Enhance tooltip functionality for CPU standard deviation in dashboard
Some checks failed
CI / ci (push) Has been cancelled

- Updated the tooltip for the CPU standard deviation metric to include a detailed explanation of the calculation, preserving newlines for better readability.
- Added CSS styles to support multi-line tooltips, improving user comprehension of the displayed data.
This commit is contained in:
2026-02-12 19:38:12 +03:00
parent 3491ed168d
commit 76eae52d2a
2 changed files with 7 additions and 1 deletions

View File

@@ -340,4 +340,10 @@ label.swap:focus-within:not(.theme-toggle) {
.print-only {
display: none !important;
}
}
/* Multi-line tooltip (formula): preserve newlines from data-tip */
.tooltip-formula[data-tip]::before {
white-space: pre-line;
text-align: left;
}

View File

@@ -13,7 +13,7 @@
</div>
<div id="currentCpuStdBlock" class="flex items-center gap-1 text-xs">
<div class="w-3 h-0.5 bg-error/60"></div>
<span class="tooltip tooltip-top text-error/60 cursor-help" data-tip="σ = √(Σ(xᵢμ)²/n)" aria-label="Формула расчёта ±0.5σ">
<span class="tooltip tooltip-top tooltip-formula text-error/60 cursor-help" data-tip="Показывает разброс утилизации CPU относительно среднего.&#10;&#10;μ — средняя утилизация CPU по хостам.&#10;σ — стандартное отклонение:&#10;σ = √(Σ(xᵢμ)²/n)." aria-label="Формула расчёта ±0.5σ">
<span class="text-error/60">±0.5σ: <span id="currentCpuStd">0</span>%</span>
</span>
</div>