Commit 33659245 authored by Rafael Monnerat's avatar Rafael Monnerat

Refactor status gadget (unify)

  This fixed badly merged slapos!394, that contained rebased commits
parent 69bb9229
......@@ -357,7 +357,7 @@
"description": "",
"title": result[1][23],
"default": {jio_key: gadget.state.jio_key,
result: gadget.state.doc},
result: gadget.state.doc.news},
"css_class": "",
"required": 0,
"editable": 0,
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.2068.62564.17</string> </value>
<value> <string>1001.26171.19762.42854</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1655115718.45</float>
<float>1658173330.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -153,7 +153,10 @@
"my_monitoring_status": {
"description": "",
"title": result[2][8],
"default": {jio_key: gadget.state.jio_key},
"default": {
jio_key: gadget.state.jio_key,
result: gadget.state.doc.news
},
"css_class": "",
"required": 1,
"editable": 0,
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.2068.62564.17</string> </value>
<value> <string>1001.26171.19762.42854</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1655115861.91</float>
<float>1657906193.21</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -17,15 +17,11 @@
}
.ui-block-50 {
width: 50%;
}
.ui-btn-color-white {
color: white !important;
width: 50% !important;
}
.ui-btn-hide {
display: none;
display: none !important;
}
.ui-bar {
......@@ -89,6 +85,18 @@
text-align: center;
}
.ui-btn-color-white,
.ui-btn-color-white:active,
.ui-btn-color-white:hover,
.ui-btn-color-white a,
.ui-btn-color-white:active a,
.ui-btn-color-white:hover a {
color: white !important;
background: grey !important;
cursor: default;
text-align: center;
}
.ui-btn-white,
.ui-btn-white:active,
......@@ -101,6 +109,10 @@
text-align: center;
}
a.ui-icon-desktop::before {
margin-left: 5px;
}
/* for Software Logo*/
div.editable_div.logo img {
object-fit: cover;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.57958.38485.23927</string> </value>
<value> <string>1001.40386.24679.24320</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1655110268.61</float>
<float>1658172898.38</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -16,7 +16,7 @@
<body>
<div class="ui-block-a ui-block-50 main-status">
<div class="ui-bar ui-corner-all first-child ui-btn-no-data">
<a class="ui-btn ui-btn-icon-left ui-icon-spinner ui-btn-color-white"> Compute Node </a>
<a class="ui-btn ui-btn-icon-left ui-icon-spinner ui-btn-color-white"> Node </a>
</div>
</div>
<div class="ui-block-c ui-block-50 sub-status">
......
......@@ -278,7 +278,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.54034.1029.62310</string> </value>
<value> <string>1001.26171.19762.42854</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -296,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>1656702663.09</float>
<float>1657906237.75</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -30,7 +30,7 @@
function getInstanceTreeStatus(options) {
var instance;
if ((!options) || (options && !options.instance)) {
if (!options) {
return 'ui-btn-no-data';
}
......@@ -44,6 +44,10 @@
return 'ui-btn-is-destroyed';
}
if (!options.instance) {
return 'ui-btn-no-data';
}
for (instance in options.instance) {
if (options.instance.hasOwnProperty(instance)) {
if (options.instance[instance].text.startsWith("#error")) {
......@@ -213,29 +217,27 @@
if (result && result.portal_type && result.portal_type === "Compute Node") {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
main_link_configuration_dict.text = 'Compute Node';
main_link_configuration_dict.text = 'Node';
sub_link_configuration_dict.href = monitor_url;
sub_link_configuration_dict.target = "_target";
sub_link_configuration_dict.text = 'Partitions';
if (result && result.news && result.news.compute_node) {
status_class = getComputeNodeStatus(result.news.compute_node);
if (result && result.compute_node) {
status_class = getComputeNodeStatus(result.compute_node);
}
if ((status_class === 'ui-btn-error') ||
(status_class === 'ui-btn-no-data')) {
right_class = status_class;
} else {
if (result && result.news && result.news.partition) {
if (result && result.partition) {
right_class = getComputePartitionStatus(
{compute_partition_news: result.news.partition}
{compute_partition_news: result.partition}
);
}
}
} else if (result && result.portal_type &&
result.portal_type === "Software Installation") {
if (result && result.news) {
status_class = getSoftwareInstallationStatus(result.news);
}
status_class = getSoftwareInstallationStatus(result);
main_link_configuration_dict.text = "Installation";
right_class = "ui-btn-hide";
if (status_class === "ui-btn-is-building") {
......@@ -246,6 +248,7 @@
} else if (status_class === "ui-btn-error") {
main_link_configuration_dict.text = "Error";
}
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else if (result && result.portal_type && (
result.portal_type === "Software Instance" ||
result.portal_type === "Slave Instance"
......@@ -253,14 +256,17 @@
status_class = getInstanceStatus(result);
right_class = "ui-btn-hide";
if (status_class === 'ui-btn-is-slave') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Slave';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-stopped') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Stopped';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-destroyed') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Destroyed';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
......@@ -268,20 +274,21 @@
}
} else if (result && result.portal_type &&
result.portal_type === "Instance Tree") {
if (result && result.news) {
status_class = getInstanceTreeStatus(result.news);
}
status_class = getInstanceTreeStatus(result);
// it should verify if the monitor-base-url is ready.
right_class = "ui-btn-hide";
if (status_class === 'ui-btn-is-slave') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Slave Only';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-stopped') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Stopped';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else if (status_class === 'ui-btn-is-destroyed') {
status_class = 'ui-btn-no-data ui-btn-color-white';
status_class = 'ui-btn-color-white';
main_link_configuration_dict.text = 'Destroyed';
main_link_configuration_dict.class = "ui-btn ui-btn-icon-left";
} else {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
......@@ -290,20 +297,22 @@
} else {
main_link_configuration_dict.href = monitor_url;
main_link_configuration_dict.target = "_target";
main_link_configuration_dict.text = 'Compute Node';
main_link_configuration_dict.text = 'Node';
sub_link_configuration_dict.href = monitor_url;
sub_link_configuration_dict.target = "_target";
sub_link_configuration_dict.text = 'Partitions';
status_class = getComputeNodeStatusList(result.news);
status_class = getComputeNodeStatusList(result);
if ((status_class === 'ui-btn-error') ||
(status_class === 'ui-btn-no-data')) {
right_class = status_class;
} else {
right_class = getComputePartitionStatusList(result.news);
right_class = getComputePartitionStatusList(result);
}
}
main_link_configuration_dict.text = ' ' + main_link_configuration_dict.text;
sub_link_configuration_dict.text = ' ' + sub_link_configuration_dict.text;
domsugar(main_status_div.querySelector('div'),
{
class: "ui-bar ui-corner-all first-child " + status_class
......@@ -316,6 +325,10 @@
}, [
domsugar("a", sub_link_configuration_dict)
]);
if (right_class === 'ui-btn-hide') {
// expand main button to use the space
main_status_div.className = "ui-block-a ui-block main-status";
}
return gadget;
}
......@@ -346,7 +359,6 @@
// result is empty.
var state_dict = options.value.result || {};
state_dict.jio_key = options.value.jio_key;
state_dict.portal_type = options.value.portal_type;
return this.changeState(state_dict);
});
......
news_dict = {"instance" : []}
news_dict = {
"portal_type": context.getPortalType(),
"reference": context.getReference(),
......
......@@ -5,6 +5,8 @@ if REQUEST is not None:
portal_type = context.getPortalType()
if portal_type == "Slave Instance":
return {
"portal_type": context.getPortalType(),
"reference": context.getReference(),
"user": "SlapOS Master",
"text": "#nodata is a slave %s" % context.getReference(),
"monitor_url": context.Base_getStatusMonitorUrl(),
......@@ -14,6 +16,8 @@ if portal_type == "Slave Instance":
slap_state = context.getSlapState()
if portal_type == "Software Instance" and slap_state == "stop_requested":
return {
"portal_type": context.getPortalType(),
"reference": context.getReference(),
"user": "SlapOS Master",
"text": "#nodata is an stopped instance %s" % context.getReference(),
"monitor_url": context.Base_getStatusMonitorUrl(),
......@@ -22,6 +26,8 @@ if portal_type == "Software Instance" and slap_state == "stop_requested":
if portal_type == "Software Instance" and slap_state == "destroy_requested":
return {
"portal_type": context.getPortalType(),
"reference": context.getReference(),
"user": "SlapOS Master",
"text": "#nodata is an destroyed instance %s" % context.getReference(),
"monitor_url": context.Base_getStatusMonitorUrl(),
......
......@@ -35,7 +35,6 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded" />
<tal:block tal:define="header python: 'Computer Network :${title}';
......@@ -43,6 +42,21 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
......@@ -51,16 +65,71 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<tal:block define="document_title python: 'TEST-SLAPOSJS-NETWORK-COMPUTER 0';">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/create_simple_compute_node" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<!-- check site -->
<tr>
<td rowspan="1" colspan="3">Add server into the site</td>
</tr>
<!-- Broken history to return
<tr>
<tal:block define="menu_item python: 'Servers'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-NETWORK-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-NETWORK-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td>//a[text()="TEST-SLAPOSJS-NETWORK-COMPUTER 0"]</td>
<td></td>
</tr>
<tal:block tal:define="header python: 'Compute Node: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-COMPUTER 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td colspan="3"><b> Add Compute Node into Computer Network </b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="subordination"]</td>
<td></td>
</tr>
-->
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="subordination"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="subordination"]</td>
<td>TEST-SLAPOSJS-NETWORK 1</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_call_slapgrid" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
......
......@@ -226,10 +226,79 @@
<td>www.erp5.com</td>
</tr>
<!-- Update Parameters -->
<!-- Update Add Ticket -->
<!-- Update Stop -->
<!-- Update Start -->
<tal:block define="menu_action python: 'Stop'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Stop Instance Tree:${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-FRONTEND 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Stopped.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tal:block define="menu_action python: 'Start'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Start Instance Tree:${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-FRONTEND 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Started.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-error')]//a[contains(text(), 'Instance') and contains(@href, 'TEST-SLAPOSJS-SERVICE-FRONTEND 0')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-error')]//a[contains(text(), 'Instance') and contains(@href, 'TEST-SLAPOSJS-SERVICE-FRONTEND 0')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-no-data')]//a[contains(text(), 'Instance')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-no-data')]//a[contains(text(), 'Instance')]</td>
<td></td>
</tr>
<tal:block define="menu_action python: 'Destroy'">
......@@ -247,6 +316,29 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
......
......@@ -142,6 +142,16 @@
<td>//a[text()="TEST-SLAPOSJS-SERVICE-FRONTEND 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-FRONTEND 0"]</td>
......@@ -158,11 +168,102 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<!-- Update Parameters -->
<!-- Update Add Ticket -->
<!-- Update Stop -->
<!-- Update Start -->
<tal:block define="menu_action python: 'Stop'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Stop Instance Tree:${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-FRONTEND 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Stopped.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Stopped')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tal:block define="menu_action python: 'Start'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Start Instance Tree:${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-FRONTEND 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Started.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave Only')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tal:block define="menu_action python: 'Destroy'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
......@@ -178,6 +279,26 @@
'text': 'Service is Destroyed.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Destroyed')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-color-white')]//a[contains(text(), 'Slave')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
......
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