summaryrefslogtreecommitdiff
path: root/web/kbn_assets/app.js
diff options
context:
space:
mode:
authorEvgeny Sorokin <me@ch1p.io>2024-01-16 03:31:55 +0300
committerEvgeny Sorokin <me@ch1p.io>2024-01-16 03:32:07 +0300
commit8a89dd77be03ca8eb9cdc378ba8e912292494fa9 (patch)
treef2d04c1a6ce8b2731febbf6b66f6127057f9477d /web/kbn_assets/app.js
parentde56aa3ae916ac0d51e503648fae8f3fa2d97951 (diff)
inverter page
Diffstat (limited to 'web/kbn_assets/app.js')
-rw-r--r--web/kbn_assets/app.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/web/kbn_assets/app.js b/web/kbn_assets/app.js
index eaac003..d575a5a 100644
--- a/web/kbn_assets/app.js
+++ b/web/kbn_assets/app.js
@@ -349,3 +349,20 @@ var ModemStatus = {
}
}
};
+
+
+var Inverter = {
+ poll: function () {
+ setInterval(this._tick, 1000);
+ },
+
+ _tick: function() {
+ ajax.get('/inverter.ajx')
+ .then(({response}) => {
+ if (response) {
+ var el = document.getElementById('inverter_status');
+ el.innerHTML = response.html;
+ }
+ });
+ }
+}; \ No newline at end of file