feat: update delivery and resource frontends
This commit is contained in:
@@ -83,6 +83,19 @@ export interface DeliveryTaskSnapshot {
|
||||
events: TaskEvent[]
|
||||
}
|
||||
|
||||
export interface MySQLServiceLedgerItem {
|
||||
name: string
|
||||
datacenter: string
|
||||
business_tag: string
|
||||
instances: number
|
||||
healthy: number
|
||||
address: string
|
||||
status: string
|
||||
status_class: string
|
||||
version: string
|
||||
namespace: string
|
||||
}
|
||||
|
||||
export const deliveryApi = {
|
||||
async listTargets(): Promise<DeliveryTarget[]> {
|
||||
const data = await authRequest('/auth/api/v1/delivery/targets?component=mysql')
|
||||
@@ -115,6 +128,11 @@ export const deliveryApi = {
|
||||
return Array.isArray(data.items) ? data.items : []
|
||||
},
|
||||
|
||||
async listMySQLServices(businessLineId: number): Promise<MySQLServiceLedgerItem[]> {
|
||||
const data = await authRequest(`/auth/api/v1/delivery/business-lines/${businessLineId}/mysql-services`)
|
||||
return Array.isArray(data.items) ? data.items : []
|
||||
},
|
||||
|
||||
async getTask(taskId: string): Promise<{ task: DeliveryTask; events: TaskEvent[] }> {
|
||||
const data = await authRequest(`/auth/api/v1/delivery/tasks/${encodeURIComponent(taskId)}`)
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user