possible fix for arm? :P
This commit is contained in:
		| @@ -52,7 +52,7 @@ $white: #fff; | |||||||
|   justify-content: left; |   justify-content: left; | ||||||
|   padding-left: 4px; |   padding-left: 4px; | ||||||
|   text-align: center; |   text-align: center; | ||||||
|   color: $light-blue; |   color: $medium-blue; | ||||||
|   background-color: transparent; |   background-color: transparent; | ||||||
|   margin-left: 2px; |   margin-left: 2px; | ||||||
| } | } | ||||||
| @@ -113,7 +113,7 @@ $white: #fff; | |||||||
|   justify-content: center; |   justify-content: center; | ||||||
|   align-items: center; |   align-items: center; | ||||||
|   margin: 0; |   margin: 0; | ||||||
|   background-color: $dark-blue; |   background-color: $medium-blue; | ||||||
| } | } | ||||||
|  |  | ||||||
| .navbar-settings span { | .navbar-settings span { | ||||||
|   | |||||||
| @@ -46,9 +46,14 @@ export default class NavBar extends Component { | |||||||
|     try { |     try { | ||||||
|       const message = JSON.parse(event.data); |       const message = JSON.parse(event.data); | ||||||
|       if (message.type === "mode") { |       if (message.type === "mode") { | ||||||
|         let mode = JSON.parse(message.data).mode; |         let mode = JSON.parse(message.data).mode.toLowerCase(); | ||||||
|         if (mode === "Idle") { |         console.log("Current Mode: " + mode); | ||||||
|  |         if (mode === "idle") { | ||||||
|  |           setTimeout(() => { | ||||||
|  |             if (mode === "idle") { | ||||||
|               this.closeModal("modalOpen_activeArm"); |               this.closeModal("modalOpen_activeArm"); | ||||||
|  |             } | ||||||
|  |           }, 3000); | ||||||
|         } else { |         } else { | ||||||
|           this.openModal("modalOpen_activeArm"); |           this.openModal("modalOpen_activeArm"); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -2,10 +2,6 @@ import React, { Component } from "react"; | |||||||
| import NavBar from "../components/NavBar"; | import NavBar from "../components/NavBar"; | ||||||
| import StatisticsComponent from "../components/StatisticsComponent"; | import StatisticsComponent from "../components/StatisticsComponent"; | ||||||
| import "../assets/stylesheets/app.scss"; | import "../assets/stylesheets/app.scss"; | ||||||
| import { |  | ||||||
|   Provider, |  | ||||||
|   KeepAlive, |  | ||||||
| } from 'react-keep-alive'; |  | ||||||
|  |  | ||||||
| export default class StatisticsRoute extends Component { | export default class StatisticsRoute extends Component { | ||||||
|   constructor(props) { |   constructor(props) { | ||||||
| @@ -17,11 +13,7 @@ export default class StatisticsRoute extends Component { | |||||||
|     return ( |     return ( | ||||||
|       <div className="container"> |       <div className="container"> | ||||||
|         <NavBar socket={this.props.socket} /> |         <NavBar socket={this.props.socket} /> | ||||||
|         <Provider> |         <StatisticsComponent socket={this.props.socket} /> | ||||||
|           <KeepAlive name="Grafana"> |  | ||||||
|             <StatisticsComponent socketHandler={this.props.socket} /> |  | ||||||
|           </KeepAlive> |  | ||||||
|         </Provider> |  | ||||||
|       </div> |       </div> | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user