Mount Cortex OS Runtime Health as WebUI panel
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
main.main:not(.svrnty-showing-cortex-os) .cortex-os-runtime-health {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cortex-os-runtime-health h2 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 15px;
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
panel.appendChild(summary);
|
||||
panel.appendChild(list);
|
||||
|
||||
var target = document.querySelector("main") || document.body;
|
||||
var target = document.querySelector("main.main");
|
||||
if (!target) {
|
||||
return panel;
|
||||
}
|
||||
target.appendChild(panel);
|
||||
return panel;
|
||||
}
|
||||
@@ -99,9 +102,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", loadRuntimeHealth, { once: true });
|
||||
} else {
|
||||
function handlePanelSwitch(event) {
|
||||
var detail = (event && event.detail) || {};
|
||||
if (detail.name === "cortex-os") {
|
||||
loadRuntimeHealth();
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("svrnty:panel-switch", handlePanelSwitch);
|
||||
|
||||
var main = document.querySelector("main.main");
|
||||
if (main && main.classList.contains("svrnty-showing-cortex-os")) {
|
||||
loadRuntimeHealth();
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -24,11 +24,14 @@
|
||||
'<path d="M12 2l1.8 5.6L19.4 9.4l-4.5 3.3 1.7 5.7L12 15l-4.6 3.4 1.7-5.7L4.6 9.4l5.6-1.8L12 2z"/>',
|
||||
canvas:
|
||||
'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 3v18M16 3v18M3 8h18M3 16h18"/>',
|
||||
"cortex-os":
|
||||
'<path d="M4 7h16M4 12h16M4 17h10"/><circle cx="17" cy="17" r="3"/>',
|
||||
};
|
||||
const TABS = [
|
||||
{ id: "adwright", label: "Adwright", tooltip: "Adwright — marketing intelligence" },
|
||||
{ id: "bte", label: "BTE", tooltip: "BTE — brand creative studio" },
|
||||
{ id: "canvas", label: "Canvas", tooltip: "Canvas — sovereign UI design" },
|
||||
{ id: "cortex-os", label: "Cortex OS", tooltip: "Cortex OS — Runtime Health" },
|
||||
];
|
||||
|
||||
function _svg(iconPath, size, stroke) {
|
||||
|
||||
Reference in New Issue
Block a user