Commit 38cc7f9c authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_jio: status

parent 85e6e268
...@@ -117,16 +117,20 @@ ...@@ -117,16 +117,20 @@
}) })
.onLoop(function () { .onLoop(function () {
var gadget = this; var gadget = this;
return gadget.jio_get(gadget.options.value.jio_key) if (gadget.state.jio_key) {
.push(function (result) { return gadget.jio_get(gadget.state.jio_key)
return getStatus(gadget, result); .push(function (result) {
}); return gadget.changeState(result);
});
}
}, 300000) }, 300000)
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
var gadget = this; var state_dict = options.value.result;
gadget.options = options; state_dict.jio_key = options.value.jio_key;
gadget.flag = options.value.jio_key; return this.changeState(state_dict);
return gadget.getStatus(options.value.result); })
.onStateChange(function () {
return getStatus(this, this.state);
}); });
}(window, rJS, Handlebars)); }(window, rJS, Handlebars));
\ No newline at end of file
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>995.20344.18918.62105</string> </value> <value> <string>995.20367.40971.20633</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1633623919.82</float> <float>1633625272.93</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment