Files
orion-visor/orion-visor-ui/src/api/asset/host-extra.ts

89 lines
1.7 KiB
TypeScript
Raw Normal View History

2023-12-20 12:20:38 +08:00
import axios from 'axios';
2023-12-25 19:03:24 +08:00
/**
*
*/
export interface HostExtraQueryRequest {
hostId?: number;
item: string;
}
/**
*
*/
export interface HostExtraUpdateRequest {
hostId?: number;
item: string;
extra: string;
}
2025-03-28 14:34:51 +08:00
// SSH 额外配置
export interface HostSshExtraSettingModel {
authType: string;
username: string;
keyId: number;
identityId: number;
}
2025-06-25 14:49:36 +08:00
// RDP 额外配置
export interface HostRdpExtraSettingModel {
authType: string;
identityId: number;
lowBandwidthMode: boolean;
2025-06-29 02:24:50 +08:00
initialProgram: string;
2025-06-25 14:49:36 +08:00
}
2025-07-04 17:43:59 +08:00
// VNC 额外配置
export interface HostVncExtraSettingModel {
port: number;
lowBandwidthMode: boolean;
2025-07-08 00:34:30 +08:00
swapRedBlue: boolean;
2025-07-04 17:43:59 +08:00
}
2025-03-28 14:34:51 +08:00
// 标签额外配置
export interface HostLabelExtraSettingModel {
alias: string;
color: string;
}
// 标签规格模型
export interface HostSpecExtraModel {
2025-04-03 01:38:37 +08:00
sn: string;
2025-11-01 22:52:50 +08:00
vendor: string;
model: string;
2025-03-28 14:34:51 +08:00
osName: string;
cpuCount: number;
cpuPhysicalCore: number;
cpuLogicalCore: number;
2025-03-28 14:34:51 +08:00
cpuFrequency: number;
cpuModel: string;
memorySize: number;
diskSize: number;
inBandwidth: number;
outBandwidth: number;
publicIpAddresses: Array<string>;
privateIpAddresses: Array<string>;
2025-09-09 21:25:44 +08:00
ownerPerson: string;
2025-03-28 14:34:51 +08:00
createdTime: number;
expiredTime: number;
items: Array<{
label: string;
key?: string;
2025-03-28 14:34:51 +08:00
value: string;
}>;
}
2023-12-25 19:03:24 +08:00
/**
*
*/
export function getHostExtraItem<T>(params: HostExtraQueryRequest) {
return axios.get<T>('/asset/host-extra/get', { params });
}
/**
*
*/
export function updateHostExtra(request: HostExtraUpdateRequest) {
return axios.put('/asset/host-extra/update', request);
}