mirror of
https://github.com/TwiN/gatus.git
synced 2025-01-09 23:48:21 +01:00
Revert changes that were accidentally committed
This commit is contained in:
parent
641c2029f7
commit
d8cfcd04f1
@ -165,10 +165,9 @@
|
|||||||
let timerHandler = 0;
|
let timerHandler = 0;
|
||||||
let refreshIntervalHandler = 0;
|
let refreshIntervalHandler = 0;
|
||||||
let userClickedStatus = false;
|
let userClickedStatus = false;
|
||||||
let showStatusOnHover = false;
|
|
||||||
|
|
||||||
function showTooltip(serviceName, index, element) {
|
function showTooltip(serviceName, index, element) {
|
||||||
//userClickedStatus = false;
|
userClickedStatus = false;
|
||||||
clearTimeout(timerHandler);
|
clearTimeout(timerHandler);
|
||||||
let serviceResult = serviceStatuses[serviceName].results[index];
|
let serviceResult = serviceStatuses[serviceName].results[index];
|
||||||
$("#tooltip-timestamp").text(prettifyTimestamp(serviceResult.timestamp));
|
$("#tooltip-timestamp").text(prettifyTimestamp(serviceResult.timestamp));
|
||||||
@ -220,30 +219,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleTooltip(serviceName, index, element) {
|
|
||||||
console.log("userClickedStatus="+userClickedStatus);
|
|
||||||
if (!userClickedStatus) {
|
|
||||||
showTooltip(serviceName, index, element);
|
|
||||||
userClickedStatus = true;
|
|
||||||
} else {
|
|
||||||
$("#tooltip").hide();
|
|
||||||
userClickedStatus = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createStatusBadge(serviceStatusIndex, index, success) {
|
function createStatusBadge(serviceStatusIndex, index, success) {
|
||||||
if (success) {
|
if (success) {
|
||||||
if (showStatusOnHover) {
|
|
||||||
return "<span class='status badge badge-success' style='width: 5%' onmouseenter='showTooltip(\""+serviceStatusIndex+"\", "+index+", this)' onmouseleave='fadeTooltip()' onclick='userClickedStatus = !userClickedStatus;'>✓</span>";
|
return "<span class='status badge badge-success' style='width: 5%' onmouseenter='showTooltip(\""+serviceStatusIndex+"\", "+index+", this)' onmouseleave='fadeTooltip()' onclick='userClickedStatus = !userClickedStatus;'>✓</span>";
|
||||||
} else {
|
|
||||||
return "<span class='status badge badge-success' style='width: 5%' onclick='toggleTooltip(\"" + serviceStatusIndex + "\", " + index + ", this)'>✓</span>";
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (showStatusOnHover) {
|
|
||||||
return "<span class='status badge badge-danger' style='width: 5%' onmouseenter='showTooltip(\""+serviceStatusIndex+"\", "+index+", this)' onmouseleave='fadeTooltip()' onclick='userClickedStatus = !userClickedStatus;'>X</span>";
|
return "<span class='status badge badge-danger' style='width: 5%' onmouseenter='showTooltip(\""+serviceStatusIndex+"\", "+index+", this)' onmouseleave='fadeTooltip()' onclick='userClickedStatus = !userClickedStatus;'>X</span>";
|
||||||
} else {
|
|
||||||
return "<span class='status badge badge-danger' style='width: 5%' onclick='toggleTooltip(\"" + serviceStatusIndex + "\", " + index + ", this)'>X</span>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshStatuses() {
|
function refreshStatuses() {
|
||||||
|
Loading…
Reference in New Issue
Block a user