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
Xavier Thompson
slapos.core
Commits
a23b5ca0
Commit
a23b5ca0
authored
Jul 04, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Update status gadget CSS/HTML
Now we only have a single div (status) rather them two.
parent
a9a7524e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
42 deletions
+13
-42
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.css
...lateItem/web_page_module/rjs_gadget_slapos_status_css.css
+2
-6
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
-6
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
+4
-24
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_js.xml
...plateItem/web_page_module/rjs_gadget_slapos_status_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.css
View file @
a23b5ca0
...
...
@@ -16,12 +16,8 @@
clear
:
left
;
}
.ui-block-50
{
width
:
50%
!important
;
}
.ui-btn-hide
{
display
:
none
!important
;
.ui-block
{
width
:
100%
}
.ui-bar
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_css.xml
View file @
a23b5ca0
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
1.40386.24679.243
20
</string>
</value>
<value>
<string>
100
9.35848.48037.158
20
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
16
58172898.38
</float>
<float>
16
88482381.84
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.html
View file @
a23b5ca0
...
...
@@ -14,15 +14,10 @@
</head>
<body>
<div
class=
"ui-block-a ui-block
-50
main-status"
>
<div
class=
"ui-block-a ui-block 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"
>
Node
</a>
</div>
</div>
<div
class=
"ui-block-c ui-block-50 sub-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"
>
Partitions
</a>
</div>
</div>
</body>
</html>
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_html.xml
View file @
a23b5ca0
...
...
@@ -282,7 +282,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
1.26171.19762.4285
4
</string>
</value>
<value>
<string>
100
9.35843.10522.3802
4
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -302,7 +302,7 @@
</tuple>
<state>
<tuple>
<float>
16
57906237.7
5
</float>
<float>
16
88481140.0
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_js.js
View file @
a23b5ca0
...
...
@@ -128,32 +128,25 @@
}
function
getStatus
(
gadget
,
result
)
{
var
i
,
status_class
=
'
ui-btn-no-data
'
,
right_class
=
'
ui-btn-no-data
'
,
var
status_class
=
'
ui-btn-no-data
'
,
main_status_div
=
gadget
.
element
.
querySelector
(
"
.main-status
"
),
sub_status_div
=
gadget
.
element
.
querySelector
(
"
.sub-status
"
),
monitor_url
=
''
,
main_link_configuration_dict
=
{
class
:
"
ui-btn ui-btn-icon-left ui-icon-desktop
"
},
sub_link_configuration_dict
=
{
class
:
"
ui-btn ui-btn-icon-left ui-icon-desktop
"
};
if
(
result
&&
result
.
monitor_url
)
{
monitor_url
=
result
.
monitor_url
monitor_url
=
result
.
monitor_url
;
}
if
(
result
&&
result
.
portal_type
&&
result
.
portal_type
===
"
Compute Node
"
)
{
main_link_configuration_dict
.
text
=
'
Node
'
;
main_link_configuration_dict
.
class
=
"
ui-btn ui-btn-icon-left
"
;
right_class
=
"
ui-btn-hide
"
;
status_class
=
getComputeNodeStatus
(
result
);
}
else
if
(
result
&&
result
.
portal_type
&&
result
.
portal_type
===
"
Software Installation
"
)
{
status_class
=
getSoftwareInstallationStatus
(
result
);
main_link_configuration_dict
.
text
=
"
Installation
"
;
right_class
=
"
ui-btn-hide
"
;
if
(
status_class
===
"
ui-btn-is-building
"
)
{
main_link_configuration_dict
.
text
=
"
Building
"
;
status_class
=
"
ui-btn-no-data
"
;
...
...
@@ -168,7 +161,6 @@
result
.
portal_type
===
"
Slave Instance
"
))
{
status_class
=
getInstanceStatus
(
result
);
right_class
=
"
ui-btn-hide
"
;
if
(
status_class
===
'
ui-btn-is-slave
'
)
{
status_class
=
'
ui-btn-color-white
'
;
main_link_configuration_dict
.
text
=
'
Slave
'
;
...
...
@@ -190,7 +182,6 @@
result
.
portal_type
===
"
Instance Tree
"
)
{
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-color-white
'
;
main_link_configuration_dict
.
text
=
'
Slave Only
'
;
...
...
@@ -211,28 +202,16 @@
}
else
{
main_link_configuration_dict
.
text
=
'
Node
'
;
main_link_configuration_dict
.
class
=
"
ui-btn ui-btn-icon-left
"
;
right_class
=
"
ui-btn-hide
"
;
status_class
=
getComputeNodeStatusList
(
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
},
[
domsugar
(
"
a
"
,
main_link_configuration_dict
)
]);
domsugar
(
sub_status_div
.
querySelector
(
'
div
'
),
{
class
:
"
ui-bar ui-corner-all last-child
"
+
right_class
},
[
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
;
}
...
...
@@ -244,7 +223,8 @@
.
onLoop
(
function
()
{
var
gadget
=
this
;
if
(
typeof
gadget
.
state
.
jio_key
===
'
string
'
&&
gadget
.
state
.
jio_key
!==
''
)
{
if
(
typeof
gadget
.
state
.
jio_key
===
'
string
'
&&
gadget
.
state
.
jio_key
!==
''
)
{
return
gadget
.
jio_get
(
gadget
.
state
.
jio_key
)
.
push
(
function
(
result
)
{
var
state_dict
=
result
.
news
||
{};
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_status_js.xml
View file @
a23b5ca0
...
...
@@ -278,7 +278,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1009.346
79.51690.7697
</string>
</value>
<value>
<string>
1009.346
88.1170.33860
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>
16884
11520.8
6
</float>
<float>
16884
81138.4
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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