Skip to content

Commit

Permalink
Fix the text on the right slider graphs so that it fits in completely
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 30, 2024
1 parent 4dc968a commit 5708d22
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/stats/stats.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified extensions/stats/stats.min.js.gz
Binary file not shown.
14 changes: 10 additions & 4 deletions extensions/stats/stats.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,18 @@ const stats = {
// Update line-charts
if ($lc.length) {
$lc.find(".bar").attr("style", "width:" + v + "%");

// Update line-charts' text
let $dp = $lc.find(".description"),
$lb = $dp.text().split(":")[0];

$dp.attr("title", vo).text($lb + ": " + v + "% (" + vo + ")");
$lb = $dp.text().split(":")[0],
uv = $lb + ": " + v + "% (" + vo + ")";
// Flatten and plunk the data for some graphs
if (target !== "cpu") {
uv = plugins.slider.update.stats.graphs.flatten(uv);
if (target !== "virt") {
uv = plugins.slider.update.stats.graphs.plunk(uv);
}
}
$dp.attr("title", vo).text(uv);
}

// Update other data
Expand Down
2 changes: 1 addition & 1 deletion theme.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bootstrap=3
spa=1
nomodcall=xnavigation=1
version=21.20.4-beta2
mversion=00
mversion=01
bversion=00
webmin=1
usermin=1
Expand Down
4 changes: 2 additions & 2 deletions unauthenticated/js/bundle.min.js

Large diffs are not rendered by default.

Binary file modified unauthenticated/js/bundle.min.js.gz
Binary file not shown.

0 comments on commit 5708d22

Please sign in to comment.