]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Initialize variables at declaration
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 11 Jul 2018 08:47:31 +0000 (11:47 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 11 Jul 2018 08:47:31 +0000 (11:47 +0300)
interface/js/app/stats.js

index 25e061783651f9660cd6748713acb239c8adf892..19b1d72a71fb4fa5a49938aaaf98415d491ebb19 100644 (file)
@@ -104,8 +104,8 @@ define(["jquery", "d3pie", "humanize"],
             $("#clusterTable tbody").empty();
             $("#selSrv").empty();
             $.each(servers, function (key, val) {
-                var glyph_status;
-                var short_id;
+                var glyph_status = "glyphicon glyphicon-remove-circle";
+                var short_id = "???";
                 if (!("config_id" in val.data)) {
                     val.data.config_id = "";
                 }
@@ -113,10 +113,6 @@ define(["jquery", "d3pie", "humanize"],
                     glyph_status = "glyphicon glyphicon-ok-circle";
                     short_id = val.data.config_id.substring(0, 8);
                 }
-                else {
-                    glyph_status = "glyphicon glyphicon-remove-circle";
-                    short_id = "???";
-                }
 
                 $("#clusterTable tbody").append("<tr>" +
                 "<td class=\"col1\" title=\"Radio\"><input type=\"radio\" class=\"form-control radio\" name=\"clusterName\" value=\"" + key + "\"></td>" +