summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js')
-rw-r--r--opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js
index c4a880b1..564f4030 100644
--- a/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js
+++ b/opendc-web/opendc-web-ui/src/components/app/sidebars/topology/TopologySidebar.js
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types'
import React from 'react'
import { InteractionLevel } from '../../../../shapes'
-import BuildingSidebarComponent from './building/BuildingSidebarComponent'
+import BuildingSidebar from './building/BuildingSidebar'
import {
Button,
DrawerActions,
@@ -16,9 +16,9 @@ import { AngleLeftIcon } from '@patternfly/react-icons'
import { useDispatch } from 'react-redux'
import { goDownOneInteractionLevel } from '../../../../redux/actions/interaction-level'
import { backButton } from './TopologySidebar.module.scss'
-import RoomSidebarContainer from './room/RoomSidebarContainer'
-import RackSidebarContainer from './rack/RackSidebarContainer'
-import MachineSidebarContainer from './machine/MachineSidebarContainer'
+import RoomSidebar from './room/RoomSidebar'
+import RackSidebar from './rack/RackSidebar'
+import MachineSidebar from './machine/MachineSidebar'
const name = {
BUILDING: 'Building',
@@ -27,21 +27,21 @@ const name = {
MACHINE: 'Machine',
}
-const TopologySidebar = ({ interactionLevel, onClose }) => {
+function TopologySidebar({ interactionLevel, onClose }) {
let sidebarContent
switch (interactionLevel.mode) {
case 'BUILDING':
- sidebarContent = <BuildingSidebarComponent />
+ sidebarContent = <BuildingSidebar />
break
case 'ROOM':
- sidebarContent = <RoomSidebarContainer />
+ sidebarContent = <RoomSidebar roomId={interactionLevel.roomId} />
break
case 'RACK':
- sidebarContent = <RackSidebarContainer />
+ sidebarContent = <RackSidebar tileId={interactionLevel.tileId} />
break
case 'MACHINE':
- sidebarContent = <MachineSidebarContainer />
+ sidebarContent = <MachineSidebar tileId={interactionLevel.tileId} position={interactionLevel.position} />
break
default:
sidebarContent = 'Missing Content'