Commit 12e69781 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

Use Hosting Subscription portal_type for dispatch too

parent 6f7596ed
......@@ -37,12 +37,8 @@
if (result.data.total_rows === 1) {
// one item found, redirect to it
redirect_options = {
"jio_key": result.data.rows[0].id
jio_key: result.data.rows[0].id
};
if (result.data.rows[0].value.portal_type === "opml") {
redirect_options.page = "ojsm_hosting_subscription_view";
redirect_options.opml_key = result.data.rows[0].id;
}
return gadget.redirect({"command": "index", options: redirect_options});
}
redirect_options = {
......@@ -52,7 +48,7 @@
// take the first one
gadget.state.portal_type = result.data.rows[0].value.portal_type;
}
if (gadget.state.portal_type === "opml") {
if (gadget.state.portal_type === "Hosting Subscription") {
redirect_options.page = "ojsm_hosting_subscription_list";
} else if (gadget.state.portal_type === "Software Instance") {
redirect_options.page = "ojsm_software_instance_list";
......@@ -113,13 +109,8 @@
pt_result = regex.exec(options.query);
if (pt_result !== null) {
page_title = "Searching " + pt_result[1] + "(s)";
if (pt_result[1] === "Hosting Subscription") {
portal_type = "opml";
options.query = options.query.replace(pt_result[1], 'opml');
} else {
portal_type = pt_result[1];
}
}
return gadget.getUrlFor({command: 'display', options: {page: 'ojsm_status_list'}})
.push(function (back_url) {
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.38063.22401.1996</string> </value>
<value> <string>963.38066.29413.61576</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1511190866.88</float>
<float>1540892674.51</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