File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 font-size : 12px ;
3535 font-weight : bold;
3636}
37- .ui .sidebar .vertical .left .menu {
38- position : fixed;
39- top : 65px ;
40- height : calc (100vh - 65px ) !important ;
41- box-shadow : none;
42- }
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import { connect } from "react-redux";
55import { userActions } from "../_actions/user.actions.js" ;
66import "./HomePage.css" ;
77import ServiceTable from "./ServiceTable" ;
8- import NavBar from "./NavBar" ;
8+ import NavBar from "../_components/NavBar" ;
9+ import SideBar from "../_components/SideBar" ;
910import { Loader , Modal , Form } from "semantic-ui-react" ;
1011
1112class HomePage extends React . Component {
@@ -156,40 +157,11 @@ class HomePage extends React.Component {
156157 </ Modal >
157158
158159 { showSideBar && (
159- < div
160- class = "ui sidebar vertical left menu overlay visible"
161- display = "none"
162- >
163- < div class = "ui accordion" >
164- < a class = "item" >
165- < b > Home</ b >
166- </ a >
167- < a
168- class = "item"
169- onClick = { ( ) =>
170- this . changeSelectedDashboardService ( "virtualMachines" )
171- }
172- >
173- Virtual Machines
174- </ a >
175- < a
176- class = "item"
177- onClick = { ( ) =>
178- this . changeSelectedDashboardService ( "virtualNetworks" )
179- }
180- >
181- Virtual Networks
182- </ a >
183- < a
184- class = "item"
185- onClick = { ( ) =>
186- this . changeSelectedDashboardService ( "loadBalancers" )
187- }
188- >
189- Load Balancers
190- </ a >
191- </ div >
192- </ div >
160+ < SideBar
161+ changeSelectedDashboardService = { serviceName =>
162+ this . changeSelectedDashboardService ( serviceName )
163+ }
164+ />
193165 ) }
194166 < div class = "ui center aligned page grid" />
195167 < div class = "ui center aligned page grid" style = { { marginTop : 50 } } >
File renamed without changes.
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class NavBar extends Component {
3232 < div >
3333 < div class = "pusher" >
3434 < div class = "ui menu asd borderless" >
35- < a class = "item openbtn" onClick = { this . handleShowSideBar . bind ( this ) } >
35+ < a class = "item openbtn" onClick = { this . handleShowSideBar } >
3636 < i class = "icon content" />
3737 </ a >
3838 < img src = { require ( "../media/nodecloudlogo.png" ) } class = "nav-logo" />
Original file line number Diff line number Diff line change 1+ .ui .sidebar .vertical .left .menu {
2+ position : fixed;
3+ top : 65px ;
4+ height : calc (100vh - 65px ) !important ;
5+ box-shadow : none;
6+ }
Original file line number Diff line number Diff line change 1+ import React , { Component } from "react" ;
2+ import "./SideBar.css" ;
3+
4+ class SideBar extends Component {
5+ constructor ( props ) {
6+ super ( props ) ;
7+ // this._child = React.createRef();
8+ this . state = { visible : true } ;
9+ this . changeSelectedDashboardService = this . changeSelectedDashboardService . bind (
10+ this
11+ ) ;
12+ }
13+
14+ changeSelectedDashboardService ( serviceName ) {
15+ this . props . changeSelectedDashboardService ( serviceName ) ;
16+ }
17+
18+ render ( ) {
19+ return (
20+ < div >
21+ < div
22+ class = "ui sidebar vertical left menu overlay visible"
23+ display = "none"
24+ >
25+ < div class = "ui accordion" >
26+ < a class = "item" >
27+ < b > Home</ b >
28+ </ a >
29+ < a
30+ class = "item"
31+ onClick = { ( ) =>
32+ this . changeSelectedDashboardService ( "virtualMachines" )
33+ }
34+ >
35+ Virtual Machines
36+ </ a >
37+ < a
38+ class = "item"
39+ onClick = { ( ) =>
40+ this . changeSelectedDashboardService ( "virtualNetworks" )
41+ }
42+ >
43+ Virtual Networks
44+ </ a >
45+ < a
46+ class = "item"
47+ onClick = { ( ) =>
48+ this . changeSelectedDashboardService ( "loadBalancers" )
49+ }
50+ >
51+ Load Balancers
52+ </ a >
53+ </ div >
54+ </ div >
55+ </ div >
56+ ) ;
57+ }
58+ }
59+
60+ export default SideBar ;
You can’t perform that action at this time.
0 commit comments