aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-05 09:52:23 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-05 09:52:23 +0300
commitd6314a4a2c3d596116fcac08293b08431ce36155 (patch)
treedb304a4e8acd53e164b0ff034435021dfe58c86d /interface/js
parent99a7c108e4a93e58612a0748b8e1f2545dc2dafe (diff)
downloadrspamd-d6314a4a2c3d596116fcac08293b08431ce36155.tar.gz
rspamd-d6314a4a2c3d596116fcac08293b08431ce36155.zip
[Minor] JS: Disable "no-bitwise" rule for specific lines
Diffstat (limited to 'interface/js')
-rw-r--r--interface/js/app/graph.js2
-rw-r--r--interface/js/app/stats.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js
index 036a1ac24..38c993059 100644
--- a/interface/js/app/graph.js
+++ b/interface/js/app/graph.js
@@ -124,7 +124,7 @@ define(["jquery", "d3evolution", "footable"],
return {
label: graph_options.legend.entries[i].label,
- value: value ^ 0,
+ value: value ^ 0, // eslint-disable-line no-bitwise
min: +yExtents[0].toFixed(6),
avg: +avg.toFixed(6),
max: +yExtents[1].toFixed(6),
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index a85f91425..f3f8930e2 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -26,11 +26,13 @@ define(["jquery", "d3pie", "humanize"],
function($, 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;
+ /* eslint-enable no-bitwise */
if (years > 0) {
if (months > 0) {
out = years + "yr " + months + "mth";