]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not use identifiers before their declarations
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 10:26:53 +0000 (13:26 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 10:26:53 +0000 (13:26 +0300)
.eslintrc.json
interface/js/app/history.js
interface/js/app/rspamd.js

index b4f242a41bf7f0a9e67c88b8795ea98b1c6e8e58..f72a231183b3d9f931d75e0e14d47243852d4ef8 100644 (file)
@@ -74,7 +74,6 @@
         "no-loop-func": "off",
         "no-negated-condition": "off",
         "no-underscore-dangle": "off",
-        "no-use-before-define": "off",
         "one-var-declaration-per-line": "off",
         "prefer-spread": "off",
         "sort-keys": "off",
index 8e34dff24bd2e78497b7a8d48e5ea85a5b7d84c1..b1097528c6e1dcd17f036310f2b05a88222ef077 100644 (file)
@@ -556,7 +556,7 @@ define(["jquery", "footable", "humanize"],
 
             if (checked_server === "All SERVERS") {
                 rspamd.queryNeighbours("history", function (req_data) {
-                    function differentVersions() {
+                    function differentVersions(neighbours_data) {
                         var dv = neighbours_data.some(function (e) {
                             return e.version !== neighbours_data[0].version;
                         });
@@ -570,7 +570,7 @@ define(["jquery", "footable", "humanize"],
                     var neighbours_data = req_data
                         .filter(function (d) { return d.status; }) // filter out unavailable neighbours
                         .map(function (d) { return d.data; });
-                    if (neighbours_data.length && !differentVersions()) {
+                    if (neighbours_data.length && !differentVersions(neighbours_data)) {
                         var data = {};
                         if (neighbours_data[0].version) {
                             data.rows = [].concat.apply([], neighbours_data
index b5d44b9f991c0f188be9882f9fcef0b83cbedb4e..03a02c42bc91c1b8ae1fd150f56d650572b8ed00 100644 (file)
@@ -42,6 +42,16 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
     var timer_id = [];
     var selData; // Graph's dataset selector state
 
+    function cleanCredentials() {
+        sessionStorage.clear();
+        $("#statWidgets").empty();
+        $("#listMaps").empty();
+        $("#modalBody").empty();
+        $("#historyLog tbody").remove();
+        $("#errorsLog tbody").remove();
+        $("#symbolsTable tbody").remove();
+    }
+
     function stopTimers() {
         for (var key in timer_id) {
             Visibility.stop(timer_id[key]);
@@ -140,17 +150,6 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
         sessionStorage.setItem("Password", password);
     }
 
-    // @clean credentials
-    function cleanCredentials() {
-        sessionStorage.clear();
-        $("#statWidgets").empty();
-        $("#listMaps").empty();
-        $("#modalBody").empty();
-        $("#historyLog tbody").remove();
-        $("#errorsLog tbody").remove();
-        $("#symbolsTable tbody").remove();
-    }
-
     function isLogged() {
         if (sessionStorage.getItem("Credentials") !== null) {
             return true;