Improve select all checkbox process on designer and fix a bug
[phpmyadmin.git] / js / server_status_queries.js
blob056cffebc781c6fd700611e8daaf163935ed8f69
1 /* vim: set expandtab sw=4 ts=4 sts=4: */
2 /**
3  */
5 /**
6  * Unbind all event handlers before tearing down a page
7  */
8 AJAX.registerTeardown('server_status_queries.js', function () {
9     var queryPieChart = $('#serverstatusquerieschart').data('queryPieChart');
10     if (queryPieChart) {
11         queryPieChart.destroy();
12     }
13 });
15 AJAX.registerOnload('server_status_queries.js', function () {
16     // Build query statistics chart
17     var cdata = [];
18     try {
19         $.each($('#serverstatusquerieschart').data('chart'), function (key, value) {
20             cdata.push([key, parseInt(value, 10)]);
21         });
22         $('#serverstatusquerieschart').data(
23             'queryPieChart',
24             PMA_createProfilingChart(
25                 'serverstatusquerieschart',
26                 cdata
27             )
28         );
29     } catch (exception) {
30         // Could not load chart, no big deal...
31     }
33     initTableSorter('statustabs_queries');
34 });