feat: refactor auth and xpack integration

This commit is contained in:
ssongliu
2026-05-21 12:32:52 +08:00
committed by zhengkunwang223
parent 69906046e8
commit a917ca00a1
175 changed files with 5676 additions and 3734 deletions
+38
View File
@@ -47,6 +47,44 @@ export namespace AI {
migMode: string;
processes: Process[];
}
export interface MonitorGPUSearch {
productName: string;
startTime: Date;
endTime: Date;
}
export interface MonitorGPUOptions {
gpuType: string;
options: Array<string>;
chartHide: Array<ChartHide>;
}
export interface ChartHide {
productName: string;
process: boolean;
gpu: boolean;
memory: boolean;
power: boolean;
temperature: boolean;
speed: boolean;
}
export interface MonitorGPUData {
date: Array<Date>;
gpuValue: Array<number>;
temperatureValue: Array<number>;
powerTotal: Array<number>;
powerUsed: Array<number>;
powerPercent: Array<number>;
memoryTotal: Array<number>;
memoryUsed: Array<number>;
memoryPercent: Array<number>;
speedValue: Array<number>;
gpuProcesses: Array<Array<GPUProcess>>;
}
export interface GPUProcess {
pid: string;
type: string;
processName: string;
usedMemory: string;
}
export interface Process {
pid: string;
type: string;
+34 -3
View File
@@ -48,15 +48,46 @@ export namespace Login {
export interface AuthInfo {
id: number;
name: string;
sessionTimeout: number;
expirationDays: number;
expirationTime: string;
mfaStatus: string;
mfaInterval: number;
role: string;
permissions: string[];
nodeScopes: number[];
nodeRoles: Array<{ nodeId: number; nodeName: string; roleId: number; roleName: string }>;
apiInterfaceStatus: string;
apiKey: string;
ipWhiteList: string;
apiKeyValidityTime: number;
}
export interface AuthInfoUpdate {
id: number;
name: string;
password: string;
oldPassword: string;
newPassword: string;
retryPassword: string;
sessionTimeout: number;
expirationDays: number;
expirationTime: string;
}
export interface MFARequest {
title: string;
interval: number;
}
export interface MFAInfo {
secret: string;
qrImage: string;
}
export interface MFABind {
secret: string;
code: string;
interval: string;
}
export interface ApiConfig {
apiInterfaceStatus: string;
apiKey: string;
ipWhiteList: string;
apiKeyValidityTime: number;
}
}
-39
View File
@@ -160,45 +160,6 @@ export namespace Host {
endTime: Date;
}
export interface MonitorGPUSearch {
productName: string;
startTime: Date;
endTime: Date;
}
export interface MonitorGPUOptions {
gpuType: string;
options: Array<string>;
chartHide: Array<ChartHide>;
}
export interface ChartHide {
productName: string;
process: boolean;
gpu: boolean;
memory: boolean;
power: boolean;
temperature: boolean;
speed: boolean;
}
export interface MonitorGPUData {
date: Array<Date>;
gpuValue: Array<number>;
temperatureValue: Array<number>;
powerTotal: Array<number>;
powerUsed: Array<number>;
powerPercent: Array<number>;
memoryTotal: Array<number>;
memoryUsed: Array<number>;
memoryPercent: Array<number>;
speedValue: Array<number>;
gpuProcesses: Array<Array<GPUProcess>>;
}
export interface GPUProcess {
pid: string;
type: string;
processName: string;
usedMemory: string;
}
export interface SSHInfo {
autoStart: boolean;
isActive: boolean;
+50 -46
View File
@@ -1,32 +1,44 @@
import { DateTimeFormats } from '@intlify/core-base';
export namespace Setting {
export interface SettingInfo {
userName: string;
password: string;
email: string;
systemIP: string;
systemVersion: string;
upgradeBackupCopies: string;
export interface AgentSettingInfo {
dockerSockPath: string;
developerMode: string;
systemVersion: string;
systemIP: string;
sessionTimeout: number;
localTime: string;
timeZone: string;
ntpSite: string;
defaultNetwork: string;
defaultIO: string;
lastCleanTime: string;
lastCleanSize: string;
lastCleanData: string;
monitorStatus: string;
monitorInterval: string;
monitorStoreDays: string;
appStoreVersion: string;
appStoreLastModified: string;
appStoreSyncStatus: string;
fileRecycleBin: string;
}
export interface SettingInfo {
systemVersion: string;
upgradeBackupCopies: string;
developerMode: string;
sessionTimeout: number;
panelName: string;
edition: string;
theme: string;
menuTabs: string;
language: string;
docSource: string;
defaultIO: string;
defaultNetwork: string;
lastCleanTime: string;
lastCleanSize: string;
lastCleanData: string;
serverPort: number;
ipv6: string;
@@ -39,16 +51,7 @@ export namespace Setting {
securityEntrance: string;
dashboardMemoVisible: string;
dashboardSimpleNodeVisible: string;
expirationDays: number;
expirationTime: string;
complexityVerification: string;
mfaStatus: string;
mfaSecret: string;
mfaInterval: string;
monitorStatus: string;
monitorInterval: number;
monitorStoreDays: number;
messageType: string;
emailVars: string;
@@ -64,11 +67,31 @@ export namespace Setting {
proxyUser: string;
proxyPasswd: string;
proxyPasswdKeep: string;
}
export interface SettingBaseInfo {
systemVersion: string;
developerMode: string;
upgradeBackupCopies: string;
apiInterfaceStatus: string;
apiKey: string;
ipWhiteList: string;
apiKeyValidityTime: number;
port: string;
ipv6: string;
bindAddress: string;
panelName: string;
edition: string;
theme: string;
menuTabs: string;
language: string;
hideMenu: string;
docSource: string;
serverPort: string;
securityEntrance: string;
complexityVerification: string;
noAuthSetting: string;
proxyType: string;
dashboardMemoVisible: string;
dashboardSimpleNodeVisible: string;
}
export interface TerminalInfo {
lineHeight: string;
@@ -113,12 +136,6 @@ export namespace Setting {
proxyPasswdKeep: string;
withDockerRestart: boolean;
}
export interface ApiConfig {
apiInterfaceStatus: string;
apiKey: string;
ipWhiteList: string;
apiKeyValidityTime: number;
}
export interface SSLUpdate {
ssl: string;
domain: string;
@@ -142,19 +159,6 @@ export namespace Setting {
export interface PortUpdate {
serverPort: number;
}
export interface MFARequest {
title: string;
interval: number;
}
export interface MFAInfo {
secret: string;
qrImage: string;
}
export interface MFABind {
secret: string;
code: string;
interval: string;
}
export interface PasskeyRegisterRequest {
name: string;
}