2023-03-01 17:43:28 +08:00
|
|
|
import { CommonModel, ReqPage } from '.';
|
2022-08-18 18:54:21 +08:00
|
|
|
|
|
|
|
export namespace Host {
|
2022-08-30 18:49:07 +08:00
|
|
|
export interface HostTree {
|
2022-08-31 23:16:10 +08:00
|
|
|
id: number;
|
|
|
|
label: string;
|
|
|
|
children: Array<TreeNode>;
|
|
|
|
}
|
|
|
|
export interface TreeNode {
|
|
|
|
id: number;
|
2022-08-30 18:49:07 +08:00
|
|
|
label: string;
|
|
|
|
}
|
2022-08-18 18:54:21 +08:00
|
|
|
export interface Host extends CommonModel {
|
|
|
|
name: string;
|
2023-03-06 17:18:13 +08:00
|
|
|
groupID: number;
|
2022-08-31 23:16:10 +08:00
|
|
|
groupBelong: string;
|
2022-08-18 18:54:21 +08:00
|
|
|
addr: string;
|
|
|
|
port: number;
|
|
|
|
user: string;
|
|
|
|
authMode: string;
|
2023-04-10 21:50:24 +08:00
|
|
|
password: string;
|
|
|
|
privateKey: string;
|
|
|
|
passPhrase: string;
|
|
|
|
rememberPassword: boolean;
|
2022-08-18 18:54:21 +08:00
|
|
|
description: string;
|
|
|
|
}
|
|
|
|
export interface HostOperate {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
2023-03-06 17:18:13 +08:00
|
|
|
groupID: number;
|
2022-08-18 18:54:21 +08:00
|
|
|
addr: string;
|
|
|
|
port: number;
|
|
|
|
user: string;
|
|
|
|
authMode: string;
|
|
|
|
password: string;
|
2023-04-10 21:50:24 +08:00
|
|
|
privateKey: string;
|
|
|
|
passPhrase: string;
|
|
|
|
rememberPassword: boolean;
|
2022-08-18 18:54:21 +08:00
|
|
|
|
|
|
|
description: string;
|
|
|
|
}
|
2022-09-01 16:52:58 +08:00
|
|
|
export interface HostConnTest {
|
|
|
|
addr: string;
|
|
|
|
port: number;
|
|
|
|
user: string;
|
|
|
|
authMode: string;
|
|
|
|
privateKey: string;
|
|
|
|
password: string;
|
|
|
|
}
|
2023-03-01 17:43:28 +08:00
|
|
|
export interface GroupChange {
|
|
|
|
id: number;
|
2023-03-06 17:18:13 +08:00
|
|
|
groupID: number;
|
2023-03-01 17:43:28 +08:00
|
|
|
}
|
2022-08-30 18:49:07 +08:00
|
|
|
export interface ReqSearch {
|
2022-08-29 18:44:35 +08:00
|
|
|
info?: string;
|
|
|
|
}
|
2023-03-01 17:43:28 +08:00
|
|
|
export interface SearchWithPage extends ReqPage {
|
2023-03-06 17:18:13 +08:00
|
|
|
groupID: number;
|
2023-03-01 17:43:28 +08:00
|
|
|
info?: string;
|
|
|
|
}
|
2023-03-27 19:02:36 +08:00
|
|
|
|
2023-03-30 16:07:28 +08:00
|
|
|
export interface FirewallBase {
|
|
|
|
name: string;
|
|
|
|
status: string;
|
|
|
|
version: string;
|
2023-03-30 18:03:21 +08:00
|
|
|
pingStatus: string;
|
2023-03-30 16:07:28 +08:00
|
|
|
}
|
2023-03-27 19:02:36 +08:00
|
|
|
export interface RuleSearch extends ReqPage {
|
2023-08-30 14:56:11 +08:00
|
|
|
status: string;
|
|
|
|
strategy: string;
|
2023-03-27 19:02:36 +08:00
|
|
|
info: string;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
export interface RuleInfo extends ReqPage {
|
|
|
|
family: string;
|
|
|
|
address: string;
|
|
|
|
port: string;
|
|
|
|
protocol: string;
|
|
|
|
strategy: string;
|
2023-10-08 12:14:13 +08:00
|
|
|
|
|
|
|
usedStatus: string;
|
2023-08-15 22:48:11 +08:00
|
|
|
description: string;
|
|
|
|
}
|
|
|
|
export interface UpdateDescription {
|
|
|
|
address: string;
|
|
|
|
port: string;
|
|
|
|
protocol: string;
|
|
|
|
strategy: string;
|
|
|
|
description: string;
|
2023-03-27 19:02:36 +08:00
|
|
|
}
|
|
|
|
export interface RulePort {
|
|
|
|
operation: string;
|
|
|
|
address: string;
|
|
|
|
port: string;
|
|
|
|
source: string;
|
|
|
|
protocol: string;
|
|
|
|
strategy: string;
|
2023-08-15 22:48:11 +08:00
|
|
|
description: string;
|
2023-03-27 19:02:36 +08:00
|
|
|
}
|
|
|
|
export interface RuleIP {
|
|
|
|
operation: string;
|
|
|
|
address: string;
|
|
|
|
strategy: string;
|
2023-08-15 22:48:11 +08:00
|
|
|
description: string;
|
2023-03-27 19:02:36 +08:00
|
|
|
}
|
2023-03-28 15:17:13 +08:00
|
|
|
export interface UpdatePortRule {
|
|
|
|
oldRule: RulePort;
|
|
|
|
newRule: RulePort;
|
|
|
|
}
|
|
|
|
export interface UpdateAddrRule {
|
|
|
|
oldRule: RuleIP;
|
|
|
|
newRule: RuleIP;
|
|
|
|
}
|
|
|
|
export interface BatchRule {
|
|
|
|
type: string;
|
|
|
|
rules: Array<RulePort>;
|
|
|
|
}
|
2023-05-11 18:09:42 +08:00
|
|
|
|
|
|
|
export interface SSHInfo {
|
2023-05-17 18:45:48 +08:00
|
|
|
status: string;
|
2023-06-01 18:27:53 +08:00
|
|
|
message: string;
|
2023-05-11 18:09:42 +08:00
|
|
|
port: string;
|
|
|
|
listenAddress: string;
|
|
|
|
passwordAuthentication: string;
|
|
|
|
pubkeyAuthentication: string;
|
|
|
|
encryptionMode: string;
|
|
|
|
primaryKey: string;
|
|
|
|
permitRootLogin: string;
|
|
|
|
useDNS: string;
|
|
|
|
}
|
2023-05-15 19:00:40 +08:00
|
|
|
export interface SSHGenerate {
|
|
|
|
encryptionMode: string;
|
|
|
|
password: string;
|
|
|
|
}
|
2023-05-16 18:49:27 +08:00
|
|
|
export interface searchSSHLog extends ReqPage {
|
|
|
|
info: string;
|
|
|
|
status: string;
|
|
|
|
}
|
2023-10-11 17:20:30 +08:00
|
|
|
export interface analysisSSHLog extends ReqPage {
|
|
|
|
orderBy: string;
|
|
|
|
}
|
|
|
|
export interface logAnalysisRes {
|
|
|
|
total: number;
|
|
|
|
items: Array<logAnalysis>;
|
|
|
|
successfulCount: number;
|
|
|
|
failedCount: number;
|
|
|
|
}
|
2023-05-16 18:49:27 +08:00
|
|
|
export interface sshLog {
|
|
|
|
logs: Array<sshHistory>;
|
|
|
|
successfulCount: number;
|
|
|
|
failedCount: number;
|
|
|
|
}
|
2023-09-20 14:18:20 +08:00
|
|
|
export interface logAnalysis {
|
|
|
|
address: string;
|
|
|
|
area: string;
|
|
|
|
successfulCount: number;
|
|
|
|
failedCount: number;
|
|
|
|
status: string;
|
|
|
|
}
|
2023-05-16 18:49:27 +08:00
|
|
|
export interface sshHistory {
|
|
|
|
date: Date;
|
2023-06-01 18:27:53 +08:00
|
|
|
area: string;
|
2023-05-16 18:49:27 +08:00
|
|
|
user: string;
|
|
|
|
authMode: string;
|
|
|
|
address: string;
|
|
|
|
port: string;
|
|
|
|
status: string;
|
|
|
|
message: string;
|
|
|
|
}
|
2022-08-18 18:54:21 +08:00
|
|
|
}
|