refactor: create Node type as subtype of Anvil

main
Josue 4 years ago committed by Tsu-ba-me
parent 799f6d65aa
commit 306ca7c4f9
  1. 4
      striker-ui/types/AnvilListItem.d.ts
  2. 4
      striker-ui/types/AnvilListItemNode.d.ts
  3. 4
      striker-ui/types/AnvilStatus.d.ts
  4. 5
      striker-ui/types/AnvilStatusNode.d.ts

@ -1,8 +1,8 @@
declare type AnvilListItem = {
anvil_name: string;
anvil_uuid: string;
anvil_state: string;
nodes: Array<{
node_name: string;
node_uuid: string;
AnvilListItemNode;
}>;
};

@ -0,0 +1,4 @@
declare type AnvilListItemNode = {
node_name: string;
node_uuid: string;
};

@ -1,8 +1,6 @@
declare type AnvilStatus = {
anvil_state: 'optimal' | 'not_ready' | 'degraded';
nodes: Array<{
state: 'unknown' | 'off' | 'on' | 'accessible' | 'ready';
state_percent: number;
state_message: string;
AnvilStatusNode;
}>;
};

@ -0,0 +1,5 @@
declare type AnvilStatusNode = {
state: 'unknown' | 'off' | 'on' | 'accessible' | 'ready';
state_percent: number;
state_message: string;
};
Loading…
Cancel
Save