refactor: update valid values for link_state

main
Josue 4 years ago committed by Tsu-ba-me
parent 6b2d3700f9
commit 7199e1899e
  1. 2
      striker-ui/components/Network/Network.tsx
  2. 6
      striker-ui/types/AnvilNetwork.d.ts

@ -37,6 +37,8 @@ const selectDecorator = (state: string): Colours => {
return 'ok'; return 'ok';
case 'degraded': case 'degraded':
return 'warning'; return 'warning';
case 'down':
return 'error';
default: default:
return 'warning'; return 'warning';
} }

@ -2,7 +2,7 @@ declare type AnvilNetworkBondLink = {
link_name: string; link_name: string;
link_uuid: string; link_uuid: string;
link_speed: number; link_speed: number;
link_state: 'optimal' | 'degraded'; link_state: 'optimal' | 'degraded' | 'down';
is_active: boolean; is_active: boolean;
}; };
@ -26,7 +26,7 @@ declare type ProcessedBond = {
bond_name: string; bond_name: string;
bond_uuid: string; bond_uuid: string;
bond_speed: number; bond_speed: number;
bond_state: 'optimal' | 'degraded'; bond_state: 'optimal' | 'degraded' | 'down';
hosts: Array<{ hosts: Array<{
host_name: string; host_name: string;
host_uuid: string; host_uuid: string;
@ -34,7 +34,7 @@ declare type ProcessedBond = {
link_name: string; link_name: string;
link_uuid: string; link_uuid: string;
link_speed: number; link_speed: number;
link_state: 'optimal' | 'degraded'; link_state: 'optimal' | 'degraded' | 'down';
is_active: boolean; is_active: boolean;
}; };
}>; }>;

Loading…
Cancel
Save