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

slapos_jio: status

parent 85e6e268
......@@ -117,16 +117,20 @@
})
.onLoop(function () {
var gadget = this;
return gadget.jio_get(gadget.options.value.jio_key)
.push(function (result) {
return getStatus(gadget, result);
});
if (gadget.state.jio_key) {
return gadget.jio_get(gadget.state.jio_key)
.push(function (result) {
return gadget.changeState(result);
});
}
}, 300000)
.declareMethod("render", function (options) {
var gadget = this;
gadget.options = options;
gadget.flag = options.value.jio_key;
return gadget.getStatus(options.value.result);
var state_dict = options.value.result;
state_dict.jio_key = options.value.jio_key;
return this.changeState(state_dict);
})
.onStateChange(function () {
return getStatus(this, this.state);
});
}(window, rJS, Handlebars));
\ No newline at end of file
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>995.20344.18918.62105</string> </value>
<value> <string>995.20367.40971.20633</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1633623919.82</float>
<float>1633625272.93</float>
<string>UTC</string>
</tuple>
</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