mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-14 13:20:05 +01:00
feat: move jobs to action based
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -8,9 +8,10 @@ import type {
|
||||
DtoSetKubeconfigRequest,
|
||||
DtoUpdateClusterRequest,
|
||||
} from "@/sdk"
|
||||
import { makeClusterApi } from "@/sdkClient"
|
||||
import { makeClusterApi, makeClusterRunsApi } from "@/sdkClient"
|
||||
|
||||
const clusters = makeClusterApi()
|
||||
const clusterRuns = makeClusterRunsApi()
|
||||
|
||||
export const clustersApi = {
|
||||
// --- basic CRUD ---
|
||||
@@ -147,4 +148,20 @@ export const clustersApi = {
|
||||
withRefresh(async () => {
|
||||
return await clusters.detachNodePool({ clusterID, nodePoolID })
|
||||
}),
|
||||
|
||||
// --- cluster runs / actions ---
|
||||
listClusterRuns: (clusterID: string) =>
|
||||
withRefresh(async () => {
|
||||
return await clusterRuns.listClusterRuns({ clusterID })
|
||||
}),
|
||||
|
||||
getClusterRun: (clusterID: string, runID: string) =>
|
||||
withRefresh(async () => {
|
||||
return await clusterRuns.getClusterRun({ clusterID, runID })
|
||||
}),
|
||||
|
||||
runClusterAction: (clusterID: string, actionID: string) =>
|
||||
withRefresh(async () => {
|
||||
return await clusterRuns.runClusterAction({ clusterID, actionID })
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user