From fc0cc1c33773e5f3e65f010f31fcee01a0143674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 22 Jul 2017 23:32:57 -0700 Subject: [PATCH] Fix remaining requires --- assets/static/alerts.js | 3 ++- assets/static/grid.js | 4 +++- assets/static/progress.js | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/static/alerts.js b/assets/static/alerts.js index cbd3ea388..273ec429e 100644 --- a/assets/static/alerts.js +++ b/assets/static/alerts.js @@ -5,6 +5,7 @@ const $ = require("jquery"); const autocomplete = require("./autocomplete"); const colors = require("./colors"); +const config = require("./config"); const counter = require("./counter"); const grid = require("./grid"); const summary = require("./summary"); @@ -174,7 +175,7 @@ function updateAlerts(apiResponse) { if (dirty) { autocomplete.reset(); grid.redraw(); - if (Config.GetOption("flash").Get()) { + if (config.getOption("flash").Get()) { unsee.flash(); } } diff --git a/assets/static/grid.js b/assets/static/grid.js index e2961b005..b85cc144a 100644 --- a/assets/static/grid.js +++ b/assets/static/grid.js @@ -1,6 +1,8 @@ const Masonry = require("masonry-layout"); const $ = require("jquery"); +const config = require("./config"); + var selectors = { alerts: "#alerts", incident: ".incident", @@ -38,7 +40,7 @@ function remove(elem) { } function append(elem) { - if (Config.GetOption("appendtop").Get()) { + if (config.getOption("appendtop").Get()) { grid.prepend(elem).masonry("prepended", elem); } else { grid.append(elem).masonry("appended", elem); diff --git a/assets/static/progress.js b/assets/static/progress.js index 8a593a28d..9f9d3eb84 100644 --- a/assets/static/progress.js +++ b/assets/static/progress.js @@ -1,5 +1,7 @@ const NProgress = require("nprogress"); +const unsee = require("./unsee"); + var timer; function init() { @@ -29,7 +31,7 @@ function pause() { function start() { var stepMs = 250; // animation step in ms - var steps = (Unsee.GetRefreshRate() * 1000) / stepMs; // how many steps we have + var steps = (unsee.getRefreshRate() * 1000) / stepMs; // how many steps we have NProgress.set(0.0); resetTimer(); timer = setInterval(function() {