jqPlot for profiling chart
This commit is contained in:
parent
b8603f16b8
commit
a44ee59093
@ -1686,7 +1686,7 @@ function PMA_createChart(passedSettings)
|
||||
|
||||
|
||||
/*
|
||||
* Creates a Profiling Chart. Used in sql.php and server_status.js
|
||||
* Creates a Profiling Chart. Used in server_status.js
|
||||
*/
|
||||
function PMA_createProfilingChart(data, options)
|
||||
{
|
||||
@ -1722,6 +1722,27 @@ function PMA_createProfilingChart(data, options)
|
||||
},options));
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a Profiling Chart with jqplot. Used in sql.js
|
||||
*/
|
||||
function PMA_createProfilingChartJqplot(data, options)
|
||||
{
|
||||
return $.jqplot('profilingchart', [data],
|
||||
{
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
showDataLabels: true
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
location: 'e'
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a profiling duration nicely (in us and ms time). Used in PMA_createProfilingChart() and server_status.js
|
||||
*
|
||||
|
||||
@ -610,7 +610,7 @@ function makeProfilingChart()
|
||||
// Prevent the user from seeing the JSON code
|
||||
$('div#profilingchart').html('').show();
|
||||
|
||||
PMA_createProfilingChart(data);
|
||||
PMA_createProfilingChartJqplot(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
8
sql.php
8
sql.php
@ -27,14 +27,12 @@ $GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
|
||||
|
||||
|
||||
if (isset($_SESSION['profiling'])) {
|
||||
$GLOBALS['js_include'][] = 'highcharts/highcharts.js';
|
||||
/* Files required for chart exporting */
|
||||
$GLOBALS['js_include'][] = 'highcharts/exporting.js';
|
||||
/* < IE 9 doesn't support canvas natively */
|
||||
if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) {
|
||||
$GLOBALS['js_include'][] = 'canvg/flashcanvas.js';
|
||||
}
|
||||
$GLOBALS['js_include'][] = 'canvg/canvg.js';
|
||||
$GLOBALS['js_include'][] = 'jqplot/jquery.jqplot.js';
|
||||
$GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.pieRenderer.js';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -916,9 +914,7 @@ $(document).ready(makeProfilingChart);
|
||||
|
||||
echo '</table>' . "\n";
|
||||
echo '</div>';
|
||||
//require_once './libraries/chart.lib.php';
|
||||
echo '<div id="profilingchart" style="display:none;">';
|
||||
//PMA_chart_profiling($profiling_results);
|
||||
echo json_encode($chart_json);
|
||||
echo '</div>';
|
||||
echo '</fieldset>' . "\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user