diff options
| author | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
|---|---|---|
| committer | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
| commit | b62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch) | |
| tree | 86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /hugo/js/server_status_queries.js | |
Diffstat (limited to 'hugo/js/server_status_queries.js')
| -rw-r--r-- | hugo/js/server_status_queries.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/hugo/js/server_status_queries.js b/hugo/js/server_status_queries.js new file mode 100644 index 0000000..3faeec4 --- /dev/null +++ b/hugo/js/server_status_queries.js @@ -0,0 +1,40 @@ +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + */ + +/** + * Unbind all event handlers before tearing down a page + */ +AJAX.registerTeardown('server_status_queries.js', function() { + var queryPieChart = $('#serverstatusquerieschart').data('queryPieChart'); + if (queryPieChart) { + queryPieChart.destroy(); + } +}); + +AJAX.registerOnload('server_status_queries.js', function() { + // Build query statistics chart + var cdata = []; + try { + $.each(jQuery.parseJSON($('#serverstatusquerieschart_data').text()), function(key, value) { + cdata.push([key, parseInt(value)]); + }); + $('#serverstatusquerieschart').data( + 'queryPieChart', + PMA_createProfilingChartJqplot( + 'serverstatusquerieschart', + cdata + ) + ); + } catch (exception) { + // Could not load chart, no big deal... + } + + /*** Table sort tooltip ***/ + PMA_tooltip( + $('table.sortable>thead>tr:first').find('th'), + 'th', + PMA_messages['strSortHint'] + ); + initTableSorter('statustabs_queries'); +}); |
