2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/functions_reporting.php: Fixed custom sql metaconsole reports. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6946 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b391b9f1de
commit
77c493f2f8
|
@ -1,3 +1,9 @@
|
|||
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
include/functions_reporting.php: Fixed custom sql metaconsole
|
||||
reports.
|
||||
|
||||
2012-09-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_reporting.php
|
||||
|
|
|
@ -1763,7 +1763,23 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
|
|||
$sql = io_safe_output($sql['sql']);
|
||||
}
|
||||
|
||||
if (($config['metaconsole'] == 1) && defined('METACONSOLE')) {
|
||||
$metaconsole_connection = enterprise_hook('metaconsole_get_connection', array($report_content['server_name']));
|
||||
|
||||
if ($metaconsole_connection === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enterprise_hook('metaconsole_load_external_db', array($metaconsole_connection)) != NOERR) {
|
||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$data_result = db_get_all_rows_sql ($sql);
|
||||
|
||||
if (($config['metaconsole'] == 1) && defined('METACONSOLE'))
|
||||
enterprise_hook('metaconsole_restore_db');
|
||||
|
||||
if ($data_result === false)
|
||||
$data_result = array ();
|
||||
|
@ -1804,7 +1820,7 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
|
|||
break;
|
||||
case 'sql_graph_hbar': // horizontal bar
|
||||
return hbar_graph($flash_charts, $data, $width, $height, array(),
|
||||
array(), "", "", $homeurl,
|
||||
array(), "", "", true, $homeurl,
|
||||
$water_mark,
|
||||
$config['fontpath'], $config['font_size'], false, $ttl);
|
||||
break;
|
||||
|
|
|
@ -2852,6 +2852,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 'sql_graph_pie':
|
||||
case 'sql_graph_vbar':
|
||||
case 'sql_graph_hbar':
|
||||
|
||||
if ($config['metaconsole'] == 1 && defined('METACONSOLE'))
|
||||
metaconsole_restore_db();
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, __('User defined graph') . " (".__($content["type"]) .")",
|
||||
"", "");
|
||||
|
||||
|
|
Loading…
Reference in New Issue