diff options
author | Evgeny Sorokin <me@ch1p.io> | 2024-01-16 02:05:00 +0300 |
---|---|---|
committer | Evgeny Sorokin <me@ch1p.io> | 2024-01-16 02:05:00 +0300 |
commit | da5db8bc280deab0e2081f39d2f32aabb2372afe (patch) | |
tree | 913c2f8c985b16b550d0ec58ba3ca469bf5a43fd /web/kbn_assets | |
parent | 7058d0f5063dc9b065248d0a906cf874788caecf (diff) |
wip
Diffstat (limited to 'web/kbn_assets')
-rw-r--r-- | web/kbn_assets/app.css | 2 | ||||
-rw-r--r-- | web/kbn_assets/app.js | 38 |
2 files changed, 21 insertions, 19 deletions
diff --git a/web/kbn_assets/app.css b/web/kbn_assets/app.css index 3146bcf..1a4697a 100644 --- a/web/kbn_assets/app.css +++ b/web/kbn_assets/app.css @@ -14,7 +14,7 @@ } -/** spinner.twig **/ +/** spinner.j2 **/ .sk-fading-circle { margin-top: 10px; diff --git a/web/kbn_assets/app.js b/web/kbn_assets/app.js index c187f89..eaac003 100644 --- a/web/kbn_assets/app.js +++ b/web/kbn_assets/app.js @@ -319,6 +319,26 @@ window.Cameras = { })(); +class ModemStatusUpdater { + constructor(id) { + this.id = id; + this.elem = ge('modem_data_'+id); + this.fetch() + } + + fetch() { + ajax.get('/modems/info.ajx', { + id: this.id + }).then(({response}) => { + const {html} = response; + this.elem.innerHTML = html; + + // TODO enqueue rerender + }); + } +} + + var ModemStatus = { _modems: [], @@ -329,21 +349,3 @@ var ModemStatus = { } } }; - -function ModemStatusUpdater(id) { - this.id = id; - this.elem = ge('modem_data_'+id); - this.fetch(); -} -extend(ModemStatusUpdater.prototype, { - fetch: function() { - ajax.get('/modem/get.ajax', { - id: this.id - }).then(({response}) => { - var {html} = response; - this.elem.innerHTML = html; - - // TODO enqueue rerender - }); - }, -});
\ No newline at end of file |