feat: 修改主机额外配置.
This commit is contained in:
@@ -24,12 +24,12 @@ export function getCurrentAuthorizedHost() {
|
||||
* 查询当前用户已授权的主机秘钥
|
||||
*/
|
||||
export function getCurrentAuthorizedHostKey() {
|
||||
return axios.get<HostKeyQueryResponse>('/asset/authorized-data/current-host-key');
|
||||
return axios.get<Array<HostKeyQueryResponse>>('/asset/authorized-data/current-host-key');
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户已授权的主机身份
|
||||
*/
|
||||
export function getCurrentAuthorizedHostIdentity() {
|
||||
return axios.get<HostIdentityQueryResponse>('/asset/authorized-data/current-host-identity');
|
||||
return axios.get<Array<HostIdentityQueryResponse>>('/asset/authorized-data/current-host-identity');
|
||||
}
|
||||
|
||||
@@ -8,9 +8,48 @@ export interface HostAliasUpdateRequest {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主机拓展信息查询请求
|
||||
*/
|
||||
export interface HostExtraQueryRequest {
|
||||
hostId?: number;
|
||||
item: string;
|
||||
items?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主机拓展信息更新请求
|
||||
*/
|
||||
export interface HostExtraUpdateRequest {
|
||||
hostId?: number;
|
||||
item: string;
|
||||
extra: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主机别名
|
||||
*/
|
||||
export function updateHostAlias(request: HostAliasUpdateRequest) {
|
||||
return axios.put('/asset/host-extra/update-alias', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主机拓展信息
|
||||
*/
|
||||
export function getHostExtraItem<T>(params: HostExtraQueryRequest) {
|
||||
return axios.get<T>('/asset/host-extra/get', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取多个主机拓展信息
|
||||
*/
|
||||
export function getHostExtraItemList(request: HostExtraQueryRequest) {
|
||||
return axios.post<Record<string, Record<string, any>>>('/asset/host-extra/list', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主机拓展信息
|
||||
*/
|
||||
export function updateHostExtra(request: HostExtraUpdateRequest) {
|
||||
return axios.put('/asset/host-extra/update', request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user