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
Lisa Casino
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 @@
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_computer_status.js"
></script>
<script
src=
"gadget_slapos_computer_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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}}
"
>
<
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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,15 @@
...
@@ -73,6 +84,15 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
ERP5TypeTestCase
</string>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_computer_status.html
</string>
</value>
<value>
<string>
gadget_slapos_computer_status.html
</string>
</value>
...
@@ -91,6 +111,25 @@
...
@@ -91,6 +111,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +273,7 @@
...
@@ -234,7 +273,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +291,7 @@
...
@@ -252,7 +291,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20342668.3
</float>
<float>
15
30120172.2
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_computer_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkComputerStatus
(
options
)
{
function
checkComputerStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
@@ -73,89 +65,70 @@
...
@@ -73,89 +65,70 @@
return
partition_class
;
return
partition_class
;
}
}
gadget_klass
function
getStatus
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
return
new
RSVP
.
Queue
()
gadget
.
props
=
{};
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
hateoas_url
"
)
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
.
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");
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
project
,
var
monitor_url
,
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
,
status_class
=
'
ui-btn-no-data
'
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Computer
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
status_style
=
''
,
right_style
=
'
color: transparent !important;
'
;
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkComputerStatus
(
result
);
status_class
=
checkComputerStatus
(
result
);
right_class
=
checkComputerPartitionStatus
(
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
'
;
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
'
)
{
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
status_style
=
"
color: transparent !important;
"
;
//monitor_url = "";
}
}
gadget
.
element
.
innerHTML
=
template
({
gadget
.
element
.
innerHTML
=
inline_status_
template
({
monitor_url
:
monitor_url
,
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_class
:
status_class
,
status_title
:
status_title
,
status_title
:
status_title
,
status_style
:
status_style
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_class
:
right_class
,
right_title
:
right_title
,
right_title
:
right_title
,
right_style
:
right_style
right_style
:
right_style
});
});
return
RSVP
.
delay
(
300000
);
return
gadget
;
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getComputerStatus
(
options
);
});
});
}
}
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
));
}(
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -69,6 +80,15 @@
...
@@ -69,6 +80,15 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
ERP5TypeTestCase
</string>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_computer_status.js
</string>
</value>
<value>
<string>
gadget_slapos_computer_status.js
</string>
</value>
...
@@ -87,6 +107,25 @@
...
@@ -87,6 +107,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -230,7 +269,7 @@
...
@@ -230,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +287,7 @@
...
@@ -248,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20343714.5
7
</float>
<float>
15
30119165.
7
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_html.html
View file @
01bfd371
...
@@ -12,13 +12,6 @@
...
@@ -12,13 +12,6 @@
<script
src=
"gadget_slapos_hosting_subscription_status.js"
></script>
<script
src=
"gadget_slapos_hosting_subscription_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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}}
"
>
<
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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_hosting_subscription_status.html
</string>
</value>
<value>
<string>
gadget_slapos_hosting_subscription_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20343086.84
</float>
<float>
15
30120259.86
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_hosting_subscription_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkHostingSubscriptionStatus
(
options
)
{
function
checkHostingSubscriptionStatus
(
options
)
{
var
message
,
var
message
,
...
@@ -52,78 +44,62 @@
...
@@ -52,78 +44,62 @@
return
partition_class
;
return
partition_class
;
}
}
gadget_klass
function
getStatus
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
return
new
RSVP
.
Queue
()
gadget
.
props
=
{};
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
hateoas_url
"
)
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
.
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
);
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
project
,
var
monitor_url
,
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
,
status_class
=
'
ui-btn-no-data
'
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Instances
'
,
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_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
;
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
'
)
{
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
status_style
=
"
color: transparent !important;
"
;
}
}
gadget
.
element
.
innerHTML
=
inline_status_template
({
gadget
.
element
.
innerHTML
=
template
({
monitor_url
:
monitor_url
,
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_class
:
status_class
,
status_title
:
status_title
,
status_title
:
status_title
,
status_style
:
status_style
,
status_style
:
status_style
middle_style
:
middle_style
});
});
return
RSVP
.
delay
(
300000
);
return
gadget
;
})
}
);
}
.
push
(
function
()
{
gadget_klass
gadget
.
element
.
innerHTML
=
loading_template
();
.
ready
(
function
(
gadget
)
{
return
getInstallationStatus
(
options
);
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
));
}(
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 @@
...
@@ -69,6 +69,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_hosting_subscription_status.js
</string>
</value>
<value>
<string>
gadget_slapos_hosting_subscription_status.js
</string>
</value>
...
@@ -87,6 +95,25 @@
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +243,7 @@
...
@@ -216,7 +243,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +257,7 @@
...
@@ -230,7 +257,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +275,7 @@
...
@@ -248,7 +275,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209652.66
</float>
<float>
15
30119779.91
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_html.html
View file @
01bfd371
...
@@ -12,14 +12,6 @@
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_installation_status.js"
></script>
<script
src=
"gadget_slapos_installation_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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-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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_installation_status.html
</string>
</value>
<value>
<string>
gadget_slapos_installation_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20343230.79
</float>
<float>
15
30120100.87
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_installation_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkInstallationStatus
(
options
)
{
function
checkInstallationStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
@@ -33,6 +25,29 @@
...
@@ -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
gadget_klass
.
ready
(
function
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
gadget
.
props
=
{};
...
@@ -48,61 +63,20 @@
...
@@ -48,61 +63,20 @@
.
declareMethod
(
"
getContent
"
,
function
()
{
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
return
{};
})
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
,
var
gadget
=
this
;
status_style
,
return
getStatus
(
gadget
);
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getInstallationStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
})
})
.
push
(
function
(
result
)
{
.
onLoop
(
function
()
{
var
project
,
var
gadget
=
this
;
data_supply_line
,
return
getStatus
(
gadget
);
data_supply_line_list
,
},
300000
)
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
);
// i = options;
.
declareMethod
(
"
render
"
,
function
(
options
)
{
// right_title = value.max? Math.round(value.max * 100 * 10) / 10 + '%': 'nan';
var
gadget
=
this
;
status_style
=
''
;
gadget
.
options
=
options
;
gadget
.
flag
=
options
.
value
.
jio_key
;
template
=
inline_status_template
;
return
gadget
.
getStatus
();
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
});
});
return
RSVP
.
delay
(
300000
);
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getInstallationStatus
(
options
);
});
}
return
queue
.
push
(
getInstallationStatus
(
options
));
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
}(
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 @@
...
@@ -69,6 +69,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_installation_status.js
</string>
</value>
<value>
<string>
gadget_slapos_installation_status.js
</string>
</value>
...
@@ -87,6 +95,25 @@
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +243,7 @@
...
@@ -216,7 +243,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +257,7 @@
...
@@ -230,7 +257,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +275,7 @@
...
@@ -248,7 +275,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209691.44
</float>
<float>
15
30119205.48
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.html
View file @
01bfd371
...
@@ -12,13 +12,6 @@
...
@@ -12,13 +12,6 @@
<script
src=
"gadget_slapos_instance_status.js"
></script>
<script
src=
"gadget_slapos_instance_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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-a
"
style
=
"
width:50%
"
><
div
class
=
"
ui-bar ui-corner-all first-child {{status_class}}
"
style
=
"
{{status_style}}
"
>
{{
status_title
}}
<
/div></
div
>
</script>
</script>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_html.xml
View file @
01bfd371
...
@@ -39,6 +39,17 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_instance_status.html
</string>
</value>
<value>
<string>
gadget_slapos_instance_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20343033.6
</float>
<float>
15
30120129.88
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_instance_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkInstanceStatus
(
options
)
{
function
checkInstanceStatus
(
options
)
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
if
((
!
options
)
||
(
options
&&
!
options
.
news
))
{
...
@@ -31,6 +23,30 @@
...
@@ -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
gadget_klass
.
ready
(
function
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
gadget
.
props
=
{};
gadget
.
props
=
{};
...
@@ -46,59 +62,20 @@
...
@@ -46,59 +62,20 @@
.
declareMethod
(
"
getContent
"
,
function
()
{
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
return
{};
})
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareJob
(
"
getStatus
"
,
function
()
{
var
gadget
=
this
,
var
gadget
=
this
;
status_style
,
return
getStatus
(
gadget
);
middle_style
,
queue
=
new
RSVP
.
Queue
();
function
getInstallationStatus
(
options
)
{
queue
.
push
(
function
()
{
return
gadget
.
jio_get
(
options
.
value
.
jio_key
);
})
})
.
push
(
function
(
result
)
{
.
onLoop
(
function
()
{
var
project
,
var
gadget
=
this
;
data_supply_line
,
return
getStatus
(
gadget
);
data_supply_line_list
,
},
300000
)
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;
"
;
}
gadget
.
element
.
innerHTML
=
template
(
{
.
declareMethod
(
"
render
"
,
function
(
options
)
{
status_class
:
status_class
,
var
gadget
=
this
;
status_title
:
status_title
,
gadget
.
options
=
options
;
status_style
:
status_style
,
gadget
.
flag
=
options
.
value
.
jio_key
;
middle_style
:
middle_style
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
));
}(
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 @@
...
@@ -69,6 +69,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_instance_status.js
</string>
</value>
<value>
<string>
gadget_slapos_instance_status.js
</string>
</value>
...
@@ -87,6 +95,25 @@
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +243,7 @@
...
@@ -216,7 +243,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +257,7 @@
...
@@ -230,7 +257,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +275,7 @@
...
@@ -248,7 +275,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209680.32
</float>
<float>
15
30119074.09
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_html.html
View file @
01bfd371
...
@@ -12,14 +12,6 @@
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_network_status.js"
></script>
<script
src=
"gadget_slapos_network_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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-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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_network_status.html
</string>
</value>
<value>
<string>
gadget_slapos_network_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20342734.64
</float>
<float>
15
30120141.03
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_network_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkComputerStatus
(
options
)
{
function
checkComputerStatus
(
options
)
{
if
(
!
options
)
{
if
(
!
options
)
{
...
@@ -125,85 +117,68 @@
...
@@ -125,85 +117,68 @@
return
status
;
return
status
;
}
}
function
getStatus
(
gadget
)
{
gadget_klass
return
new
RSVP
.
Queue
()
.
ready
(
function
(
gadget
)
{
.
push
(
function
()
{
gadget
.
props
=
{};
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
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
);
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
project
,
var
status_class
=
'
ui-btn-no-data
'
,
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
=
'
Computer
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
status_style
=
''
,
right_style
=
'
color: transparent !important;
'
;
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkNetworkStatus
(
result
);
status_class
=
checkNetworkStatus
(
result
);
right_class
=
checkNetworkPartitionStatus
(
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
'
)
{
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
status_style
=
"
color: transparent !important;
"
;
}
}
gadget
.
element
.
innerHTML
=
template
({
gadget
.
element
.
innerHTML
=
inline_status_
template
({
status_class
:
status_class
,
status_class
:
status_class
,
status_title
:
status_title
,
status_title
:
status_title
,
status_style
:
status_style
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_class
:
right_class
,
right_title
:
right_title
,
right_title
:
right_title
,
right_style
:
right_style
right_style
:
right_style
});
});
return
RSVP
.
delay
(
300000
);
return
gadget
;
})
.
push
(
function
()
{
gadget
.
element
.
innerHTML
=
loading_template
();
return
getNetworkStatus
(
options
);
});
});
}
}
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
));
}(
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 @@
...
@@ -69,6 +69,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_network_status.js
</string>
</value>
<value>
<string>
gadget_slapos_network_status.js
</string>
</value>
...
@@ -87,6 +95,25 @@
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +243,7 @@
...
@@ -216,7 +243,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +257,7 @@
...
@@ -230,7 +257,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +275,7 @@
...
@@ -248,7 +275,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209669.6
9
</float>
<float>
15
30119497.3
9
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_html.html
View file @
01bfd371
...
@@ -12,14 +12,6 @@
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_project_status.js"
></script>
<script
src=
"gadget_slapos_project_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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}}
"
>
<
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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_project_status.html
</string>
</value>
<value>
<string>
gadget_slapos_project_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20342719.17
</float>
<float>
15
30120154.6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_project_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkComputerStatus
(
options
)
{
function
checkComputerStatus
(
options
)
{
if
(
!
options
)
{
if
(
!
options
)
{
...
@@ -126,87 +118,69 @@
...
@@ -126,87 +118,69 @@
}
}
gadget_klass
function
getStatus
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
return
new
RSVP
.
Queue
()
gadget
.
props
=
{};
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
hateoas_url
"
)
return
gadget
.
jio_get
(
gadget
.
options
.
value
.
jio_key
);
.
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
);
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
project
,
var
monitor_url
,
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
,
status_class
=
'
ui-btn-no-data
'
,
status_class
=
'
ui-btn-no-data
'
,
status_title
=
'
Computer
'
,
status_title
=
'
Computer
'
,
right_title
=
'
Partitions
'
,
right_title
=
'
Partitions
'
,
right_class
=
'
ui-btn-no-data
'
,
right_class
=
'
ui-btn-no-data
'
,
status_style
=
"
color: transparent !important;
"
,
status_style
=
''
,
right_style
=
'
color: transparent !important;
'
;
right_style
=
'
'
;
if
((
options
.
value
!==
undefined
)
&&
(
options
.
doc
===
undefined
))
{
options
.
doc
=
options
.
value
.
doc
;
}
status_class
=
checkProjectStatus
(
result
);
status_class
=
checkProjectStatus
(
result
);
right_class
=
checkProjectPartitionStatus
(
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
'
)
{
if
(
status_class
===
'
ui-btn-no-data
'
)
{
status_style
=
"
color: transparent !important;
"
;
status_style
=
"
color: transparent !important;
"
;
}
}
monitor_url
=
gadget
.
props
.
hateoas_url
+
gadget
.
options
.
value
.
jio_key
+
'
/Base_redirectToMonitor
'
;
monitor_url
=
gadget
.
props
.
hateoas_url
+
options
.
value
.
jio_key
+
'
/Base_redirectToMonitor
'
;
gadget
.
element
.
innerHTML
=
inline_status_template
({
gadget
.
element
.
innerHTML
=
template
({
monitor_url
:
monitor_url
,
monitor_url
:
monitor_url
,
status_class
:
status_class
,
status_class
:
status_class
,
status_title
:
status_title
,
status_title
:
status_title
,
status_style
:
status_style
,
status_style
:
status_style
,
middle_style
:
middle_style
,
right_class
:
right_class
,
right_class
:
right_class
,
right_title
:
right_title
,
right_title
:
right_title
,
right_style
:
right_style
right_style
:
right_style
});
});
return
RSVP
.
delay
(
300000
);
return
gadget
;
})
}
);
}
.
push
(
function
()
{
gadget_klass
gadget
.
element
.
innerHTML
=
loading_template
();
.
ready
(
function
(
gadget
)
{
return
getStatus
(
options
);
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
));
}(
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 @@
...
@@ -69,6 +69,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_project_status.js
</string>
</value>
<value>
<string>
gadget_slapos_project_status.js
</string>
</value>
...
@@ -87,6 +95,25 @@
...
@@ -87,6 +95,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +243,7 @@
...
@@ -216,7 +243,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +257,7 @@
...
@@ -230,7 +257,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +275,7 @@
...
@@ -248,7 +275,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209644.2
9
</float>
<float>
15
30119961.6
9
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_html.html
View file @
01bfd371
...
@@ -12,14 +12,6 @@
...
@@ -12,14 +12,6 @@
<script
src=
"gadget_slapos_site_status.js"
></script>
<script
src=
"gadget_slapos_site_status.js"
></script>
<link
href=
"gadget_slapos_computer_status.css"
rel=
"stylesheet"
type=
"text/css"
/>
<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"
>
<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}}
"
>
<
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
>
<
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -73,6 +84,14 @@
...
@@ -73,6 +84,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_site_status.html
</string>
</value>
<value>
<string>
gadget_slapos_site_status.html
</string>
</value>
...
@@ -91,6 +110,25 @@
...
@@ -91,6 +110,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
<value>
<string>
Web Page
</string>
</value>
...
@@ -234,7 +272,7 @@
...
@@ -234,7 +272,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +290,7 @@
...
@@ -252,7 +290,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
20342697.9
2
</float>
<float>
15
30120162.6
2
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_site_status_js.js
View file @
01bfd371
...
@@ -4,18 +4,10 @@
...
@@ -4,18 +4,10 @@
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
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
inline_status_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
inline-status-template
"
)
.
getElementById
(
"
inline-status-template
"
)
.
innerHTML
,
.
innerHTML
,
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
),
inline_status_template
=
Handlebars
.
compile
(
inline_status_source
);
loading_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
loading-template
"
)
.
innerHTML
,
loading_template
=
Handlebars
.
compile
(
loading_source
);
function
checkComputerStatus
(
options
)
{
function
checkComputerStatus
(
options
)
{
if
(
!
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 @@
...
@@ -39,6 +39,17 @@
</tuple>
</tuple>
</value>
</value>
</item>
</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>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<value>
...
@@ -69,6 +80,14 @@
...
@@ -69,6 +80,14 @@
<none/>
<none/>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_slapos_site_status.js
</string>
</value>
<value>
<string>
gadget_slapos_site_status.js
</string>
</value>
...
@@ -87,6 +106,25 @@
...
@@ -87,6 +106,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</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>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
<value>
<string>
Web Script
</string>
</value>
...
@@ -216,7 +254,7 @@
...
@@ -216,7 +254,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCas
e
</string>
</value>
<value>
<string>
zop
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +268,7 @@
...
@@ -230,7 +268,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +286,7 @@
...
@@ -248,7 +286,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19209630.33
</float>
<float>
15
30119121.08
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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