Revert changes that were accidentally committed

This commit is contained in:
TwinProduction 2020-12-30 01:18:30 -05:00
parent 641c2029f7
commit d8cfcd04f1

View File

@ -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;'>&#10003;</span>"; return "<span class='status badge badge-success' style='width: 5%' onmouseenter='showTooltip(\""+serviceStatusIndex+"\", "+index+", this)' onmouseleave='fadeTooltip()' onclick='userClickedStatus = !userClickedStatus;'>&#10003;</span>";
} else {
return "<span class='status badge badge-success' style='width: 5%' onclick='toggleTooltip(\"" + serviceStatusIndex + "\", " + index + ", this)'>&#10003;</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() {