fix(webui): route pve-detmir activity to watcher-safe view and add audit links

This commit is contained in:
igor04091968
2026-04-27 21:58:37 +03:00
parent 0da0d880c0
commit 947717251f
3 changed files with 14 additions and 4 deletions
+5 -1
View File
@@ -8,7 +8,11 @@
"^pve-detmir$"
],
"links": [
{ "label": "Активность", "type": "activity" },
{ "label": "Активность", "type": "activity", "view": "DLP" },
{ "label": "Web-admin аудит", "type": "bucket", "bucket_prefix": "aw-pve-webadmin-events_" },
{ "label": "PVE tasks", "type": "bucket", "bucket_prefix": "aw-pve-task-events_" },
{ "label": "SSH сессии", "type": "bucket", "bucket_prefix": "aw-ssh-sessions_" },
{ "label": "Команды shell", "type": "bucket", "bucket_prefix": "aw-console-commands_" },
{ "label": "Web категории", "type": "bucket", "bucket_prefix": "aw-detmir-web-category_" },
{ "label": "Все бакеты", "type": "buckets" }
]
+4 -3
View File
@@ -1,6 +1,6 @@
(function () {
window.__awRuPatchVersion = "template-v6-pve-detmir-client";
document.documentElement.setAttribute("data-aw-ru-patch", "template-v6-pve-detmir-client");
window.__awRuPatchVersion = "template-v7-pve-detmir-audit-view";
document.documentElement.setAttribute("data-aw-ru-patch", "template-v7-pve-detmir-audit-view");
const exact = new Map([
["ActivityWatch", "АктивВотч"],
@@ -749,7 +749,8 @@
function buildHostLink(host, hostBuckets, linkDef) {
if (!linkDef || !linkDef.type) return "";
if (linkDef.type === "activity") {
return '#/activity/' + encodeURIComponent(host) + '/day/' + encodeURIComponent(new Date().toISOString().slice(0, 10)) + '/view/summary';
const viewId = linkDef.view ? String(linkDef.view) : "summary";
return '#/activity/' + encodeURIComponent(host) + '/day/' + encodeURIComponent(new Date().toISOString().slice(0, 10)) + '/view/' + encodeURIComponent(viewId);
}
if (linkDef.type === "buckets") {
return "#/buckets";
+5
View File
@@ -30,5 +30,10 @@
{ "type": "category_tree", "size": 3, "props": {} },
{ "type": "top_apps", "size": 3, "props": {} }
]
},
{
"id": "pve_audit",
"name": "PVE Audit",
"elements": []
}
]