Improve stability and functionalities
This commit is contained in:
@@ -59,7 +59,8 @@ export type RegexFilter = {
|
||||
is_blacklist:boolean,
|
||||
is_case_sensitive:boolean,
|
||||
mode:string //C S B => C->S S->C BOTH
|
||||
n_packets:number
|
||||
n_packets:number,
|
||||
active:boolean
|
||||
}
|
||||
|
||||
export type RegexAddForm = {
|
||||
|
||||
@@ -99,6 +99,16 @@ export async function deleteregex(regex_id:number){
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
export async function activateregex(regex_id:number){
|
||||
const { status } = await getapi(`regex/${regex_id}/enable`) as ServerResponse;
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
export async function deactivateregex(regex_id:number){
|
||||
const { status } = await getapi(`regex/${regex_id}/disable`) as ServerResponse;
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
export async function startservice(service_id:string){
|
||||
const { status } = await getapi(`service/${service_id}/start`) as ServerResponse;
|
||||
return status === "ok"?undefined:status
|
||||
@@ -127,6 +137,7 @@ export async function deleteservice(service_id:string) {
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
|
||||
export async function addregex(data:RegexAddForm) {
|
||||
const { status } = await postapi("regexes/add",data) as ServerResponse;
|
||||
return status === "ok"?undefined:status
|
||||
|
||||
Reference in New Issue
Block a user