Commit 2430e032 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_monitoring: handle predecessor category renaming to successor

See nexedi/slapos.core!307 (b7d5041e)
parent c9630e9f
......@@ -335,7 +335,7 @@
}
return gadget.state.erp5_gadget.allDocs({
query: '(portal_type:"Instance Tree") AND (validation_state:"validated")',
select_list: ['title', 'default_predecessor_uid', 'uid', 'slap_state'],
select_list: ['title', 'default_successor_uid', 'uid', 'slap_state'],
limit: [0, limit],
sort_on: [
["creation_date", "descending"]
......@@ -355,15 +355,15 @@
"start_requested") ? "Started" : "Stopped"
});
uid_search_list.push(result.data.rows[i].value.uid);
if (result.data.rows[i].value.default_predecessor_uid) {
uid_dict[result.data.rows[i].value.default_predecessor_uid] = i;
if (result.data.rows[i].value.default_successor_uid) {
uid_dict[result.data.rows[i].value.default_successor_uid] = i;
}
}
}
return gadget.state.erp5_gadget.allDocs({
query: '(portal_type:"Software Instance") AND ' +
'(predecessor_related_uid:("' + uid_search_list.join('","') + '"))',
select_list: ['uid', 'predecessor_related_uid', 'connection_xml'],
'(successor_related_uid:("' + uid_search_list.join('","') + '"))',
select_list: ['uid', 'successor_related_uid', 'connection_xml'],
limit: [0, limit]
});
})
......
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.35342.36450.46984</string> </value>
<value> <string>994.35349.51657.9164</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -276,7 +276,7 @@
</tuple>
<state>
<tuple>
<float>1630678427.22</float>
<float>1630678740.59</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