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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
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
Show 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 @@
...
@@ -113,7 +113,12 @@
"
portal_type
"
,
"
portal_type
"
,
"
_links
"
,
"
_links
"
,
"
_embedded
"
,
"
_embedded
"
,
"
reference
"
"
reference
"
,
"
aggregate_reference
"
,
"
ipv6
"
,
"
ipv4
"
,
"
partition_id
"
,
"
software_release
"
],
],
query
:
'
(portal_type:"Software Instance") AND (parent_id:"
'
+
query
:
'
(portal_type:"Software Instance") AND (parent_id:"
'
+
options
.
doc
.
parent_id
+
'
")
'
options
.
doc
.
parent_id
+
'
")
'
...
@@ -148,6 +153,13 @@
...
@@ -148,6 +153,13 @@
public_url
:
{
href
:
""
}},
public_url
:
{
href
:
""
}},
_embedded
:
{
instance
:
{}}};
_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
// fix URLs
software_instance
.
_links
.
private_url
.
href
=
software_instance
software_instance
.
_links
.
private_url
.
href
=
software_instance
.
_links
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
.
_links
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
...
@@ -171,10 +183,11 @@
...
@@ -171,10 +183,11 @@
instance_title
:
software_instance
.
title
,
instance_title
:
software_instance
.
title
,
hosting_title
:
opml_doc
.
title
,
hosting_title
:
opml_doc
.
title
,
hosting_url
:
hosting_url
,
hosting_url
:
hosting_url
,
partition_ipv6
:
software_instance
.
_embedded
.
instance
.
ipv6
,
partition_ipv6
:
software_instance
.
ipv6
,
computer_partition
:
software_instance
.
_embedded
.
instance
.
partition
,
partition_ipv4
:
software_instance
.
ipv4
,
computer_reference
:
software_instance
.
_embedded
.
instance
.
computer
,
computer_partition
:
software_instance
.
partition_id
,
software_release
:
software_instance
.
_embedded
.
instance
[
'
software-release
'
]
computer_reference
:
software_instance
.
aggregate_reference
,
software_release
:
software_instance
.
software_release
});
});
});
});
})
})
...
@@ -252,7 +265,10 @@
...
@@ -252,7 +265,10 @@
editable
:
0
,
editable
:
0
,
hidden
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
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
"
,
key
:
"
start_date
"
,
required
:
0
,
required
:
0
,
timezone_style
:
0
,
timezone_style
:
0
,
...
@@ -268,8 +284,10 @@
...
@@ -268,8 +284,10 @@
editable
:
0
,
editable
:
0
,
hidden
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
new
Date
(
status_history
.
data
[
i
][
'
change-time
'
]
*
1000
)
"
default
"
:
new
Date
(
.
toUTCString
(),
status_history
.
data
[
i
][
'
change-date
'
]
||
status_history
.
data
[
i
][
'
change-time
'
]
*
1000
).
toUTCString
(),
key
:
"
change_date
"
,
key
:
"
change_date
"
,
required
:
0
,
required
:
0
,
timezone_style
:
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 @@
...
@@ -250,7 +250,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -268,7 +268,7 @@
...
@@ -268,7 +268,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
10929659.2
</float>
<float>
15
23626142.93
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_officejs_jio_software_instance_view_js.js
View file @
4164fc66
...
@@ -66,6 +66,13 @@
...
@@ -66,6 +66,13 @@
private_url
,
private_url
,
current_document
=
gadget
.
state
.
instance
;
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
// fix URLs
private_url
=
gadget
.
state
.
instance
.
_links
private_url
=
gadget
.
state
.
instance
.
_links
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
.
private_url
.
href
.
replace
(
"
jio_private
"
,
"
private
"
);
...
@@ -88,11 +95,11 @@
...
@@ -88,11 +95,11 @@
//process_url: tmp_process_url,
//process_url: tmp_process_url,
hosting_title
:
gadget
.
state
.
opml
.
title
,
hosting_title
:
gadget
.
state
.
opml
.
title
,
hosting_url
:
hosting_url
,
hosting_url
:
hosting_url
,
partition_ipv6
:
current_document
.
_embedded
.
instance
.
ipv6
,
partition_ipv6
:
current_document
.
ipv6
,
partition_ipv4
:
current_document
.
_embedded
.
instance
.
ipv4
,
partition_ipv4
:
current_document
.
ipv4
,
computer_partition
:
current_document
.
_embedded
.
instance
.
partition
,
computer_partition
:
current_document
.
partition_id
,
computer_reference
:
current_document
.
_embedded
.
instance
.
computer
,
computer_reference
:
current_document
.
aggregate_reference
,
software_release
:
current_document
.
_embedded
.
instance
[
'
software-release
'
]
software_release
:
current_document
.
software_release
});
});
});
});
})
})
...
@@ -110,7 +117,7 @@
...
@@ -110,7 +117,7 @@
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
.
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
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
lastBuildDate
"
))
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
lastBuildDate
"
))
{
value
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
lastBuildDate
);
value
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
lastBuildDate
);
...
@@ -135,26 +142,20 @@
...
@@ -135,26 +142,20 @@
value
:
2713
value
:
2713
};
};
}
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
comments
"
))
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
description
"
))
{
value
=
result
.
data
.
rows
[
i
].
value
.
comments
.
slice
(
0
,
30
);
tmp
=
result
.
data
.
rows
[
i
].
value
.
description
.
split
(
'
\n
'
);
if
(
result
.
data
.
rows
[
i
].
value
.
comments
.
length
>=
30
)
{
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
+=
"
...
"
;
value
+=
"
...
"
;
}
}
result
.
data
.
rows
[
i
].
value
.
comments
=
{
}
css_class
:
"
string_field
"
,
}
description
:
"
The Message
"
,
result
.
data
.
rows
[
i
].
value
.
description
=
value
;
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
};
}
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
category
"
))
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
category
"
))
{
value
=
result
.
data
.
rows
[
i
].
value
.
category
;
value
=
result
.
data
.
rows
[
i
].
value
.
category
;
...
@@ -256,10 +257,10 @@
...
@@ -256,10 +257,10 @@
})
})
.
push
(
function
(
form_gadget
)
{
.
push
(
function
(
form_gadget
)
{
var
column_list
=
[
var
column_list
=
[
[
'
category
'
,
'
Status
'
],
[
'
source
'
,
'
Promise
'
],
[
'
source
'
,
'
Promise
'
],
[
'
lastBuildDate
'
,
'
Promise Date
'
],
[
'
lastBuildDate
'
,
'
Promise Date
'
],
[
'
comments
'
,
'
Message
'
],
[
'
description
'
,
'
Message
'
]
[
'
category
'
,
'
Status
'
]
];
];
return
form_gadget
.
render
({
return
form_gadget
.
render
({
erp5_document
:
{
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 @@
...
@@ -250,7 +250,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -268,7 +268,7 @@
...
@@ -268,7 +268,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
14370868.02
</float>
<float>
15
24237317.01
</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