fix: did not cache workers and clusters in model files

This commit is contained in:
jialin
2025-12-31 10:23:15 +08:00
parent 41ebceca8f
commit 66e8f83395
2 changed files with 46 additions and 24 deletions
+13
View File
@@ -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;
}[]
>([]);