Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.core
Commits
33659245
Commit
33659245
authored
Jul 26, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor status gadget (unify)
This fixed badly merged
nexedi/slapos!394
, that contained rebased commits
parent
69bb9229
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
372 additions
and
58 deletions
+372
-58
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js.js
...module/rjs_gadget_erp5_page_slap_instance_tree_view_js.js
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js.xml
...odule/rjs_gadget_erp5_page_slap_instance_tree_view_js.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_software_installation_view_js.js
...js_gadget_erp5_page_slap_software_installation_view_js.js
+4
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_software_installation_view_js.xml
...s_gadget_erp5_page_slap_software_installation_view_js.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.css
...lateItem/web_page_module/rjs_gadget_slapos_status_css.css
+19
-7
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.xml
...lateItem/web_page_module/rjs_gadget_slapos_status_css.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.html
...teItem/web_page_module/rjs_gadget_slapos_status_html.html
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.xml
...ateItem/web_page_module/rjs_gadget_slapos_status_html.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_js.js
...mplateItem/web_page_module/rjs_gadget_slapos_status_js.js
+35
-23
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/InstanceTree_getNewsDict.py
...l_skins/slapos_hal_json_style/InstanceTree_getNewsDict.py
+0
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SoftwareInstance_getNewsDict.py
...ins/slapos_hal_json_style/SoftwareInstance_getNewsDict.py
+6
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSNetwork.zpt
...eItem/portal_tests/slaposjs_zuite/testSlapOSJSNetwork.zpt
+79
-10
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
...eItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
+96
-4
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSServiceSlave.zpt
.../portal_tests/slaposjs_zuite/testSlapOSJSServiceSlave.zpt
+123
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js.js
View file @
33659245
...
...
@@ -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
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js.xml
View file @
33659245
...
...
@@ -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>
165
5115718.4
5
</float>
<float>
165
8173330.6
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_software_installation_view_js.js
View file @
33659245
...
...
@@ -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
,
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_software_installation_view_js.xml
View file @
33659245
...
...
@@ -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>
165
5115861.9
1
</float>
<float>
165
7906193.2
1
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.css
View file @
33659245
...
...
@@ -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,8 +109,12 @@
text-align
:
center
;
}
a
.ui-icon-desktop
::before
{
margin-left
:
5px
;
}
/* for Software Logo*/
div
.editable_div.logo
img
{
object-fit
:
cover
;
max-height
:
3.5em
;
}
\ No newline at end of file
}
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.xml
View file @
33659245
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
0.57958.38485.23927
</string>
</value>
<value>
<string>
100
1.40386.24679.24320
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
165
5110268.61
</float>
<float>
165
8172898.38
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.html
View file @
33659245
...
...
@@ -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"
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.xml
View file @
33659245
...
...
@@ -278,7 +278,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
0.54034.1029.62310
</string>
</value>
<value>
<string>
100
1.26171.19762.42854
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -296,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>
165
6702663.09
</float>
<float>
165
7906237.75
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_js.js
View file @
33659245
...
...
@@ -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,8 +359,7 @@
// 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
);
});
}(
window
,
rJS
,
domsugar
));
}(
window
,
rJS
,
domsugar
));
\ No newline at end of file
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/InstanceTree_getNewsDict.py
View file @
33659245
news_dict
=
{
"instance"
:
[]}
news_dict
=
{
"portal_type"
:
context
.
getPortalType
(),
"reference"
:
context
.
getReference
(),
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/SoftwareInstance_getNewsDict.py
View file @
33659245
...
...
@@ -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
(),
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSNetwork.zpt
View file @
33659245
...
...
@@ -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>
<!-- check site -->
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page"
/>
<tr>
<td
rowspan=
"1"
colspan=
"3"
>
Add server into the site
</td>
</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[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>
<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"
/>
<!-- Broken history to return
<tr>
<td>click</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
-->
<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"
/>
...
...
@@ -255,4 +324,4 @@
</table>
</body>
</html>
</html>
\ No newline at end of file
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSService.zpt
View file @
33659245
...
...
@@ -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"
>
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSServiceSlave.zpt
View file @
33659245
...
...
@@ -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"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment