Přidáno:
nová stránka /portal/incidents s title CSBot Services Portal - Incidenty menu Provoz -> Incidenty aktivní incidenty a historie posledních 100 incidentů barevné stavy: open červeně, resolved zeleně karta Aktivní incidenty a seznam Poslední incidenty na přehledu realtime napojení přes existující operations-live.js a snapshot sekce Incidenty služby v detailu služby, posledních 20 incidentů DB helpery pro service_incidents migrace/indexy pro lokální prostředí, kde tabulka ještě neexistuje
This commit is contained in:
@@ -29,8 +29,10 @@ from ..db.apps import (
|
||||
)
|
||||
from ..db.audit import log_audit_event
|
||||
from ..db.health import get_latest_service_health, get_service_health, get_service_health_history
|
||||
from ..db.incidents import get_service_incidents
|
||||
from ..db.jobs import create_job, get_jobs, has_active_deploy_job
|
||||
from ..routes.deployments import render_status_pill
|
||||
from ..routes.incidents import render_incident_history_rows
|
||||
from ..shell import run_command
|
||||
from ..templates.layout import page, render_result
|
||||
|
||||
@@ -415,6 +417,7 @@ def app_detail(app_id: str, request: Request, user=Depends(require_user)):
|
||||
templates = get_app_templates()
|
||||
template_options = render_template_options(templates, app.get("template", "") or "")
|
||||
variables = get_app_variables(app.get("id", ""))
|
||||
incidents = get_service_incidents(app.get("id", ""), limit=20)
|
||||
current_health = get_service_health(app.get("id", ""))
|
||||
health_history = get_service_health_history(app.get("id", ""), limit=50)
|
||||
|
||||
@@ -653,6 +656,20 @@ def app_detail(app_id: str, request: Request, user=Depends(require_user)):
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Incidenty služby</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Název</th>
|
||||
<th>Začátek</th>
|
||||
<th>Konec</th>
|
||||
<th>Trvání</th>
|
||||
<th>Stav</th>
|
||||
</tr>
|
||||
{render_incident_history_rows(incidents, include_service=False)}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Historie nasazení</h2>
|
||||
<table>
|
||||
|
||||
Reference in New Issue
Block a user