Ver código fonte

[WebUI] Avoid using "undefined" property

of the global object
tags/1.7.8
Alexander Moisseev 5 anos atrás
pai
commit
e514ce57b5

+ 0
- 1
.eslintrc.json Ver arquivo

@@ -78,7 +78,6 @@
"no-redeclare": "off",
"no-shadow": "off",
"no-undef": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"one-var-declaration-per-line": "off",

+ 1
- 1
interface/js/app/graph.js Ver arquivo

@@ -205,7 +205,7 @@ define(["jquery", "d3evolution", "footable"],
drawRrdTable(rrd_summary, unit);
}

if (graphs.graph === undefined) {
if (!graphs.graph) {
graphs.graph = initGraph();
}


+ 3
- 3
interface/js/app/history.js Ver arquivo

@@ -612,7 +612,7 @@ define(["jquery", "footable", "humanize"],
});
} else if (ft.history) {
ft.history.destroy();
ft.history = undefined;
delete ft.history;
}
});
}
@@ -676,11 +676,11 @@ define(["jquery", "footable", "humanize"],
}
if (ft.history) {
ft.history.destroy();
ft.history = undefined;
delete ft.history;
}
if (ft.errors) {
ft.errors.destroy();
ft.errors = undefined;
delete ft.errors;
}
if (checked_server === "All SERVERS") {
rspamd.queryNeighbours("errors", function () {

+ 6
- 6
interface/js/app/rspamd.js Ver arquivo

@@ -47,27 +47,27 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
function disconnect() {
if (graphs.chart) {
graphs.chart.destroy();
graphs.chart = undefined;
delete graphs.chart;
}
if (graphs.rrd_pie) {
graphs.rrd_pie.destroy();
graphs.rrd_pie = undefined;
delete graphs.rrd_pie;
}
if (graphs.graph) {
graphs.graph.destroy();
graphs.graph = undefined;
delete graphs.graph;
}
if (tables.history) {
tables.history.destroy();
tables.history = undefined;
delete tables.history;
}
if (tables.errors) {
tables.errors.destroy();
tables.errors = undefined;
delete tables.errors;
}
if (tables.symbols) {
tables.symbols.destroy();
tables.symbols = undefined;
delete tables.symbols;
}

stopTimers();

Carregando…
Cancelar
Salvar