Skip to content

Commit

Permalink
remove N/A
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciareinoso committed Jan 15, 2025
1 parent ae40842 commit 74e9ca3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
13 changes: 7 additions & 6 deletions components/NetworkSliceGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
<MainTable
headers={[
{
content: deviceGroup?.["group-name"] || "N/A",
content: deviceGroup?.["group-name"] || "",
style: { textTransform: "none" },
},
{
content:
Expand All @@ -177,7 +178,7 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
content:
deviceGroup?.["ip-domain-expanded"]?.[
"ue-ip-pool"
] || "N/A",
] || "",

className: "u-align--right",
},
Expand All @@ -190,7 +191,7 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
content:
deviceGroup?.["ip-domain-expanded"]?.[
"dns-primary"
] || "N/A",
] || "",

className: "u-align--right",
},
Expand All @@ -203,7 +204,7 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
content:
deviceGroup?.["ip-domain-expanded"]?.[
"mtu"
] || "N/A",
] || "",

className: "u-align--right",
},
Expand All @@ -222,7 +223,7 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
"ue-dnn-qos"
]?.["dnn-mbr-downlink"] / 1_000_000
} Mbps`
: "N/A",
: "",
className: "u-align--right",
},
],
Expand All @@ -240,7 +241,7 @@ export const NetworkSliceGroups: React.FC<NetworkSliceTableProps> = ({
"ue-dnn-qos"
]?.["dnn-mbr-uplink"] / 1_000_000
} Mbps`
: "N/A",
: "",
className: "u-align--right",
},
],
Expand Down
18 changes: 11 additions & 7 deletions components/NetworkSliceTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const NetworkSliceTable: React.FC<NetworkSliceTableProps> = ({
columns: [
{ content: "MCC" },
{
content: slice["site-info"]?.plmn.mcc || "N/A",
content: slice["site-info"]?.plmn.mcc || "",
className: "u-align--right",
},
],
Expand All @@ -66,7 +66,7 @@ export const NetworkSliceTable: React.FC<NetworkSliceTableProps> = ({
columns: [
{ content: "MNC" },
{
content: slice["site-info"]?.plmn.mnc || "N/A",
content: slice["site-info"]?.plmn.mnc || "",
className: "u-align--right",
},
],
Expand All @@ -76,10 +76,14 @@ export const NetworkSliceTable: React.FC<NetworkSliceTableProps> = ({
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",
},
],
Expand All @@ -90,7 +94,7 @@ export const NetworkSliceTable: React.FC<NetworkSliceTableProps> = ({
{ content: "gNodeBs" },
{
content:
slice?.["site-info"]?.gNodeBs?.length.toString() || "N/A",
slice?.["site-info"]?.gNodeBs?.length.toString() || "0",
className: "u-align--right",
},
],
Expand Down

0 comments on commit 74e9ca3

Please sign in to comment.