diff options
author | moisseev <moiseev@mezonplus.ru> | 2020-08-07 20:41:03 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2020-08-07 20:41:03 +0300 |
commit | 9de2bdef09aa9cfa1bcbbef07c208e96c737765e (patch) | |
tree | 08b14f4ad696081128d4af53984734412d2f0167 /interface | |
parent | 1d4e94c70d96920dfc189d123ee680c08533e95f (diff) | |
download | rspamd-9de2bdef09aa9cfa1bcbbef07c208e96c737765e.tar.gz rspamd-9de2bdef09aa9cfa1bcbbef07c208e96c737765e.zip |
[WebUI] Remove actions capitalization
Diffstat (limited to 'interface')
-rw-r--r-- | interface/index.html | 2 | ||||
-rw-r--r-- | 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(); |