ui+api: dedup per-app marks by app_key; auto-refresh runtime
This commit is contained in:
@@ -825,6 +825,9 @@ class ApiClient:
|
||||
op: str,
|
||||
target: str,
|
||||
cgroup: str = "",
|
||||
unit: str = "",
|
||||
command: str = "",
|
||||
app_key: str = "",
|
||||
timeout_sec: int = 0,
|
||||
) -> TrafficAppMarksResult:
|
||||
payload: Dict[str, Any] = {
|
||||
@@ -833,6 +836,12 @@ class ApiClient:
|
||||
}
|
||||
if cgroup:
|
||||
payload["cgroup"] = str(cgroup).strip()
|
||||
if unit:
|
||||
payload["unit"] = str(unit).strip()
|
||||
if command:
|
||||
payload["command"] = str(command).strip()
|
||||
if app_key:
|
||||
payload["app_key"] = str(app_key).strip()
|
||||
if int(timeout_sec or 0) > 0:
|
||||
payload["timeout_sec"] = int(timeout_sec)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user