Commit ef26613e authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_jio: status

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