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

Loading…
Cancel
Save