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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
0ce92760
Commit
0ce92760
authored
Oct 11, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: drop rjs_gadget_slapos_compute_node
parent
87e4c388
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
920 deletions
+0
-920
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_html.html
...ge_module/rjs_gadget_slapos_compute_node_status_html.html
+0
-39
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_html.xml
...age_module/rjs_gadget_slapos_compute_node_status_html.xml
+0
-366
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_js.js
...b_page_module/rjs_gadget_slapos_compute_node_status_js.js
+0
-149
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_js.xml
..._page_module/rjs_gadget_slapos_compute_node_status_js.xml
+0
-362
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
...jio/bt/template_keep_last_workflow_history_only_path_list
+0
-2
master/bt5/slapos_jio/bt/template_path_list
master/bt5/slapos_jio/bt/template_path_list
+0
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_html.html
deleted
100644 → 0
View file @
87e4c388
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Background
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"handlebars.js"
></script>
<script
src=
"gadget_slapos_compute_node_status.js"
></script>
<link
href=
"gadget_slapos_compute_node_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"inline-status-template"
type=
"text/x-handlebars-template"
>
<
div
class
=
"
ui-block-a
"
style
=
"
width:50%
"
><
div
class
=
"
ui-bar ui-corner-all first-child {{status_class}}
"
style
=
"
{{status_style}}
"
>
<
a
class
=
"
ui-btn ui-btn-icon-left ui-icon-desktop
"
href
=
{{
monitor_url
}}
target
=
_blank
>
{{
status_title
}}
<
/a></
div
><
/div
>
<
div
class
=
"
ui-block-c
"
style
=
"
width:50%
"
><
div
class
=
"
ui-bar ui-corner-all last-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
<
a
class
=
"
ui-btn ui-btn-icon-left ui-icon-desktop
"
href
=
"
{{monitor_url}}
"
target
=
_blank
>
{{
right_title
}}
<
/a></
div
><
/div
>
</script>
<script
id=
"loading-template"
type=
"text/x-handlebars-template"
>
<
button
data
-
i18n
=
"
loading
"
type
=
"
submit
"
class
=
"
responsive ui-btn ui-icon-spinner ui-icon-spin ui-btn-icon-center ui-disabled
"
style
=
"
border:none;
"
>
loading
<
/button
>
</script>
</head>
<body>
<div
class=
"ui-block-a"
style=
"width:50%"
>
<div
class=
"ui-bar ui-corner-all first-child ui-btn-no-data"
>
<a
class=
"ui-btn ui-btn-icon-left ui-icon-spinner"
style=
"color: white !important;"
>
Compute Node
</a>
</div>
</div>
<div
class=
"ui-block-c"
style=
"width:50%"
>
<div
class=
"ui-bar ui-corner-all first-child ui-btn-no-data"
>
<a
class=
"ui-btn ui-btn-icon-left ui-icon-spinner"
style=
"color: white !important;"
>
Partitions
</a>
</div>
</div>
</body>
</html>
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_html.xml
deleted
100644 → 0
View file @
87e4c388
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_js.js
deleted
100644 → 0
View file @
87e4c388
/*globals console, window, rJS, RSVP, loopEventListener, i18n, Handlebars, $*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkComputeNodeStatus
(
options
)
{
if
(
!
options
||
!
options
.
news
||
!
options
.
news
.
text
)
{
return
'
ui-btn-no-data
'
;
}
if
(
options
.
news
.
text
.
startsWith
(
"
#access
"
))
{
if
(
options
.
news
.
no_data_since_15_minutes
)
{
return
'
ui-btn-error
'
;
}
if
(
options
.
news
.
no_data_since_5_minutes
)
{
return
'
ui-btn-warning
'
;
}
return
'
ui-btn-ok
'
;
}
if
(
options
.
news
.
no_data
)
{
return
'
ui-btn-no-data
'
;
}
return
'
ui-btn-error
'
;
}
function
checkComputePartitionStatus
(
options
)
{
var
message
,
compute_partition
,
partition_class
=
'
ui-btn-ok
'
,
error_amount
=
0
,
total_amount
=
0
;
if
(
!
options
||
!
options
.
compute_partition_news
)
{
return
'
ui-btn-no-data
'
;
}
for
(
compute_partition
in
options
.
compute_partition_news
)
{
if
(
options
.
compute_partition_news
.
hasOwnProperty
(
compute_partition
)
&&
options
.
compute_partition_news
[
compute_partition
].
text
)
{
message
=
options
.
compute_partition_news
[
compute_partition
].
text
;
if
(
message
.
startsWith
(
"
#error
"
))
{
partition_class
=
'
ui-btn-warning
'
;
error_amount
+=
1
;
}
total_amount
+=
1
;
if
((
error_amount
>
0
)
&&
(
error_amount
<
total_amount
))
{
// No need to continue the result will be a warnning
return
partition_class
;
}
}
}
if
(
total_amount
===
0
)
{
return
'
ui-btn-no-data
'
;
}
if
(
error_amount
===
total_amount
)
{
// No need to continue the result will be a warnning
return
'
ui-btn-error
'
;
}
return
partition_class
;
}
function
getStatus
(
gadget
,
result
)
{
var
monitor_url
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Compute Node
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
''
,
right_style
=
''
;
if
(
result
&&
result
.
news
&&
result
.
news
.
compute_node
)
{
status_class
=
checkComputeNodeStatus
({
news
:
result
.
news
.
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
)
{
right_class
=
checkComputePartitionStatus
(
{
compute_partition_news
:
result
.
news
.
partition
}
);
}
}
monitor_url
=
'
https://monitor.app.officejs.com/#/
'
+
'
?page=ojsm_dispatch&query=portal_type%3A%22Software%20Instance%22%20
'
+
'
AND%20aggregate_reference%3A%22
'
+
result
.
reference
+
'
%22
'
;
gadget
.
element
.
innerHTML
=
inline_status_template
({
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
right_class
:
right_class
,
right_title
:
right_title
,
right_style
:
right_style
});
return
gadget
;
}
function
getStatusLoop
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
return
getStatus
(
gadget
,
result
);
});
}
gadget_klass
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
gadget
.
props
.
hateoas_url
=
url
;
});
})
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
.
declareJob
(
"
getStatus
"
,
function
(
result
)
{
var
gadget
=
this
;
return
getStatus
(
gadget
,
{
news
:
result
});
})
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatusLoop
(
gadget
);
},
300000
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
(
options
.
value
.
result
);
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_compute_node_status_js.xml
deleted
100644 → 0
View file @
87e4c388
This diff is collapsed.
Click to expand it.
master/bt5/slapos_jio/bt/template_keep_last_workflow_history_only_path_list
View file @
0ce92760
...
@@ -176,8 +176,6 @@ web_page_module/rjs_gadget_slapos_appcache
...
@@ -176,8 +176,6 @@ web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_compute_node_status_css
web_page_module/rjs_gadget_slapos_compute_node_status_css
web_page_module/rjs_gadget_slapos_compute_node_status_html
web_page_module/rjs_gadget_slapos_compute_node_status_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
...
...
master/bt5/slapos_jio/bt/template_path_list
View file @
0ce92760
...
@@ -176,8 +176,6 @@ web_page_module/rjs_gadget_slapos_appcache
...
@@ -176,8 +176,6 @@ web_page_module/rjs_gadget_slapos_appcache
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_html
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_compute_node_map_js
web_page_module/rjs_gadget_slapos_compute_node_status_css
web_page_module/rjs_gadget_slapos_compute_node_status_css
web_page_module/rjs_gadget_slapos_compute_node_status_html
web_page_module/rjs_gadget_slapos_compute_node_status_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_css
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_html
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
web_page_module/rjs_gadget_slapos_event_discussion_entry_js
...
...
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