fix: did not cache workers and clusters in model files
This commit is contained in:
@@ -20,17 +20,30 @@ export const getRequestId = () => {
|
||||
return store.get(requestIdAtom);
|
||||
};
|
||||
|
||||
// store for cluster list: res.items from api
|
||||
export const clusterListAtom = atom<
|
||||
{
|
||||
label: string;
|
||||
value: number;
|
||||
provider: string;
|
||||
state: string;
|
||||
is_default: boolean;
|
||||
workers: number;
|
||||
ready_workers: number;
|
||||
gpus: number;
|
||||
}[]
|
||||
>([]);
|
||||
|
||||
// store for worker list: res.items from api
|
||||
export const workerListAtom = atom<
|
||||
{
|
||||
label: string;
|
||||
value: number;
|
||||
cluster_id: number;
|
||||
state: string;
|
||||
id: number;
|
||||
labels: Record<string, any>;
|
||||
name: string;
|
||||
}[]
|
||||
>([]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user