Skip to content

Commit

Permalink
fix: show component status and reason in sidebar
Browse files Browse the repository at this point in the history
Fixes #2370
  • Loading branch information
mainawycliffe authored and moshloop committed Oct 25, 2024
1 parent 38183bf commit 40e28ee
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/components/Topology/Sidebar/TopologyDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Status } from "@flanksource-ui/components/Status";
import { useMemo } from "react";
import { BsCardList } from "react-icons/bs";
import { Link } from "react-router-dom";
Expand Down Expand Up @@ -180,6 +181,29 @@ export default function TopologyDetails({
]}
/>

{topology.health && (
<DisplayDetailsRow
items={[
{
label: "Status",
value: (
<>
<Status
status={topology.health}
statusText={topology.health}
/>
{topology.status_reason && (
<p className="ml-1 text-sm text-gray-600">
{topology.status_reason}
</p>
)}
</>
)
}
]}
/>
)}

<DisplayGroupedProperties items={formattedProperties} />

{formattedLabels.length > 0 && (
Expand Down

0 comments on commit 40e28ee

Please sign in to comment.