From 74e9ca33f37736f325ad790d57ac39e08e97a3cf Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 15 Jan 2025 12:20:55 +0100 Subject: [PATCH] remove N/A --- components/NetworkSliceGroups.tsx | 13 +++++++------ components/NetworkSliceTable.tsx | 18 +++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/components/NetworkSliceGroups.tsx b/components/NetworkSliceGroups.tsx index 1271a03..4fc7aed 100644 --- a/components/NetworkSliceGroups.tsx +++ b/components/NetworkSliceGroups.tsx @@ -157,7 +157,8 @@ export const NetworkSliceGroups: React.FC = ({ = ({ content: deviceGroup?.["ip-domain-expanded"]?.[ "ue-ip-pool" - ] || "N/A", + ] || "", className: "u-align--right", }, @@ -190,7 +191,7 @@ export const NetworkSliceGroups: React.FC = ({ content: deviceGroup?.["ip-domain-expanded"]?.[ "dns-primary" - ] || "N/A", + ] || "", className: "u-align--right", }, @@ -203,7 +204,7 @@ export const NetworkSliceGroups: React.FC = ({ content: deviceGroup?.["ip-domain-expanded"]?.[ "mtu" - ] || "N/A", + ] || "", className: "u-align--right", }, @@ -222,7 +223,7 @@ export const NetworkSliceGroups: React.FC = ({ "ue-dnn-qos" ]?.["dnn-mbr-downlink"] / 1_000_000 } Mbps` - : "N/A", + : "", className: "u-align--right", }, ], @@ -240,7 +241,7 @@ export const NetworkSliceGroups: React.FC = ({ "ue-dnn-qos" ]?.["dnn-mbr-uplink"] / 1_000_000 } Mbps` - : "N/A", + : "", className: "u-align--right", }, ], diff --git a/components/NetworkSliceTable.tsx b/components/NetworkSliceTable.tsx index cb40c6a..1a806c8 100644 --- a/components/NetworkSliceTable.tsx +++ b/components/NetworkSliceTable.tsx @@ -56,7 +56,7 @@ export const NetworkSliceTable: React.FC = ({ columns: [ { content: "MCC" }, { - content: slice["site-info"]?.plmn.mcc || "N/A", + content: slice["site-info"]?.plmn.mcc || "", className: "u-align--right", }, ], @@ -66,7 +66,7 @@ export const NetworkSliceTable: React.FC = ({ columns: [ { content: "MNC" }, { - content: slice["site-info"]?.plmn.mnc || "N/A", + content: slice["site-info"]?.plmn.mnc || "", className: "u-align--right", }, ], @@ -76,10 +76,14 @@ export const NetworkSliceTable: React.FC = ({ columns: [ { content: "UPF" }, { - content: `${slice["site-info"]?.upf?.["upf-name"] || "N/A"}:${ - slice["site-info"]?.upf?.["upf-port"] || "N/A" - }`, - + content: (() => { + const upfName = slice["site-info"]?.upf?.["upf-name"] ?? ""; + const upfPort = slice["site-info"]?.upf?.["upf-port"] ?? ""; + if (upfName === "" && upfPort === "") { + return ""; + } + return `${upfName}:${upfPort}`; + })(), className: "u-align--right", }, ], @@ -90,7 +94,7 @@ export const NetworkSliceTable: React.FC = ({ { content: "gNodeBs" }, { content: - slice?.["site-info"]?.gNodeBs?.length.toString() || "N/A", + slice?.["site-info"]?.gNodeBs?.length.toString() || "0", className: "u-align--right", }, ],