Commit ef26613e authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: status

parent 8cc58a5a
......@@ -13,7 +13,8 @@
if (compute_node_news_dict.no_data) {
return STATUS_NODATA;
}
if (compute_node_news_dict.text.startsWith("#access")) {
if (compute_node_news_dict.text &&
compute_node_news_dict.text.startsWith("#access")) {
if (compute_node_news_dict.no_data_since_15_minutes) {
return STATUS_ERROR;
}
......@@ -125,8 +126,10 @@
.push(function (result) {
console.log('STATUS.onLoop2', result);
return gadget.changeState({
compute_node_news_dict: JSON.stringify(result.news.compute_node),
partition_news_dict_dict: JSON.stringify(result.news.partition)
compute_node_news_dict:
JSON.stringify(result.news.compute_node || {}),
partition_news_dict_dict:
JSON.stringify(result.news.partition || {})
});
});
}
......@@ -135,9 +138,9 @@
.declareMethod("render", function (options) {
console.log('STATUS.render', options);
return this.changeState({
compute_node_news_dict: JSON.stringify(options.compute_node),
compute_node_news_dict: JSON.stringify(options.compute_node || {}),
partition_news_dict_dict: JSON.stringify(
options.partition
options.partition || {}
),
jio_key: options.value,
reference: options.reference
......
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>995.25892.59451.19899</string> </value>
<value> <string>995.25914.47446.21742</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1633956802.87</float>
<float>1633958158.48</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