]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Remove actions capitalization 3463/head
authormoisseev <moiseev@mezonplus.ru>
Fri, 7 Aug 2020 17:41:03 +0000 (20:41 +0300)
committermoisseev <moiseev@mezonplus.ru>
Fri, 7 Aug 2020 17:41:03 +0000 (20:41 +0300)
interface/index.html
interface/js/app/stats.js

index 742db46df744da4c66eb881284b9597d700a7a56..a57033376f08798c21aca57d4e382f3e393f69b1 100644 (file)
@@ -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">
index 539116983d6924073405b0c25a072d5c0f23191b..e2724af4756009bae535a350792e0b31071a0c33 100644 (file)
@@ -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();