diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 2d08284af1..6d4217a368 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.723-180607
+Version: 7.0NG.723-180610
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index a0c723fba1..63cc81da53 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.723-180607"
+pandora_version="7.0NG.723-180610"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index e246c32c1b..2abd6bf5b9 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.723';
-use constant AGENT_BUILD => '180607';
+use constant AGENT_BUILD => '180610';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 74adcd09b1..10211d1acf 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.723
-%define release 180607
+%define release 180610
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 9e91de83b6..c258129bcc 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.723
-%define release 180607
+%define release 180610
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index c0908fa0af..dd1c31f324 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.723"
-PI_BUILD="180607"
+PI_BUILD="180610"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index a9e50f9b90..057730abde 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{180607}
+{180610}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 00104d9bef..844b3e7ed7 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.723(Build 180607)")
+#define PANDORA_VERSION ("7.0NG.723(Build 180610)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 7b394527da..3a12cc8e1c 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.723(Build 180607))"
+ VALUE "ProductVersion", "(7.0NG.723(Build 180610))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index b409c17fc4..d1e1ddab89 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.723-180607
+Version: 7.0NG.723-180610
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 847bf8c362..f6dce85044 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.723-180607"
+pandora_version="7.0NG.723-180610"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php
index e8cac701bb..a723844d40 100644
--- a/pandora_console/extensions/realtime_graphs.php
+++ b/pandora_console/extensions/realtime_graphs.php
@@ -39,14 +39,40 @@ function pandora_realtime_graphs () {
$legend = '';
$long_index = array();
$no_data_image = '';
-
+
$canvas = '
';
$canvas .= '
';
- $canvas .= area_graph($interactive_graph, $chart, 800, 300, $color, $legend, $long_index, $no_data_image, "", "", "",
- "", '', '', '', 1, array(), array(), 0, 0, '', false, '', false);
+
+ $width = 800;
+ $height = 300;
+
+ $data_array['realtime']['data'][0][0] = time() - 10;
+ $data_array['realtime']['data'][0][1] = 0;
+ $data_array['realtime']['data'][1][0] = time();
+ $data_array['realtime']['data'][1][1] = 0;
+ $data_array['realtime']['color'] = 'green';
+
+ $params =array(
+ 'agent_module_id' => false,
+ 'period' => 300,
+ 'width' => $width,
+ 'height' => $height,
+ 'unit' => $unit,
+ 'only_image' => $only_image,
+ 'homeurl' => $homeurl,
+ 'type_graph' => 'area',
+ 'font' => $config['fontpath'],
+ 'font-size' => $config['font_size'],
+ 'array_data_create' => $data_array,
+ 'show_legend' => false,
+ 'show_menu' => false
+ );
+
+ $canvas .= grafico_modulo_sparse($params);
+
$canvas .= '
';
echo $canvas;
-
+
$table->width = '100%';
$table->id = 'table-form';
$table->class = 'databox filters';
@@ -62,7 +88,7 @@ function pandora_realtime_graphs () {
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->style['snmp_oid'] = 'font-weight: bold;';
$table->data = array ();
-
+
$graph_fields['cpu_load'] = __('%s Server CPU', get_product_name());
$graph_fields['pending_packets'] = __('Pending packages from %s Server', get_product_name());
$graph_fields['disk_io_wait'] = __('%s Server Disk IO Wait', get_product_name());
@@ -70,19 +96,19 @@ function pandora_realtime_graphs () {
$graph_fields['mysql_load'] = __('%s Server MySQL load', get_product_name());
$graph_fields['server_load'] = __('%s Server load', get_product_name());
$graph_fields['snmp_interface'] = __('SNMP Interface throughput');
-
+
$graph = get_parameter('graph', 'cpu_load');
$refresh = get_parameter('refresh', '1000');
-
+
if ($graph != 'snmp_module') {
$data['graph'] = __('Graph') . ' ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true);
}
- $refresh_fields[1000] = human_time_description_raw(1, true, 'large');
- $refresh_fields[5000] = human_time_description_raw(5, true, 'large');
+ $refresh_fields[1000] = human_time_description_raw(1, true, 'large');
+ $refresh_fields[5000] = human_time_description_raw(5, true, 'large');
$refresh_fields[10000] = human_time_description_raw(10, true, 'large');
$refresh_fields[30000] = human_time_description_raw(30, true, 'large');
-
+
if ($graph == 'snmp_module') {
$agent_alias = get_parameter('agent_alias', '');
$module_name = get_parameter('module_name', '');
@@ -109,7 +135,7 @@ function pandora_realtime_graphs () {
$snmp_ver = get_parameter('snmp_ver', '');
$data = array();
-
+
$data['snmp_address'] = __('Target IP') . ' ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true);
$table->colspan[1]['snmp_address'] = 2;
@@ -122,7 +148,7 @@ function pandora_realtime_graphs () {
$snmp_versions['1'] = '1';
$snmp_versions['2'] = '2';
$snmp_versions['2c'] = '2c';
-
+
$data = array();
$data['snmp_oid'] = __('OID') . ' ' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true);
$table->colspan[2]['snmp_oid'] = 2;
@@ -140,7 +166,7 @@ function pandora_realtime_graphs () {
}
snmp_browser_print_container (false, '100%', '60%', 'none');
}
-
+
// Print the relative path to AJAX calls:
html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
@@ -148,7 +174,7 @@ function pandora_realtime_graphs () {
echo '';
-
+
// Define a custom action to save the OID selected in the SNMP browser to the form
html_print_input_hidden ('custom_action', urlencode (base64_encode('
')), false);
html_print_input_hidden ('incremental_base', '0');
@@ -156,7 +182,7 @@ function pandora_realtime_graphs () {
echo '';
echo '';
echo '';
-
+
// Store servers timezone offset to be retrieved from js
set_js_value('timezone_offset', date('Z', time()));
}
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index fa75a7b452..3831fb9b33 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -2919,7 +2919,7 @@ function chooseType() {
case 'simple_graph':
$("#row_time_compare_overlapped").show();
- $("#row_only_avg").show();
+ // $("#row_only_avg").show();
$("#row_fullscale").show();
if ($("#checkbox-percentil").prop("checked"))
$("#row_percentil").show();
@@ -2930,7 +2930,6 @@ function chooseType() {
$("#row_agent").show();
$("#row_module").show();
$("#row_period").show();
- $("#row_show_in_two_columns").show();
$("#row_show_in_landscape").show();
$("#row_time_compare_overlapped").show();
$("#row_historical_db_check").hide();
diff --git a/pandora_console/include/ajax/graph.ajax.php b/pandora_console/include/ajax/graph.ajax.php
index ed1651ee3c..a4f5bc80a7 100644
--- a/pandora_console/include/ajax/graph.ajax.php
+++ b/pandora_console/include/ajax/graph.ajax.php
@@ -22,7 +22,7 @@ $get_graphs = (bool)get_parameter('get_graphs_container');
if ($save_custom_graph) {
$return = array();
-
+
$id_modules = (array)get_parameter('id_modules', array());
$name = get_parameter('name', '');
$description = get_parameter('description', '');
@@ -32,87 +32,90 @@ if ($save_custom_graph) {
$events = get_parameter('events', 0);
$period = get_parameter('period', 0);
$fullscale = get_parameter('fullscale', 0);
-
+
$result = (bool)custom_graphs_create($id_modules, $name,
$description, $stacked, $width, $height, $events, $period, 0, 0, false, $fullscale);
-
-
+
$return['correct'] = $result;
-
+
echo json_encode($return);
return;
}
if ($print_custom_graph) {
ob_clean();
-
- $id_graph = (int) get_parameter('id_graph');
- $height = (int) get_parameter('height', CHART_DEFAULT_HEIGHT);
- $width = (int) get_parameter('width', CHART_DEFAULT_WIDTH);
- $period = (int) get_parameter('period', SECONDS_5MINUTES);
- $stacked = (int) get_parameter('stacked', CUSTOM_GRAPH_LINE);
- $date = (int) get_parameter('date', time());
- $only_image = (bool) get_parameter('only_image');
- $background_color = (string) get_parameter('background_color', 'white');
- $modules_param = get_parameter('modules_param', array());
- $homeurl = (string) get_parameter('homeurl');
- $name_list = get_parameter('name_list', array());
- $unit_list = get_parameter('unit_list', array());
- $show_last = (bool) get_parameter('show_last', true);
- $show_max = (bool) get_parameter('show_max', true);
- $show_min = (bool) get_parameter('show_min', true);
- $show_avg = (bool) get_parameter('show_avg', true);
- $ttl = (int) get_parameter('ttl', 1);
- $dashboard = (bool) get_parameter('dashboard');
- $vconsole = (bool) get_parameter('vconsole');
- $fullscale = (bool) get_parameter('fullscale');
- echo custom_graphs_print($id_graph, $height, $width, $period, $stacked,
- true, $date, $only_image, $background_color, $modules_param,
- $homeurl, $name_list, $unit_list, $show_last, $show_max,
- $show_min, $show_avg, $ttl, $dashboard, $vconsole);
+ $params =array(
+ 'period' => (int) get_parameter('period', SECONDS_5MINUTES),
+ 'width' => (int) get_parameter('width', CHART_DEFAULT_WIDTH),
+ 'height' => (int) get_parameter('height', CHART_DEFAULT_HEIGHT),
+ 'unit_name' => get_parameter('unit_list', array()),
+ 'date' => (int) get_parameter('date', time()),
+ 'only_image' => (bool) get_parameter('only_image', false),
+ 'homeurl' => (string) get_parameter('homeurl', ''),
+ 'ttl' => (int) get_parameter('ttl', 1),
+ 'dashboard' => (bool) get_parameter('dashboard', false),
+ 'vconsole' => (bool) get_parameter('vconsole', false),
+ 'fullscale' => (bool) get_parameter('fullscale', false),
+ 'backgroundColor' => (string) get_parameter('background_color', 'white'),
+ 'show_alerts' => (bool) get_parameter('show_alerts'),
+ 'show_events' => (bool) get_parameter('show_events'),
+ 'type_graph' => get_parameter('type_g', $config['type_module_charts']),
+ );
+
+ $params_combined = array(
+ 'stacked' => (int) get_parameter('stacked', CUSTOM_GRAPH_LINE),
+ 'labels' => get_parameter('name_list', array()),
+ 'modules_series' => get_parameter('modules_param', array()),
+ 'id_graph' => (int) get_parameter('id_graph', 0),
+ 'return' => 1
+ );
+
+ echo graphic_combined_module(
+ get_parameter('modules_param', array()),
+ $params,
+ $params_combined
+ );
return;
}
if ($print_sparse_graph) {
ob_clean();
-
- $agent_module_id = (int) get_parameter('agent_module_id');
- $period = (int) get_parameter('period', SECONDS_5MINUTES);
- $show_events = (bool) get_parameter('show_events');
- $width = (int) get_parameter('width', CHART_DEFAULT_WIDTH);
- $height = (int) get_parameter('height', CHART_DEFAULT_HEIGHT);
- $title = (string) get_parameter('title');
- $unit_name = (string) get_parameter('unit_name');
- $show_alerts = (bool) get_parameter('show_alerts');
- $avg_only = (int) get_parameter('avg_only');
- $pure = (bool) get_parameter('pure');
- $date = (int) get_parameter('date', time());
- $unit = (string) get_parameter('unit');
- $baseline = (int) get_parameter('baseline');
- $return_data = (int) get_parameter('return_data');
- $show_title = (bool) get_parameter('show_title', true);
- $only_image = (bool) get_parameter('only_image');
- $homeurl = (string) get_parameter('homeurl');
- $ttl = (int) get_parameter('ttl', 1);
- $projection = (bool) get_parameter('projection');
- $adapt_key = (string) get_parameter('adapt_key');
- $compare = (bool) get_parameter('compare');
- $show_unknown = (bool) get_parameter('show_unknown');
- $menu = (bool) get_parameter('menu', true);
- $background_color = (string) get_parameter('background_color', 'white');
- $percentil = get_parameter('percentil', null);
- $dashboard = (bool) get_parameter('dashboard');
- $vconsole = (bool) get_parameter('vconsole');
- $type_g = get_parameter('type_g', $config['type_module_charts']);
- $fullscale = get_parameter('fullscale', 0);
-
- echo grafico_modulo_sparse($agent_module_id, $period, $show_events,
- $width, $height , $title, $unit_name, $show_alerts, $avg_only,
- $pure, $date, $unit, $baseline, $return_data, $show_title,
- $only_image, $homeurl, $ttl, $projection, $adapt_key, $compare,
- $show_unknown, $menu, $backgroundColor, $percentil,
- $dashboard, $vconsole, $type_g, $fullscale);
+ $params =array(
+ 'agent_module_id' => (int)get_parameter('agent_module_id'),
+ 'period' => (int) get_parameter('period', SECONDS_5MINUTES),
+ 'show_events' => (bool) get_parameter('show_events'),
+ 'title' => (string) get_parameter('title'),
+ 'unit_name' => (string) get_parameter('unit_name'),
+ 'show_alerts' => (bool) get_parameter('show_alerts'),
+ 'avg_only' => (int) get_parameter('avg_only'),
+ 'pure' => (bool) get_parameter('pure'),
+ 'date' => (int) get_parameter('date', time()),
+ 'unit' => (string) get_parameter('unit'),
+ 'baseline' => (int) get_parameter('baseline'),
+ 'return_data' => (int) get_parameter('return_data'),
+ 'show_title' => (bool) get_parameter('show_title', true),
+ 'only_image' => (bool) get_parameter('only_image'),
+ 'homeurl' => (string) get_parameter('homeurl'),
+ 'ttl' => (int) get_parameter('ttl', 1),
+ 'projection' => (bool) get_parameter('projection'),
+ 'adapt_key' => (string) get_parameter('adapt_key'),
+ 'compare' => (bool) get_parameter('compare'),
+ 'show_unknown' => (bool) get_parameter('show_unknown'),
+ 'menu' => (bool) get_parameter('menu', true),
+ 'backgroundColor' => (string) get_parameter('background_color', 'white'),
+ 'percentil' => get_parameter('percentil', null),
+ 'dashboard' => (bool) get_parameter('dashboard'),
+ 'vconsole' => (bool) get_parameter('vconsole'),
+ 'type_graph' => get_parameter('type_g', $config['type_module_charts']),
+ 'fullscale' => get_parameter('fullscale', 0),
+ 'id_widget_dashboard' => false,
+ 'force_interval' => '',
+ 'time_interval' => 300,
+ 'array_data_create' => 0
+ );
+
+ echo grafico_modulo_sparse($params);
return;
}
@@ -124,7 +127,7 @@ if ($get_graphs){
if (!empty($result_items)){
$hash = get_parameter('hash',0);
$period = get_parameter('time',0);
-
+
$periods = array ();
$periods[1] = __('none');
$periods[SECONDS_1HOUR] = __('1 hour');
@@ -137,7 +140,7 @@ if ($get_graphs){
$periods[SECONDS_1WEEK] = __('1 week');
$periods[SECONDS_15DAYS] = __('15 days');
$periods[SECONDS_1MONTH] = __('1 month');
-
+
$table = '';
$single_table = "";
$single_table .= "";
@@ -151,7 +154,7 @@ if ($get_graphs){
$single_table .= "";
$single_table .= "
";
$single_table .= "
";
-
+
$table .= $single_table;
$contador = $config['max_graph_container'];
foreach ($result_items as $key => $value) {
@@ -159,9 +162,9 @@ if ($get_graphs){
if($period > 1){
$value['time_lapse'] = $period;
}
-
+
$type_graph = ($value['type_graph'])? "line" : "area";
-
+
switch ($value['type']) {
case 'simple_graph':
if ($contador > 0) {
@@ -170,60 +173,23 @@ if ($get_graphs){
$sql_alias = db_get_all_rows_sql("SELECT alias from tagente
WHERE id_agente = ". $sql_modulo[0]['id_agente']);
$table .= "AGENT " .$sql_alias[0]['alias']." MODULE ".$sql_modulo[0]['nombre']."
";
- $table .= grafico_modulo_sparse(
- $value['id_agent_module'],
- $value['time_lapse'],
- 0,
- 1000,
- 300,
- '',
- '',
- false,
- $value['only_average'],
- false,
- 0,
- '',
- 0,
- 0,
- 1,
- false,
- ui_get_full_url(false, false, false, false),
- 1,
- false,
- 0,
- false,
- false,
- 1,
- 'white',
- null,
- false,
- false,
- $type_graph,
- $value['fullscale']);
+
+ $params =array(
+ 'agent_module_id' => $value['id_agent_module'],
+ 'period' => $value['time_lapse'],
+ 'avg_only' => $value['only_average'],
+ 'homeurl' => ui_get_full_url(false, false, false, false),
+ 'type_graph' => $type_graph,
+ 'fullscale' => $value['fullscale']
+ );
+
+ $table .= grafico_modulo_sparse($params);
$contador --;
}
// $table .= "";
break;
case 'custom_graph':
if ($contador > 0) {
- $graph = db_get_all_rows_field_filter('tgraph', 'id_graph',$value['id_graph']);
-
- $sources = db_get_all_rows_field_filter('tgraph_source', 'id_graph',$value['id_graph']);
- $modules = array ();
- $weights = array ();
- $labels = array ();
- foreach ($sources as $source) {
- array_push ($modules, $source['id_agent_module']);
- array_push ($weights, $source['weight']);
- if ($source['label'] != ''){
- $item['type'] = 'custom_graph';
- $item['id_agent'] = agents_get_module_id($source['id_agent_module']);
- $item['id_agent_module'] = $source['id_agent_module'];
- $labels[$source['id_agent_module']] = reporting_label_macro($item, $source['label']);
- }
- }
-
- $homeurl = ui_get_full_url(false, false, false, false);
$graph_conf = db_get_row('tgraph', 'id_graph', $value['id_graph']);
if($graph_conf['stacked'] == 4 || $graph_conf['stacked'] == 9){
@@ -233,40 +199,28 @@ if ($get_graphs){
} else {
$height = 300;
}
+
$table .= "".$graph[0]['name']."
";
- $table .= graphic_combined_module(
- $modules,
- $weights,
- $value['time_lapse'],
- 1000,
- $height,
- '',
- '',
- 0,
- 0,
- 0,
- $graph_conf['stacked'],
- 0,
- false,
- $homeurl,
- 1,
- false,
- false,
- 'white',
- array(),
- array(),
- 1,
- 1,
- 1,
- 1,
- $labels,
- false,
- false,
- $graph_conf['percentil'] == 1,
- false,
- false,
- $value['fullscale']
+
+ $params =array(
+ 'period' => $value['time_lapse'],
+ 'width' => 1000,
+ 'height' => $height,
+ 'percentil' => $graph_conf['percentil'] == 1,
+ 'fullscale' => $value['fullscale']
);
+
+ $params_combined = array(
+ 'stacked' => $graph_conf['stacked'],
+ 'id_graph' => $value['id_graph']
+ );
+
+ $table .= graphic_combined_module(
+ false,
+ $params,
+ $params_combined
+ );
+
$contador --;
}
break;
@@ -280,13 +234,13 @@ if ($get_graphs){
} else {
$id_group = " AND id_grupo = ".$value['id_group'];
}
-
+
if($value['id_module_group'] === '0'){
$id_module_group = "";
} else {
$id_module_group = " AND id_module_group = ".$value['id_module_group'];
}
-
+
if($value['id_tag'] === '0'){
$tag = "";
$id_tag = "";
@@ -294,7 +248,7 @@ if ($get_graphs){
$tag = " INNER JOIN ttag_module ON ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo ";
$id_tag = " AND ttag_module.id_tag = ".$value['id_tag'];
}
-
+
if($value['module'] != ''){
$module_name = " AND nombre REGEXP '".$value['module']."'";
}
@@ -303,47 +257,27 @@ if ($get_graphs){
". $tag . "WHERE 1=1" . $id_module_group . $module_name .
" AND id_agente IN (SELECT id_agente FROM tagente WHERE 1=1" .$alias.$id_group.")"
. $id_tag);
-
+
foreach ($id_agent_module as $key2 => $value2) {
if ($contador > 0) {
$sql_modulo2 = db_get_all_rows_sql("SELECT nombre, id_agente FROM
tagente_modulo WHERE id_agente_modulo = ". $value2['id_agente_modulo']);
-
+
$sql_alias2 = db_get_all_rows_sql("SELECT alias from tagente
WHERE id_agente = ". $sql_modulo2[0]['id_agente']);
-
+
$table .= "AGENT " .$sql_alias2[0]['alias']." MODULE ".$sql_modulo2[0]['nombre']."
";
-
- $table .= grafico_modulo_sparse(
- $value2['id_agente_modulo'],
- $value['time_lapse'],
- 0,
- 1000,
- 300,
- '',
- '',
- false,
- $value['only_average'],
- false,
- 0,
- '',
- 0,
- 0,
- 1,
- false,
- ui_get_full_url(false, false, false, false),
- 1,
- false,
- 0,
- false,
- false,
- 1,
- 'white',
- null,
- false,
- false,
- $type_graph,
- $value['fullscale']);
+
+ $params =array(
+ 'agent_module_id' => $value2['id_agente_modulo'],
+ 'period' => $value['time_lapse'],
+ 'avg_only' => $value['only_average'],
+ 'homeurl' => ui_get_full_url(false, false, false, false),
+ 'type_graph' => $type_graph,
+ 'fullscale' => $value['fullscale']
+ );
+
+ $table .= grafico_modulo_sparse($params);
$contador --;
}
}
@@ -353,7 +287,6 @@ if ($get_graphs){
$table .= "";
echo $table;
return;
-
}
}
diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php
index 461c20298a..fab370763d 100755
--- a/pandora_console/include/ajax/visual_console_builder.ajax.php
+++ b/pandora_console/include/ajax/visual_console_builder.ajax.php
@@ -251,20 +251,41 @@ switch ($action) {
continue;
}
}
-
+
+ $params =array(
+ 'period' => $period,
+ 'width' => $width,
+ 'height' => $height,
+ 'vconsole' => true,
+ 'backgroundColor'=> $background_color
+ );
+
+ $params_combined = array(
+ 'id_graph' => $id_custom_graph
+ );
+
if ($id_custom_graph != 0) {
- $img = custom_graphs_print(
- $id_custom_graph, $height, $width, $period,
- null, true, 0, true, $background_color);
+ $img = graphic_combined_module(
+ false,
+ $params,
+ $params_combined
+ );
}
else {
- $img = grafico_modulo_sparse($id_agent_module,
- $period, 0, $width, $height, '', null, false, 1,
- 0, 0, '', 0, 0, true, true, '', 1, false, '',
- false, false, true, $background_color,
- false, false, false, $config['type_module_charts']);
+ $params =array(
+ 'agent_module_id' => $id_agent_module,
+ 'period' => $period,
+ 'show_events' => false,
+ 'width' => $width,
+ 'height' => $height,
+ 'menu' => false,
+ 'backgroundColor' => $background_color,
+ 'vconsole' => true,
+ 'type_graph' => $config['type_module_charts']
+ );
+ $img = grafico_modulo_sparse($params);
}
-
+
//Restore db connection
if (!empty($id_metaconsole)) {
metaconsole_restore_db();
diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php
new file mode 100644
index 0000000000..fef8d1abeb
--- /dev/null
+++ b/pandora_console/include/chart_generator.php
@@ -0,0 +1,120 @@
+";
+ echo "";
+ ui_print_error_message(__('There was a problem connecting with the node'));
+ echo "";
+ echo "