Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
4164fc66
Commit
4164fc66
authored
Apr 20, 2018
by
Alain Takoudjou
Committed by
Rafael Monnerat
Sep 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_monitoring] update promise view for changes in new backend instances
parent
061eb0ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
39 deletions
+58
-39
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
...em/web_page_module/gadget_officejs_jio_promise_view_js.js
+26
-8
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.xml
...m/web_page_module/gadget_officejs_jio_promise_view_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_software_instance_view_js.js
...e_module/gadget_officejs_jio_software_instance_view_js.js
+28
-27
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_software_instance_view_js.xml
..._module/gadget_officejs_jio_software_instance_view_js.xml
+2
-2
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.js
View file @
4164fc66
...
...
@@ -113,7 +113,12 @@
"
portal_type
"
,
"
_links
"
,
"
_embedded
"
,
"
reference
"
"
reference
"
,
"
aggregate_reference
"
,
"
ipv6
"
,
"
ipv4
"
,
"
partition_id
"
,
"
software_release
"
],
query
:
'
(portal_type:"Software Instance") AND (parent_id:"
'
+
options
.
doc
.
parent_id
+
'
")
'
...
...
@@ -148,6 +153,13 @@
public_url
:
{
href
:
""
}},
_embedded
:
{
instance
:
{}}};
}
if
(
software_instance
.
_embedded
!==
undefined
&&
software_instance
.
_embedded
.
hasOwnProperty
(
'
instance
'
))
{
software_instance
.
ipv6
=
software_instance
.
_embedded
.
instance
.
ipv6
;
software_instance
.
ipv4
=
software_instance
.
_embedded
.
instance
.
ipv4
;
software_instance
.
partition_id
=
software_instance
.
_embedded
.
instance
.
partition
;
software_instance
.
software_release
=
software_instance
.
_embedded
.
instance
[
'
software-release
'
];
}
// fix URLs
software_instance
.
_links
.
private_url
.
href
=
software_instance
.
_links
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
...
...
@@ -171,10 +183,11 @@
instance_title
:
software_instance
.
title
,
hosting_title
:
opml_doc
.
title
,
hosting_url
:
hosting_url
,
partition_ipv6
:
software_instance
.
_embedded
.
instance
.
ipv6
,
computer_partition
:
software_instance
.
_embedded
.
instance
.
partition
,
computer_reference
:
software_instance
.
_embedded
.
instance
.
computer
,
software_release
:
software_instance
.
_embedded
.
instance
[
'
software-release
'
]
partition_ipv6
:
software_instance
.
ipv6
,
partition_ipv4
:
software_instance
.
ipv4
,
computer_partition
:
software_instance
.
partition_id
,
computer_reference
:
software_instance
.
aggregate_reference
,
software_release
:
software_instance
.
software_release
});
});
})
...
...
@@ -252,7 +265,10 @@
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
new
Date
(
status_history
.
data
[
i
][
'
start-date
'
]).
toUTCString
(),
"
default
"
:
new
Date
(
status_history
.
data
[
i
].
date
||
status_history
.
data
[
i
][
'
start-date
'
]
).
toUTCString
(),
key
:
"
start_date
"
,
required
:
0
,
timezone_style
:
0
,
...
...
@@ -268,8 +284,10 @@
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
new
Date
(
status_history
.
data
[
i
][
'
change-time
'
]
*
1000
)
.
toUTCString
(),
"
default
"
:
new
Date
(
status_history
.
data
[
i
][
'
change-date
'
]
||
status_history
.
data
[
i
][
'
change-time
'
]
*
1000
).
toUTCString
(),
key
:
"
change_date
"
,
required
:
0
,
timezone_style
:
0
,
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_promise_view_js.xml
View file @
4164fc66
...
...
@@ -250,7 +250,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.33711.61316.13482
</string>
</value>
<value>
<string>
96
6.22632.27070.1706
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>
15
10929659.2
</float>
<float>
15
23626142.93
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_software_instance_view_js.js
View file @
4164fc66
...
...
@@ -66,6 +66,13 @@
private_url
,
current_document
=
gadget
.
state
.
instance
;
if
(
current_document
.
_embedded
!==
undefined
&&
current_document
.
_embedded
.
hasOwnProperty
(
'
instance
'
))
{
current_document
.
ipv6
=
current_document
.
_embedded
.
instance
.
ipv6
;
current_document
.
ipv4
=
current_document
.
_embedded
.
instance
.
ipv4
;
current_document
.
partition_id
=
current_document
.
_embedded
.
instance
.
partition
;
current_document
.
software_release
=
current_document
.
_embedded
.
instance
[
'
software-release
'
];
}
// fix URLs
private_url
=
gadget
.
state
.
instance
.
_links
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
...
...
@@ -88,11 +95,11 @@
//process_url: tmp_process_url,
hosting_title
:
gadget
.
state
.
opml
.
title
,
hosting_url
:
hosting_url
,
partition_ipv6
:
current_document
.
_embedded
.
instance
.
ipv6
,
partition_ipv4
:
current_document
.
_embedded
.
instance
.
ipv4
,
computer_partition
:
current_document
.
_embedded
.
instance
.
partition
,
computer_reference
:
current_document
.
_embedded
.
instance
.
computer
,
software_release
:
current_document
.
_embedded
.
instance
[
'
software-release
'
]
partition_ipv6
:
current_document
.
ipv6
,
partition_ipv4
:
current_document
.
ipv4
,
computer_partition
:
current_document
.
partition_id
,
computer_reference
:
current_document
.
aggregate_reference
,
software_release
:
current_document
.
software_release
});
});
})
...
...
@@ -110,7 +117,7 @@
var
gadget
=
this
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
value
,
len
=
result
.
data
.
total_rows
;
var
i
,
j
,
tmp
,
value
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
lastBuildDate
"
))
{
value
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
lastBuildDate
);
...
...
@@ -135,26 +142,20 @@
value
:
2713
};
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
comments
"
))
{
value
=
result
.
data
.
rows
[
i
].
value
.
comments
.
slice
(
0
,
30
);
if
(
result
.
data
.
rows
[
i
].
value
.
comments
.
length
>=
30
)
{
value
+=
"
...
"
;
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
description
"
))
{
tmp
=
result
.
data
.
rows
[
i
].
value
.
description
.
split
(
'
\n
'
);
value
=
""
;
for
(
j
=
1
;
j
<
tmp
.
length
;
j
+=
1
)
{
// first line of text is the date and status
if
(
!
value
&&
tmp
[
j
].
trim
()
!==
""
)
{
value
+=
tmp
[
j
].
slice
(
0
,
50
);
if
(
tmp
[
j
].
length
>=
50
||
j
+
1
<
tmp
.
length
)
{
// a part of text is not shown
value
+=
"
...
"
;
}
}
}
result
.
data
.
rows
[
i
].
value
.
comments
=
{
css_class
:
"
string_field
"
,
description
:
"
The Message
"
,
editable
:
0
,
hidden
:
0
,
"
default
"
:
value
,
key
:
"
comments
"
,
required
:
0
,
title
:
"
Message
"
,
type
:
"
StringField
"
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
key
:
"
listbox_uid:list
"
,
value
:
2713
};
result
.
data
.
rows
[
i
].
value
.
description
=
value
;
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
category
"
))
{
value
=
result
.
data
.
rows
[
i
].
value
.
category
;
...
...
@@ -256,10 +257,10 @@
})
.
push
(
function
(
form_gadget
)
{
var
column_list
=
[
[
'
category
'
,
'
Status
'
],
[
'
source
'
,
'
Promise
'
],
[
'
lastBuildDate
'
,
'
Promise Date
'
],
[
'
comments
'
,
'
Message
'
],
[
'
category
'
,
'
Status
'
]
[
'
description
'
,
'
Message
'
]
];
return
form_gadget
.
render
({
erp5_document
:
{
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_software_instance_view_js.xml
View file @
4164fc66
...
...
@@ -250,7 +250,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.26968.43905.35072
</string>
</value>
<value>
<string>
96
6.64656.29215.3054
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>
15
14370868.02
</float>
<float>
15
24237317.01
</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