feat: add system health diagnostics
This commit is contained in:
1 parent
0dd26a3f24
commit
c3501b987e
17 files changed
+1335
-741
No files matched your search
@@ -5,6 +5,7 @@ from typing import Callable
|
||||
|
||||
from app.frontend.miner_detail_view import miner_detail_content
|
||||
from app.frontend.monitoring_trends_view import monitoring_trends_content
|
||||
from app.frontend.system_health_view import system_health_content
|
||||
|
||||
|
||||
NAVIGATION = (
|
||||
@@ -13,6 +14,7 @@ NAVIGATION = (
|
||||
("analytics", "Trends", "/monitoring/analytics", "miners.view"),
|
||||
("repairs", "Repair Center", "/operations/repairs", "repairs.view"),
|
||||
("miners", "Miners", "/assets/miners", "miners.view"),
|
||||
("system_health", "System Health", "/system-health", "system_health.view"),
|
||||
)
|
||||
|
||||
PAGE_DETAILS = {
|
||||
@@ -46,6 +48,11 @@ PAGE_DETAILS = {
|
||||
"Miner Detail",
|
||||
"Current identity, operating facts, location, and authorized history.",
|
||||
),
|
||||
"system_health": (
|
||||
"Administration / Diagnostics",
|
||||
"System Health",
|
||||
"Inspect application services, operational data, and maintenance facts.",
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -455,7 +462,9 @@ def render_app_page(
|
||||
else '<div class="global-search-unavailable" aria-hidden="true"></div>'
|
||||
)
|
||||
content = (
|
||||
miner_detail_content()
|
||||
system_health_content()
|
||||
if view == "system_health"
|
||||
else miner_detail_content()
|
||||
if view == "miner_detail"
|
||||
else monitoring_trends_content(has_permission("locations.view"))
|
||||
if view == "analytics"
|
||||
@@ -474,7 +483,9 @@ def render_app_page(
|
||||
)
|
||||
)
|
||||
page_script = (
|
||||
'<script src="/assets/minerops-miner-detail.js" defer></script>'
|
||||
'<script src="/assets/minerops-system-health.js" defer></script>'
|
||||
if view == "system_health"
|
||||
else '<script src="/assets/minerops-miner-detail.js" defer></script>'
|
||||
if view == "miner_detail"
|
||||
else '<script src="/assets/minerops-monitoring-trends.js" defer></script>'
|
||||
if view == "analytics"
|
||||
@@ -489,7 +500,9 @@ def render_app_page(
|
||||
else ""
|
||||
)
|
||||
page_style = (
|
||||
'<link rel="stylesheet" href="/assets/minerops-monitoring-trends.css">'
|
||||
'<link rel="stylesheet" href="/assets/minerops-system-health.css">'
|
||||
if view == "system_health"
|
||||
else '<link rel="stylesheet" href="/assets/minerops-monitoring-trends.css">'
|
||||
if view == "analytics" else ""
|
||||
)
|
||||
object_attributes = ""
|
||||
|
||||
Reference in new issue
Block a user