summaryrefslogtreecommitdiffstats
path: root/interface/js
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-08 12:01:18 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-08 12:01:18 +0300
commit9819f6a164133a8d8774265bb323e12bf8ce7300 (patch)
tree494f01aff0b1b336d69dd1682b506abb5bff5028 /interface/js
parent97f21fc116b5c2bb416d8bd212a2ee06ddceee68 (diff)
downloadrspamd-9819f6a164133a8d8774265bb323e12bf8ce7300.tar.gz
rspamd-9819f6a164133a8d8774265bb323e12bf8ce7300.zip
[WebUI] Add missed declarations
Diffstat (limited to 'interface/js')
-rw-r--r--interface/js/app/history.js4
-rw-r--r--interface/js/app/stats.js11
2 files changed, 8 insertions, 7 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 4a8cddb0c..be2471c57 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -39,13 +39,13 @@ define(["jquery", "footable", "humanize"],
var htmlEscaper = /[&<>"'/`=]/g;
var symbolDescriptions = {};
- EscapeHTML = function (string) {
+ var EscapeHTML = function (string) {
return ("" + string).replace(htmlEscaper, function (match) {
return htmlEscapes[match];
});
};
- escape_HTML_array = function (arr) {
+ var escape_HTML_array = function (arr) {
arr.forEach(function (d, i) { arr[i] = EscapeHTML(d); });
};
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index c75b20441..a074d47f8 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -27,12 +27,13 @@ define(["jquery", "d3pie", "humanize"],
// @ ms to date
function msToTime(seconds) {
/* eslint-disable no-bitwise */
- years = seconds / 31536000 >> 0; // 3600*24*365
- months = seconds % 31536000 / 2628000 >> 0; // 3600*24*365/12
- days = seconds % 31536000 % 2628000 / 86400 >> 0; // 24*3600
- hours = seconds % 31536000 % 2628000 % 86400 / 3600 >> 0;
- minutes = seconds % 31536000 % 2628000 % 86400 % 3600 / 60 >> 0;
+ var years = seconds / 31536000 >> 0; // 3600*24*365
+ var months = seconds % 31536000 / 2628000 >> 0; // 3600*24*365/12
+ var days = seconds % 31536000 % 2628000 / 86400 >> 0; // 24*3600
+ var hours = seconds % 31536000 % 2628000 % 86400 / 3600 >> 0;
+ var minutes = seconds % 31536000 % 2628000 % 86400 % 3600 / 60 >> 0;
/* eslint-enable no-bitwise */
+ var out;
if (years > 0) {
if (months > 0) {
out = years + "yr " + months + "mth";