Commit 0d083d86 authored by Roque's avatar Roque

erp5_web_monitoring: update options header (instance tree view)

parent 1408dbf8
......@@ -7,16 +7,44 @@
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("getOptions", function (argument_list) {
console.log("header getOptions...", argument_list);
return {'a': 1};
.declareMethod("getOptions", function (portal_type_dict, page_options, header_options) {
var gadget = this;
switch (portal_type_dict.view) {
case "instance_tree":
return new RSVP.Queue()
.push(function () {
return gadget.jio_get(page_options.jio_key);
})
.push(function (instance_tree) {
//TODO migrate
gadget.getUrlFor({command: 'store_and_change', options: {
page: "ojsm_jump",
jio_key: instance_tree.opml_url,
title: instance_tree.title,
view_title: "Related OPML",
search_page: "ojsm_status_list"
}});
})
.push(function (url) {
//TODO set title here
header_options.jump_url = url;
header_options.save_action = true;
return header_options;
});
case "software_instance":
return {};
case "promise":
return {};
default:
return {};
}
});
}(document, window, rJS, RSVP));
\ No newline at end of file
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.63271.25358.37546</string> </value>
<value> <string>1015.64614.5724.62173</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1713373899.89</float>
<float>1713454481.43</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