From 7199e1899e6714bc63b7f02966a1b350cac14311 Mon Sep 17 00:00:00 2001 From: Josue Date: Thu, 27 May 2021 19:01:57 -0400 Subject: [PATCH] refactor: update valid values for link_state --- striker-ui/components/Network/Network.tsx | 2 ++ striker-ui/types/AnvilNetwork.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/striker-ui/components/Network/Network.tsx b/striker-ui/components/Network/Network.tsx index 009c5b96..6f9515c4 100644 --- a/striker-ui/components/Network/Network.tsx +++ b/striker-ui/components/Network/Network.tsx @@ -37,6 +37,8 @@ const selectDecorator = (state: string): Colours => { return 'ok'; case 'degraded': return 'warning'; + case 'down': + return 'error'; default: return 'warning'; } diff --git a/striker-ui/types/AnvilNetwork.d.ts b/striker-ui/types/AnvilNetwork.d.ts index 2fcb8a49..3330c466 100644 --- a/striker-ui/types/AnvilNetwork.d.ts +++ b/striker-ui/types/AnvilNetwork.d.ts @@ -2,7 +2,7 @@ declare type AnvilNetworkBondLink = { link_name: string; link_uuid: string; link_speed: number; - link_state: 'optimal' | 'degraded'; + link_state: 'optimal' | 'degraded' | 'down'; is_active: boolean; }; @@ -26,7 +26,7 @@ declare type ProcessedBond = { bond_name: string; bond_uuid: string; bond_speed: number; - bond_state: 'optimal' | 'degraded'; + bond_state: 'optimal' | 'degraded' | 'down'; hosts: Array<{ host_name: string; host_uuid: string; @@ -34,7 +34,7 @@ declare type ProcessedBond = { link_name: string; link_uuid: string; link_speed: number; - link_state: 'optimal' | 'degraded'; + link_state: 'optimal' | 'degraded' | 'down'; is_active: boolean; }; }>;