diff --git a/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.tsx b/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.tsx
index 963d9ea65a..bc5e3e1468 100644
--- a/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.tsx
+++ b/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.tsx
@@ -104,6 +104,16 @@ export function MetricsTabs({
return null;
}
+ const canShow =
+ networkUtilization !== undefined &&
+ networkThroughput !== undefined &&
+ isFinite(networkUtilization) &&
+ isFinite(networkThroughput);
+
+ if (!canShow) {
+ return null;
+ }
+
if (isServerless) {
return ;
}
diff --git a/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/components/NetworkTab.tsx b/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/components/NetworkTab.tsx
index 7f6d4a9778..1d22b61dbd 100644
--- a/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/components/NetworkTab.tsx
+++ b/src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/components/NetworkTab.tsx
@@ -5,8 +5,6 @@ import {cn} from '../../../../../../utils/cn';
import {UtilizationTabCard} from '../../TabCard/UtilizationTabCard';
import i18n from '../../i18n';
-import {PlaceholderTab} from './PlaceholderTab';
-
import '../MetricsTabs.scss';
const b = cn('tenant-metrics-tabs');
@@ -14,22 +12,11 @@ const b = cn('tenant-metrics-tabs');
interface NetworkTabProps {
to: string;
active: boolean;
- networkUtilization?: number;
- networkThroughput?: number;
+ networkUtilization: number;
+ networkThroughput: number;
}
export function NetworkTab({to, active, networkUtilization, networkThroughput}: NetworkTabProps) {
- const canShow =
- networkUtilization !== undefined &&
- networkThroughput !== undefined &&
- isFinite(networkUtilization) &&
- isFinite(networkThroughput) &&
- networkThroughput > 0;
-
- if (!canShow) {
- return ;
- }
-
const fillPercent = networkUtilization * 100;
const legendText = formatBytes({value: networkThroughput, withSpeedLabel: true});