]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] JS: Add missed semicolons
authorAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 3 Jul 2018 10:34:38 +0000 (13:34 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Tue, 3 Jul 2018 10:34:38 +0000 (13:34 +0300)
interface/js/app/config.js
interface/js/app/graph.js
interface/js/app/history.js
interface/js/app/rspamd.js
interface/js/app/symbols.js
interface/js/app/upload.js

index cb8fb0c75ee2f5fa55536d830957bb1e49f44ff1..36377f5bff93c491b21bd43f9dbb591dbff0f130 100644 (file)
@@ -24,7 +24,7 @@
 
 define(["jquery"],
     function($) {
-        var interface = {}
+        var interface = {};
 
         function save_map_success(rspamd) {
             rspamd.alertMessage("alert-modal alert-success", "Map data successfully saved");
@@ -51,14 +51,14 @@ define(["jquery"],
                 error: function (data) {
                     save_map_error(rspamd, "local", null, null, data.statusText);
                 },
-                success: function() {save_map_success(rspamd)},
+                success: function() {save_map_success(rspamd);},
             });
         }
 
         // @get maps id
         function getMaps(rspamd) {
             var items = [];
-            var $listmaps = $("#listMaps")
+            var $listmaps = $("#listMaps");
             $listmaps.closest(".widget-box").hide();
             $.ajax({
                 dataType: "json",
@@ -275,7 +275,7 @@ define(["jquery"],
                     dataType: "text",
                 });
             });
-        }
+        };
 
         interface.getActions = getActions;
         interface.getMaps = getMaps;
index 9bffd2dad19a01af848f5e65c5f0993c695527d7..46231bc1f1301fb5cb059ae2e6f91abff75ed13b 100644 (file)
@@ -212,7 +212,7 @@ define(["jquery", "d3evolution", "footable"],
             if (checked_server === "All SERVERS") {
                 rspamd.queryNeighbours("graph", function (req_data) {
                     var neighbours_data = req_data
-                        .filter(function (d) { return d.status }) // filter out unavailable neighbours
+                        .filter(function (d) { return d.status; }) // filter out unavailable neighbours
                         .map(function (d){ return d.data; });
 
                     if (neighbours_data.length > 1) {
index 8bef4d2264cae3cb6fe3b1960b974ac44835a0d0..02616ad134b565fea52ec8a62599f486455834d1 100644 (file)
@@ -46,7 +46,7 @@ define(["jquery", "footable", "humanize"],
         };
 
         escape_HTML_array = function (arr) {
-            arr.forEach(function (d, i) { arr[i] = EscapeHTML(d) });
+            arr.forEach(function (d, i) { arr[i] = EscapeHTML(d); });
         };
 
         function unix_time_format(tm) {
@@ -233,7 +233,7 @@ define(["jquery", "footable", "humanize"],
                     }
                 };
 
-                items.push(item)
+                items.push(item);
             });
 
             return items;
@@ -551,7 +551,7 @@ define(["jquery", "footable", "humanize"],
                         "title": description
                     });
                 });
