Commit bf7bd69d authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: clean up and put back reset button

parent 5fba43e2
...@@ -24,5 +24,8 @@ ...@@ -24,5 +24,8 @@
<div class="wrap"></div> <div class="wrap"></div>
</div> </div>
</div> </div>
<div class="bottom">
<input type="submit" class="ui-disabled" data-i18n="[value]Reset Filter" value="Reset Filter" disabled />
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.15023.5523.52002</string> </value> <value> <string>994.33037.54289.49544</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>1629926033.28</float> <float>1630625748.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -100,11 +100,7 @@ ...@@ -100,11 +100,7 @@
} }
} }
if (Array.isArray(group_by)) { data.y = "count(*)";
data.y = "count(" + (group_by[0] || options.layout.x.key) + ")";
} else {
data.y = "count(" + (group_by || options.layout.x.key) + ")";
}
for (i in query_by) { for (i in query_by) {
if (query_by.hasOwnProperty(i)) { if (query_by.hasOwnProperty(i)) {
...@@ -239,7 +235,7 @@ ...@@ -239,7 +235,7 @@
bar_chart.style.display = "block"; bar_chart.style.display = "block";
function avoidFunction(el) { function avoidFunction(el) {
return el && !el.match(/^\D+\(\w+\)$/); return el && !el.match(/^\D+\((\w+|\*)\)$/);
} }
if (gadget.state.query && if (gadget.state.query &&
"object" === typeof gadget.state.query && "object" === typeof gadget.state.query &&
...@@ -255,6 +251,7 @@ ...@@ -255,6 +251,7 @@
title: gadget.state.x_title || gadget.state.title title: gadget.state.x_title || gadget.state.title
}]; }];
for (i = 0; i < row_list.length; i += 1) { for (i = 0; i < row_list.length; i += 1) {
console.log([gadget.state.x, gadget.state.y]);
data_list[0].value_dict['0'].push( data_list[0].value_dict['0'].push(
row_list[i].value[gadget.state.x] row_list[i].value[gadget.state.x]
); );
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.34220.36018.63146</string> </value> <value> <string>994.34490.6237.36642</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1630610878.23</float> <float>1630629853.6</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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