|
@@ -10,20 +10,22 @@ import NodeList from "./NodeList";
|
|
|
import { NamespaceList } from "./NamespaceList";
|
|
import { NamespaceList } from "./NamespaceList";
|
|
|
import ClusterSettings from "./ClusterSettings";
|
|
import ClusterSettings from "./ClusterSettings";
|
|
|
import useAuth from "shared/auth/useAuth";
|
|
import useAuth from "shared/auth/useAuth";
|
|
|
|
|
+import Metrics from "./Metrics";
|
|
|
|
|
|
|
|
-type TabEnum = "nodes" | "settings" | "namespaces";
|
|
|
|
|
|
|
+type TabEnum = "nodes" | "settings" | "namespaces" | "metrics";
|
|
|
|
|
|
|
|
const tabOptions: {
|
|
const tabOptions: {
|
|
|
label: string;
|
|
label: string;
|
|
|
value: TabEnum;
|
|
value: TabEnum;
|
|
|
}[] = [
|
|
}[] = [
|
|
|
{ label: "Nodes", value: "nodes" },
|
|
{ label: "Nodes", value: "nodes" },
|
|
|
|
|
+ { label: "Metrics", value: "metrics" },
|
|
|
{ label: "Namespaces", value: "namespaces" },
|
|
{ label: "Namespaces", value: "namespaces" },
|
|
|
{ label: "Settings", value: "settings" },
|
|
{ label: "Settings", value: "settings" },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
export const Dashboard: React.FunctionComponent = () => {
|
|
export const Dashboard: React.FunctionComponent = () => {
|
|
|
- const [currentTab, setCurrentTab] = useState<TabEnum>("nodes");
|
|
|
|
|
|
|
+ const [currentTab, setCurrentTab] = useState<TabEnum>("metrics");
|
|
|
const [currentTabOptions, setCurrentTabOptions] = useState(tabOptions);
|
|
const [currentTabOptions, setCurrentTabOptions] = useState(tabOptions);
|
|
|
const [isAuthorized] = useAuth();
|
|
const [isAuthorized] = useAuth();
|
|
|
|
|
|
|
@@ -32,6 +34,8 @@ export const Dashboard: React.FunctionComponent = () => {
|
|
|
switch (currentTab) {
|
|
switch (currentTab) {
|
|
|
case "settings":
|
|
case "settings":
|
|
|
return <ClusterSettings />;
|
|
return <ClusterSettings />;
|
|
|
|
|
+ case "metrics":
|
|
|
|
|
+ return <Metrics />;
|
|
|
case "namespaces":
|
|
case "namespaces":
|
|
|
return <NamespaceList />;
|
|
return <NamespaceList />;
|
|
|
case "nodes":
|
|
case "nodes":
|