Skip to content

Commit 5b59fb0

Browse files
committed
add chart column to logger page
1 parent a676c4a commit 5b59fb0

2 files changed

Lines changed: 40 additions & 3 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { TabLayout } from "layouts/TabLayout/TabLayout";
2+
import { ChartMenu } from "components/ChartMenu/ChartMenu";
3+
import { ReactComponent as Chart } from "assets/svg/chart.svg";
4+
import { useMemo } from "react";
5+
import { usePodDataStore } from "common";
6+
import { createSidebarSections } from "components/ChartMenu/sidebar";
7+
8+
export const ChartsColumn = () => {
9+
const podData = usePodDataStore(state => state.podData);
10+
11+
const sections = useMemo(() => {
12+
return createSidebarSections(podData);
13+
}, []);
14+
15+
const chartsColumnTabItems = [
16+
{
17+
id: "charts",
18+
name: "Charts",
19+
icon: <Chart />,
20+
component: <ChartMenu sidebarSections={sections} />,
21+
},
22+
]
23+
24+
return <TabLayout tabs={chartsColumnTabItems}></TabLayout>;
25+
};
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
import { Orientation } from "hooks/useSplit/Orientation";
2+
import { SplitLayout } from "layouts/SplitLayout/SplitLayout";
3+
import { ChartsColumn } from "pages/LoggerPage/ChartsColumn/ChartsColumn";
4+
import chart from "assets/svg/chart.svg"
15

26
export const LoggerPage = () => {
37
return (
4-
<div>LoggerPage</div>
5-
)
6-
}
8+
<SplitLayout
9+
components={[
10+
{
11+
component: <ChartsColumn />,
12+
collapsedIcon: chart,
13+
},
14+
]}
15+
orientation={Orientation.HORIZONTAL}
16+
></SplitLayout>
17+
);
18+
};

0 commit comments

Comments
 (0)