feat(system-info): add stale instance cleanup actions (#5953)
This commit is contained in:
+18
-1
@@ -18,7 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { api } from '@/lib/api'
|
||||
|
||||
import type { SystemInstanceListResponse } from './types'
|
||||
import type {
|
||||
SystemInstanceDeleteResponse,
|
||||
SystemInstanceListResponse,
|
||||
} from './types'
|
||||
|
||||
export async function listSystemInstances() {
|
||||
const res = await api.get<SystemInstanceListResponse>(
|
||||
@@ -26,3 +29,17 @@ export async function listSystemInstances() {
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function deleteStaleSystemInstances() {
|
||||
const res = await api.delete<SystemInstanceDeleteResponse>(
|
||||
'/api/system-info/stale-instances'
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function deleteStaleSystemInstance(nodeName: string) {
|
||||
const res = await api.delete<SystemInstanceDeleteResponse>(
|
||||
`/api/system-info/instances/${encodeURIComponent(nodeName)}`
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user