initial commit

This commit is contained in:
2025-04-06 22:30:23 +02:00
parent 34c5a8b84a
commit b9605e74c0
10 changed files with 300 additions and 0 deletions

37
index.sql Normal file
View File

@@ -0,0 +1,37 @@
SELECT 'dynamic' AS component, sqlpage.run_sql('shell.sql') AS properties;
SELECT 'card' AS component,
'Applications' AS title;
SELECT name AS title,
coalesce(severity_color,'green' ) AS background_color,
incident_title as description
FROM application_status;
SELECT 'divider' AS component,
'incidents' AS contents
;
select
'timeline' as component;
select
i.title as title,
'incident.sql?id=' || i.id AS link,
CASE
WHEN i.status = 'CLOSED' THEN 'resolved'
ELSE ''
END
AS class,
i.date_time as date,
i.description as description,
s.color AS color,
CASE
WHEN i.status = 'CLOSED' THEN 'alert-triangle-off'
ELSE 'alert-triangle'
END
AS icon
from incident i
JOIN severity s on i.severity = s.id
order by i.date_time desc
;