feat: 主机别名.

This commit is contained in:
lijiahangmax
2023-12-19 01:06:09 +08:00
parent bbb56d63bf
commit 934c59cf96
9 changed files with 206 additions and 66 deletions

View File

@@ -46,8 +46,13 @@ export interface HostQueryResponse extends TableData {
creator: string;
updater: string;
favorite: boolean;
alias: string;
tags: Array<{ id: number, name: string }>;
groupIdList: Array<number>;
editable: boolean;
loading: boolean;
modCount: number;
}
/**
@@ -72,6 +77,14 @@ export interface HostConfigQueryResponse {
config: Record<string, any>;
}
/**
* 主机别名更新请求
*/
export interface HostAliasUpdateRequest {
id?: number;
name?: string;
}
/**
* 创建主机
*/
@@ -114,6 +127,13 @@ export function deleteHost(id: number) {
return axios.delete('/asset/host/delete', { params: { id } });
}
/**
* 修改主机别名
*/
export function updateHostAlias(request: HostAliasUpdateRequest) {
return axios.put('/asset/host/update-alias', request);
}
/**
* 查询主机配置
*/