Adding Statists Page!
This commit is contained in:
		| @@ -50,6 +50,9 @@ export default class NavBar extends Component { | ||||
|             <NavLink className="navbar-list-item" id="map" to="/map"> | ||||
|               <span id="map-s">🗺️ Map</span> | ||||
|             </NavLink> | ||||
|             <NavLink className="navbar-list-item" id="map" to="/statists"> | ||||
|               <span id="map-s">📊 Statists</span> | ||||
|             </NavLink> | ||||
|             <NavLink className="navbar-list-item" id="settings" to="/settings"> | ||||
|               <span id="settings-s">⚙️ Settings</span> | ||||
|             </NavLink> | ||||
|   | ||||
							
								
								
									
										38
									
								
								src/components/StatistsComponent.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/components/StatistsComponent.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| import React, { Component } from "react"; | ||||
| import BeldenLogo from "../assets/images/belden-white.png"; | ||||
| import "../assets/stylesheets/summary.scss"; | ||||
|  | ||||
| export default class StatistsComponent extends Component { | ||||
|   render() { | ||||
|     return ( | ||||
|       <div className="summary"> | ||||
|         <div className="summary-image"> | ||||
|           <img src={BeldenLogo} alt="Belden" /> | ||||
|         </div> | ||||
|         <div className="summary-fieldContainer"> | ||||
|           <h1 className="summary-title">Summary</h1> | ||||
|           <div className="summary-grid"> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=8" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=3" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=7" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=6" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=4" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=2" title="Belden" className="summary-iframe" /> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     ); | ||||
|   } | ||||
| } | ||||
							
								
								
									
										10
									
								
								src/index.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/index.js
									
									
									
									
									
								
							| @@ -5,6 +5,7 @@ import SummaryRoute from "./routes/SummaryRoute"; | ||||
| import BrowseRoute from "./routes/BrowseRoute"; | ||||
| import SettingsRoute from "./routes/SettingsRoute"; | ||||
| import MapRoute from "./routes/MapRoute"; | ||||
| import StatistsRoute from "./routes/StatistsRoute"; | ||||
| import CableDetailRoute from "./routes/CableDetailRoute"; | ||||
|  | ||||
| // Root | ||||
| @@ -43,6 +44,11 @@ const init = () => { | ||||
|       element: <MapRoute socket={socket}></MapRoute>, | ||||
|       // errorElement: <ErrorRoute></ErrorRoute>, | ||||
|     }, | ||||
|     { | ||||
|       path: "/statists", | ||||
|       element: <StatistsRoute socket={socket}></StatistsRoute>, | ||||
|       // errorElement: <ErrorRoute></ErrorRoute>, | ||||
|     }, | ||||
|     { | ||||
|       path: "/browse/cable/:cablePos", | ||||
|       element: <CableDetailRoute socket={socket} />, | ||||
| @@ -55,4 +61,6 @@ const init = () => { | ||||
|       <RouterProvider router={router} /> | ||||
|     </div> | ||||
|   ); | ||||
| }; | ||||
| }; | ||||
|  | ||||
| init(); | ||||
							
								
								
									
										20
									
								
								src/routes/StatistsRoute.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/routes/StatistsRoute.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| import React, { Component } from "react"; | ||||
| import NavBar from "../components/NavBar"; | ||||
| import StatistsComponent from "../components/StatistsComponent"; | ||||
| import "../assets/stylesheets/app.scss"; | ||||
|  | ||||
| export default class StatistsRoute extends Component { | ||||
|   constructor(props) { | ||||
|     super(props); | ||||
|     document.title = "Summary"; | ||||
|   } | ||||
|  | ||||
|   render() { | ||||
|     return ( | ||||
|       <div className="container"> | ||||
|         <NavBar /> | ||||
|         <StatistsComponent socketHandler={this.props.socket} /> | ||||
|       </div> | ||||
|     ); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user