diff --git a/pandora_agents/win32/misc/cron.cc b/pandora_agents/win32/misc/cron.cc
index d712c2685c..2d3e5e0440 100644
--- a/pandora_agents/win32/misc/cron.cc
+++ b/pandora_agents/win32/misc/cron.cc
@@ -227,7 +227,7 @@ int Cron::getResetValue (int position) {
* @return false if should not execute
*/
bool Cron::shouldExecuteAt (time_t date) {
- return this->utimestamp < date;
+ return this->utimestamp <= date;
}
/**
diff --git a/pandora_console/extensions/insert_data.php b/pandora_console/extensions/insert_data.php
index 5cfcc331d0..b930462fe5 100644
--- a/pandora_console/extensions/insert_data.php
+++ b/pandora_console/extensions/insert_data.php
@@ -48,7 +48,7 @@ function createXMLData($agent, $agentModule, $time, $data) {
$data
);
- $file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . str_replace($time, " ", "_") . ".data";
+ $file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . strtotime($time) . ".data";
return (bool) @file_put_contents($file_name, $xml);
}
@@ -115,7 +115,7 @@ function mainInsertData() {
$utimestamp = strtotime($date . " " . $time) - get_fixed_offset();
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
$result = createXMLData($agent, $agentModule, $timestamp, $data);
-
+
if ($result) {
$done++;
}
diff --git a/pandora_console/extras/mr/22.sql b/pandora_console/extras/mr/22.sql
new file mode 100644
index 0000000000..cee9b45ede
--- /dev/null
+++ b/pandora_console/extras/mr/22.sql
@@ -0,0 +1,5 @@
+START TRANSACTION;
+
+ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
+
+COMMIT;
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index 079c9b5d23..10a93a2e83 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -1740,6 +1740,8 @@ CREATE TABLE IF NOT EXISTS `tlayout_template` (
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
+
-- ---------------------------------------------------------------------
-- Table `tlayout_template_data`
-- ---------------------------------------------------------------------
diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php
index 4af38ec669..658f7dd9fc 100644
--- a/pandora_console/godmode/admin_access_logs.php
+++ b/pandora_console/godmode/admin_access_logs.php
@@ -233,7 +233,7 @@ foreach ($result as $row) {
$data[2] = ui_print_help_tip(date($config["date_format"], $row["utimestamp"]), true)
. ui_print_timestamp($row["utimestamp"], true);
$data[3] = $row["ip_origen"];
- $data[4] = $row["descripcion"];
+ $data[4] = io_safe_output($row["descripcion"]);
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
$data[5] = enterprise_hook("cell1EntepriseAudit", array($row["id_sesion"]));
diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
index e27c014a1f..7e1e8bd2f7 100644
--- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
+++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
@@ -541,7 +541,7 @@ if (!empty($interfaces_list)) {
$table->data[0][1] = '';
$table->data[0][2] = ''.__('Modules').'';
- $table->data[1][0] = html_print_select ($interfaces_list, 'id_snmp[]', 0, false, '', '', true, true, true, '', false, 'width:500px;');
+ $table->data[1][0] = html_print_select ($interfaces_list, 'id_snmp[]', 0, false, '', '', true, true, true, '', false, 'width:500px; overflow: auto;');
$table->data[1][1] = html_print_image('images/darrowright.png', true);
$table->data[1][2] = html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;');
$table->data[1][2] .= html_print_input_hidden('agent', $id_agent, true);
diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php
index dc606ad1f5..ff06f4c4f7 100644
--- a/pandora_console/godmode/agentes/module_manager.php
+++ b/pandora_console/godmode/agentes/module_manager.php
@@ -139,7 +139,7 @@ if (($policy_page) || (isset($agent))) {
echo '';
}
echo '
';
- echo __("Type");
+ echo __(" Type ");
html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false, '', false, 'max-width:300px;' );
html_print_input_hidden ('edit_module', 1);
echo ' | ';
@@ -607,7 +607,7 @@ foreach ($modules as $module) {
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
$table->colspan[$i - 1][0] = 10;
else
- $table->colspan[$i - 1][0] = 8;
+ $table->colspan[$i - 1][0] = 9;
$data = array ();
}
diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php
index 564c179f67..957720f59c 100644
--- a/pandora_console/godmode/reporting/graph_builder.php
+++ b/pandora_console/godmode/reporting/graph_builder.php
@@ -195,7 +195,8 @@ if ($add_module) {
"')");
if (count($id_agent_modules) > 0 && $id_agent_modules != '') {
- $order = db_get_row_sql("SELECT `field_order` from tgraph_source ORDER BY `field_order` DESC");
+ $order = db_get_row_sql("SELECT `field_order` from tgraph_source WHERE id_graph=$id_graph ORDER BY `field_order` DESC");
+
$order = $order['field_order'];
foreach($id_agent_modules as $id_agent_module){
$order++;
@@ -207,8 +208,13 @@ if ($add_module) {
}
if ($delete_module) {
+ $id_graph = get_parameter('id');
+
$deleteGraph = get_parameter('delete');
+ $order_val = db_get_value('field_order', 'tgraph_source', 'id_gs', $deleteGraph);
$result = db_process_sql_delete('tgraph_source', array('id_gs' => $deleteGraph));
+ db_process_sql ('UPDATE tgraph_source SET field_order=field_order-1 WHERE id_graph='.$id_graph.' AND field_order>'.$order_val);
+
}
if ($change_weight) {
diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php
index 37f595a9fb..7d95828b68 100644
--- a/pandora_console/godmode/setup/setup_general.php
+++ b/pandora_console/godmode/setup/setup_general.php
@@ -222,7 +222,7 @@ $table->data[36][0] = __('Include agents manually disabled');
$table->data[36][1] = __('Yes').' '.html_print_radio_button ('include_agents', 1, '', $config["include_agents"], true).' ';
$table->data[36][1] .= __('No').' '.html_print_radio_button ('include_agents', 0, '', $config["include_agents"], true);
-$table->data[37][0] = __('audit log directory') .
+$table->data[37][0] = __('Audit log directory') .
ui_print_help_tip (__("Directory where audit log is stored."), true);
$table->data[37][1] = html_print_input_text ('auditdir', io_safe_output($config["auditdir"]), '', 30, 100, true);
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index 00a968fc04..fa471659b6 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -83,13 +83,8 @@ $table_behaviour->data[$row][1] = html_print_checkbox('paginate_module', 1,
$row++;
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('render_proc', 1, '',
- $config["render_proc"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('render_proc', 0, '',
- $config["render_proc"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('render_proc', 1,
+ $config['render_proc'], true);
$row++;
$table_behaviour->data[$row][0] = __('Display text proc modules have state is ok');
@@ -103,13 +98,8 @@ $row++;
//Daniel maya 02/06/2016 Display menu with click --INI
$table_behaviour->data[$row][0] = __('Click to display lateral menus').
ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('click_display', 1, '',
- $config["click_display"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('click_display', 0, '',
- $config["click_display"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('click_display', 1,
+ $config['click_display'], true);
$row++;
//Daniel maya 02/06/2016 Display menu with click --END
@@ -126,13 +116,8 @@ if (enterprise_installed()) {
$table_behaviour->data[$row][0] = __('Classic menu mode').
ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true);
-$table_behaviour->data[$row][1] = __('Yes') . ' ' .
- html_print_radio_button ('classic_menu', 1, '',
- $config["classic_menu"], true) .
- ' ';
-$table_behaviour->data[$row][1] .= __('No') . ' ' .
- html_print_radio_button ('classic_menu', 0, '',
- $config["classic_menu"], true);
+$table_behaviour->data[$row][1] = html_print_checkbox('classic_menu', 1,
+ $config['classic_menu'], true);
$row++;
echo "