diff --git a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.test.tsx b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.test.tsx index b825b1107f..f58ec6b762 100644 --- a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.test.tsx +++ b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.test.tsx @@ -248,4 +248,6 @@ describe("node is a machine", () => { expect(screen.getByText(DetailsCardLabels.Pool)).toBeInTheDocument(); expect(screen.getByText("swimming")).toBeInTheDocument(); }); + + it.todo("shows the status of kernel crash dumps on the machine"); }); diff --git a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx index f6b444f7a2..4116088ff3 100644 --- a/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx +++ b/src/app/base/components/node/OverviewCard/DetailsCard/DetailsCard.tsx @@ -1,4 +1,4 @@ -import { Spinner } from "@canonical/react-components"; +import { Icon, Spinner } from "@canonical/react-components"; import classNames from "classnames"; import { useSelector } from "react-redux"; import { Link } from "react-router-dom"; @@ -36,6 +36,7 @@ export enum Labels { PowerTypeLink = "Power type ›", Tags = "Tags", TagsLink = "Tags ›", + KernelCrashDump = "Kernel crash dump", } const DetailsCard = ({ node }: Props): JSX.Element => { @@ -59,6 +60,7 @@ const DetailsCard = ({ node }: Props): JSX.Element => { node.power_type ); const tagsDisplay = getTagsDisplay(machineTags); + const kernelCrashDumpEnabled = true; useFetchActions([generalActions.fetchPowerTypes, tagActions.fetch]); @@ -196,6 +198,22 @@ const DetailsCard = ({ node }: Props): JSX.Element => { )} + {import.meta.env.VITE_APP_KERNEL_CRASH_DUMP_ENABLED === "true" && ( +
+
{Labels.KernelCrashDump}
+ + {kernelCrashDumpEnabled ? ( + <> + enabled + + ) : ( + <> + disabled + + )} + +
+ )} ); };