Commit 5f4bf97c authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_monitoring: Hosting Subscription are now Instance Tree

See nexedi/slapos.core!313 (b02b2bff)
parent 3acdcc67
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
// 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 === "Hosting Subscription") { if (gadget.state.portal_type === "Instance Tree") {
redirect_options.page = "ojsm_hosting_subscription_list"; redirect_options.page = "ojsm_instance_tree_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";
} else if (gadget.state.portal_type === "promise") { } else if (gadget.state.portal_type === "promise") {
......
...@@ -327,14 +327,14 @@ ...@@ -327,14 +327,14 @@
} }
function getInstanceOPMLListFromMaster(gadget, limit) { function getInstanceOPMLListFromMaster(gadget, limit) {
var hosting_subscription_list = [], var instance_tree_list = [],
opml_list = [], opml_list = [],
uid_dict = {}; uid_dict = {};
if (limit === undefined) { if (limit === undefined) {
limit = 300; limit = 300;
} }
return gadget.state.erp5_gadget.allDocs({ return gadget.state.erp5_gadget.allDocs({
query: '(portal_type:"Hosting Subscription") AND (validation_state:"validated")', query: '(portal_type:"Instance Tree") AND (validation_state:"validated")',
select_list: ['title', 'default_predecessor_uid', 'uid', 'slap_state'], select_list: ['title', 'default_predecessor_uid', 'uid', 'slap_state'],
limit: [0, limit], limit: [0, limit],
sort_on: [ sort_on: [
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
uid_search_list = []; uid_search_list = [];
for (i = 0; i < result.data.total_rows; i += 1) { for (i = 0; i < result.data.total_rows; i += 1) {
if (result.data.rows[i].value.slap_state !== "destroy_requested") { if (result.data.rows[i].value.slap_state !== "destroy_requested") {
hosting_subscription_list.push({ instance_tree_list.push({
title: result.data.rows[i].value.title, title: result.data.rows[i].value.title,
relative_url: result.data.rows[i].id, relative_url: result.data.rows[i].id,
active: (result.data.rows[i].value.slap_state === active: (result.data.rows[i].value.slap_state ===
...@@ -381,9 +381,9 @@ ...@@ -381,9 +381,9 @@
} }
opml_list.push({ opml_list.push({
portal_type: "opml", portal_type: "opml",
title: hosting_subscription_list[uid_dict[tmp_uid]] title: instance_tree_list[uid_dict[tmp_uid]]
.title, .title,
relative_url: hosting_subscription_list[uid_dict[tmp_uid]] relative_url: instance_tree_list[uid_dict[tmp_uid]]
.relative_url, .relative_url,
url: tmp_parameter.opml_url || String(tmp_uid) + " NO MONITOR", url: tmp_parameter.opml_url || String(tmp_uid) + " NO MONITOR",
has_monitor: tmp_parameter.opml_url !== undefined, has_monitor: tmp_parameter.opml_url !== undefined,
...@@ -392,8 +392,8 @@ ...@@ -392,8 +392,8 @@
basic_login: btoa(tmp_parameter.username + ':' + basic_login: btoa(tmp_parameter.username + ':' +
tmp_parameter.password), tmp_parameter.password),
active: tmp_parameter.opml_url !== undefined && active: tmp_parameter.opml_url !== undefined &&
hosting_subscription_list[uid_dict[tmp_uid]].active, instance_tree_list[uid_dict[tmp_uid]].active,
state: hosting_subscription_list[uid_dict[tmp_uid]].state state: instance_tree_list[uid_dict[tmp_uid]].state
}); });
} }
} }
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Monitoring Hosting Subscription List</title> <title>Monitoring Instance Tree List</title>
<link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/> <link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<script src="rsvp.js"></script> <script src="rsvp.js"></script>
<script src="renderjs.js"></script> <script src="renderjs.js"></script>
<script src="gadget_erp5_page_ojsm_hosting_subscription_list.js"></script> <script src="gadget_erp5_page_ojsm_instance_tree_list.js"></script>
</head> </head>
<body> <body>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_ojsm_hosting_subscription_list.html</string> </value> <value> <string>gadget_erp5_page_ojsm_instance_tree_list.html</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>gadget_erp5_page_ojsm_hosting_subscription_list_html</string> </value> <value> <string>gadget_erp5_page_ojsm_instance_tree_list_html</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription List</string> </value> <value> <string>Monitoring Instance Tree List</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
.push(function (form_list) { .push(function (form_list) {
var column_list = [ var column_list = [
['status', 'Status'], ['status', 'Status'],
['title', 'Hosting Subscription'], ['title', 'Instance Tree'],
['instance_amount', 'Instance Amount'], ['instance_amount', 'Instance Amount'],
['status_date', 'Status Date'] ['status_date', 'Status Date']
]; ];
...@@ -113,17 +113,17 @@ ...@@ -113,17 +113,17 @@
"default_params": {}, "default_params": {},
"editable": 0, "editable": 0,
"editable_column_list": [], "editable_column_list": [],
"key": "hosting_subscription_listbox", "key": "instance_tree_listbox",
"lines": lines_limit, "lines": lines_limit,
"list_method": "portal_catalog", "list_method": "portal_catalog",
"query": "urn:jio:allDocs?query=%28portal_type%3A%22" + "query": "urn:jio:allDocs?query=%28portal_type%3A%22" +
"Hosting Subscription" + "%22%29", "Instance Tree" + "%22%29",
"portal_type": [], "portal_type": [],
"search_column_list": [['status', 'Status'], ['title', 'Hosting Subscription']], "search_column_list": [['status', 'Status'], ['title', 'Instance Tree']],
"sort_column_list": [['status', 'Status'], ['title', 'Hosting Subscription'], "sort_column_list": [['status', 'Status'], ['title', 'Instance Tree'],
['instance_amount', 'Instance Amount'], ['status_date', 'Status Date']], ['instance_amount', 'Instance Amount'], ['status_date', 'Status Date']],
"sort": [['status', 'ascending'], ['title', 'ascending']], "sort": [['status', 'ascending'], ['title', 'ascending']],
"title": "Hosting Subscriptions", "title": "Instance Trees",
"command": "index", "command": "index",
"type": "ListBox" "type": "ListBox"
} }
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
}) })
.push(function () { .push(function () {
return gadget.updateHeader({ return gadget.updateHeader({
page_title: "Hosting Subscriptions Status", page_title: "Instance Trees Status",
filter_action: true filter_action: true
}); });
}); });
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_ojsm_hosting_subscription_list.js</string> </value> <value> <string>gadget_erp5_page_ojsm_instance_tree_list.js</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>gadget_erp5_page_ojsm_hosting_subscription_list_js</string> </value> <value> <string>gadget_erp5_page_ojsm_instance_tree_list_js</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription list JS</string> </value> <value> <string>Monitoring Instance Tree list JS</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
var column_list = [ var column_list = [
['status', 'Status'], ['status', 'Status'],
['title', 'Instance Title'], ['title', 'Instance Title'],
['specialise_title', 'Hosting Subscription'], ['specialise_title', 'Instance Tree'],
['aggregate_reference', 'Computer'], ['aggregate_reference', 'Computer'],
['date', 'Status Date'] ['date', 'Status Date']
]; ];
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
['category', 'Status'], ['category', 'Status'],
['source', 'Promise'], ['source', 'Promise'],
['channel_item', 'Software Instance'], ['channel_item', 'Software Instance'],
['channel', 'Hosting Subscription'], ['channel', 'Instance Tree'],
['lastBuildDate', 'Promise Date'], ['lastBuildDate', 'Promise Date'],
['description', 'Message'] ['description', 'Message']
]; ];
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Monitoring Hosting Subscription View</title> <title>Monitoring Instance Tree View</title>
<link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/> <link href="gadget_officejs_monitoring_custom.css" rel="stylesheet" type="text/css"/>
<script src="rsvp.js"></script> <script src="rsvp.js"></script>
<script src="renderjs.js"></script> <script src="renderjs.js"></script>
<script src="gadget_officejs_jio_hosting_subscription_view.js"></script> <script src="gadget_officejs_jio_instance_tree_view.js"></script>
</head> </head>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_jio_hosting_subscription_view.html</string> </value> <value> <string>gadget_officejs_jio_instance_tree_view.html</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>gadget_officejs_jio_hosting_subscription_view_html</string> </value> <value> <string>gadget_officejs_jio_instance_tree_view_html</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription View</string> </value> <value> <string>Monitoring Instance Tree View</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
gadget_klass gadget_klass
.setState({ .setState({
ouline_list: "", ouline_list: "",
hosting_subscription: "" instance_tree: ""
}) })
.ready(function (g) { .ready(function (g) {
g.props = {}; g.props = {};
...@@ -90,16 +90,16 @@ ...@@ -90,16 +90,16 @@
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
var gadget = this; var gadget = this;
return gadget.updateHeader({ return gadget.updateHeader({
title: 'Hosting Subscriptions View' title: 'Instance Trees View'
}) })
.push(function () { .push(function () {
return gadget.jio_get(options.jio_key); return gadget.jio_get(options.jio_key);
}) })
.push(function (hosting_doc) { .push(function (hosting_doc) {
return gadget.changeState({hosting_subscription: hosting_doc}); return gadget.changeState({instance_tree: hosting_doc});
}) })
.push(function () { .push(function () {
return gadget.jio_get(gadget.state.hosting_subscription.opml_url); return gadget.jio_get(gadget.state.instance_tree.opml_url);
}) })
.push(function (opml_doc) { .push(function (opml_doc) {
return gadget.changeState({opml: opml_doc}); return gadget.changeState({opml: opml_doc});
...@@ -292,27 +292,27 @@ ...@@ -292,27 +292,27 @@
gadget.getUrlFor({command: 'history_previous'}), gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: 'store_and_change', options: { gadget.getUrlFor({command: 'store_and_change', options: {
page: "ojsm_jump", page: "ojsm_jump",
jio_key: gadget.state.hosting_subscription.opml_url, jio_key: gadget.state.instance_tree.opml_url,
title: gadget.state.hosting_subscription.title, title: gadget.state.instance_tree.title,
view_title: "Related OPML", view_title: "Related OPML",
search_page: "ojsm_status_list" search_page: "ojsm_status_list"
}}) }})
]); ]);
}) })
.push(function (url_list) { .push(function (url_list) {
if (gadget.state.hosting_subscription.instance_amount === 0) { if (gadget.state.instance_tree.instance_amount === 0) {
gadget.element.querySelector('.hosting-title').textContent = gadget.element.querySelector('.hosting-title').textContent =
gadget.state.hosting_subscription.title + " - Not synchronized!"; gadget.state.instance_tree.title + " - Not synchronized!";
return gadget.updateHeader({ return gadget.updateHeader({
page_title: "Hosting Subscription: " + gadget.state.hosting_subscription.title, page_title: "Instance Tree: " + gadget.state.instance_tree.title,
selection_url: url_list[0], selection_url: url_list[0],
jump_url: url_list[1] jump_url: url_list[1]
}); });
} }
gadget.element.querySelector('.hosting-title').textContent = gadget.element.querySelector('.hosting-title').textContent =
gadget.state.hosting_subscription.title; gadget.state.instance_tree.title;
return gadget.updateHeader({ return gadget.updateHeader({
page_title: "Hosting Subscription: " + gadget.state.hosting_subscription.title, page_title: "Instance Tree: " + gadget.state.instance_tree.title,
selection_url: url_list[0], selection_url: url_list[0],
jump_url: url_list[1], jump_url: url_list[1],
save_action: true save_action: true
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_jio_hosting_subscription_view.js</string> </value> <value> <string>gadget_officejs_jio_instance_tree_view.js</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>gadget_officejs_jio_hosting_subscription_view_js</string> </value> <value> <string>gadget_officejs_jio_instance_tree_view_js</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monitoring Hosting Subscription View Js</string> </value> <value> <string>Monitoring Instance Tree View Js</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
"type": "PasswordField" "type": "PasswordField"
}, },
"my_requested_state": { "my_requested_state": {
"description": "Hosting subscription state", "description": "Instance tree state",
"title": "Requested State", "title": "Requested State",
"default": doc.state || (doc.active ? "Started" : "Stopped"), "default": doc.state || (doc.active ? "Started" : "Stopped"),
"css_class": "", "css_class": "",
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
page: "ojsm_jump", page: "ojsm_jump",
jio_key: hosting_key, jio_key: hosting_key,
title: gadget.state.opml_title, title: gadget.state.opml_title,
view_title: "Related Hosting Subscription" view_title: "Related Instance Tree"
}}), }}),
gadget.getUrlFor({command: 'change', options: { gadget.getUrlFor({command: 'change', options: {
page: 'ojsm_opml_delete', page: 'ojsm_opml_delete',
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
public_url: software_instance._links.public_url.href, public_url: software_instance._links.public_url.href,
instance_reference: software_instance.reference, instance_reference: software_instance.reference,
instance_title: software_instance.title, instance_title: software_instance.title,
hosting_title: opml_doc.title, instance_tree_title: opml_doc.title,
hosting_url: hosting_url, hosting_url: hosting_url,
partition_ipv6: software_instance.ipv6, partition_ipv6: software_instance.ipv6,
partition_ipv4: software_instance.ipv4, partition_ipv4: software_instance.ipv4,
...@@ -439,17 +439,17 @@ ...@@ -439,17 +439,17 @@
"hidden": 0, "hidden": 0,
"type": "EditorField" "type": "EditorField"
}, },
"your_hosting_title": { "your_instance_tree_title": {
"description": "", "description": "",
"title": "Hosting Subscription", "title": "Instance Tree",
"default": link_template({ "default": link_template({
url: gadget.state.hosting_url, url: gadget.state.hosting_url,
title: gadget.state.hosting_title title: gadget.state.instance_tree_title
}), }),
"css_class": "", "css_class": "",
"required": 0, "required": 0,
"editable": 0, "editable": 0,
"key": "hosting_title", "key": "instance_tree_title",
"hidden": 0, "hidden": 0,
"type": "EditorField" "type": "EditorField"
}, },
...@@ -545,7 +545,7 @@ ...@@ -545,7 +545,7 @@
[ [
"right", "right",
[ [
["your_hosting_title"], ["your_instance_title"], ["your_instance_tree_title"], ["your_instance_title"],
["your_computer_reference"], ["your_computer_partition"], ["your_computer_reference"], ["your_computer_partition"],
["your_partition_ipv6"], ["your_software_release_url"] ["your_partition_ipv6"], ["your_software_release_url"]
] ]
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
.push(function () { .push(function () {
return gadget.getUrlFor({command: 'push_history', options: { return gadget.getUrlFor({command: 'push_history', options: {
jio_key: options.doc.reference, jio_key: options.doc.reference,
page: 'ojsm_hosting_subscription_view', page: 'ojsm_instance_tree_view',
opml_key: gadget.state.opml.url opml_key: gadget.state.opml.url
}}); }});
}) })
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
rss_url: rss_url, rss_url: rss_url,
//resource_url: tmp_url, //resource_url: tmp_url,
//process_url: tmp_process_url, //process_url: tmp_process_url,
hosting_title: gadget.state.opml.title, instance_tree_title: gadget.state.opml.title,
hosting_url: hosting_url, hosting_url: hosting_url,
partition_ipv6: current_document.ipv6, partition_ipv6: current_document.ipv6,
partition_ipv4: current_document.ipv4, partition_ipv4: current_document.ipv4,
...@@ -402,17 +402,17 @@ ...@@ -402,17 +402,17 @@
"hidden": hide_link, "hidden": hide_link,
"type": "EditorField" "type": "EditorField"
}, },
"your_hosting_title": { "your_instance_tree_title": {
"description": "", "description": "",
"title": "Hosting Subscription", "title": "Instance Tree",
"default": link_template({ "default": link_template({
url: gadget.state.hosting_url, url: gadget.state.hosting_url,
title: gadget.state.hosting_title title: gadget.state.instance_tree_title
}), }),
"css_class": "", "css_class": "",
"required": 0, "required": 0,
"editable": 0, "editable": 0,
"key": "hosting_title", "key": "instance_tree_title",
"hidden": 0, "hidden": 0,
"type": "EditorField" "type": "EditorField"
}, },
...@@ -512,7 +512,7 @@ ...@@ -512,7 +512,7 @@
[ [
"right", "right",
[ [
["your_hosting_title"], ["your_instance_title"], ["your_instance_tree_title"], ["your_instance_title"],
["your_computer_reference"], ["your_computer_partition"], ["your_computer_reference"], ["your_computer_partition"],
["your_partition_ipv4"], ["your_partition_ipv6"], ["your_partition_ipv4"], ["your_partition_ipv6"],
["your_software_release_url"], ["your_rss_url"] ["your_software_release_url"], ["your_rss_url"]
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<script id="panel-template-body-list" type="text/x-handlebars-template"> <script id="panel-template-body-list" type="text/x-handlebars-template">
<li class="ui-first-child"><a href="{{promise_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-check" data-i18n="Promises" accesskey="p">Promises</a></li> <li class="ui-first-child"><a href="{{promise_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-check" data-i18n="Promises" accesskey="p">Promises</a></li>
<li><a href="{{instance_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-cube" data-i18n="Software Instances">Software Instances</a></li> <li><a href="{{instance_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-cube" data-i18n="Software Instances">Software Instances</a></li>
<li><a href="{{hosting_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-cubes" data-i18n="Hosting Subscriptions">Hosting Subscriptions</a></li> <li><a href="{{hosting_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-cubes" data-i18n="Instance Trees">Instance Trees</a></li>
<li><a href="{{configurator_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Monitoring Configurations">Monitoring Configurations</a></li> <li><a href="{{configurator_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Monitoring Configurations">Monitoring Configurations</a></li>
<li><a href="{{synchronize_href}}" class="ui-btn ui-btn-icon-left ui-icon-refresh" data-i18n="Synchronize" accesskey="r">Synchronize</a></li> <li><a href="{{synchronize_href}}" class="ui-btn ui-btn-icon-left ui-icon-refresh" data-i18n="Synchronize" accesskey="r">Synchronize</a></li>
<li class="ui-last-child"><a href="{{import_export_href}}" class="ui-btn ui-btn-icon-left ui-icon-exchange" data-i18n="OPML Import / Export">OPML Import / Export</a></li> <li class="ui-last-child"><a href="{{import_export_href}}" class="ui-btn ui-btn-icon-left ui-icon-exchange" data-i18n="OPML Import / Export">OPML Import / Export</a></li>
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
return RSVP.all([ return RSVP.all([
context.getUrlFor({command: 'display', options: {page: "ojsm_status_list"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_status_list"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_software_instance_list"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_software_instance_list"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_hosting_subscription_list"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_instance_tree_list"}}),
context.getUrlFor({command: 'display', options: {page: "settings_configurator"}}), context.getUrlFor({command: 'display', options: {page: "settings_configurator"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_import_export"}}), context.getUrlFor({command: 'display', options: {page: "ojsm_import_export"}}),
context.getUrlFor({command: 'display', options: {page: "ojsm_synchronize", reset: 1}}) context.getUrlFor({command: 'display', options: {page: "ojsm_synchronize", reset: 1}})
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
var remove_id_list = [], var remove_id_list = [],
remove_signature_id_list = []; remove_signature_id_list = [];
// remove related hosting subscription // remove related instance tree
remove_id_list.push(generateHash(id)); remove_id_list.push(generateHash(id));
// removed saved opml content // removed saved opml content
remove_signature_id_list.push({ remove_signature_id_list.push({
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
}); });
} }
function updateHostingSubscriptionState(hosting, element) { function updateInstanceTreeState(hosting, element) {
var status = element.status.toUpperCase(); var status = element.status.toUpperCase();
if (hosting.instance_amount === 0) { if (hosting.instance_amount === 0) {
...@@ -436,16 +436,16 @@ ...@@ -436,16 +436,16 @@
opml_result_list, opml_result_list,
current_signature_dict = {}, current_signature_dict = {},
fetch_remote_opml = false, fetch_remote_opml = false,
hosting_subscription, instance_tree,
id; id;
id = generateHash(opml_url); id = generateHash(opml_url);
opml_storage = createStorage(context, opml_spec, id); opml_storage = createStorage(context, opml_spec, id);
// Hosting Subscription is build from OPML and it has status // Instance Tree is build from OPML and it has status
hosting_subscription = { instance_tree = {
title: opml_title || "", title: opml_title || "",
portal_type: "Hosting Subscription", portal_type: "Instance Tree",
opml_url: opml_url, opml_url: opml_url,
status: "WARNING", status: "WARNING",
instance_amount: 0, instance_amount: 0,
...@@ -508,7 +508,7 @@ ...@@ -508,7 +508,7 @@
if (opml_result_list.data.total_rows > 0) { if (opml_result_list.data.total_rows > 0) {
if (opml_result_list.data.rows[0].doc.title) { if (opml_result_list.data.rows[0].doc.title) {
hosting_subscription.title = opml_result_list.data.rows[0] instance_tree.title = opml_result_list.data.rows[0]
.doc.title; .doc.title;
} }
if (fetch_remote_opml) { if (fetch_remote_opml) {
...@@ -612,8 +612,8 @@ ...@@ -612,8 +612,8 @@
item_signature_dict = {}; item_signature_dict = {};
if (element.type === 'global') { if (element.type === 'global') {
updateHostingSubscriptionState(hosting_subscription, element); updateInstanceTreeState(instance_tree, element);
hosting_subscription.instance_amount += 1; instance_tree.instance_amount += 1;
if (element.aggregate_reference === undefined) { if (element.aggregate_reference === undefined) {
// XXX - document need to be updated to keep compatibility // XXX - document need to be updated to keep compatibility
element = fixGlobalInstanceDocument(element); element = fixGlobalInstanceDocument(element);
...@@ -728,7 +728,7 @@ ...@@ -728,7 +728,7 @@
} }
opml_document_list.push({ opml_document_list.push({
id: id, id: id,
doc: hosting_subscription doc: instance_tree
}); });
return [opml_document_list, delete_key_list, attachment_document_list]; return [opml_document_list, delete_key_list, attachment_document_list];
}); });
......
...@@ -79,11 +79,11 @@ url_list = [ ...@@ -79,11 +79,11 @@ url_list = [
"gadget_erp5_sort_editor.html", "gadget_erp5_sort_editor.html",
"gadget_erp5_sort_editor.js", "gadget_erp5_sort_editor.js",
"gadget_officejs_monitoring_jio.html", "gadget_officejs_monitoring_jio.html",
"gadget_erp5_page_ojsm_hosting_subscription_list.html", "gadget_erp5_page_ojsm_instance_tree_list.html",
"gadget_officejs_monitoring_parameter_view.html", "gadget_officejs_monitoring_parameter_view.html",
"gadget_erp5_page_settings_configurator.html", "gadget_erp5_page_settings_configurator.html",
"gadget_erp5_page_ojsm_processes_view.html", "gadget_erp5_page_ojsm_processes_view.html",
"gadget_officejs_jio_hosting_subscription_view.html", "gadget_officejs_jio_instance_tree_view.html",
"gadget_officejs_monitoring_sync.html", "gadget_officejs_monitoring_sync.html",
"gadget_officejs_jio_software_instance_view.html", "gadget_officejs_jio_software_instance_view.html",
"gadget_erp5_page_ojsm_software_instance_list.html", "gadget_erp5_page_ojsm_software_instance_list.html",
...@@ -104,12 +104,12 @@ url_list = [ ...@@ -104,12 +104,12 @@ url_list = [
"gadget_erp5_page_ojsm_dispatch.html", "gadget_erp5_page_ojsm_dispatch.html",
"gadget_ojsm_graph_field.html", "gadget_ojsm_graph_field.html",
"gadget_officejs_monitoring_jio.js", "gadget_officejs_monitoring_jio.js",
"gadget_erp5_page_ojsm_hosting_subscription_list.js", "gadget_erp5_page_ojsm_instance_tree_list.js",
"gadget_officejs_monitoring_parameter_view.js", "gadget_officejs_monitoring_parameter_view.js",
"gadget_erp5_page_settings_configurator.js", "gadget_erp5_page_settings_configurator.js",
"gadget_erp5_page_ojsm_processes_view.js", "gadget_erp5_page_ojsm_processes_view.js",
"gadget_officejs_monitoring_custom.css", "gadget_officejs_monitoring_custom.css",
"gadget_officejs_jio_hosting_subscription_view.js", "gadget_officejs_jio_instance_tree_view.js",
"gadget_erp5_global.js", "gadget_erp5_global.js",
"gadget_officejs_monitoring_sync.js", "gadget_officejs_monitoring_sync.js",
"gadget_erp5_page_ojsm_software_instance_list.js", "gadget_erp5_page_ojsm_software_instance_list.js",
......
web_page_module/gadget_officejs_jio_hosting_subscription_view_html web_page_module/gadget_officejs_jio_instance_tree_view_html
web_page_module/gadget_officejs_jio_hosting_subscription_view_js web_page_module/gadget_officejs_jio_instance_tree_view_js
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
......
web_page_module/gadget_officejs_jio_hosting_subscription_view_html web_page_module/gadget_officejs_jio_instance_tree_view_html
web_page_module/gadget_officejs_jio_hosting_subscription_view_js web_page_module/gadget_officejs_jio_instance_tree_view_js
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
......
...@@ -2,8 +2,8 @@ image_module/gadget_officejs_appstore_rapid_spage ...@@ -2,8 +2,8 @@ image_module/gadget_officejs_appstore_rapid_spage
web_page_module/gadget_erp5_field_status_* web_page_module/gadget_erp5_field_status_*
web_page_module/gadget_erp5_page_ojsm_* web_page_module/gadget_erp5_page_ojsm_*
web_page_module/gadget_erp5_page_settings_configurator_* web_page_module/gadget_erp5_page_settings_configurator_*
web_page_module/gadget_officejs_jio_hosting_subscription_view_html web_page_module/gadget_officejs_jio_instance_tree_view_html
web_page_module/gadget_officejs_jio_hosting_subscription_view_js web_page_module/gadget_officejs_jio_instance_tree_view_js
web_page_module/gadget_officejs_jio_opml_view_html web_page_module/gadget_officejs_jio_opml_view_html
web_page_module/gadget_officejs_jio_opml_view_js web_page_module/gadget_officejs_jio_opml_view_js
web_page_module/gadget_officejs_jio_promise_view_html web_page_module/gadget_officejs_jio_promise_view_html
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
<tr> <tr>
<td>storeText</td> <td>storeText</td>
<td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td> <td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td>
<td>hosting_title</td> <td>instance_tree_title</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Hosting Subscriptions']</td> <td>//a[@data-i18n='Instance Trees']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td> <td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='${hosting_title}']</td> <td>//a[@data-i18n='${instance_tree_title}']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -453,7 +453,7 @@ ...@@ -453,7 +453,7 @@
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td> <td>//table[contains(@class, 'ui-table-inset')]/tbody/tr[1]/td[1]/a</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -467,7 +467,7 @@ ...@@ -467,7 +467,7 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='${hosting_title}']</td> <td>//a[@data-i18n='${instance_tree_title}']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -492,12 +492,12 @@ ...@@ -492,12 +492,12 @@
</tr> </tr>
<tr> <tr>
<td>assertTextNotPresent</td> <td>assertTextNotPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Hosting Subscriptions']</td> <td>//a[@data-i18n='Instance Trees']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -507,7 +507,7 @@ ...@@ -507,7 +507,7 @@
</tr> </tr>
<tr> <tr>
<td>assertTextNotPresent</td> <td>assertTextNotPresent</td>
<td>${hosting_title}</td> <td>${instance_tree_title}</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
......
...@@ -158,17 +158,17 @@ ...@@ -158,17 +158,17 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Hosting Subscriptions']</td> <td>//a[@data-i18n='Instance Trees']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Hosting Subscriptions']</td> <td>//a[@data-i18n='Instance Trees']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//h1[text()='Hosting Subscriptions ']</td> <td>//h1[text()='Instance Trees ']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -70,7 +70,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase): ...@@ -70,7 +70,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase):
instance_list = [] instance_list = []
httpd = None httpd = None
httpd_is_alive = False httpd_is_alive = False
root_title = "TEST Hosting Subscription" root_title = "TEST Instance Tree"
def start_httpd_server(self, root_folder): def start_httpd_server(self, root_folder):
self.httpd = SocketServer.TCPServer(('localhost', 5378), CustomHTTPRequestHandler) self.httpd = SocketServer.TCPServer(('localhost', 5378), CustomHTTPRequestHandler)
...@@ -143,7 +143,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase): ...@@ -143,7 +143,7 @@ class TestZeleniumCore(ERP5TypeFunctionalTestCase):
result_dict = { result_dict = {
"status": status, "status": status,
"change-time": now_time, "change-time": now_time,
"hosting_subscription": self.root_title, "instance_tree": self.root_title,
"title": title, "title": title,
"start-date": start_date, "start-date": start_date,
"instance": instance['title'], "instance": instance['title'],
......
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