summaryrefslogtreecommitdiff
path: root/web/kbn_assets/app.js
diff options
context:
space:
mode:
authorEvgeny Sorokin <me@ch1p.io>2024-01-16 02:05:00 +0300
committerEvgeny Sorokin <me@ch1p.io>2024-01-16 02:05:00 +0300
commitda5db8bc280deab0e2081f39d2f32aabb2372afe (patch)
tree913c2f8c985b16b550d0ec58ba3ca469bf5a43fd /web/kbn_assets/app.js
parent7058d0f5063dc9b065248d0a906cf874788caecf (diff)
wip
Diffstat (limited to 'web/kbn_assets/app.js')
-rw-r--r--web/kbn_assets/app.js38
1 files changed, 20 insertions, 18 deletions
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