Commit bd38392f authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

Use Hosting Subscription portal_type for dispatch too

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