Skip to content

Commit

Permalink
fix IT status when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mart2070 committed Sep 3, 2024
1 parent 4383377 commit 4a31a88
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tdx-enhanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,19 @@
let statusTime = statusLink.querySelector("#statusTime")
let statusText = statusLink.querySelector("#statusText")

if (statusData && statusData.msg != "All Systems Operational") {
let operationalText = "All Systems Operational"

if (statusData) {
if (statusData.msg.length==0) {
statusData.msg = operationalText
}
} else {
statusData = {
msg: operationalText
}
}

if (!statusData.msg == operationalText) {
statusIcon.classList = ("fa-solid fa-triangle-exclamation")
} else {
statusIcon.classList = ("fa-solid fa-check")
Expand Down

0 comments on commit 4a31a88

Please sign in to comment.