refactor: fix ReplicatedStorage type to handle one resource instead of a list

main
Josue 4 years ago
parent 7608d643fd
commit 90e6abee2b
  1. 22
      striker-ui/types/AnvilReplicatedStorage.d.ts

@ -1,34 +1,34 @@
declare type AnvilConnection = { declare type AnvilConnection = {
protocol: 'async_a' | 'sync_c'; protocol: 'async_a' | 'sync_c';
connection_state: string;
fencing: string;
targets: Array<{ targets: Array<{
target_name: string; target_name: string;
states: { target_host_uuid: string;
connection: string; disk_state: string;
disk: string;
};
role: string; role: string;
logical_volume_path: string; logical_volume_path?: string;
}>; }>;
resync?: { resync?: {
rate: number; rate: number;
percent_complete: number; percent_complete: number;
time_remain: number; time_remain: number;
oos_size: number;
}; };
}; };
declare type AnvilVolume = { declare type AnvilVolume = {
index: number; number: number;
drbd_device_path: string; drbd_device_path: string;
drbd_device_minor: number; drbd_device_minor: number;
size: number; size: number;
connections: Array<AnvilConnection>; connections: Array<AnvilConnection>;
}; };
declare type AnvilResource = { declare type AnvilReplicatedStorage = {
resource_name: string; resource_name: string;
resource_host_uuid: string;
is_active: boolean;
timestamp: number;
volumes: Array<AnvilVolume>; volumes: Array<AnvilVolume>;
}; };
declare type AnvilReplicatedStorage = {
resources: Array<AnvilResource>;
};

Loading…
Cancel
Save