-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.jsx
46 lines (44 loc) · 1.18 KB
/
index.jsx
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from "react";
import Overview from "./overview";
import Advanced from "./advanced";
import Process from "./process";
import { formatMessage } from "umi/locale";
import Monitor from "@/components/Overview/Monitor";
import StatisticBar from "./statistic_bar";
const panes = [
{ title: "Overview", component: Overview, key: "overview" },
{ title: "Advanced", component: Advanced, key: "advanced" },
{ title: "Process", component: Process, key: "process" },
];
export default (props) => {
return (
<Monitor
selectedCluster={{}}
formatState={(state) => {
return {
...state,
hostID: props.match.params?.host_id || "",
hostName: state?.param?.host_name || "",
};
}}
getBreadcrumbList={(state) => [
{
title: formatMessage({ id: "menu.home" }),
href: "/",
},
{
title: formatMessage({ id: "menu.cluster" }),
},
{
title: "Hosts",
},
{
title: state.hostName || state.hostID,
},
]}
StatisticBar={StatisticBar}
panes={panes}
checkPaneParams={(params) => !!params.hostID}
/>
);
};