blob: 81e510a186f75a13804f4cc5b49227294afd67fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import React from "react";
import BuildingSidebarContainer from "../../../../containers/app/sidebars/topology/building/BuildingSidebarContainer";
import MachineSidebarContainer from "../../../../containers/app/sidebars/topology/machine/MachineSidebarContainer";
import RackSidebarContainer from "../../../../containers/app/sidebars/topology/rack/RackSidebarContainer";
import RoomSidebarContainer from "../../../../containers/app/sidebars/topology/room/RoomSidebarContainer";
import Sidebar from "../Sidebar";
const TopologySidebarComponent = ({ interactionLevel }) => {
let sidebarContent;
switch (interactionLevel.mode) {
case "BUILDING":
sidebarContent = <BuildingSidebarContainer />;
break;
case "ROOM":
sidebarContent = <RoomSidebarContainer />;
break;
case "RACK":
sidebarContent = <RackSidebarContainer />;
break;
case "MACHINE":
sidebarContent = <MachineSidebarContainer />;
break;
default:
sidebarContent = "Missing Content";
}
return <Sidebar isRight={true}>{sidebarContent}</Sidebar>;
};
export default TopologySidebarComponent;
|