From 8b07a5867cfedaae4b260cf8345b4d6dbde209f9 Mon Sep 17 00:00:00 2001 From: Domonkos Gulyas <domonkos.gulyas@ess.eu> Date: Thu, 21 Sep 2023 11:01:22 +0000 Subject: [PATCH] CE-2132: Display network scope in host table --- src/components/host/HostTable.js | 4 +++- src/components/host/HostTable.spec.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/host/HostTable.js b/src/components/host/HostTable.js index df92a8c3..b2b4254c 100644 --- a/src/components/host/HostTable.js +++ b/src/components/host/HostTable.js @@ -14,7 +14,8 @@ const columns = [ }, { field: "hostName", headerName: "Host" }, { field: "description", headerName: "Description" }, - { field: "network", headerName: "Network" } + { field: "network", headerName: "Network" }, + { field: "scope", headerName: "Network scope" } ]; export function rowDescription(description) { @@ -46,6 +47,7 @@ export function createRow(hostContainer) { host: host, description: rowDescription(host.description), network: noWrapText(host.network), + scope: noWrapText(host.scope), discrepancy: hostContainer.alertSeverity === "WARNING", inconsistentState: hostContainer.alertSeverity === "ERROR", shortenLongData: true, diff --git a/src/components/host/HostTable.spec.js b/src/components/host/HostTable.spec.js index 01b7dd12..92e2e743 100644 --- a/src/components/host/HostTable.spec.js +++ b/src/components/host/HostTable.spec.js @@ -3,7 +3,7 @@ import { composeStories } from "@storybook/testing-react"; import * as stories from "../../stories/components/common/host/HostTable.stories"; const { Populated } = composeStories(stories); -const textColumns = ["host", "description", "network"]; +const textColumns = ["host", "description", "network", "scope"]; const columns = ["status"].concat(textColumns); const firstRowData = [ "Active", -- GitLab