diff options
Diffstat (limited to 'web/kbn_assets/app.js')
-rw-r--r-- | web/kbn_assets/app.js | 17 |
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 |