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
01bfd371
Commit
01bfd371
authored
Jun 27, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Use onLoop instead RSVP.delay and make a major clean up on the code.
parent
a298c46e
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
779 additions
and
513 deletions
+779
-513
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_html.html
...b_page_module/rjs_gadget_slapos_computer_status_html.html
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_html.xml
...eb_page_module/rjs_gadget_slapos_computer_status_html.xml
+41
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.js
...m/web_page_module/rjs_gadget_slapos_computer_status_js.js
+50
-77
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.xml
.../web_page_module/rjs_gadget_slapos_computer_status_js.xml
+41
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_html.html
...e/rjs_gadget_slapos_hosting_subscription_status_html.html
+0
-7
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_html.xml
...le/rjs_gadget_slapos_hosting_subscription_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_js.js
...odule/rjs_gadget_slapos_hosting_subscription_status_js.js
+42
-66
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_js.xml
...dule/rjs_gadget_slapos_hosting_subscription_status_js.xml
+30
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_html.html
...ge_module/rjs_gadget_slapos_installation_status_html.html
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_html.xml
...age_module/rjs_gadget_slapos_installation_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_js.js
...b_page_module/rjs_gadget_slapos_installation_status_js.js
+38
-64
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_js.xml
..._page_module/rjs_gadget_slapos_installation_status_js.xml
+30
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.html
...b_page_module/rjs_gadget_slapos_instance_status_html.html
+0
-7
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.xml
...eb_page_module/rjs_gadget_slapos_instance_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_js.js
...m/web_page_module/rjs_gadget_slapos_instance_status_js.js
+39
-62
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_js.xml
.../web_page_module/rjs_gadget_slapos_instance_status_js.xml
+30
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_html.html
...eb_page_module/rjs_gadget_slapos_network_status_html.html
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_html.xml
...web_page_module/rjs_gadget_slapos_network_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_js.js
...em/web_page_module/rjs_gadget_slapos_network_status_js.js
+47
-72
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_js.xml
...m/web_page_module/rjs_gadget_slapos_network_status_js.xml
+30
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_html.html
...eb_page_module/rjs_gadget_slapos_project_status_html.html
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_html.xml
...web_page_module/rjs_gadget_slapos_project_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_js.js
...em/web_page_module/rjs_gadget_slapos_project_status_js.js
+49
-75
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_js.xml
...m/web_page_module/rjs_gadget_slapos_project_status_js.xml
+30
-3
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_html.html
...m/web_page_module/rjs_gadget_slapos_site_status_html.html
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_html.xml
...em/web_page_module/rjs_gadget_slapos_site_status_html.xml
+40
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_js.js
...eItem/web_page_module/rjs_gadget_slapos_site_status_js.js
+1
-9
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_js.xml
...Item/web_page_module/rjs_gadget_slapos_site_status_js.xml
+41
-3
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_html.html
View file @
01bfd371
...
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_computer_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,15 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
ERP5TypeTestCase
</string>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_computer_status.html
</string>
</value>
...
...
@@ -91,6 +111,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.58
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.65216.36649.5442
5
</string>
</value>
<value>
<string>
96
6.58781.43824.363
5
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
15
20342668.3
</float>
<float>
15
30120172.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkComputerStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
...
@@ -73,89 +65,70 @@
return
partition_class
;
}
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
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getComputerStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
// return gadget.jio_get("computer_module/20171103-94D99B");
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
monitor_url
,
var
monitor_url
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
right_style
=
'
color: transparent !important;
'
;
status_style
=
''
,
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkComputerStatus
(
result
);
right_class
=
checkComputerPartitionStatus
(
result
);
i
=
options
;
// right_title = value.max? Math.round(value.max * 100 * 10) / 10 + '%': 'nan';
right_style
=
''
;
status_style
=
''
;
template
=
inline_status_template
;
monitor_url
=
'
https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type%3A%22Software%20Instance%22%20AND%20aggregate_reference%3A%22
'
+
result
.
reference
+
'
%22
'
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
//monitor_url = "";
}
gadget
.
element
.
innerHTML
=
template
({
gadget
.
element
.
innerHTML
=
inline_status_
template
({
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_title
:
right_title
,
right_style
:
right_style
});
return
RSVP
.
delay
(
300000
);
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getComputerStatus
(
options
);
return
gadget
;
});
}
return
queue
.
push
(
getComputerStatus
(
options
));
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
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -69,6 +80,15 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
ERP5TypeTestCase
</string>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_computer_status.js
</string>
</value>
...
...
@@ -87,6 +107,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.64
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -230,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.42326.49975.23552
</string>
</value>
<value>
<string>
96
8.33041.14393.16810
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
15
20343714.5
7
</float>
<float>
15
30119165.
7
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_html.html
View file @
01bfd371
...
...
@@ -12,13 +12,6 @@
<script
src=
"gadget_slapos_hosting_subscription_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_hosting_subscription_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.83
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.42084.6603.48605
</string>
</value>
<value>
<string>
96
8.33074.267.61440
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20343086.84
</float>
<float>
15
30120259.86
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkHostingSubscriptionStatus
(
options
)
{
var
message
,
...
...
@@ -52,78 +44,62 @@
return
partition_class
;
}
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
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getInstallationStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
monitor_url
,
var
monitor_url
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Instances
'
,
status_style
=
"
color: transparent !important;
"
;
status_style
=
"
"
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkHostingSubscriptionStatus
(
result
);
status_style
=
''
;
template
=
inline_status_template
;
monitor_url
=
'
https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type%3A%22Hosting%20Subscription%22%20AND%20title%3A
'
+
result
.
title
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
gadget
.
element
.
innerHTML
=
template
({
gadget
.
element
.
innerHTML
=
inline_status_template
({
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
status_style
:
status_style
});
return
RSVP
.
delay
(
300000
);
})
return
gadget
;
}
);
}
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getInstallationStatus
(
options
);
gadget_klass
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
gadget
.
props
.
hateoas_url
=
url
;
});
}
return
queue
.
push
(
getInstallationStatus
(
options
));
})
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_js.xml
View file @
01bfd371
...
...
@@ -69,6 +69,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_hosting_subscription_status.js
</string>
</value>
...
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.86
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +243,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +257,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.17481.5463.24917
</string>
</value>
<value>
<string>
96
8.33068.10194.31522
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209652.66
</float>
<float>
15
30119779.91
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_html.html
View file @
01bfd371
...
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_installation_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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}}
"
>
{{
status_title
}}
<
/div></
div
>
<
div
class
=
"
ui-block-c
"
style
=
"
width:50%
"
><
div
class
=
"
ui-bar ui-corner-all last-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/div></
div
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_installation_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.9
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.65289.26932.60672
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20343230.79
</float>
<float>
15
30120100.87
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkInstallationStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
...
@@ -33,6 +25,29 @@
}
}
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Installation
'
,
status_style
=
""
;
status_class
=
checkInstallationStatus
(
result
);
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
gadget
.
element
.
innerHTML
=
inline_status_template
({
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
});
return
gadget
;
});
}
gadget_klass
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
...
...
@@ -48,61 +63,20 @@
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getInstallationStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Installation
'
,
status_style
=
"
color: transparent !important;
"
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkInstallationStatus
(
result
);
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
// i = options;
// right_title = value.max? Math.round(value.max * 100 * 10) / 10 + '%': 'nan';
status_style
=
''
;
template
=
inline_status_template
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
gadget
.
element
.
innerHTML
=
template
({
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
return
RSVP
.
delay
(
300000
);
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getInstallationStatus
(
options
);
});
}
return
queue
.
push
(
getInstallationStatus
(
options
));
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_js.xml
View file @
01bfd371
...
...
@@ -69,6 +69,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_installation_status.js
</string>
</value>
...
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884656.94
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +243,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +257,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.19451.40512.41966
</string>
</value>
<value>
<string>
96
8.33049.60346.61764
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209691.44
</float>
<float>
15
30119205.48
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.html
View file @
01bfd371
...
...
@@ -12,13 +12,6 @@
<script
src=
"gadget_slapos_instance_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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}}
"
>
{{
status_title
}}
<
/div></
div
>
</script>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_instance_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.03
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.19451.40512.41966
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20343033.6
</float>
<float>
15
30120129.88
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkInstanceStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
...
@@ -31,6 +23,30 @@
}
}
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Instance
'
,
status_style
=
""
;
status_class
=
checkInstanceStatus
(
result
);
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
gadget
.
element
.
innerHTML
=
inline_status_template
({
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
});
return
gadget
;
});
}
gadget_klass
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
...
...
@@ -46,59 +62,20 @@
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getInstallationStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Instance
'
,
status_style
=
"
color: transparent !important;
"
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkInstanceStatus
(
result
);
status_style
=
''
;
template
=
inline_status_template
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
gadget
.
element
.
innerHTML
=
template
(
{
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
return
RSVP
.
delay
(
300000
);
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getInstallationStatus
(
options
);
});
}
return
queue
.
push
(
getInstallationStatus
(
options
));
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_js.xml
View file @
01bfd371
...
...
@@ -69,6 +69,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_instance_status.js
</string>
</value>
...
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.06
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +243,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +257,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.19451.40512.41966
</string>
</value>
<value>
<string>
96
8.33056.31297.6997
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209680.32
</float>
<float>
15
30119074.09
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_html.html
View file @
01bfd371
...
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_network_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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}}
"
>
{{
status_title
}}
<
/div></
div
>
<
div
class
=
"
ui-block-c
"
style
=
"
width:50%
"
><
div
class
=
"
ui-bar ui-corner-all last-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/div></
div
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_network_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.31
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.19451.40512.41966
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20342734.64
</float>
<float>
15
30120141.03
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkComputerStatus
(
options
)
{
if
(
!
options
)
{
...
...
@@ -125,85 +117,68 @@
return
status
;
}
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
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getNetworkStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
status_class
=
'
ui-btn-no-data
'
,
var
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
right_style
=
'
color: transparent !important;
'
;
status_style
=
''
,
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkNetworkStatus
(
result
);
right_class
=
checkNetworkPartitionStatus
(
result
);
i
=
options
;
// right_title = value.max? Math.round(value.max * 100 * 10) / 10 + '%': 'nan';
right_style
=
''
;
status_style
=
''
;
template
=
inline_status_template
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
gadget
.
element
.
innerHTML
=
template
({
gadget
.
element
.
innerHTML
=
inline_status_
template
({
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_title
:
right_title
,
right_style
:
right_style
});
return
RSVP
.
delay
(
300000
);
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getNetworkStatus
(
options
);
return
gadget
;
});
}
return
queue
.
push
(
getNetworkStatus
(
options
));
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
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_js.xml
View file @
01bfd371
...
...
@@ -69,6 +69,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_network_status.js
</string>
</value>
...
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.33
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +243,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +257,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.7092.16949.32648
</string>
</value>
<value>
<string>
96
8.33063.24201.50227
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209669.6
9
</float>
<float>
15
30119497.3
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_html.html
View file @
01bfd371
...
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_project_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_project_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.52
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.42084.41084.17220
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20342719.17
</float>
<float>
15
30120154.6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkComputerStatus
(
options
)
{
if
(
!
options
)
{
...
...
@@ -126,87 +118,69 @@
}
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
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
status_style
,
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
function
getStatus
(
gadget
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
})
.
push
(
function
(
result
)
{
var
project
,
data_supply_line
,
data_supply_line_list
,
count
=
0
,
tmp
,
sum
=
0
,
i
,
no_data
=
true
,
no_data_since_24_hours
=
true
,
value
=
""
,
template
,
monitor_url
,
var
monitor_url
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
right_style
=
'
color: transparent !important;
'
;
status_style
=
''
,
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkProjectStatus
(
result
);
right_class
=
checkProjectPartitionStatus
(
result
);
i
=
options
;
// right_title = value.max? Math.round(value.max * 100 * 10) / 10 + '%': 'nan';
right_style
=
''
;
status_style
=
''
;
template
=
inline_status_template
;
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
}
monitor_url
=
gadget
.
props
.
hateoas_url
+
options
.
value
.
jio_key
+
'
/Base_redirectToMonitor
'
;
gadget
.
element
.
innerHTML
=
template
({
monitor_url
=
gadget
.
props
.
hateoas_url
+
gadget
.
options
.
value
.
jio_key
+
'
/Base_redirectToMonitor
'
;
gadget
.
element
.
innerHTML
=
inline_status_template
({
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_title
:
status_title
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_title
:
right_title
,
right_style
:
right_style
});
return
RSVP
.
delay
(
300000
);
})
return
gadget
;
}
);
}
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getStatus
(
options
);
gadget_klass
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
gadget
.
props
.
hateoas_url
=
url
;
});
}
return
queue
.
push
(
getStatus
(
options
));
})
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
})
.
onLoop
(
function
()
{
var
gadget
=
this
;
return
getStatus
(
gadget
);
},
300000
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
return
gadget
.
getStatus
();
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_js.xml
View file @
01bfd371
...
...
@@ -69,6 +69,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_project_status.js
</string>
</value>
...
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.55
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +243,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +257,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.17488.45396.32614
</string>
</value>
<value>
<string>
96
8.33071.21265.51541
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209644.2
9
</float>
<float>
15
30119961.6
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_html.html
View file @
01bfd371
...
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_site_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
id=
"sensor-status-template"
type=
"text/x-handlebars-template"
>
<
ul
class
=
"
grid-items
"
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{status_class}}
"
data
-
i18n
=
{{
status_title
}}
>
{{
status_title
}}
<
/a></
li
>
<
li
><
a
class
=
"
ui-btn ui-first-child {{right_class}}
"
style
=
"
{{right_style}}
"
>
{{
right_title
}}
<
/a></
li
>
<
/ul
>
</script>
<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
>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_html.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_site_status.html
</string>
</value>
...
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.62
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
...
...
@@ -234,7 +272,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.64689.21845.43827
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>
15
20342697.9
2
</float>
<float>
15
30120162.6
2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_js.js
View file @
01bfd371
...
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
sensor_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
sensor-status-template
"
)
.
innerHTML
,
sensor_status_template
=
Handlebars
.
compile
(
sensor_status_source
),
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
function
checkComputerStatus
(
options
)
{
if
(
!
options
)
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_js.xml
View file @
01bfd371
...
...
@@ -39,6 +39,17 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<list>
<string>
Manager
</string>
<string>
Authenticated
</string>
<string>
Developer
</string>
<string>
Owner
</string>
</list>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
...
...
@@ -69,6 +80,14 @@
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_site_status.js
</string>
</value>
...
...
@@ -87,6 +106,25 @@
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884657.64
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -216,7 +254,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +268,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.17501.33036.24234
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +286,7 @@
</tuple>
<state>
<tuple>
<float>
15
19209630.33
</float>
<float>
15
30119121.08
</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