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
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
Alexander Emmerich
erp5
Commits
f69ee075
Commit
f69ee075
authored
Mar 17, 2023
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Improve perfomance
parent
859aad11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
...PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
+16
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
...athTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
View file @
f69ee075
...
@@ -104,11 +104,17 @@
...
@@ -104,11 +104,17 @@
extended_search_mapping
:
{},
extended_search_mapping
:
{},
graph_gadget
:
"
unsafe/gadget_field_graph_echarts.html
"
graph_gadget
:
"
unsafe/gadget_field_graph_echarts.html
"
},
},
/*
performance_mapping = {
performance_mapping
=
{
"
translated_simulation_state_title
"
:
[
"
translated_simulation_state_title
"
:
[
"
simulation_state
"
,
"
getTranslatedSimulationStateTitle
"
"
simulation_state
"
,
"
getTranslatedSimulationStateTitle
"
],
"
translated_validation_state_title
"
:
[
"
validation_state
"
,
"
getTranslatedValidationStateTitle
"
],
"
translated_causality_state_title
"
:
[
"
causality_state
"
,
"
getTranslatedCausalityStateTitle
"
]
]
},
*/
},
domain_list
,
domain_list
,
i
,
i
,
j
;
j
;
...
@@ -123,16 +129,20 @@
...
@@ -123,16 +129,20 @@
group_by
=
options
.
group_by
;
group_by
=
options
.
group_by
;
}
}
/* XXX - Improve the perfomance changing the parameter in the select_list is not working properly
/* Replace the key (group_by) using performance_mapping to use SQL indexes in a more efficient way.
For example, use getTranslatedSimulationStateTitle instead of translated_simulation_state_title
Group by translated_simulation_state_title will increase the number of SQL join.
For example, use getTranslatedSimulationStateTitle and simulation_state instead of
translated_simulation_state_title
*/
*/
/*
for (i = 0; i < group_by.length; i += 1) {
for
(
i
=
0
;
i
<
group_by
.
length
;
i
+=
1
)
{
if
(
performance_mapping
.
hasOwnProperty
(
group_by
[
i
]))
{
if
(
performance_mapping
.
hasOwnProperty
(
group_by
[
i
]))
{
options
.
layout
.
x
.
key
=
performance_mapping
[
group_by
[
i
]][
1
];
options
.
layout
.
x
.
key
=
performance_mapping
[
group_by
[
i
]][
1
];
data
.
x
=
options
.
layout
.
x
.
key
;
data
.
x
=
options
.
layout
.
x
.
key
;
group_by
[
i
]
=
performance_mapping
[
group_by
[
i
]][
0
];
group_by
[
i
]
=
performance_mapping
[
group_by
[
i
]][
0
];
}
}
}
*/
}
data
.
y
=
"
count(*)
"
;
data
.
y
=
"
count(*)
"
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
View file @
f69ee075
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1007.
6054.5919.58094
</string>
</value>
<value>
<string>
1007.
7141.47221.20428
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
16790
02058.79
</float>
<float>
16790
67473.94
</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