blob: 72d985cf6bf576eaca0b05350d9100bb30267144 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
var Inverter = {
poll: function () {
setInterval(this._tick, 1000);
},
_tick: function() {
ajax.get('/inverter/status.ajax')
.then(({response}) => {
if (response) {
var el = document.getElementById('inverter_status');
el.innerHTML = response.html;
}
});
}
};
|