mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-06 00:00:14 +00:00
feat: 完成前端端口规则设置功能
This commit is contained in:
@@ -52,4 +52,29 @@ export namespace Host {
|
||||
groupID: number;
|
||||
info?: string;
|
||||
}
|
||||
|
||||
export interface RuleSearch extends ReqPage {
|
||||
info: string;
|
||||
type: string;
|
||||
}
|
||||
export interface RuleInfo extends ReqPage {
|
||||
family: string;
|
||||
address: string;
|
||||
port: string;
|
||||
protocol: string;
|
||||
strategy: string;
|
||||
}
|
||||
export interface RulePort {
|
||||
operation: string;
|
||||
address: string;
|
||||
port: string;
|
||||
source: string;
|
||||
protocol: string;
|
||||
strategy: string;
|
||||
}
|
||||
export interface RuleIP {
|
||||
operation: string;
|
||||
address: string;
|
||||
strategy: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,3 +70,14 @@ export const editCommand = (params: Command.CommandOperate) => {
|
||||
export const deleteCommand = (params: { ids: number[] }) => {
|
||||
return http.post(`/hosts/command/del`, params);
|
||||
};
|
||||
|
||||
// firewall
|
||||
export const searchFireRule = (params: Host.RuleSearch) => {
|
||||
return http.post<ResPage<Host.RuleInfo>>(`/hosts/firewall/search`, params);
|
||||
};
|
||||
export const operatePortRule = (params: Host.RulePort) => {
|
||||
return http.post<Host.RulePort>(`/hosts/firewall/port`, params);
|
||||
};
|
||||
export const operateIPRule = (params: Host.RuleIP) => {
|
||||
return http.post<Host.RuleIP>(`/hosts/firewall/ip`, params);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user