-            }
+            };
 
             if (checked_server === "All SERVERS") {
                 rspamd.queryNeighbours("history", function (req_data) {
@@ -567,7 +567,7 @@ define(["jquery", "footable", "humanize"],
                     }
 
                     var neighbours_data = req_data
-                        .filter(function (d) { return d.status }) // filter out unavailable neighbours
+                        .filter(function (d) { return d.status; }) // filter out unavailable neighbours
                         .map(function (d){ return d.data; });
                     if (neighbours_data.length && !differentVersions()) {
                         var data = {};
@@ -766,7 +766,7 @@ define(["jquery", "footable", "humanize"],
                 rspamd.queryNeighbours("errors", function (req_data) {
                     var neighbours_data = req_data
                         .filter(function (d) {
-                            return d.status
+                            return d.status;
                         }) // filter out unavailable neighbours
                         .map(function (d) {
                             return d.data;
index 5c31d1aca44d6cc78720cb7c2204196cc62d72e0..d1ae283317f30a71534462d6b529a96e1f8b2b42 100644 (file)
@@ -351,7 +351,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
             });
         }
         $.ajax(req_params);
-    }
+    };
 
     interface.queryNeighbours = function(req_url, on_success, on_error, method, headers, params, req_data) {
         $.ajax({
index 8d10294fa98873a257a76229eb07780f27d4cbc4..66cbc4cf16027e62bfe631acf7b79ce0291e477c 100644 (file)
@@ -24,8 +24,8 @@
 
 define(["jquery", "footable"],
     function($) {
-        var interface = {}
-        var ft = {}
+        var interface = {};
+        var ft = {};
 
         function saveSymbols(rspamd, action, id, is_cluster) {
             var inputs = $("#" + id + " :input[data-role=\"numerictextbox\"]");
@@ -90,7 +90,7 @@ define(["jquery", "footable"],
                     if (item.weight > max) {
                         max = item.weight * 2;
                     }
-                    item.group = group.group
+                    item.group = group.group;
                     if (item.weight < min) {
                         min = item.weight * 2;
                     }
@@ -105,23 +105,23 @@ define(["jquery", "footable"],
                     min + "\" max=\"" +
                     max + "\" step=\"" + decimalStep(item.weight) +
                     "\" tabindex=\"1\" value=\"" + Number(item.weight).toFixed(3) +
-                    "\" id=\"_sym_" + item.symbol + "\"></input>"
+                    "\" id=\"_sym_" + item.symbol + "\"></input>";
                     if (!item.time) {
                         item.time = 0;
                     }
-                    item.time = Number(item.time).toFixed(2) + "s"
+                    item.time = Number(item.time).toFixed(2) + "s";
                     if (!item.frequency) {
                         item.frequency = 0;
                     }
                     freqs.push(item.frequency);
-                    item.frequency = Number(item.frequency).toFixed(2)
+                    item.frequency = Number(item.frequency).toFixed(2);
                     if (!(item.group in lookup)) {
                         lookup[item.group] = 1;
                         distinct_groups.push(item.group);
                     }
                     item.save = "<button type=\"button\" data-save=\"local\" class=\"btn btn-primary btn-sm mb-disabled\">Save</button>" +
                 "&nbsp;<button data-save=\"cluster\" type=\"button\" class=\"btn btn-primary btn-sm mb-disabled\">Save in cluster</button>";
-                    items.push(item)
+                    items.push(item);
                 });
             });
 
@@ -150,7 +150,7 @@ define(["jquery", "footable"],
                     item.frequency = item.frequency.toFixed(2);
                 }
             });
-            return [items, distinct_groups]
+            return [items, distinct_groups];
         }
         // @get symbols into modal form
         interface.getSymbols = function(rspamd, tables, checked_server) {
@@ -219,7 +219,7 @@ define(["jquery", "footable"],
                             {"name":"symbol","title":"Symbol","style":{"font-size":"11px"}},
                             {"name":"description","title":"Description","breakpoints":"xs sm","style":{"font-size":"11px"}},
                             {"name":"weight","title":"Score","style":{"font-size":"11px"}},
-                            {"name":"frequency","title":"Frequency","breakpoints":"xs sm","style":{"font-size":"11px"},"sortValue": function(value){return Number(value).toFixed(2)}},
+                            {"name":"frequency","title":"Frequency","breakpoints":"xs sm","style":{"font-size":"11px"},"sortValue": function(value){return Number(value).toFixed(2);}},
                             {"name":"time","title":"Avg. time","breakpoints":"xs sm","style":{"font-size":"11px"}},
                             {"name":"save","title":"Save","style":{"font-size":"11px"}},
                         ],
@@ -255,7 +255,7 @@ define(["jquery", "footable"],
             });
             $(document).on("click", "#symbolsTable :button", function(event){
                 var value = $(this).data("save");
-                if (!value) return
+                if (!value) return;
                 saveSymbols(rspamd, "./savesymbols", "symbolsTable", value == "cluster");
             });
         };
index 05b47e82de73d02c4b8ded0b407e5b027a66177a..8a5457a6fc760b15aeea5f063afa2f7c1c8c3b07 100644 (file)
@@ -24,7 +24,7 @@
 
 define(["jquery"],
     function($) {
-        var interface = {}
+        var interface = {};
 
         function cleanTextUpload(source) {
             $("#" + source + "TextSource").val("");