feat: rebuild frontend with react

This commit is contained in:
liumangmang
2026-04-22 09:53:06 +08:00
parent 42836aa4c3
commit 423cca97a6
81 changed files with 2907 additions and 10230 deletions
+22
View File
@@ -0,0 +1,22 @@
import http from './http'
import type { BatchCommandResponse, Connection, ConnectionCreateRequest } from '../types'
export function listConnections() {
return http.get<Connection[]>('/connections')
}
export function createConnection(payload: ConnectionCreateRequest) {
return http.post<Connection>('/connections', payload)
}
export function updateConnection(id: number, payload: ConnectionCreateRequest) {
return http.put<Connection>(`/connections/${id}`, payload)
}
export function deleteConnection(id: number) {
return http.delete<{ message: string }>(`/connections/${id}`)
}
export function executeBatchCommand(connectionIds: number[], command: string) {
return http.post<BatchCommandResponse>('/connections/batch-command', { connectionIds, command })
}