commit 9de2bde: [WebUI] Remove actions capitalization
moisseev
moiseev at mezonplus.ru
Fri Aug 7 19:28:07 UTC 2020
Author: moisseev
Date: 2020-08-07 20:41:03 +0300
URL: https://github.com/rspamd/rspamd/commit/9de2bdef09aa9cfa1bcbbef07c208e96c737765e (refs/pull/3463/head)
[WebUI] Remove actions capitalization
---
interface/index.html | 2 +-
interface/js/app/stats.js | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/interface/index.html b/interface/index.html
index 742db46df..a57033376 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -96,7 +96,7 @@
<div class="tab-content">
<div class="tab-pane active" id="status">
<div class="row">
- <div id="statWidgets" class="col-lg-12 stat-boxes text-capitalize font-weight-bold text-secondary" style="display: none;">
+ <div id="statWidgets" class="col-lg-12 stat-boxes font-weight-bold text-secondary" style="display: none;">
</div>
</div>
<div class="row">
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index 539116983..e2724af47 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -70,10 +70,11 @@ define(["jquery", "d3pie"],
$.each(data, function (i, item) {
var widgetsOrder = ["scanned", "no action", "greylist", "add header", "rewrite subject", "reject", "learned"];
- function widget(k, v) {
+ function widget(k, v, cls) {
+ var c = (typeof cls === "undefined") ? "" : cls;
var titleAtt = d3.format(",")(v) + " " + k;
return '<div class="card stat-box d-inline-block text-center bg-light shadow-sm mr-3 px-3">' +
- '<div class="widget overflow-hidden p-2" title="' + titleAtt +
+ '<div class="widget overflow-hidden p-2' + c + '" title="' + titleAtt +
'"><strong class="d-block mt-2 mb-1 font-weight-bold">' +
d3.format(".3~s")(v) + "</strong>" + k + "</div></div>";
}
@@ -94,14 +95,15 @@ define(["jquery", "d3pie"],
stat_w[widgetsOrder.indexOf(action)] = widget(action, count);
});
} else {
- stat_w[widgetsOrder.indexOf(i)] = widget(i, item);
+ stat_w[widgetsOrder.indexOf(i)] = widget(i, item, " text-capitalize");
}
});
$.each(stat_w, function (i, item) {
$(item).appendTo(widgets);
});
$("#statWidgets > div:not(.stat-box)")
- .wrapAll("<div class=\"card stat-box text-center bg-light shadow-sm float-right\"><div class=\"widget overflow-hidden p-2\"></div></div>");
+ .wrapAll('<div class="card stat-box text-center bg-light shadow-sm float-right">' +
+ '<div class="widget overflow-hidden p-2 text-capitalize"></div></div>');
$("#statWidgets").find("div.float-right").appendTo("#statWidgets");
$("#clusterTable tbody").empty();
More information about the Commits
mailing list