fix: remove annoiying messages

pull/4/head
lambda 6 days ago
parent e1a1da6835
commit 8f90af6cf2
No known key found for this signature in database
GPG Key ID: CF45A8EE158BBCB6

@ -225,7 +225,7 @@ function powerTolerance(target) {
}
function updateDeviation(metricEl, targetEl, warnEl, actual, target, tolerance, unit) {
targetEl.textContent = target != null ? `цель ${target} ${unit}` : "—";
targetEl.textContent = target != null ? `${target} ${unit}` : "—";
if (actual == null || target == null) {
metricEl.classList.remove("metric--off");
warnEl.textContent = "";
@ -234,10 +234,8 @@ function updateDeviation(metricEl, targetEl, warnEl, actual, target, tolerance,
const diff = actual - target;
if (Math.abs(diff) > tolerance) {
metricEl.classList.add("metric--off");
warnEl.textContent = diff > 0 ? "выше цели" : "ниже цели";
} else {
metricEl.classList.remove("metric--off");
warnEl.textContent = "";
}
}

Loading…
Cancel
Save