Commit ac5f03c9 authored by Boxiang Sun's avatar Boxiang Sun

erp5_officejs_support_request_ui: Switch the backend chart library from Chartjs to ECharts.

ECharts has better visual effect than Chartjs.
And also update the tests.
parent efb59a4f
#generate-rss { #generate-rss {
padding: 8pt; padding: 8pt;
margin-top: 30pt; margin-top: 30pt;
margin-right: 12pt; margin-right: 12pt;
...@@ -9,4 +9,12 @@ ...@@ -9,4 +9,12 @@
border-style: solid; border-style: solid;
min-width: 8em; min-width: 8em;
line-height: 1.5; line-height: 1.5;
}
#wrap1 iframe {
height: 100%;
}
#wrap2 iframe {
height: 100%;
} }
\ No newline at end of file
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.39587.62437.8823</string> </value> <value> <string>961.52407.42575.23859</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1503561791.86</float> <float>1504527393.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
<script src="rsvp.js" type="text/javascript"></script> <script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<!-- libraries needed for graphs -->
<script src="chart.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_erp5_page_homepage.js" type="text/javascript"></script> <script src="gadget_erp5_page_homepage.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="gadget_erp5_page_homepage.css"> <link rel="stylesheet" type="text/css" href="gadget_erp5_page_homepage.css">
...@@ -24,31 +21,26 @@ ...@@ -24,31 +21,26 @@
<h1 style="font-size:2em;font-weight:bold;text-align:center">Customer Support Dashboard</h1> <h1 style="font-size:2em;font-weight:bold;text-align:center">Customer Support Dashboard</h1>
<form> <form>
<div style="text-align:center;"> <div style="text-align:center;">
<input data-theme="b" data-inline="true" type="submit" data-i18n="[value]Submit New Support Request" value="Submit New Support Request" data-icon="check" name="create"/> <input data-theme="b" data-inline="true" type="submit" data-i18n="[value]Submit New Support Request" value="Submit New Support Request" data-icon="check" />
</div> </div>
<div class='ui-field-contain'> <div class='ui-field-contain'>
<div class='left'> <div class='left' style="height:50%; width:100%">
<div style="width: 100% height: 200%"> <div class="ui-icon-spinner ui-btn-icon-notext first-loader graph-spinner"></div>
<canvas id="bar-chart-grouped" responsive="true"></canvas> <div id="wrap1" style="height:300px;"></div>
</div>
</div> </div>
<div class='right'> <div class='right' style="height:50%; width:100%">
<div style="width: 50%"> <div class="ui-icon-spinner ui-btn-icon-notext first-loader graph-spinner"></div>
<canvas id="pie-chart" responsive="true"></canvas> <div id="wrap2" style="height:300px;"></div>
</div>
</div> </div>
</div> </div>
<div class='bottom'>
<a id="generate-rss">
Generate RSS
</a>
</div>
<div class='bottom'>
<a id="generate-rss">Generate RSS</a>
</div>
<div data-gadget-url="gadget_erp5_page_form.html" data-gadget-scope="last"></div> <div data-gadget-url="gadget_erp5_page_form.html" data-gadget-scope="last"></div>
</form> </form>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.39558.32635.51763</string> </value> <value> <string>961.56620.20048.26265</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1503561223.16</float> <float>1504526707.1</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.50969.9466.33160</string> </value> <value> <string>961.56651.42335.12800</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1504187369.74</float> <float>1504528133.07</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -21,12 +21,17 @@ ...@@ -21,12 +21,17 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//canvas[@id='bar-chart-grouped']</td> <td>//a[@id='generate-rss']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//canvas[@id='pie-chart']</td> <td>//div[@id='wrap1']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id='wrap2']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
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