Commit 5d2a6b37 authored by Romain Courteaud's avatar Romain Courteaud

erp5_officejs_support_request_ui: render the 2 graphs in parallel

parent a4994f47
......@@ -181,9 +181,9 @@
graph_gadget_1 = result_list[1],
graph_gadget_2 = result_list[2],
count_by_state_and_date_range = sp_data.count_by_state_and_date_range;
gadget.property_dict.graph_widget = graph_gadget_1;
return RSVP.all([graph_gadget_1.render(
{
return RSVP.all([
// render first graph
graph_gadget_1.render({
value: {
data: [
{
......@@ -222,16 +222,10 @@
title: "Support Request Pipe"
}
}
}
),
sp_data,
graph_gadget_2
]);
})
.push(function (result_list) {
var sp_data = result_list[1], graph_gadget = result_list[2];
gadget.property_dict.graph_widget = graph_gadget;
return graph_gadget.render({
}),
// render second graph
graph_gadget_2.render({
value:
{
data: [
......@@ -248,7 +242,7 @@
sp_data.count_by_state.submitted || 0,
sp_data.count_by_state.suspended || 0,
sp_data.count_by_state.invalidated || 0
],
]
},
colors: ['#d48265', '#61a0a8', '#c23531', '#2f4554'],
type: "pie",
......@@ -263,7 +257,9 @@
title: "Last Month Activity"
}
}
});
})
]);
});
})
.declareService(function () {
......
......@@ -75,7 +75,9 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
......@@ -158,11 +160,13 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -206,16 +210,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -238,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.25743.31377.26094</string> </value>
<value> <string>983.46010.49549.22528</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,8 +264,8 @@
</tuple>
<state>
<tuple>
<float>1542008780.46</float>
<string>GMT+9</string>
<float>1588755553.56</float>
<string>UTC</string>
</tuple>
</state>
</object>
......@@ -265,16 +273,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -322,7 +334,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment