From b912834ce7d460ce9bdc6a0cf3dfd814b3e2eec5 Mon Sep 17 00:00:00 2001
From: Arturo Gonzalez
Date: Wed, 12 Apr 2017 15:00:09 +0200
Subject: [PATCH 001/311] Added the new item to item editor builder and to html
view
---
.../reporting_builder.item_editor.php | 16 +++++
.../include/functions_reporting.php | 65 ++++++++++++++++++
.../include/functions_reporting_html.php | 66 +++++++++++++++++++
pandora_console/include/functions_reports.php | 3 +-
4 files changed, 149 insertions(+), 1 deletion(-)
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index 2e974b85fe..900cf4b475 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -144,6 +144,7 @@ switch ($action) {
case 'network_interfaces_report':
case 'availability':
case 'event_report_log':
+ case 'increment':
case 'availability_graph':
case 'agent_module':
$get_data_editor = true;
@@ -272,6 +273,13 @@ switch ($action) {
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
break;
+ case 'increment':
+ $description = $item['description'];
+ $idAgentModule = $item['id_agent_module'];
+ $idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
+ $period = $item['period'];
+ break;
+
case 'SLA_services':
$description = $item['description'];
$period = $item['period'];
@@ -578,6 +586,7 @@ switch ($action) {
case 'MTTR':
case 'simple_baseline_graph':
case 'event_report_log':
+ case 'increment':
$label = (isset($style['label'])) ? $style['label'] : '';
break;
default:
@@ -2646,6 +2655,13 @@ function chooseType() {
$("#agents_row").show();
$("#row_source").show();
break;
+
+ case 'increment':
+ $("#row_description").show();
+ $("#row_agent").show();
+ $("#row_module").show();
+ $("#row_period").show();
+ break;
case 'simple_graph':
$("#row_time_compare_overlapped").show();
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 3d05c2099f..1a649d63ab 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -171,6 +171,12 @@ function reporting_make_reporting_data($report = null, $id_report,
$report,
$content);
break;
+ case 'increment':
+ $report['contents'][] =
+ reporting_increment(
+ $report,
+ $content);
+ break;
case 'general':
$report['contents'][] =
reporting_general(
@@ -5464,6 +5470,65 @@ function reporting_availability_graph($report, $content, $pdf=false) {
return reporting_check_structure_content($return);
}
+/**
+ * reporting_increment
+ *
+ * Generates a structure the report.
+ *
+ */
+function reporting_increment ($report, $content) {
+ global $config;
+
+ $return = array();
+ $return['type'] = 'increment';
+ if (empty($content['name'])) {
+ $content['name'] = __('Increment');
+ }
+
+ $return['title'] = $content['name'];
+ $return["description"] = $content["description"];
+ $return["id_agent_module"] = $content["id_agent_module"];
+ $return["id_agent"] = $content["id_agent"];
+
+ $id_agent_module = $content['id_agent_module'];
+ $period = (int)$content['period'];
+
+ $return["from"] = time() - $period;
+ $return["to"] = time();
+
+ $return["data"] = array();
+
+ $old_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . '
+ AND utimestamp <= ' . (time() - $period) . ' ORDER BY utimestamp DESC');
+
+ $last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC');
+
+ if (is_numeric($old_data) && is_numeric($last_data)) {
+ $return["data"]['old'] = $old_data;
+ $return["data"]['now'] = $last_data;
+ $increment = $old_data - $last_data;
+
+ if ($increment < 0) {
+ $return["data"]['inc'] = 'positive';
+ $return["data"]["inc_data"] = $last_data - $old_data;
+ }
+ else if ($increment == 0) {
+ $return["data"]['inc'] = 'neutral';
+ $return["data"]["inc_data"] = 0;
+ }
+ else {
+ $return["data"]['inc'] = 'negative';
+ $return["data"]["inc_data"] = $old_data - $last_data;
+ }
+ }
+ else {
+ $return["data"]['message'] = __('The monitor type is not numeric');
+ $return["data"]['error'] = true;
+ }
+
+ return reporting_check_structure_content($return);
+}
+
/**
* reporting_general
*
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index f6acad7fbe..1cf64b4342 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -208,6 +208,9 @@ function reporting_html_print_report($report, $mini = false, $report_info = 1) {
case 'avg_value':
reporting_html_avg_value($table, $item, $mini);
break;
+ case 'increment':
+ reporting_html_increment($table, $item);
+ break;
case 'min_value':
reporting_html_min_value($table, $item, $mini);
break;
@@ -2213,6 +2216,69 @@ function reporting_html_value(&$table, $item, $mini, $only_value = false, $check
$table->data['data']['cell'] .= '
';
}
+function reporting_html_increment(&$table, $item) {
+ global $config;
+
+ if (isset($item["data"]['error'])) {
+ $table->colspan['error']['cell'] = 3;
+ $table->data['error']['cell'] = $item["data"]['message'];
+ }
+ else {
+ $table1 = new stdClass();
+ $table1->width = '99%';
+ $table1->data = array ();
+
+ $table1->head = array ();
+ $table1->head[0] = __('Agent');
+ $table1->head[1] = __('Module');
+ $table1->head[2] = __('From');
+ $table1->head[3] = __('To');
+ $table1->head[4] = __('From data');
+ $table1->head[5] = __('To data');
+ $table1->head[6] = __('Increment');
+
+ $table1->headstyle = array();
+ $table1->headstyle[0] = 'text-align: left';
+ $table1->headstyle[1] = 'text-align: left';
+ $table1->headstyle[2] = 'text-align: left';
+ $table1->headstyle[3] = 'text-align: left';
+ $table1->headstyle[4] = 'text-align: right';
+ $table1->headstyle[5] = 'text-align: right';
+ $table1->headstyle[6] = 'text-align: right';
+
+ $table1->style[0] = 'text-align: left';
+ $table1->style[1] = 'text-align: left';
+ $table1->style[2] = 'text-align: left';
+ $table1->style[3] = 'text-align: left';
+ $table1->style[4] = 'text-align: right';
+ $table1->style[5] = 'text-align: right';
+ $table1->style[6] = 'text-align: right';
+
+ $table1_row = array();
+ $table1_row[0] = agents_get_alias($item['id_agent']);
+ $table1_row[1] = modules_get_agentmodule_name($item['id_agent_module']);
+ $table1_row[2] = date("F j, Y, g:i a", $item['from']);
+ $table1_row[3] = date("F j, Y, g:i a", $item['to']);
+ $table1_row[4] = $item["data"]['old'];
+ $table1_row[5] = $item["data"]['now'];
+ if ($item["data"]['inc'] == 'negative') {
+ $table1_row[6] = __('Negative increase: ') . $item["data"]["inc_data"];
+ }
+ else if ($item["data"]['inc'] == 'positive') {
+ $table1_row[6] = __('Positive increase: ') . $item["data"]["inc_data"];
+ }
+ else {
+ $table1_row[6] = __('Neutral increase: ') . $item["data"]["inc_data"];
+ }
+
+ $table1->data[] = $table1_row;
+
+ $data = array();
+ $data[0] = html_print_table($table1, true);
+ array_push ($table->data, $data);
+ }
+}
+
function reporting_html_url(&$table, $item, $key) {
$table->colspan['data']['cell'] = 3;
$table->cellstyle['data']['cell'] = 'text-align: left;';
diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php
index 9282be345b..dfa3d3d490 100755
--- a/pandora_console/include/functions_reports.php
+++ b/pandora_console/include/functions_reports.php
@@ -574,7 +574,8 @@ function reports_get_report_types ($template = false, $not_editor = false) {
'name' => __('Summatory'));
$types['historical_data'] = array('optgroup' => __('Modules'),
'name' => __('Historical Data'));
-
+ $types['increment'] = array('optgroup' => __('Modules'),
+ 'name' => __('Increment'));
$types['general'] = array('optgroup' => __('Grouped'),
From cc1ab47a65cc5815427d327b6727f138782d198b Mon Sep 17 00:00:00 2001
From: Arturo Gonzalez
Date: Wed, 12 Apr 2017 15:53:36 +0200
Subject: [PATCH 002/311] Added fixes to new report item
---
pandora_console/include/functions_reporting.php | 6 +++++-
pandora_console/include/functions_reporting_html.php | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 1a649d63ab..2d230792d3 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -5503,7 +5503,11 @@ function reporting_increment ($report, $content) {
$last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC');
- if (is_numeric($old_data) && is_numeric($last_data)) {
+ if ($old_data === false || $last_data === false) {
+ $return["data"]['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
+ $return["data"]['error'] = true;
+ }
+ else if (is_numeric($old_data) && is_numeric($last_data)) {
$return["data"]['old'] = $old_data;
$return["data"]['now'] = $last_data;
$increment = $old_data - $last_data;
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index 1cf64b4342..6522a0b63a 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -2257,8 +2257,8 @@ function reporting_html_increment(&$table, $item) {
$table1_row = array();
$table1_row[0] = agents_get_alias($item['id_agent']);
$table1_row[1] = modules_get_agentmodule_name($item['id_agent_module']);
- $table1_row[2] = date("F j, Y, g:i a", $item['from']);
- $table1_row[3] = date("F j, Y, g:i a", $item['to']);
+ $table1_row[2] = date("F j, Y, G:i", $item['from']);
+ $table1_row[3] = date("F j, Y, G:i", $item['to']);
$table1_row[4] = $item["data"]['old'];
$table1_row[5] = $item["data"]['now'];
if ($item["data"]['inc'] == 'negative') {
From d499cc1b84ba70fb5fc0a1e88db7124590e9d665 Mon Sep 17 00:00:00 2001
From: Arturo Gonzalez
Date: Wed, 12 Apr 2017 17:12:16 +0200
Subject: [PATCH 003/311] Added modification to new report item in meta
---
.../include/functions_reporting.php | 36 +++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 2d230792d3..98438030ef 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -5498,10 +5498,42 @@ function reporting_increment ($report, $content) {
$return["data"] = array();
- $old_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . '
+ if (defined('METACONSOLE')) {
+ $sql1 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . '
+ AND utimestamp <= ' . (time() - $period) . ' ORDER BY utimestamp DESC';
+ $sql2 = 'SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC';
+
+ $servers = db_get_all_rows_sql ('SELECT *
+ FROM tmetaconsole_setup
+ WHERE disabled = 0');
+
+ if ($servers === false)
+ $servers = array();
+
+ $result = array();
+ $count_modules = 0;
+ foreach ($servers as $server) {
+ // If connection was good then retrieve all data server
+ if (metaconsole_connect($server) == NOERR)
+ $connection = true;
+ else
+ $connection = false;
+
+ $old_data = db_get_value_sql ($sql1);
+
+ $last_data = db_get_value_sql ($sql2);
+ }
+ }
+ else {
+ $old_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . '
AND utimestamp <= ' . (time() - $period) . ' ORDER BY utimestamp DESC');
- $last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC');
+ $last_data = db_get_value_sql('SELECT datos FROM tagente_datos WHERE id_agente_modulo = ' . $id_agent_module . ' ORDER BY utimestamp DESC');
+ }
+
+ if (!defined('METACONSOLE')) {
+
+ }
if ($old_data === false || $last_data === false) {
$return["data"]['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
From 0cb186600976855c0a370074d0d85d15e82f6ed7 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Thu, 15 Jun 2017 15:01:31 +0200
Subject: [PATCH 004/311] Add optional report description section to
metaconsole - 708
---
pandora_console/include/functions_config.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index c6828ffd1b..478866ae81 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -1656,6 +1656,10 @@ function config_process_config () {
config_update_value ('command_snapshot', 1);
}
+ if (!isset($config['custom_report_info'])) {
+ config_update_value ('custom_report_info', 1);
+ }
+
// Juanma (06/05/2014) New feature: Custom front page for reports
if (!isset($config['custom_report_front'])) {
config_update_value ('custom_report_front', 0);
From 0155dae269fd0f70c92182d759f49ec93d2ba7c3 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Mon, 19 Jun 2017 17:28:35 +0200
Subject: [PATCH 005/311] Add multiple checkbox selector for report delete -
#895
---
.../godmode/reporting/reporting_builder.php | 57 ++++++++++++++++++-
1 file changed, 54 insertions(+), 3 deletions(-)
diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php
index ca470dc79b..6c49f6d82c 100755
--- a/pandora_console/godmode/reporting/reporting_builder.php
+++ b/pandora_console/godmode/reporting/reporting_builder.php
@@ -1,3 +1,37 @@
+
+
head[$next] = '' .
- __('Op.') . '';
+ __('Op.') . ''.html_print_checkbox('all_delete', 0, false, true, false,
+ 'check_all_checkboxes();');
//$table->size = array ();
$table->size[$next] = '10%';
@@ -703,9 +738,13 @@ switch ($action) {
$data[$next] .= '';
+
}
}
@@ -733,8 +772,19 @@ switch ($action) {
else
echo '';
html_print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
- echo "
";
+
echo "";
+ echo '';
+ echo "";
+
}
enterprise_hook('close_meta_frame');
@@ -2044,3 +2094,4 @@ switch ($activeTab) {
enterprise_hook('close_meta_frame');
?>
+
From 5c4b5a02424b8571022e5dcd5fb0cf0dada0402c Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Wed, 28 Jun 2017 15:47:24 +0200
Subject: [PATCH 006/311] Add link in minor release update dialog to
documentation - #951
---
.../godmode/update_manager/update_manager.offline.php | 9 ++++++++-
pandora_console/include/functions_update_manager.php | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/pandora_console/godmode/update_manager/update_manager.offline.php b/pandora_console/godmode/update_manager/update_manager.offline.php
index 2079678fa8..afad03cc2c 100644
--- a/pandora_console/godmode/update_manager/update_manager.offline.php
+++ b/pandora_console/godmode/update_manager/update_manager.offline.php
@@ -58,7 +58,14 @@ $baseurl = ui_get_full_url(false, false, false, false);
var text1_mr_file = "\n";
var text2_mr_file = "\n";
var text3_mr_file = "\n";
- var text4_mr_file = "\n";
+ var text4_mr_file = "
'.__('About minor release update').'';
+ }
+ else{
+ echo __(' to this process').'
'.__('About minor release update').'';
+ }
+ ?>";
var text1_package_file = "\n";
var text2_package_file = "\n";
var applying_mr = "\n";
diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php
index 607b108e42..ba6508fa19 100755
--- a/pandora_console/include/functions_update_manager.php
+++ b/pandora_console/include/functions_update_manager.php
@@ -358,7 +358,14 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
var text1_mr_file = "\n";
var text2_mr_file = "\n";
var text3_mr_file = "\n";
- var text4_mr_file = "\n";
+ var text4_mr_file = "
'.__('About minor release update').'';
+ }
+ else{
+ echo __(' to this process').'
'.__('About minor release update').'';
+ }
+ ?>";
var text1_package_file = "\n";
var text2_package_file = "\n";
var applying_mr = "\n";
From 0d82c88fd705ab5a226295024f4478bd56d85246 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Fri, 25 Aug 2017 10:28:48 +0200
Subject: [PATCH 007/311] Order agents list by alias in module bulk operations
- #159
---
pandora_console/operation/agentes/ver_agente.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php
index 381b089b68..0b01be44a0 100644
--- a/pandora_console/operation/agentes/ver_agente.php
+++ b/pandora_console/operation/agentes/ver_agente.php
@@ -97,7 +97,7 @@ if (is_ajax ()) {
$filter[] = "(notinit_count = total_count)";
break;
}
- $filter['order'] = "nombre ASC";
+ $filter['order'] = "alias ASC";
// Build fields
$fields = array('id_agente', 'alias');
From 29703c708a334d7c96bf3ff9348ccce19b91ca75 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Mon, 28 Aug 2017 11:14:04 +0200
Subject: [PATCH 008/311] Disable autosubmit in agent module view - #1125
---
pandora_console/extensions/agents_alerts.php | 8 +++++---
pandora_console/extensions/agents_modules.php | 4 +++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/pandora_console/extensions/agents_alerts.php b/pandora_console/extensions/agents_alerts.php
index 97f1bc7589..f5cad20d74 100755
--- a/pandora_console/extensions/agents_alerts.php
+++ b/pandora_console/extensions/agents_alerts.php
@@ -546,9 +546,11 @@ ui_require_jquery_file('pandora');
});
$('#group_id').change(function(){
- var regx = /&group_id=\d*/g;
- var url = location.href.replace(regx, "");
- location.href = url+"&group_id="+$("#group_id").val();
+ if(location.href.indexOf("extensions/agents_modules") == -1){
+ var regx = /&group_id=\d*/g;
+ var url = location.href.replace(regx, "");
+ location.href = url+"&group_id="+$("#group_id").val();
+ }
});
});
diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php
index cb6fe8cd42..4a35c66374 100644
--- a/pandora_console/extensions/agents_modules.php
+++ b/pandora_console/extensions/agents_modules.php
@@ -70,7 +70,9 @@ function mainAgentsModules() {
$offset = (int)get_parameter('offset', 0);
$hor_offset = (int)get_parameter('hor_offset', 0);
$block = $config['block_size'];
- $agents_id = (array)get_parameter('id_agents2', -1);
+ if(get_parameter('modulegroup') != null){
+ $agents_id = (array)get_parameter('id_agents2', -1);
+ }
$selection_a_m = (int)get_parameter('selection_agent_module');
$modules_selected = (array)get_parameter('module', 0);
$update_item = (string)get_parameter('edit_item','');
From da3905a593d6f493cf1dd9c4172a594dfa9e788a Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Thu, 7 Sep 2017 13:25:39 +0200
Subject: [PATCH 009/311] Apply comfort displacement to update button in visual
styles section - #1228
---
pandora_console/godmode/setup/setup_visuals.php | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index 2e18f50669..5eb4aae3b1 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -914,6 +914,23 @@ tinyMCE.init({
});
$(document).ready (function () {
+
+ var comfort = 0;
+
+ if(comfort == 0){
+ $(':input,:radio,:checkbox,:file').change(function(){
+ $('#submit-update_button').css({'position':'fixed','right':'80px','bottom':'55px'});
+ var comfort = 1;
+ });
+
+ $("*").keydown(function(){
+ $('#submit-update_button').css({'position':'fixed','right':'80px','bottom':'55px'});
+ var comfort = 1;
+ });
+
+ $('#form_setup').after('
');
+ }
+
$("#form_setup #text-graph_color1").attachColorPicker();
$("#form_setup #text-graph_color2").attachColorPicker();
$("#form_setup #text-graph_color3").attachColorPicker();
From d290d69d335c6bfd7395a7bf5d869ba413c74854 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Fri, 8 Sep 2017 11:15:29 +0200
Subject: [PATCH 010/311] Now the label editor color is changed by the mouse
scroll - #1103
---
.../visual_console_builder.editor.js | 24 +++++++------------
.../include/functions_visual_map_editor.php | 2 +-
2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js
index 3cea48be21..ce58217ccb 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.js
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js
@@ -126,23 +126,17 @@ function visual_map_main() {
// Begin - Background label color changer
- $( "#text-label_ifr" ).contents().find( "body" ).bind("contextmenu", function(e) {
- e.preventDefault();
+ $( "#text-label_ifr" ).contents().find( "body" ).bind('mousewheel', function(e){
+ e.preventDefault();
+
+ if($( "#text-label_ifr" ).contents().find( "body" ).css('background-color') == 'rgb(211, 211, 211)'){
+ $( "#text-label_ifr" ).contents().find( "body" ).css('background-color','white');
+ }
+ else{
+ $( "#text-label_ifr" ).contents().find( "body" ).css('background-color','lightgray');
+ }
});
- $( "#text-label_ifr" ).contents().find( "body" ).mousedown(function(e){
- if(e.which == 3)
- {
- if($( "#text-label_ifr" ).contents().find( "body" ).css('background-color') == 'rgb(211, 211, 211)'){
- $( "#text-label_ifr" ).contents().find( "body" ).css('background-color','white');
- }
- else{
- $( "#text-label_ifr" ).contents().find( "body" ).css('background-color','lightgray');
- }
-
- }
- });
-
// End - Background label color changer
$('#radiobtn0001').click(function(){
diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php
index c0c261ea57..7ef82de44d 100755
--- a/pandora_console/include/functions_visual_map_editor.php
+++ b/pandora_console/include/functions_visual_map_editor.php
@@ -189,7 +189,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
' .
html_print_input_text('label', '', '', 20, 200, true) . '
- '.__("Click right mouse button to change the background color of the label editor").'
+ '.__("Scroll the mouse wheel over the label editor to change the background color").'
| ';
From 3919edcbd860a679e392e02e2e251ada42a88271 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Fri, 8 Sep 2017 13:39:20 +0200
Subject: [PATCH 011/311] Add snmp oid field in module bulk operations - #1205
---
.../godmode/massive/massive_edit_modules.php | 27 +++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php
index 7e2db21c3c..11fd325fcf 100755
--- a/pandora_console/godmode/massive/massive_edit_modules.php
+++ b/pandora_console/godmode/massive/massive_edit_modules.php
@@ -503,6 +503,10 @@ $table->data['edit3'][2] = __('SMNP community');
$table->data['edit3'][3] = html_print_input_text ('snmp_community', '',
'', 10, 15, true);
+$table->data['edit15'][2] = __('SNMP OID');
+$table->data['edit15'][3] = html_print_input_text ('snmp_oid', '',
+ '', 80, 80, true);
+
$target_ip_values = array();
$target_ip_values['auto'] = __('Auto');
$target_ip_values['force_pri'] = __('Force primary key');
@@ -736,7 +740,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").hide ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").hide ();
var params = {
"page" : "operation/agentes/ver_agente",
@@ -800,7 +805,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").show ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").show ();
}
function clean_lists() {
@@ -829,7 +835,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").hide ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").hide ();
$('input[type=checkbox]').attr('checked', false);
$('input[type=checkbox]').attr('disabled', true);
@@ -877,7 +884,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").hide ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").hide ();
}
}
}
@@ -919,7 +927,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").show ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").show ();
}
else {
$(".select_agents_row_2").css('display', '');
@@ -942,7 +951,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").hide ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").hide ();
}
}
}
@@ -1026,7 +1036,8 @@ $(document).ready (function () {
"tr#delete_table-edit11, " +
"tr#delete_table-edit12, " +
"tr#delete_table-edit13, " +
- "tr#delete_table-edit14").hide ();
+ "tr#delete_table-edit14, " +
+ "tr#delete_table-edit15").hide ();
jQuery.post ("ajax.php",
{"page" : "operation/agentes/ver_agente",
@@ -1128,7 +1139,7 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
$fields = array ('dynamic_interval', 'dynamic_max', 'dynamic_min', 'dynamic_two_tailed', 'min_warning', 'max_warning', 'str_warning',
'min_critical', 'max_critical', 'str_critical', 'min_ff_event',
'module_interval', 'disabled', 'post_process', 'unit',
- 'snmp_community', 'tcp_send', 'custom_string_1',
+ 'snmp_community','snmp_oid','tcp_send', 'custom_string_1',
'plugin_parameter', 'custom_string_2', 'custom_string_3', 'min',
'max', 'id_module_group', 'plugin_user', 'plugin_pass',
'id_export', 'history_data', 'critical_inverse',
From dc33195358dafdfa88452dff79c084f6ce5e0d66 Mon Sep 17 00:00:00 2001
From: enriquecd
Date: Mon, 11 Sep 2017 17:20:07 +0200
Subject: [PATCH 012/311] Add recursion group search for agent/module view and
angent/module item in reports - #1113
---
pandora_console/extensions/agents_modules.php | 51 ++++++++++++++++---
.../reporting_builder.item_editor.php | 37 +++++++++++++-
.../operation/agentes/ver_agente.php | 4 +-
3 files changed, 82 insertions(+), 10 deletions(-)
diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php
index cb6fe8cd42..a69343d6dd 100644
--- a/pandora_console/extensions/agents_modules.php
+++ b/pandora_console/extensions/agents_modules.php
@@ -66,11 +66,14 @@ function mainAgentsModules() {
$modulegroup = get_parameter('modulegroup', 0);
$refr = get_parameter('refresh', 0); // By default 30 seconds
+ $recursion = get_parameter('recursion', 0);
$group_id = (int)get_parameter('group_id', 0);
$offset = (int)get_parameter('offset', 0);
$hor_offset = (int)get_parameter('hor_offset', 0);
$block = $config['block_size'];
+ if(get_parameter('modulegroup') != null){
$agents_id = (array)get_parameter('id_agents2', -1);
+ }
$selection_a_m = (int)get_parameter('selection_agent_module');
$modules_selected = (array)get_parameter('module', 0);
$update_item = (string)get_parameter('edit_item','');
@@ -139,6 +142,8 @@ function mainAgentsModules() {
$filter_groups_label = ''.__('Group').'';
$filter_groups = html_print_select_groups(false, "AR", true, 'group_id', $group_id, '', '', '', true, false, true, '', false , 'width: auto;');
+ $filter_recursion_label = ''.__('Recursion').'';
+ $filter_recursion = html_print_checkbox('recursion', 1, 0, true);
//groups module
$filter_module_groups_label = ''.__('Module group').'';
$filter_module_groups = html_print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name",
@@ -245,12 +250,12 @@ function mainAgentsModules() {
if($config['pure'] != 1){
echo '