Merge remote-tracking branch 'origin/develop' into ent-7844-revision-acl-enterprise-parte-3-fallos-actuales

This commit is contained in:
Calvo 2021-09-01 11:06:20 +02:00
commit 3204fdb71f
114 changed files with 2019 additions and 1381 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.756-210811 Version: 7.0NG.756-210901
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.756-210811" pandora_version="7.0NG.756-210901"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.756'; use constant AGENT_VERSION => '7.0NG.756';
use constant AGENT_BUILD => '210811'; use constant AGENT_BUILD => '210901';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.756 %define version 7.0NG.756
%define release 210811 %define release 210901
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.756 %define version 7.0NG.756
%define release 210811 %define release 210901
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.756" PI_VERSION="7.0NG.756"
PI_BUILD="210811" PI_BUILD="210901"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{210811} {210901}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.756 Build 210811") #define PANDORA_VERSION ("7.0NG.756 Build 210901")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.756(Build 210811))" VALUE "ProductVersion", "(7.0NG.756(Build 210901))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.756-210811 Version: 7.0NG.756-210901
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.756-210811" pandora_version="7.0NG.756-210901"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1,5 +1,7 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `tevento` MODIFY `data` TINYTEXT default NULL;
ALTER TABLE `tmetaconsole_event` MODIFY `data` TINYTEXT default NULL;
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `unified` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE `tmetaconsole_setup` ADD COLUMN `unified` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0; ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
ALTER TABLE `tlayout_data` ADD COLUMN `title` TEXT default ''; ALTER TABLE `tlayout_data` ADD COLUMN `title` TEXT default '';

View File

@ -0,0 +1,7 @@
START TRANSACTION;
UPDATE `tconfig` set value = 'Lato-Regular.ttf' WHERE token LIKE 'custom_report_front_font';
UPDATE `tconfig` set value = 'Lato-Regular.ttf' WHERE token LIKE 'fontpath';
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';
COMMIT;

View File

@ -1028,6 +1028,7 @@ ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_timestamp_idx` (`timestamp`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_module_status_idx` (`module_status`); ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_module_status_idx` (`module_status`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_criticity_idx` (`criticity`); ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_criticity_idx` (`criticity`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_agent_name_idx` (`agent_name`); ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_agent_name_idx` (`agent_name`);
ALTER TABLE `tmetaconsole_event` MODIFY `data` TINYTEXT default NULL;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tmetaconsole_event_history` -- Table `tmetaconsole_event_history`
@ -2350,6 +2351,8 @@ ALTER TABLE `tevento` ADD COLUMN `data` double(50,5) default NULL;
ALTER TABLE `tevento` ADD COLUMN `module_status` int(4) NOT NULL default '0'; ALTER TABLE `tevento` ADD COLUMN `module_status` int(4) NOT NULL default '0';
ALTER TABLE `tevento` MODIFY `data` TINYTEXT default NULL;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tevent_extended` -- Table `tevent_extended`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
@ -4075,3 +4078,5 @@ CREATE TABLE IF NOT EXISTS `talert_execution_queue` (
`utimestamp` bigint(20) NOT NULL default '0', `utimestamp` bigint(20) NOT NULL default '0',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';

View File

@ -23,13 +23,8 @@ ui_require_css_file('order_interpreter');
// Global errors/warnings checking. // Global errors/warnings checking.
config_check(); config_check();
echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
if ($config['menu_type'] == 'classic') {
echo '<div id="header_table" class="header_table_classic">';
} else {
echo '<div id="header_table" class="header_table_collapsed">';
}
?> ?>
<div id="header_table_inner"> <div id="header_table_inner">
<?php <?php

View File

@ -1,17 +1,33 @@
<?php <?php
/**
* Lateral Main Menu.
*
* @category Main Menu.
* @package Pandora FMS.
* @subpackage OpenSource.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com // Begin.
// ================================================== if (isset($config['id_user']) === false) {
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
if (! isset($config['id_user'])) {
include 'general/login_page.php'; include 'general/login_page.php';
exit(); exit();
} }
@ -20,9 +36,9 @@ if (! isset($config['id_user'])) {
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(document).ready(function(){ $(document).ready(function(){
var menuType_value = "<?php echo $config['menu_type']; ?>"; var menuType_value = "<?php echo $_SESSION['menu_type']; ?>";
if (menuType_value == 'classic') { if (menuType_value === '' || menuType_value === 'classic') {
$('ul.submenu').css('left', '214px'); $('ul.submenu').css('left', '214px');
} }
else{ else{
@ -34,26 +50,22 @@ $(document).ready(function(){
<?php <?php
$autohidden_menu = 0; $autohidden_menu = 0;
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) { if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_menu'] === true) {
$autohidden_menu = 1; $autohidden_menu = 1;
} }
// Menu container prepared to autohide menu // Start of full lateral menu.
if ($config['menu_type'] == 'classic') { echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
echo '<div id="menu_full" class="menu_full_classic">';
} else {
echo '<div id="menu_full" class="menu_full_collapsed">';
}
$custom_logo = 'images/custom_logo/'.$config['custom_logo']; $custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed']; $custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (!defined('PANDORA_ENTERPRISE')) { if (defined('PANDORA_ENTERPRISE') === false) {
$logo_title = get_product_name().' Opensource'; $logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png'; $custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png'; $custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else { } else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) { if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo; $custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
} }
@ -61,54 +73,48 @@ if (!defined('PANDORA_ENTERPRISE')) {
} }
echo '<div class="logo_green"><a href="index.php?sec=main">'; echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo'])) {
if ($config['menu_type'] == 'classic') { if (isset($config['custom_logo']) === true) {
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:block']); echo html_print_image(
} else { $custom_logo,
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']); true,
} [
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
} }
if (isset($config['custom_logo_collapsed'])) { if (isset($config['custom_logo_collapsed']) === true) {
if ($config['menu_type'] == 'classic') { echo html_print_image(
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:none']); $custom_logo_collapsed,
} else { true,
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']); [
} 'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
]
);
} }
echo '</a></div>'; echo '</a></div>';
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
require 'operation/menu.php'; require 'operation/menu.php';
// Check all enterprise ACL used in godmenu items to print menu headers
if (check_acl($config['id_user'], 0, 'AW')
|| check_acl($config['id_user'], 0, 'PM')
|| check_acl($config['id_user'], 0, 'LM')
|| check_acl($config['id_user'], 0, 'UM')
|| check_acl($config['id_user'], 0, 'LW')
|| check_acl($config['id_user'], 0, 'EW')
|| check_acl($config['id_user'], 0, 'DW')
) {
// echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
}
require 'godmode/menu.php'; require 'godmode/menu.php';
if ($config['menu_type'] == 'classic') { echo sprintf('<div id="button_collapse" class="button_%s button_collapse"></div>', $menuTypeClass);
echo '<div id="button_collapse" class="button_classic button_collapse"></div>';
} else {
echo '<div id="button_collapse" class="button_collapsed button_collapse"></div>';
}
// require ("links_menu.php");
echo '</div>'; echo '</div>';
// menu_container // Menu_container.
ui_require_jquery_file('cookie'); ui_require_jquery_file('cookie');
$config_fixed_header = false; $config_fixed_header = false;
if (isset($config['fixed_header'])) { if (isset($config['fixed_header']) === true) {
$config_fixed_header = $config['fixed_header']; $config_fixed_header = $config['fixed_header'];
} }
?> ?>

View File

@ -577,12 +577,7 @@ $(document).ready (function () {
$('#text-ip_target').keyup(function() { $('#text-ip_target').keyup(function() {
$('#text-target_ip').val($(this).val()); $('#text-target_ip').val($(this).val());
}); });
$('#text-target_ip').keyup(function() {
$('#text-ip_target').val($(this).val());
});
$('#text-community').keyup(function() {
$('#text-snmp_community').val($(this).val());
});
$('#text-snmp_community').keyup(function() { $('#text-snmp_community').keyup(function() {
$('#text-community').val($(this).val()); $('#text-community').val($(this).val());
}); });
@ -591,61 +586,25 @@ $(document).ready (function () {
// Display or collapse the SNMP browser's v3 options // Display or collapse the SNMP browser's v3 options
checkSNMPVersion (); checkSNMPVersion ();
}); });
$('#snmp_browser_version').change(function() {
$('#snmp_version').val($(this).val());
// Display or collapse the SNMP v3 options in the main window
if ($(this).val() == "3") {
$("#simple-field_snmpv3_row1").attr("style", "");
$("#simple-field_snmpv3_row2").attr("style", "");
$("#simple-field_snmpv3_row3").attr("style", "");
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").attr("disabled", true);
}
else {
$("#simple-field_snmpv3_row1").css("display", "none");
$("#simple-field_snmpv3_row2").css("display", "none");
$("#simple-field_snmpv3_row3").css("display", "none");
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").removeAttr('disabled');
}
});
$('#snmp3_auth_user').keyup(function() { $('#snmp3_auth_user').keyup(function() {
$('#snmp3_browser_auth_user').val($(this).val()); $('#snmp3_browser_auth_user').val($(this).val());
}); });
$('#snmp3_browser_auth_user').keyup(function() {
$('#snmp3_auth_user').val($(this).val());
});
$('#snmp3_security_level').change(function() { $('#snmp3_security_level').change(function() {
$('#snmp3_browser_security_level').val($(this).val()); $('#snmp3_browser_security_level').val($(this).val());
}); });
$('#snmp3_browser_security_level').change(function() {
$('#snmp3_security_level').val($(this).val());
});
$('#snmp3_auth_method').change(function() { $('#snmp3_auth_method').change(function() {
$('#snmp3_browser_auth_method').val($(this).val()); $('#snmp3_browser_auth_method').val($(this).val());
}); });
$('#snmp3_browser_auth_method').change(function() {
$('#snmp3_auth_method').val($(this).val());
});
$('#snmp3_auth_pass').keyup(function() { $('#snmp3_auth_pass').keyup(function() {
$('#snmp3_browser_auth_pass').val($(this).val()); $('#snmp3_browser_auth_pass').val($(this).val());
}); });
$('#snmp3_browser_auth_pass').keyup(function() {
$('#snmp3_auth_pass').val($(this).val());
});
$('#snmp3_privacy_method').change(function() { $('#snmp3_privacy_method').change(function() {
$('#snmp3_browser_privacy_method').val($(this).val()); $('#snmp3_browser_privacy_method').val($(this).val());
}); });
$('#snmp3_browser_privacy_method').change(function() {
$('#snmp3_privacy_method').val($(this).val());
});
$('#snmp3_privacy_pass').keyup(function() { $('#snmp3_privacy_pass').keyup(function() {
$('#snmp3_browser_privacy_pass').val($(this).val()); $('#snmp3_browser_privacy_pass').val($(this).val());
}); });
$('#snmp3_browser_privacy_pass').keyup(function() {
$('#snmp3_privacy_pass').val($(this).val());
});
var custom_ip_target = "<?php echo $custom_ip_target; ?>"; var custom_ip_target = "<?php echo $custom_ip_target; ?>";
if(custom_ip_target == ''){ if(custom_ip_target == ''){
$("#text-custom_ip_target").hide(); $("#text-custom_ip_target").hide();

View File

@ -1120,6 +1120,12 @@ function show_add_action(id_alert) {
opacity: 0.5, opacity: 0.5,
background: "black" background: "black"
}, },
open: function() {
$("#action_select, #action_select").select2({
tags: true,
dropdownParent: $("#add_action-div-" + id_alert)
});
},
width: 500, width: 500,
height: 300 height: 300
}) })
@ -1150,6 +1156,12 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
opacity: 0.5, opacity: 0.5,
background: "black" background: "black"
}, },
open: function() {
$("#action_select_ajax, #action_select_ajax").select2({
tags: true,
dropdownParent: $("#update_action-div")
});
},
width: 500, width: 500,
height: 300 height: 300
}) })

View File

@ -95,6 +95,7 @@ $fields_available['id_evento'] = __('Event Id');
$fields_available['evento'] = __('Event Name'); $fields_available['evento'] = __('Event Name');
$fields_available['id_agente'] = __('Agent ID'); $fields_available['id_agente'] = __('Agent ID');
$fields_available['agent_name'] = __('Agent Name'); $fields_available['agent_name'] = __('Agent Name');
$fields_available['direccion'] = __('Agent IP');
$fields_available['id_usuario'] = __('User'); $fields_available['id_usuario'] = __('User');
$fields_available['id_grupo'] = __('Group'); $fields_available['id_grupo'] = __('Group');
$fields_available['estado'] = __('Status'); $fields_available['estado'] = __('Status');

View File

@ -404,7 +404,8 @@ $(document).ready (function () {
"get_agent_modules_json" : 1, "get_agent_modules_json" : 1,
"get_id_and_name" : 1, "get_id_and_name" : 1,
"disabled" : 0, "disabled" : 0,
"id_agent" : id_agent "id_agent" : id_agent,
"safe_name": 1,
}; };
var tags_to_search = $('#tags').val(); var tags_to_search = $('#tags').val();
@ -434,7 +435,7 @@ $(document).ready (function () {
jQuery.each (data, function (i, val) { jQuery.each (data, function (i, val) {
option = $("<option></option>") option = $("<option></option>")
.attr ("value", val["id_agente_modulo"]) .attr ("value", val["id_agente_modulo"])
.append (val["nombre"]); .append (val["safe_name"]);
$("#target_modules").append (option); $("#target_modules").append (option);
}); });

View File

@ -685,7 +685,8 @@ $(document).ready (function () {
"get_agent_modules_json" : 1, "get_agent_modules_json" : 1,
"get_distinct_name" : 1, "get_distinct_name" : 1,
"indexed" : 0, "indexed" : 0,
"privilege" : "AW" "privilege" : "AW",
"safe_name": 1
}; };
if (this.value != '0') if (this.value != '0')
@ -712,7 +713,7 @@ $(document).ready (function () {
jQuery.each (data, function (id, value) { jQuery.each (data, function (id, value) {
option = $("<option></option>") option = $("<option></option>")
.attr("value", value["nombre"]) .attr("value", value["nombre"])
.html(value["nombre"]); .html(value["safe_name"]);
$("#module_name").append (option); $("#module_name").append (option);
}); });
hideSpinner(); hideSpinner();

View File

@ -1326,7 +1326,8 @@ $(document).ready (function () {
"page" : "operation/agentes/ver_agente", "page" : "operation/agentes/ver_agente",
"get_agent_modules_json" : 1, "get_agent_modules_json" : 1,
"get_distinct_name" : 1, "get_distinct_name" : 1,
"indexed" : 0 "indexed" : 0,
"safe_name" : 1
}; };
if (this.value != '0') if (this.value != '0')
@ -1346,12 +1347,12 @@ $(document).ready (function () {
showSpinner(); showSpinner();
$("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide (); $("tr#delete_table-edit1, tr#delete_table-edit0, tr#delete_table-edit2").hide ();
$("#module_name").attr ("disabled", "disabled") $("#module_name").attr ("disabled", "disabled")
$("#module_name option[value!=0]").remove (); $("#module_name option[value!=0]").remove();
jQuery.post ("ajax.php", jQuery.post ("ajax.php",
params, params,
function (data, status) { function (data, status) {
jQuery.each (data, function (id, value) { jQuery.each (data, function (id, value) {
option = $("<option></option>").attr ("value", value["nombre"]).html (value["nombre"]); option = $("<option></option>").attr("value", value["nombre"]).html(value["safe_name"]);
$("#module_name").append (option); $("#module_name").append (option);
}); });
hideSpinner(); hideSpinner();

View File

@ -525,10 +525,8 @@ if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager'])
$menu_godmode['messages']['id'] = 'god-um_messages'; $menu_godmode['messages']['id'] = 'god-um_messages';
$sub = []; $sub = [];
if ($config['enterprise_installed']) {
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline'); $sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline'; $sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
}
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update Manager online'); $sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update Manager online');
$sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online'; $sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online';

View File

@ -331,9 +331,9 @@ echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting
echo "<table width='100%' cellpadding='4' cellpadding='4' class='databox filters'>"; echo "<table width='100%' cellpadding='4' cellpadding='4' class='databox filters'>";
echo '<tr>'; echo '<tr>';
echo "<td colspan='3'>".__('Filter group').'</td>'; echo "<td colspan='1'>".__('Filter group').'</td>';
echo '</tr><tr>'; echo '</tr><tr>';
echo "<td colspan='3'>".html_print_select_groups( echo "<td colspan='1'>".html_print_select_groups(
$config['id_user'], $config['id_user'],
($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RW'), ($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RW'),
true, true,

View File

@ -748,6 +748,7 @@ switch ($action) {
$selected_agent_group_filter = $es['agent_group_filter']; $selected_agent_group_filter = $es['agent_group_filter'];
$selected_agents_inventory_display_options = $es['agents_inventory_display_options']; $selected_agents_inventory_display_options = $es['agents_inventory_display_options'];
$selected_agent_os_filter = $es['agent_os_filter']; $selected_agent_os_filter = $es['agent_os_filter'];
$selected_agent_custom_fields = $es['agent_custom_fields'];
$selected_agent_custom_field_filter = $es['agent_custom_field_filter']; $selected_agent_custom_field_filter = $es['agent_custom_field_filter'];
$selected_agent_status_filter = $es['agent_status_filter']; $selected_agent_status_filter = $es['agent_status_filter'];
$selected_agent_module_search_filter = $es['agent_module_search_filter']; $selected_agent_module_search_filter = $es['agent_module_search_filter'];
@ -3080,6 +3081,7 @@ $class = 'databox filters';
</tr> </tr>
<?php <?php
if (is_metaconsole()) {
$server_fields = []; $server_fields = [];
$server_fields[0] = __('All'); $server_fields[0] = __('All');
@ -3106,7 +3108,6 @@ $class = 'databox filters';
'min-width: 180px' 'min-width: 180px'
).'</td></tr>'; ).'</td></tr>';
if (is_metaconsole()) {
echo $server_filter_markup; echo $server_filter_markup;
} }
?> ?>
@ -3158,6 +3159,28 @@ $class = 'databox filters';
</tr> </tr>
<tr id="row_custom_field" class="datos"> <tr id="row_custom_field" class="datos">
<td class="bolder">
<?php
echo __('Agent custom field');
?>
</td>
<td >
<?php
html_print_select_from_sql(
'SELECT id_field, name FROM tagent_custom_fields',
'agent_custom_fields[]',
$selected_agent_custom_fields,
'',
__('All'),
'0',
false,
true
);
?>
</td>
</tr>
<tr id="row_custom_field_filter" class="datos">
<td class="bolder"> <td class="bolder">
<?php <?php
echo __('Agent custom field filter'); echo __('Agent custom field filter');
@ -5159,7 +5182,6 @@ function addSLARow() {
$("input[name=id_agent_failover]").val(''); $("input[name=id_agent_failover]").val('');
$("input[name=id_server]").val(''); $("input[name=id_server]").val('');
$("input[name=agent_sla]").val(''); $("input[name=agent_sla]").val('');
$("input[name=agent_sla]").css("background","url('<?php echo $autocompleteImage; ?>') right center no-repeat")
$("input[name=agent_failover]").val(''); $("input[name=agent_failover]").val('');
$("#id_agent_module_sla").empty(); $("#id_agent_module_sla").empty();
$("#id_agent_module_sla").attr('disabled', 'true'); $("#id_agent_module_sla").attr('disabled', 'true');
@ -5486,6 +5508,7 @@ function chooseType() {
$("#row_agent_server_filter").hide(); $("#row_agent_server_filter").hide();
$("#row_agent_group_filter").hide(); $("#row_agent_group_filter").hide();
$("#row_os").hide(); $("#row_os").hide();
$("#row_custom_field_filter").hide();
$("#row_custom_field").hide(); $("#row_custom_field").hide();
$("#row_agent_status").hide(); $("#row_agent_status").hide();
$("#row_agent_version").hide(); $("#row_agent_version").hide();
@ -6039,11 +6062,26 @@ function chooseType() {
$("#row_group").show(); $("#row_group").show();
$("#row_os").show(); $("#row_os").show();
$("#row_custom_field").show(); $("#row_custom_field").show();
$("#row_custom_field_filter").show();
$("#row_agent_status").show(); $("#row_agent_status").show();
$("#row_agent_version").show(); $("#row_agent_version").show();
$("#row_agent_remote_conf").show(); $("#row_agent_remote_conf").show();
$("#row_module_free_search").show(); $("#row_module_free_search").show();
if ($('#agent_custom_fields :selected').length > 0) {
$('#text-agent_custom_field_filter').removeAttr('disabled');
} else {
$('#text-agent_custom_field_filter').prop('disabled', true);
}
$("#agent_custom_fields").change(function(e) {
if ($('#agent_custom_fields :selected').length > 0) {
$('#text-agent_custom_field_filter').removeAttr('disabled');
} else {
$('#text-agent_custom_field_filter').prop('disabled', true);
}
});
break; break;
case 'inventory': case 'inventory':

View File

@ -2219,6 +2219,7 @@ switch ($action) {
$es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options'); $es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options');
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter'); $es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
$es['agent_os_filter'] = get_parameter('agent_os_filter'); $es['agent_os_filter'] = get_parameter('agent_os_filter');
$es['agent_custom_fields'] = get_parameter('agent_custom_fields');
$es['agent_status_filter'] = get_parameter('agent_status_filter'); $es['agent_status_filter'] = get_parameter('agent_status_filter');
$es['agent_version_filter'] = get_parameter('agent_version_filter'); $es['agent_version_filter'] = get_parameter('agent_version_filter');
$es['agent_module_search_filter'] = get_parameter('agent_module_search_filter'); $es['agent_module_search_filter'] = get_parameter('agent_module_search_filter');
@ -2858,6 +2859,7 @@ switch ($action) {
$es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options'); $es['agents_inventory_display_options'] = get_parameter('agents_inventory_display_options');
$es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter'); $es['agent_custom_field_filter'] = get_parameter('agent_custom_field_filter');
$es['agent_os_filter'] = get_parameter('agent_os_filter'); $es['agent_os_filter'] = get_parameter('agent_os_filter');
$es['agent_custom_fields'] = get_parameter('agent_custom_fields');
$es['agent_status_filter'] = get_parameter('agent_status_filter'); $es['agent_status_filter'] = get_parameter('agent_status_filter');
$es['agent_version_filter'] = get_parameter('agent_version_filter'); $es['agent_version_filter'] = get_parameter('agent_version_filter');
$es['agent_module_search_filter'] = get_parameter('agent_module_search_filter'); $es['agent_module_search_filter'] = get_parameter('agent_module_search_filter');
@ -3370,7 +3372,7 @@ $buttons['view'] = [
$buttons[$activeTab]['active'] = true; $buttons[$activeTab]['active'] = true;
if ($idReport != 0) { if ($idReport != 0) {
$textReportName = $reportName; $textReportName = (empty($reportName) === false) ? $reportName : $report['name'];
} else { } else {
$temp = $buttons['main']; $temp = $buttons['main'];
$buttons = null; $buttons = null;

View File

@ -327,6 +327,12 @@ if (is_array($config) === true) {
) { ) {
ui_print_error_message(__('Update manager online requires registration.')); ui_print_error_message(__('Update manager online requires registration.'));
} }
if ($mode === Manager::MODE_OFFLINE) {
ui_print_warning_message(
__('Applying offline patches may make your console unusable, we recommend to completely backup your files before applying any patch.')
);
}
} }
$url_update_manager = $config['url_update_manager']; $url_update_manager = $config['url_update_manager'];
@ -381,6 +387,20 @@ if (is_array($config) === true) {
} }
} }
$proxy = null;
if (empty($config['update_manager_proxy_server']) === false
|| empty($config['update_manager_proxy_port']) === false
|| empty($config['update_manager_proxy_user']) === false
|| empty($config['update_manager_proxy_password']) === false
) {
$proxy = [
'host' => $config['update_manager_proxy_server'],
'port' => $config['update_manager_proxy_port'],
'user' => $config['update_manager_proxy_user'],
'password' => $config['update_manager_proxy_password'],
];
}
$ui = new Manager( $ui = new Manager(
((is_array($config) === true) ? $pandora_url : 'http://'.$_SERVER['SERVER_ADDR'].'/'), ((is_array($config) === true) ? $pandora_url : 'http://'.$_SERVER['SERVER_ADDR'].'/'),
((is_array($config) === true) ? ui_get_full_url('ajax.php') : ''), ((is_array($config) === true) ? ui_get_full_url('ajax.php') : ''),
@ -400,6 +420,7 @@ $ui = new Manager(
'registration_code' => $puid, 'registration_code' => $puid,
'remote_config' => $remote_config, 'remote_config' => $remote_config,
'propagate_updates' => $is_metaconsole, 'propagate_updates' => $is_metaconsole,
'proxy' => $proxy,
'set_maintenance_mode' => function () { 'set_maintenance_mode' => function () {
if (function_exists('config_update_value') === true) { if (function_exists('config_update_value') === true) {
config_update_value('maintenance_mode', 1); config_update_value('maintenance_mode', 1);

View File

@ -666,6 +666,7 @@ class Client
$target = __('console update %d', $request['version']); $target = __('console update %d', $request['version']);
} }
// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.Found
curl_setopt( curl_setopt(
$ch, $ch,
CURLOPT_PROGRESSFUNCTION, CURLOPT_PROGRESSFUNCTION,
@ -1673,7 +1674,7 @@ class Client
); );
$this->updateMR( $this->updateMR(
$this->productPath.'/extras/mr/'.$mr, $this->extract_to.'/extras/mr/'.$mr,
$this->dbhHistory, $this->dbhHistory,
$historical_MR $historical_MR
); );

View File

@ -34,7 +34,7 @@
<script type="text/javascript"> <script type="text/javascript">
if (typeof $ != "function") { if (typeof $ != "function") {
// Dynamically include jquery if not added to this page. // Dynamically include jquery if not added to this page.
document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery-3.3.1.min.js'); ?>"></'+'script>'); document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery.current.js'); ?>"></'+'script>');
} }
</script> </script>
<script src="<?php $asset('resources/javascript/umc.js'); ?>" type="text/javascript"></script> <script src="<?php $asset('resources/javascript/umc.js'); ?>" type="text/javascript"></script>

View File

@ -34,7 +34,7 @@ $product_name = get_product_name(); ?>
<script type="text/javascript"> <script type="text/javascript">
if (typeof $ != "function") { if (typeof $ != "function") {
// Dynamically include jquery if not added to this page. // Dynamically include jquery if not added to this page.
document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery-3.3.1.min.js'); ?>"></'+'script>'); document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery.current.js'); ?>"></'+'script>');
document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery-ui.min.js'); ?>"></'+'script>'); document.write('<script type="text/javascript" src="<?php echo $asset('resources/javascript/jquery-ui.min.js'); ?>"></'+'script>');
} }
</script> </script>

View File

@ -37,12 +37,10 @@ $buttons['setup'] = [
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>', 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>',
]; ];
if (enterprise_installed()) { $buttons['offline'] = [
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false, 'active' => ($tab == 'offline') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>', 'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>',
]; ];
}
$buttons['online'] = [ $buttons['online'] = [
'active' => ($tab == 'online') ? true : false, 'active' => ($tab == 'online') ? true : false,
@ -60,6 +58,7 @@ switch ($tab) {
break; break;
case 'online': case 'online':
default:
$title = __('Update manager » Online'); $title = __('Update manager » Online');
break; break;
} }

View File

@ -30,6 +30,7 @@
global $config; global $config;
require_once __DIR__.'/../../include/functions_users.php'; require_once __DIR__.'/../../include/functions_users.php';
require_once __DIR__.'/../../include/functions_update_manager.php';
check_login(); check_login();

View File

@ -100,7 +100,7 @@ $update_profile = (bool) get_parameter('update_profile');
$id_profile = (int) get_parameter('id'); $id_profile = (int) get_parameter('id');
$is_management_allowed = true; $is_management_allowed = true;
if (is_management_allowed() === false) { if (is_metaconsole() === false && is_management_allowed() === false) {
$is_management_allowed = false; $is_management_allowed = false;
ui_print_warning_message( ui_print_warning_message(
__( __(

View File

@ -129,7 +129,7 @@ switch ($sortField) {
break; break;
default: default:
// Not possible. // Nothing to do.
break; break;
} }
break; break;
@ -153,7 +153,7 @@ switch ($sortField) {
break; break;
default: default:
// Not possible. // Nothing to do.
break; break;
} }
break; break;
@ -177,7 +177,7 @@ switch ($sortField) {
break; break;
default: default:
// Not possible. // Nothing to do.
break; break;
} }
break; break;
@ -395,7 +395,7 @@ $table->data[0][4] = html_print_submit_button(
); );
$is_management_allowed = true; $is_management_allowed = true;
if (is_management_allowed() === false) { if (is_metaconsole() === false && is_management_allowed() === false) {
$is_management_allowed = false; $is_management_allowed = false;
ui_print_warning_message( ui_print_warning_message(
__( __(
@ -585,11 +585,11 @@ foreach ($info as $user_id => $user_info) {
$cont++; $cont++;
// Manual pagination due the complicated process of the ACL data. // Manual pagination due the complicated process of the ACL data.
if ($cont <= $offset) { if ($cont <= $offset && $search !== true) {
continue; continue;
} }
if ($cont > ($limit + $offset)) { if ($cont > ($limit + $offset) && $search !== true) {
break; break;
} }
@ -820,6 +820,9 @@ foreach ($info as $user_id => $user_info) {
$data[6] .= ''; $data[6] .= '';
// Delete button not in this mode. // Delete button not in this mode.
} }
} else {
$data[6] .= '';
// Delete button not in this mode.
} }
} }

View File

@ -95,7 +95,7 @@ if (check_login(false) === false) {
<link rel="stylesheet" href="styles/js/jquery-ui_custom.css" type="text/css" /> <link rel="stylesheet" href="styles/js/jquery-ui_custom.css" type="text/css" />
<script language="javascript" type='text/javascript' src='javascript/pandora.js'></script> <script language="javascript" type='text/javascript' src='javascript/pandora.js'></script>
<script language="javascript" type='text/javascript' src='javascript/pandora_ui.js'></script> <script language="javascript" type='text/javascript' src='javascript/pandora_ui.js'></script>
<script language="javascript" type='text/javascript' src='javascript/jquery-3.3.1.min.js'></script> <script language="javascript" type='text/javascript' src='javascript/jquery.current.js'></script>
</head> </head>
<body> <body>
<h1>Access is not granted</h1> <h1>Access is not granted</h1>
@ -153,7 +153,7 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
<link rel="stylesheet" href="styles/js/jquery-ui_custom.css" type="text/css" /> <link rel="stylesheet" href="styles/js/jquery-ui_custom.css" type="text/css" />
<script language="javascript" type='text/javascript' src='javascript/pandora.js'></script> <script language="javascript" type='text/javascript' src='javascript/pandora.js'></script>
<script language="javascript" type='text/javascript' src='javascript/pandora_ui.js'></script> <script language="javascript" type='text/javascript' src='javascript/pandora_ui.js'></script>
<script language="javascript" type='text/javascript' src='javascript/jquery-3.3.1.min.js'></script> <script language="javascript" type='text/javascript' src='javascript/jquery.current.js'></script>
<script language="javascript" type='text/javascript' src='javascript/jquery.pandora.js'></script> <script language="javascript" type='text/javascript' src='javascript/jquery.pandora.js'></script>
<script language="javascript" type='text/javascript' src='javascript/jquery-ui.min.js'></script> <script language="javascript" type='text/javascript' src='javascript/jquery-ui.min.js'></script>
<script language="javascript" type="text/javascript" src="graphs/flot/jquery.flot.js"></script> <script language="javascript" type="text/javascript" src="graphs/flot/jquery.flot.js"></script>

View File

@ -2336,7 +2336,7 @@ class ConsoleSupervisor
// Check if DiscoveryCronTasks is running. Warn user if not. // Check if DiscoveryCronTasks is running. Warn user if not.
if ($config['cron_last_run'] == 0 if ($config['cron_last_run'] == 0
|| (get_system_time() - $config['cron_last_run']) > 3600 || (get_system_time() - $config['cron_last_run']) > SECONDS_10MINUTES
) { ) {
$message_conf_cron = __('DiscoveryConsoleTasks is not running properly'); $message_conf_cron = __('DiscoveryConsoleTasks is not running properly');
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@ -2359,12 +2359,17 @@ class ConsoleSupervisor
$message_conf_cron .= __('Please, make sure process is not locked.'); $message_conf_cron .= __('Please, make sure process is not locked.');
} }
$url = '__url__/index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist';
if (is_metaconsole() === true) {
$url = '__url__index.php?sec=extensions&sec2=enterprise/extensions/cron';
}
$this->notify( $this->notify(
[ [
'type' => 'NOTIF.CRON.CONFIGURED', 'type' => 'NOTIF.CRON.CONFIGURED',
'title' => __('DiscoveryConsoleTasks is not configured.'), 'title' => __('DiscoveryConsoleTasks is not configured.'),
'message' => __($message_conf_cron), 'message' => __($message_conf_cron),
'url' => '__url__/index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist', 'url' => $url,
] ]
); );
} else { } else {

View File

@ -3043,6 +3043,7 @@ class NetworkMap
$table->data = []; $table->data = [];
$table->rowstyle['template_row'] = 'display: none;'; $table->rowstyle['template_row'] = 'display: none;';
$table->data['template_row']['node_source'] = ''; $table->data['template_row']['node_source'] = '';
// Inputs must be not select2, cause duplication make issues.
$table->data['template_row']['interface_source'] = html_print_select( $table->data['template_row']['interface_source'] = html_print_select(
[], [],
'interface_source', 'interface_source',
@ -3050,7 +3051,21 @@ class NetworkMap
'', '',
__('None'), __('None'),
0, 0,
true true,
false,
true,
'',
false,
false,
false,
false,
false,
'',
false,
false,
false,
false,
false
); );
$table->data['template_row']['interface_target'] = html_print_select( $table->data['template_row']['interface_target'] = html_print_select(
[], [],
@ -3059,7 +3074,21 @@ class NetworkMap
'', '',
__('None'), __('None'),
0, 0,
true true,
false,
true,
'',
false,
false,
false,
false,
false,
'',
false,
false,
false,
false,
false
); );
$table->data['template_row']['node_target'] = ''; $table->data['template_row']['node_target'] = '';

View File

@ -593,7 +593,7 @@ class Tree
$module['type'] = 'module'; $module['type'] = 'module';
$module['id'] = (int) $module['id']; $module['id'] = (int) $module['id'];
$module['name'] = io_safe_output($module['name']); $module['name'] = $module['name'];
$module['id_module_type'] = (int) $module['id_tipo_modulo']; $module['id_module_type'] = (int) $module['id_tipo_modulo'];
$module['server_type'] = (int) $module['id_modulo']; $module['server_type'] = (int) $module['id_modulo'];
$module['status'] = $module['estado']; $module['status'] = $module['estado'];
@ -1097,7 +1097,7 @@ class Tree
protected function getThirdLevelSql() protected function getThirdLevelSql()
{ {
// Get the server id // Get the server id.
$serverID = $this->serverID; $serverID = $this->serverID;
$group_acl = $this->getGroupAclCondition(); $group_acl = $this->getGroupAclCondition();

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC210811'; $build_version = 'PC210901';
$pandora_version = 'v7.0NG.756'; $pandora_version = 'v7.0NG.756';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.
@ -306,7 +306,7 @@ switch ($config['dbtype']) {
// ====================================================================== // ======================================================================
// Menu display mode. // Menu display mode.
if (isset($_SESSION['meny_type']) === true && $_SESSION['menu_type']) { if (isset($_SESSION['meny_type']) === true && empty($_SESSION['menu_type']) === false) {
$config['menu_type'] = $_SESSION['menu_type']; $config['menu_type'] = $_SESSION['menu_type'];
} else { } else {
$config['menu_type'] = 'classic'; $config['menu_type'] = 'classic';

View File

@ -1585,7 +1585,7 @@ function enterprise_include($filename, $variables=[])
extract($variables); extract($variables);
} }
include $filepath; include_once $filepath;
return true; return true;
} }

View File

@ -3187,6 +3187,7 @@ function agents_get_network_interfaces($agents=false, $agents_filter=false)
$module_description = $module['descripcion']; $module_description = $module['descripcion'];
$db_status = modules_get_agentmodule_status($module_id); $db_status = modules_get_agentmodule_status($module_id);
$module_value = modules_get_last_value($module_id); $module_value = modules_get_last_value($module_id);
$last_contact = modules_get_last_contact($module_id);
modules_get_status($module_id, $db_status, $module_value, $status, $title); modules_get_status($module_id, $db_status, $module_value, $status, $title);
$status_image = ui_print_status_image($status, $title, true); $status_image = ui_print_status_image($status, $title, true);
@ -3267,6 +3268,7 @@ function agents_get_network_interfaces($agents=false, $agents_filter=false)
$agent_interfaces[$interface_name]['status_module_name'] = $module_name; $agent_interfaces[$interface_name]['status_module_name'] = $module_name;
$agent_interfaces[$interface_name]['ip'] = $ip_target; $agent_interfaces[$interface_name]['ip'] = $ip_target;
$agent_interfaces[$interface_name]['mac'] = $mac; $agent_interfaces[$interface_name]['mac'] = $mac;
$agent_interfaces[$interface_name]['last_contact'] = $last_contact;
if ($interface_traffic_modules !== false) { if ($interface_traffic_modules !== false) {
$agent_interfaces[$interface_name]['traffic'] = []; $agent_interfaces[$interface_name]['traffic'] = [];

View File

@ -17341,7 +17341,7 @@ function remove_agent_from_policy($id_policy, $use_agent_name, $params)
$agent = db_get_row_filter('tmetaconsole_agent', ['id_tagente' => $id_agent, 'id_tmetaconsole_setup' => $id_node]); $agent = db_get_row_filter('tmetaconsole_agent', ['id_tagente' => $id_agent, 'id_tmetaconsole_setup' => $id_node]);
} }
$policy = policies_get_policy($id_policy, false, false); $policy = policies_get_policy($id_policy);
$policy_agent = (is_metaconsole()) ? db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent, 'id_node' => $id_node]) : db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent]); $policy_agent = (is_metaconsole()) ? db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent, 'id_node' => $id_node]) : db_get_row_filter('tpolicy_agents', ['id_policy' => $id_policy, 'id_agent' => $id_agent]);

View File

@ -2243,7 +2243,7 @@ function config_process_config()
if (!isset($config['fontpath'])) { if (!isset($config['fontpath'])) {
config_update_value( config_update_value(
'fontpath', 'fontpath',
'lato.ttf' 'Lato-Regular.ttf'
); );
} }
@ -3126,7 +3126,7 @@ function config_process_config()
} }
if (!isset($config['custom_report_front_font'])) { if (!isset($config['custom_report_front_font'])) {
config_update_value('custom_report_front_font', 'lato.ttf'); config_update_value('custom_report_front_font', 'Lato-Regular.ttf');
} }
if (!isset($config['custom_report_front_logo'])) { if (!isset($config['custom_report_front_logo'])) {

View File

@ -305,6 +305,9 @@ function events_get_column_name($field, $table_alias=false)
return __('Severity mini'); return __('Severity mini');
} }
case 'direccion':
return __('Agent IP');
default: default:
return __($field); return __($field);
} }
@ -3581,7 +3584,12 @@ function events_page_responses($event, $childrens_ids=[])
'', '',
__('None'), __('None'),
-1, -1,
true true,
false,
true,
'',
false,
'width: 70%'
); );
$data[2] .= html_print_button( $data[2] .= html_print_button(
__('Update'), __('Update'),
@ -4872,6 +4880,14 @@ function events_page_general($event)
$data[1] = '<span class="break_word">'.events_display_name($event['evento']).'</span>'; $data[1] = '<span class="break_word">'.events_display_name($event['evento']).'</span>';
$table_general->data[] = $data; $table_general->data[] = $data;
// Show server name in metaconsole.
if (is_metaconsole() === true && $event['server_name'] !== '') {
$data = [];
$data[0] = __('Node');
$data[1] = '<span class="break_word">'.$event['server_name'].'</span>';
$table_general->data[] = $data;
}
$data = []; $data = [];
$data[0] = __('Timestamp'); $data[0] = __('Timestamp');

View File

@ -740,7 +740,7 @@ function filemanager_file_explorer(
if ((!$fileinfo['is_dir']) && ($download_button)) { if ((!$fileinfo['is_dir']) && ($download_button)) {
$filename = base64_encode($fileinfo['name']); $filename = base64_encode($fileinfo['name']);
$hash = md5($filename.$config['server_unique_identifier']); $hash = md5($filename.$config['server_unique_identifier']);
$data[4] .= '<a href="include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'" style="vertical-align: 25%;">'; $data[4] .= '<a href="'.$hack_metaconsole.'include/get_file.php?file='.urlencode($filename).'&hash='.$hash.'" style="vertical-align: 25%;">';
$data[4] .= html_print_image('images/file.png', true, ['class' => 'invert_filter']); $data[4] .= html_print_image('images/file.png', true, ['class' => 'invert_filter']);
$data[4] .= '</a>'; $data[4] .= '</a>';
} }

View File

@ -735,7 +735,7 @@ function grafico_modulo_sparse($params)
$params['backgroundColor'] = 'white'; $params['backgroundColor'] = 'white';
} }
if (isset($params['only_image']) === true) { if (isset($params['only_image']) === true && $params['vconsole'] !== true) {
$params['backgroundColor'] = 'transparent'; $params['backgroundColor'] = 'transparent';
} }

View File

@ -436,6 +436,7 @@ function html_print_select_style($fields, $name, $selected='', $style='', $scrip
* @param string $size Style, size (width) of element. * @param string $size Style, size (width) of element.
* @param boolean $simple_multiple_options Discovery simple multiple inputs. * @param boolean $simple_multiple_options Discovery simple multiple inputs.
* @param boolean $required Required input. * @param boolean $required Required input.
* @param string $inverse Change All to None with inverse condition.
* *
* @return string HTML code if return parameter is true. * @return string HTML code if return parameter is true.
*/ */
@ -462,7 +463,8 @@ function html_print_select_groups(
$include_groups=false, $include_groups=false,
$size=false, $size=false,
$simple_multiple_options=false, $simple_multiple_options=false,
$required=false $required=false,
$inverse=''
) { ) {
$output = ''; $output = '';
@ -522,8 +524,12 @@ function html_print_select_groups(
if (empty($selected) === false) { if (empty($selected) === false) {
$fields = [ $selected => groups_get_name($selected) ]; $fields = [ $selected => groups_get_name($selected) ];
} else if ($returnAllGroup === true && $multiple === false) { } else if ($returnAllGroup === true && $multiple === false) {
if ($selected === 0 && $inverse !== '') {
$fields = [ $selected => 'None' ];
} else {
$fields = [ $selected => groups_get_name(null, true) ]; $fields = [ $selected => groups_get_name(null, true) ];
} }
}
} else { } else {
foreach ($selected as $k) { foreach ($selected as $k) {
if ($k === null || $k === '') { if ($k === null || $k === '') {
@ -595,7 +601,9 @@ function html_print_select_groups(
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
$('select[name="<?php echo $name; ?>"]').each( $('select[name="<?php echo $name; ?>"]').each(
function() { function() {
$(this).select2({ $(this).select2({
@ -625,6 +633,7 @@ function html_print_select_groups(
inclusions: '<?php echo $json_inclusions; ?>', inclusions: '<?php echo $json_inclusions; ?>',
step: params.page || 1, step: params.page || 1,
strict: "<?php echo $strict_user; ?>", strict: "<?php echo $strict_user; ?>",
not_condition: $('#not_condition_switch').prop('checked'),
returnAllGroup: <?php echo (int) $returnAllGroup; ?> returnAllGroup: <?php echo (int) $returnAllGroup; ?>
} }
@ -781,7 +790,7 @@ function html_print_select(
$required = 'required'; $required = 'required';
} }
$output .= '<select '.$required.' id="'.$id.'" name="'.$name.'"'.$attributes.' '.$styleText.'>'; $output .= '<select '.$required.' onclick="'.$script.'" id="'.$id.'" name="'.$name.'"'.$attributes.' '.$styleText.'>';
if ($nothing !== false) { if ($nothing !== false) {
if ($nothing != '' || empty($fields)) { if ($nothing != '' || empty($fields)) {

View File

@ -30,7 +30,7 @@
global $config; global $config;
// Set variable to store menu type (classic or collapsed). // Set variable to store menu type (classic or collapsed).
if (!empty(get_parameter('menuType'))) { if (is_ajax() === true && empty(get_parameter('menuType')) === false) {
$_SESSION['menu_type'] = get_parameter('menuType', 'classic'); $_SESSION['menu_type'] = get_parameter('menuType', 'classic');
return; return;
} }
@ -39,11 +39,14 @@ if (!empty(get_parameter('menuType'))) {
/** /**
* Prints a complete menu structure. * Prints a complete menu structure.
* *
* @param array Menu structure to print. * @param array $menu Menu structure to print.
*
* @return void
*/ */
function menu_print_menu(&$menu) function menu_print_menu(&$menu)
{ {
global $config; global $config;
global $menuTypeClass;
static $idcounter = 0; static $idcounter = 0;
echo '<div class="menu">'; echo '<div class="menu">';
@ -108,7 +111,7 @@ function menu_print_menu(&$menu)
$submenu = false; $submenu = false;
if ($config['menu_type'] == 'classic') { if ($menuTypeClass === 'classic') {
$classes = [ $classes = [
'menu_icon', 'menu_icon',
'no_hidden_menu', 'no_hidden_menu',
@ -120,12 +123,12 @@ function menu_print_menu(&$menu)
]; ];
} }
if (isset($main['sub'])) { if (isset($main['sub']) === true) {
$classes[] = ''; $classes[] = '';
$submenu = true; $submenu = true;
} }
if (!isset($main['refr'])) { if (isset($main['refr']) === false) {
$main['refr'] = 0; $main['refr'] = 0;
} }
@ -409,23 +412,14 @@ function menu_print_menu(&$menu)
// Print out the first level. // Print out the first level.
$output .= '<li title="'.$main['text'].'" class="'.implode(' ', $classes).' '.$seleccionado.'" id="icon_'.$id.'">'; $output .= '<li title="'.$main['text'].'" class="'.implode(' ', $classes).' '.$seleccionado.'" id="icon_'.$id.'">';
// onclick="location.href=\'index.php?sec='.$mainsec.'&amp;sec2='.$main["sec2"].($main["refr"] ? '&amp;refr='.$main["refr"] : '').'\'">';
$length = strlen(__($main['text']));
$padding_top = ( $length >= 18) ? 6 : 12;
if ($config['menu_type'] == 'classic') { $output .= sprintf('<div id="title_menu" class="title_menu_%s">%s</div>', $menuTypeClass, $main['text']);
$output .= '<div id="title_menu" class="title_menu_classic">'.$main['text'].'</div>';
} else {
$output .= '<div id="title_menu" class="title_menu_collapsed">'.$main['text'].'</div>';
}
// Add the notification ball if defined // Add the notification ball if defined.
if (isset($main['notification'])) { if (isset($main['notification']) === true) {
$output .= '<div class="notification_ball">'.$main['notification'].'</div>'; $output .= '<div class="notification_ball">'.$main['notification'].'</div>';
} }
$padding_top = 0;
$length = 0;
if ($submenu_output != '') { if ($submenu_output != '') {
// WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS. // WARNING: IN ORDER TO MODIFY THE VISIBILITY OF MENU'S AND SUBMENU'S (eg. with cookies) YOU HAVE TO ADD TO THIS ELSEIF. DON'T MODIFY THE CSS.
if ($visible || in_array('selected', $classes)) { if ($visible || in_array('selected', $classes)) {
@ -436,10 +430,7 @@ function menu_print_menu(&$menu)
$visible = false; $visible = false;
} }
// $output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">'; $output .= sprintf('<ul id="subicon_%s" class="submenu">%s</ul>', $id, $submenu_output);
$output .= '<ul id="subicon_'.$id.'" class="submenu">';
$output .= $submenu_output;
$output .= '</ul>';
} }
$config['count_main_menu']++; $config['count_main_menu']++;

View File

@ -2295,17 +2295,19 @@ function modules_get_agentmodule_data(
$search_in_history_db = db_search_in_history_db($datelimit); $search_in_history_db = db_search_in_history_db($datelimit);
switch ($module['id_tipo_modulo']) { switch ($module['id_tipo_modulo']) {
// generic_data_string // Generic_data_string.
case 3: case 3:
// remote_tcp_string // Remote_tcp_string.
case 10: case 10:
// remote_snmp_string // Remote_snmp_string.
case 17: case 17:
// async_string // Async_string.
case 36: case 36:
// remote_cmd_string // Remote_cmd_string.
case 23: case 23:
// Free search is a json with value and exact modifier // Web content string.
case 33:
// Free search is a json with value and exact modifier.
$freesearch = json_decode($freesearch, true); $freesearch = json_decode($freesearch, true);
$freesearch_sql = ''; $freesearch_sql = '';
if (isset($freesearch['value']) && !empty($freesearch['value'])) { if (isset($freesearch['value']) && !empty($freesearch['value'])) {

View File

@ -264,7 +264,19 @@ function show_configuration_wizard() {
background: "black" background: "black"
}, },
closeOnEscape: false, closeOnEscape: false,
open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } open: function(event, ui) {
$(".ui-dialog-titlebar-close").hide();
if ($.ui && $.ui.dialog && $.ui.dialog.prototype._allowInteraction) {
var ui_dialog_interaction = $.ui.dialog.prototype._allowInteraction;
$.ui.dialog.prototype._allowInteraction = function(e) {
if ($(e.target).closest('.select2-dropdown').length) return true;
return ui_dialog_interaction.apply(this, arguments);
};
}
},
_allowInteraction: function (event) {
return !!$(event.target).is(".select2-input") || this._super(event);
}
}); });
default_language_displayed = $("#language").val(); default_language_displayed = $("#language").val();

View File

@ -2285,6 +2285,7 @@ function reporting_agents_inventory($report, $content)
$external_source = io_safe_input(json_decode($content['external_source'], true)); $external_source = io_safe_input(json_decode($content['external_source'], true));
$es_agents_inventory_display_options = $external_source['agents_inventory_display_options']; $es_agents_inventory_display_options = $external_source['agents_inventory_display_options'];
$es_agent_custom_fields = $external_source['agent_custom_fields'];
$es_custom_fields = $external_source['agent_custom_field_filter']; $es_custom_fields = $external_source['agent_custom_field_filter'];
$es_os_filter = $external_source['agent_os_filter']; $es_os_filter = $external_source['agent_os_filter'];
$es_agent_status_filter = $external_source['agent_status_filter']; $es_agent_status_filter = $external_source['agent_status_filter'];
@ -2299,10 +2300,20 @@ function reporting_agents_inventory($report, $content)
$es_agents_inventory_display_options = []; $es_agents_inventory_display_options = [];
} }
$custom_field_sql = '';
$search_sql = ''; $search_sql = '';
if ($es_custom_fields != '') { if (!empty($es_agent_custom_fields)) {
$search_sql .= ' AND id_os = '.$es_custom_fields; $custom_field_sql = 'INNER JOIN tagent_custom_data tacd ON tacd.id_agent = tagente.id_agente';
if ($es_agent_custom_fields[0] != 0) {
$custom_field_sql .= ' AND tacd.id_field IN ('.implode(',', $es_agent_custom_fields).')';
}
if (!empty($es_custom_fields)) {
$custom_field_sql .= ' AND tacd.description like "%'.$es_custom_fields.'%"';
} else {
$custom_field_sql .= ' AND tacd.description <> ""';
}
} }
if (in_array('0', $es_os_filter) === false) { if (in_array('0', $es_os_filter) === false) {
@ -2341,8 +2352,10 @@ function reporting_agents_inventory($report, $content)
ON tagente.id_agente = tasg.id_agent ON tagente.id_agente = tasg.id_agent
LEFT JOIN tagente_modulo tam LEFT JOIN tagente_modulo tam
ON tam.id_agente = tagente.id_agente ON tam.id_agente = tagente.id_agente
%s
WHERE (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s)) WHERE (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))
%s', %s',
$custom_field_sql,
$user_groups_to_sql, $user_groups_to_sql,
$user_groups_to_sql, $user_groups_to_sql,
$search_sql $search_sql

View File

@ -2559,12 +2559,19 @@ function reporting_html_last_value($table, $item, $pdf=0)
'Y-m-d H:i:s', 'Y-m-d H:i:s',
$item['data']['utimestamp'] $item['data']['utimestamp']
); );
$table_data->data[1][2] = remove_right_zeros(
if (is_numeric($item['data']['datos']) === true) {
$dataDatos = remove_right_zeros(
number_format( number_format(
$item['data']['datos'], $item['data']['datos'],
$config['graph_precision'] $config['graph_precision']
) )
); );
} else {
$dataDatos = trim($item['data']['datos']);
}
$table_data->data[1][2] = $dataDatos;
switch ($item['data']['estado']) { switch ($item['data']['estado']) {
case AGENT_MODULE_STATUS_CRITICAL_BAD: case AGENT_MODULE_STATUS_CRITICAL_BAD:

View File

@ -69,9 +69,9 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
// Module name // Module name
if ($module['disabled']) { if ($module['disabled']) {
$cellName = '<em>'.ui_print_truncate_text(io_safe_output($module['nombre']), GENERIC_SIZE_TEXT, true, true, true, '[&hellip;]', 'text-transform: uppercase;').ui_print_help_tip(__('Disabled'), true).'<em>'; $cellName = '<em>'.ui_print_truncate_text($module['nombre'], GENERIC_SIZE_TEXT, true, true, true, '[&hellip;]', 'text-transform: uppercase;').ui_print_help_tip(__('Disabled'), true).'<em>';
} else { } else {
$cellName = ui_print_truncate_text(io_safe_output($module['nombre']), GENERIC_SIZE_TEXT, true, true, true, '[&hellip;]', 'text-transform: uppercase;'); $cellName = ui_print_truncate_text($module['nombre'], GENERIC_SIZE_TEXT, true, true, true, '[&hellip;]', 'text-transform: uppercase;');
} }
$row = []; $row = [];
@ -817,7 +817,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$events_graph .= graph_graphic_agentevents( $events_graph .= graph_graphic_agentevents(
$id_agente, $id_agente,
'340px;margin:0', '340px;margin:0',
45, '130px',
SECONDS_1DAY, SECONDS_1DAY,
'', '',
true, true,

View File

@ -1869,7 +1869,7 @@ function ui_process_page_head($string, $bitfield)
} else { } else {
$config['jquery'] = array_merge( $config['jquery'] = array_merge(
[ [
'jquery' => 'include/javascript/jquery-3.3.1.min.js', 'jquery' => 'include/javascript/jquery.current.js',
'pandora' => 'include/javascript/jquery.pandora.js', 'pandora' => 'include/javascript/jquery.pandora.js',
'jquery-ui' => 'include/javascript/jquery-ui.min.js', 'jquery-ui' => 'include/javascript/jquery-ui.min.js',
], ],
@ -4438,6 +4438,13 @@ function ui_print_standard_header(
true true
); );
// Create the header. // Create the header.
if (is_metaconsole() === true) {
$output = ui_meta_print_header(
$title,
false,
$options
);
} else {
$output = ui_print_page_header( $output = ui_print_page_header(
$title, $title,
$icon, $icon,
@ -4451,6 +4458,7 @@ function ui_print_standard_header(
'', '',
$headerInformation->printHeader(true) $headerInformation->printHeader(true)
); );
}
if ($return !== true) { if ($return !== true) {
echo $output; echo $output;

View File

@ -55,6 +55,10 @@ if ($file === '' || $hash === '' || $hash !== md5($file_raw.$config['server_uniq
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file; $downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/files_repo/'.$file;
break; break;
case 'godmode/servers/plugin':
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/plugin/'.$file;
break;
case $main_collections: case $main_collections:
$downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/collection/'.$file; $downloadable_file = $_SERVER['DOCUMENT_ROOT'].'/pandora_console/attachment/collection/'.$file;
break; break;

View File

@ -118,6 +118,7 @@ function flot_area_graph(
$array_events_alerts $array_events_alerts
) { ) {
global $config; global $config;
global $is_mobile;
// Get a unique identifier to graph. // Get a unique identifier to graph.
$graph_id = uniqid('graph_'); $graph_id = uniqid('graph_');
@ -145,7 +146,7 @@ function flot_area_graph(
break; break;
} }
if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null ) if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null) && (isset($is_mobile) === false || $is_mobile === false)
) { ) {
$background_style = '#222'; $background_style = '#222';
$params['grid_color'] = '#fff'; $params['grid_color'] = '#fff';
@ -170,7 +171,7 @@ function flot_area_graph(
// Set some containers to legend, graph, timestamp tooltip, etc. // Set some containers to legend, graph, timestamp tooltip, etc.
if ($params['show_legend']) { if ($params['show_legend']) {
$return .= '<p id="legend_'.$graph_id.'" style="text-align:left; width: '.$params['width'].'px;"></p>'; $return .= '<p id="legend_'.$graph_id.'" class="legend_background" style="text-align:left; width: '.$params['width'].'px;"></p>';
} }
if (isset($params['graph_combined']) === true && $params['graph_combined'] if (isset($params['graph_combined']) === true && $params['graph_combined']
@ -760,11 +761,23 @@ function flot_slicesbar_graph(
$graph_id = uniqid('graph_'); $graph_id = uniqid('graph_');
// Set some containers to legend, graph, timestamp tooltip, etc. // Set some containers to legend, graph, timestamp tooltip, etc.
if (is_numeric($height) === true) {
$height = ((int) $height + 15); $height = ((int) $height + 15);
}
$style = 'width:'.$width.'%;'; $style = 'width:'.$width.'%;';
// Fixed height size. // Fixed height size.
if (empty($height) === true) {
$style .= 'height: 100%;'; $style .= 'height: 100%;';
} else {
if (is_numeric($height) === true) {
$style .= 'height: '.$height.'px;';
} else {
$style .= 'height: '.$height.';';
}
}
$return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>"; $return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>";
$return .= "<div id='value_".$graph_id."' class='flot_container'></div>"; $return .= "<div id='value_".$graph_id."' class='flot_container'></div>";

View File

@ -1113,6 +1113,10 @@ function load_interfaces(selected_links) {
); );
$("#relations_table tbody").append(template_relation_row); $("#relations_table tbody").append(template_relation_row);
// Update input for transform in select2.
$("#interface_source_" + i).select2();
$("#interface_target_" + i).select2();
template_relation_row = null; template_relation_row = null;
}); });
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1333,9 +1333,13 @@ function defineTinyMCE(added_config) {
theme_advanced_buttons1: buttons1, theme_advanced_buttons1: buttons1,
theme_advanced_toolbar_location: "top", theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left", theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "none", theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true,
convert_urls: false, convert_urls: false,
element_format: "html" element_format: "html",
object_resizing: true,
autoresize_bottom_margin: 50,
autoresize_on_init: true
}); });
if (!isEmptyObject(added_config)) { if (!isEmptyObject(added_config)) {
@ -1385,6 +1389,8 @@ function removeTinyMCE(elementID) {
function addTinyMCE(elementID) { function addTinyMCE(elementID) {
if (elementID.length > 0 && !isEmptyObject(tinyMCE)) if (elementID.length > 0 && !isEmptyObject(tinyMCE))
tinyMCE.EditorManager.execCommand("mceAddControl", true, elementID); tinyMCE.EditorManager.execCommand("mceAddControl", true, elementID);
tinyMCE.EditorManager.execCommand("mceAutoResize");
tinymce.EditorManager.execCommand("mceTableSizingMode", false, "responsive");
} }
function toggle_full_value(id) { function toggle_full_value(id) {

View File

@ -12,7 +12,6 @@ function parse_alert_command(command, classs) {
// Only render values different from '' // Only render values different from ''
var field = "_field" + nfield + "_"; var field = "_field" + nfield + "_";
var regex = new RegExp(field, "gi"); var regex = new RegExp(field, "gi");
console.log($(this).val());
if ($(this).val() == "") { if ($(this).val() == "") {
if ( if (
classs == "fields_recovery" && classs == "fields_recovery" &&

View File

@ -1169,6 +1169,10 @@ function dashboardLoadVC(settings) {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
function dashboardShowEventDialog(settings) { function dashboardShowEventDialog(settings) {
settings = JSON.parse(atob(settings)); settings = JSON.parse(atob(settings));
var dialog_exist = $("div[aria-describedby='event_details_window']");
if (dialog_exist.length == 1) {
$("div[aria-describedby='event_details_window']").remove();
}
$.ajax({ $.ajax({
method: "post", method: "post",
url: settings.ajaxUrl, url: settings.ajaxUrl,

View File

@ -721,6 +721,7 @@ final class DBMaintainer
$umc->updateMR($path); $umc->updateMR($path);
} catch (\Exception $e) { } catch (\Exception $e) {
// TODO: Send an event to notify errors. // TODO: Send an event to notify errors.
$this->lastError = $e->getMessage();
$return = false; $return = false;
} }
} else { } else {

View File

@ -413,7 +413,7 @@ class AgentModuleWidget extends Widget
array $visualData, array $visualData,
array $allModules array $allModules
):string { ):string {
$style = 'display:flex; width:100%; height:100%; margin: 10px;'; $style = 'display:flex; width:100%; margin: 10px;';
$table_data = '<div style="'.$style.'">'; $table_data = '<div style="'.$style.'">';
$table_data .= '<table class="widget_agent_module transparent mrgn_0px" cellpadding="1" cellspacing="0" border="0">'; $table_data .= '<table class="widget_agent_module transparent mrgn_0px" cellpadding="1" cellspacing="0" border="0">';
@ -645,9 +645,18 @@ class AgentModuleWidget extends Widget
$all_modules = $target_modules; $all_modules = $target_modules;
} else { } else {
if (is_array($target_modules) === true
|| is_numeric($target_modules) === true
) {
$all_modules = Module::search( $all_modules = Module::search(
['id_agente_modulo' => $target_modules] ['id_agente_modulo' => $target_modules]
); );
} else {
// From previous definitions.
$all_modules = Module::search(
['id_agente_modulo' => explode(',', $target_modules)]
);
}
} }
if ($all_modules !== null) { if ($all_modules !== null) {

View File

@ -761,11 +761,6 @@ class EventsListWidget extends Widget
$output .= "<div id='event_response_window'></div>"; $output .= "<div id='event_response_window'></div>";
$output .= "<div id='event_response_command_window' title='"; $output .= "<div id='event_response_command_window' title='";
$output .= \__('Parameters')."'></div>"; $output .= \__('Parameters')."'></div>";
$output .= \ui_require_javascript_file(
'pandora_events',
'include/javascript/',
true
);
} else { } else {
$output .= '<div class="container-center">'; $output .= '<div class="container-center">';
$output .= \ui_print_info_message( $output .= \ui_print_info_message(

View File

@ -396,9 +396,20 @@ class ModuleValueWidget extends Widget
$output .= '<div class="container-icon">'; $output .= '<div class="container-icon">';
// Div value. // Div value.
$output .= '<div style="flex: 0 1 '.$sizeValue.'px; font-size:'.$sizeValue.'px;">'; $output .= '<div style="flex: 0 1 '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= remove_right_zeros(
number_format($data_module, $config['graph_precision']) if (is_numeric($data_module) === true) {
$dataDatos = remove_right_zeros(
number_format(
$data_module,
$config['graph_precision']
)
); );
} else {
$dataDatos = trim($data_module);
}
$output .= $dataDatos;
$output .= '</div>'; $output .= '</div>';
if (empty($label) === false) { if (empty($label) === false) {

View File

@ -386,6 +386,7 @@ class Group extends Entity
$search = get_parameter('search', ''); $search = get_parameter('search', '');
$step = get_parameter('step', 1); $step = get_parameter('step', 1);
$limit = get_parameter('limit', false); $limit = get_parameter('limit', false);
$not_condition = get_parameter('not_condition', false);
$exclusions = get_parameter('exclusions', '[]'); $exclusions = get_parameter('exclusions', '[]');
$inclusions = get_parameter('inclusions', '[]'); $inclusions = get_parameter('inclusions', '[]');
@ -430,6 +431,11 @@ class Group extends Entity
$return = self::prepareGroups($groups); $return = self::prepareGroups($groups);
// When not_condition is select firts option text change All to None.
if ($not_condition === 'true') {
$return[0]['text'] = 'None';
}
if (is_array($return) === false) { if (is_array($return) === false) {
return; return;
} }

View File

@ -1517,6 +1517,20 @@ class Item extends CachedModel
$result['border_color'] = $border_color; $result['border_color'] = $border_color;
} }
$id_custom_graph = static::parseIntOr(
static::issetInArray(
$data,
[
'customGraphId',
'id_custom_graph',
]
),
null
);
if ($id_custom_graph !== null) {
$result['id_custom_graph'] = $id_custom_graph;
}
$linked_layout_node_id = static::parseIntOr( $linked_layout_node_id = static::parseIntOr(
static::issetInArray( static::issetInArray(
$data, $data,

View File

@ -134,8 +134,7 @@ final class EventsHistory extends Item
} }
} }
$data['height'] = ($data['height'] - 20); // $data['height'] = ($data['height'] - 20);
if ((int) $data['width'] < 11) { if ((int) $data['width'] < 11) {
$data['width'] = 11; $data['width'] = 11;
} }

View File

@ -356,10 +356,15 @@ class View extends \HTML
case MODULE_GRAPH: case MODULE_GRAPH:
$data['backgroundType'] = \get_parameter('backgroundType'); $data['backgroundType'] = \get_parameter('backgroundType');
$type = \get_parameter('choosetype');
$data['agentId'] = \get_parameter('agentId'); $data['agentId'] = \get_parameter('agentId');
$data['metaconsoleId'] = \get_parameter('metaconsoleId'); $data['metaconsoleId'] = \get_parameter('metaconsoleId');
$data['moduleId'] = \get_parameter('moduleId'); $data['moduleId'] = \get_parameter('moduleId');
$data['customGraphId'] = \get_parameter('customGraphId'); $data['customGraphId'] = \get_parameter('customGraphId');
if ($type === 'module') {
$data['customGraphId'] = 0;
}
$data['graphType'] = \get_parameter('graphType'); $data['graphType'] = \get_parameter('graphType');
$data['showLegend'] = \get_parameter_switch('showLegend'); $data['showLegend'] = \get_parameter_switch('showLegend');
$data['period'] = \get_parameter('period'); $data['period'] = \get_parameter('period');

View File

@ -401,6 +401,12 @@ table.group_modules_status_box tr td span a {
text-align: center; text-align: center;
} }
table.widget_agent_module,
table.widget_agent_module img {
width: auto;
height: auto;
}
table.widget_agent_module tbody tr td { table.widget_agent_module tbody tr td {
padding: 5px; padding: 5px;
} }

View File

@ -416,11 +416,14 @@ ul li {
} }
.menu_full_classic .title_menu_classic { .menu_full_classic .title_menu_classic {
display: flex; display: flex !important;
}
.menu_icon_collapsed {
background-position: 50% 50%;
} }
.menu_full_collapsed .title_menu_collapsed { .menu_full_collapsed .title_menu_collapsed {
display: none; display: none !important;
} }
.button_classic { .button_classic {
@ -474,15 +477,3 @@ ul li {
.header_table_collapsed { .header_table_collapsed {
padding-left: 80px; /* 60 + 35 */ padding-left: 80px; /* 60 + 35 */
} }
.title_menu_classic {
display: flex;
}
.title_menu_collapsed {
display: none;
}
.menu_icon_collapsed {
background-position: 50% 50%;
}

View File

@ -0,0 +1,178 @@
/*
* ---------------------------------------------------------------------
* - Notifications
* ---------------------------------------------------------------------
*/
#meta_total_container #header_discovery {
padding-left: 10px;
}
.notification-ball {
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #fff;
font-weight: bold;
}
.notification-ball.notification-ball-new-messages:hover {
box-shadow: 0 0 3px #888;
}
.notification-ball-no-messages {
background-color: #82b92e;
cursor: pointer;
}
.notification-ball-new-messages {
background-color: #e63c52;
}
#notification-wrapper {
background: white;
border: #a5a5a5 solid 1px;
z-index: 900000;
position: absolute;
width: 550px;
margin-top: -5px;
border-radius: 5px;
}
#notification-wrapper::before {
content: "";
display: block;
position: absolute;
width: 0px;
height: 0;
border-color: transparent;
border-width: 12px;
border-style: solid;
bottom: 100%;
left: calc(58% - 7px);
margin-left: -12px;
border-bottom-color: white;
}
#notification-wrapper-inner {
max-height: 400px;
overflow: auto;
}
#notification-wrapper-shadow {
height: 100%;
width: 100%;
background: #111;
position: fixed;
z-index: 9009;
top: 0;
opacity: 0.3;
}
.notification-item {
background: whitesmoke;
height: 100px;
margin: 7px;
border: #e4e4e4 solid 1px;
display: flex;
flex-flow: row nowrap;
align-items: center;
padding: 5px;
}
.notification-item:hover {
border: #ccc solid 1px;
text-decoration: none;
}
.notification-item > * {
padding-left: 15px;
pointer-events: none;
}
.notification-item > img {
width: 75px;
}
.notification-info {
width: 87%;
display: flex;
flex-flow: column nowrap;
overflow: hidden;
max-height: 83px;
line-height: 1.4em;
}
.notification-item img {
max-width: 100%;
max-height: 100%;
}
.notification-title {
margin: 0;
}
h4.notification-title {
font-size: 13px;
color: #3f3f3f;
text-transform: none;
}
.notification-subtitle,
.color-black-grey {
color: #373737;
}
.global-config-notification-title {
display: flex;
flex-direction: row;
align-items: center;
}
.global-config-notification-title h2 {
margin-left: 10px;
}
.global-config-notification-checkboxes :first-child {
font-weight: bold;
}
.global-config-notification-selectors {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.global-config-notification-selectors h4 {
margin: 0;
}
.global-config-notification-single-selector,
.global_config_notifications_dialog_add select {
display: flex;
width: 100%;
padding: 0 10px;
}
.global-config-notification-single-selector :first-child,
.global-config-notification-single-selector :first-child select {
width: 99%;
}
.global-config-notification-single-selector :last-child,
.global_config_notifications_dialog_add_wrapper {
flex-direction: column;
display: flex;
justify-content: flex-end;
}
.global_config_notifications_dialog_add {
display: flex;
flex-direction: row;
margin: 8px;
}
.global_config_notifications_two_ways_form_arrows {
display: flex;
flex-flow: column;
justify-content: center;
margin: 0 5px;
}
.global_config_notifications_two_ways_form_arrows img {
margin: 15px 0;
}

View File

@ -399,7 +399,7 @@ table#diagnostic_info tbody td div {
} }
.ui-widget-content, .ui-widget-content,
.ui-widget-content a { .ui-widget-content a {
color: #fff; color: #fff !important;
} }
.ui-widget-content.ui-autocomplete a { .ui-widget-content.ui-autocomplete a {
@ -1161,3 +1161,8 @@ a.pandora_pagination,
padding-right: 35px; padding-right: 35px;
background-color: #222; background-color: #222;
} }
.legend_background {
background-color: #222;
color: #fff !important;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1112,17 +1112,36 @@ if (get_parameter('login', 0) !== 0) {
} }
} }
// Header.
if ($config['pure'] == 0) {
echo '<div id="container"><div id="head">';
include 'general/header.php';
if ($config['menu_type'] == 'classic') { if ((bool) $config['maintenance_mode'] === true
echo '</div><div id="page" class="page_classic"><div id="menu">'; && (bool) users_is_admin() === false
} else { ) {
echo '</div><div id="page" class="page_collapsed"><div id="menu">'; // Show maintenance web-page. For non-admin users only.
include 'general/maintenance.php';
while (ob_get_length() > 0) {
ob_end_flush();
} }
exit('</html>');
}
// Pure.
if ($config['pure'] == 0) {
// Menu container prepared to autohide menu.
$menuCollapsed = (isset($_SESSION['menu_type']) === true && $_SESSION['menu_type'] !== 'classic');
$menuTypeClass = ($menuCollapsed === true) ? 'collapsed' : 'classic';
// Container.
echo '<div id="container">';
// Header.
echo '<div id="head">';
include 'general/header.php';
echo '</div>';
// Main menu.
echo sprintf('<div id="page" class="page_%s">', $menuTypeClass);
echo '<div id="menu">';
include 'general/main_menu.php'; include 'general/main_menu.php';
echo '</div>'; echo '</div>';
echo '<button onclick="topFunction()" id="top_btn" title="Go to top"></button>'; echo '<button onclick="topFunction()" id="top_btn" title="Go to top"></button>';
@ -1330,11 +1349,15 @@ if ($config['pure'] == 0) {
// Main pure. // Main pure.
} }
echo '<div id="wiz_container">'; html_print_div(
echo '</div>'; ['id' => 'wiz_container'],
true
);
echo '<div id="um_msg_receiver">'; html_print_div(
echo '</div>'; ['id' => 'um_msg_receiver'],
true
);
// Connection lost alert. // Connection lost alert.
ui_require_javascript_file('connection_check'); ui_require_javascript_file('connection_check');

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.756'; $version = '7.0NG.756';
$build = '210811'; $build = '210901';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -1,3 +1,37 @@
/**
*
* Default mobile theme
*
* @category Stylesheet
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
@font-face {
font-family: "lato";
src: url("../../../fonts/lato.woff2") format("woff");
font-weight: 400;
}
* { * {
text-decoration: none !important; text-decoration: none !important;
font-size: 12px; font-size: 12px;
@ -11,6 +45,8 @@ body {
margin: 0; margin: 0;
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
font-weight: 400;
font-family: "Lato";
} }
.small { .small {

View File

@ -96,7 +96,7 @@ if ($refresh > 0) {
<link rel="stylesheet" href="../../include/styles/pandora_minimal.css" type="text/css" /> <link rel="stylesheet" href="../../include/styles/pandora_minimal.css" type="text/css" />
<link rel="stylesheet" href="../../include/styles/js/jquery-ui.min.css" type="text/css" /> <link rel="stylesheet" href="../../include/styles/js/jquery-ui.min.css" type="text/css" />
<script type='text/javascript' src='../../include/javascript/pandora.js'></script> <script type='text/javascript' src='../../include/javascript/pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-3.3.1.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.current.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script>
<?php <?php

View File

@ -666,12 +666,6 @@ function print_table(
time() time()
); );
// Get last data timestamp.
$timestamps_array = array_merge(
array_column(ifInOctets, 'utimestamp'),
array_column(ifOutOctets, 'utimestamp')
);
if ($sec === 'view') { if ($sec === 'view') {
$table_data[$loop_index]['if_agent_name'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$agent_interfaces['agent_id'].'">'.$agent_interfaces['agent_alias'].'</a>'; $table_data[$loop_index]['if_agent_name'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente='.$agent_interfaces['agent_id'].'">'.$agent_interfaces['agent_alias'].'</a>';
} }
@ -683,12 +677,7 @@ function print_table(
$table_data[$loop_index]['if_out_octets'] = ($ifOutOctets['datos'] === null) ? __('N/A') : $ifOutOctets['datos']; $table_data[$loop_index]['if_out_octets'] = ($ifOutOctets['datos'] === null) ? __('N/A') : $ifOutOctets['datos'];
$table_data[$loop_index]['if_usage_module_data_in'] = ($usage_module_data_in['datos'] === null) ? __('N/A') : $usage_module_data_in['datos']; $table_data[$loop_index]['if_usage_module_data_in'] = ($usage_module_data_in['datos'] === null) ? __('N/A') : $usage_module_data_in['datos'];
$table_data[$loop_index]['if_usage_module_data_out'] = ($usage_module_data_out['datos'] === null) ? __('N/A') : $usage_module_data_out['datos']; $table_data[$loop_index]['if_usage_module_data_out'] = ($usage_module_data_out['datos'] === null) ? __('N/A') : $usage_module_data_out['datos'];
$table_data[$loop_index]['if_last_data'] = human_time_comparation( $table_data[$loop_index]['if_last_data'] = human_time_comparation($agent_interfaces['last_contact']);
max(
$ifInOctets['utimestamp'],
$ifOutOctets['utimestamp']
)
);
$loop_index++; $loop_index++;
} }

View File

@ -87,7 +87,7 @@ echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/
<link rel="stylesheet" href="../../include/styles/js/jquery-ui.min.css" type="text/css" /> <link rel="stylesheet" href="../../include/styles/js/jquery-ui.min.css" type="text/css" />
<script type='text/javascript' src='../../include/javascript/pandora.js'></script> <script type='text/javascript' src='../../include/javascript/pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/pandora_ui.js'></script> <script type='text/javascript' src='../../include/javascript/pandora_ui.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-3.3.1.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.current.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script>
<?php <?php

View File

@ -86,7 +86,7 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) {
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo __('%s Snapshot data view for module (%s)', get_product_name(), $label); ?></title> <title><?php echo __('%s Snapshot data view for module (%s)', get_product_name(), $label); ?></title>
<script type='text/javascript' src='../../include/javascript/jquery-3.3.1.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.current.js'></script>
</head> </head>
<body class=''> <body class=''>
<?php <?php

View File

@ -119,7 +119,7 @@ ui_print_message_dialog(
<link rel="stylesheet" href="../../include/styles/js/jquery-ui_custom.css" type="text/css" /> <link rel="stylesheet" href="../../include/styles/js/jquery-ui_custom.css" type="text/css" />
<script type='text/javascript' src='../../include/javascript/pandora.js'></script> <script type='text/javascript' src='../../include/javascript/pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/pandora_ui.js'></script> <script type='text/javascript' src='../../include/javascript/pandora_ui.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-3.3.1.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.current.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script> <script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script>
<script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script> <script type='text/javascript' src='../../include/javascript/jquery-ui.min.js'></script>
<?php <?php

File diff suppressed because it is too large Load Diff

View File

@ -887,6 +887,8 @@ if (is_ajax()) {
$tags = (array) get_parameter('tags', []); $tags = (array) get_parameter('tags', []);
$safe_name = (bool) get_parameter('safe_name', false);
// Filter. // Filter.
$filter = []; $filter = [];
if ($disabled !== -1) { if ($disabled !== -1) {
@ -1024,6 +1026,9 @@ if (is_ajax()) {
foreach ($agent_modules as $key => $module) { foreach ($agent_modules as $key => $module) {
$agent_modules[$key]['nombre'] = io_safe_output($module['nombre']); $agent_modules[$key]['nombre'] = io_safe_output($module['nombre']);
if ($safe_name == true) {
$agent_modules[$key]['safe_name'] = $module['nombre'];
}
} }
$get_order_json = (bool) get_parameter('get_order_json', false); $get_order_json = (bool) get_parameter('get_order_json', false);

View File

@ -293,6 +293,7 @@ if (is_ajax()) {
'te.module_status', 'te.module_status',
'ta.alias as agent_name', 'ta.alias as agent_name',
'tg.nombre as group_name', 'tg.nombre as group_name',
'ta.direccion',
]; ];
if (!is_metaconsole()) { if (!is_metaconsole()) {
$fields[] = 'am.nombre as module_name'; $fields[] = 'am.nombre as module_name';
@ -391,10 +392,14 @@ if (is_ajax()) {
true true
); );
if (is_numeric($tmp->data) === true) {
$tmp->data = format_numeric( $tmp->data = format_numeric(
$tmp->data, $tmp->data,
$config['graph_precision'] $config['graph_precision']
); );
} else {
$tmp->data = ui_print_truncate_text($tmp->data, 10);
}
$tmp->instructions = events_get_instructions($item); $tmp->instructions = events_get_instructions($item);

View File

@ -29,9 +29,9 @@
// Begin. // Begin.
global $config; global $config;
require_once 'include/functions_users.php'; require_once $config['homedir'].'/include/functions_users.php';
require_once 'include/functions_groups.php'; require_once $config['homedir'].'/include/functions_groups.php';
require_once 'include/functions_io.php'; require_once $config['homedir'].'/include/functions_io.php';
// Parse parameters. // Parse parameters.
$send_mes = (bool) get_parameter('send_mes', false); $send_mes = (bool) get_parameter('send_mes', false);
@ -82,6 +82,10 @@ $buttons['create_message'] = [
]; ];
// Header. // Header.
if (is_metaconsole() === true) {
enterprise_hook('open_meta_frame');
}
ui_print_standard_header( ui_print_standard_header(
__('Compose message'), __('Compose message'),
'images/email_mc.png', 'images/email_mc.png',
@ -400,3 +404,6 @@ html_print_div(
echo '</form>'; echo '</form>';
echo $jsOutput; echo $jsOutput;
if (is_metaconsole() === true) {
enterprise_hook('close_meta_frame');
}

View File

@ -27,10 +27,10 @@
*/ */
// Begin. // Begin.
require_once 'include/functions_messages.php';
global $config; global $config;
require_once $config['homedir'].'/include/functions_messages.php';
$delete_msg = get_parameter('delete_message', 0); $delete_msg = get_parameter('delete_message', 0);
$multiple_delete = get_parameter('multiple_delete', 0); $multiple_delete = get_parameter('multiple_delete', 0);
$show_sent = (bool) get_parameter('show_sent', false); $show_sent = (bool) get_parameter('show_sent', false);
@ -68,6 +68,10 @@ $buttons['create_message'] = [
]; ];
if (is_ajax() === false) { if (is_ajax() === false) {
if (is_metaconsole() === true) {
enterprise_hook('open_meta_frame');
}
// Header. // Header.
ui_print_standard_header( ui_print_standard_header(
$tabSelectedMessage, $tabSelectedMessage,
@ -300,6 +304,10 @@ echo "<div class='float-right'>";
html_print_submit_button(__('Create message'), 'create', false, 'class="sub next mrgn_right_5px"'); html_print_submit_button(__('Create message'), 'create', false, 'class="sub next mrgn_right_5px"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
if (is_ajax() !== true && is_metaconsole() === true) {
enterprise_hook('close_meta_frame');
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -235,7 +235,7 @@ if (is_metaconsole() === true) {
} }
$is_management_allowed = true; $is_management_allowed = true;
if (is_management_allowed() === false) { if (is_metaconsole() === false && is_management_allowed() === false) {
$is_management_allowed = false; $is_management_allowed = false;
ui_print_warning_message( ui_print_warning_message(
__( __(

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.756 %define version 7.0NG.756
%define release 210811 %define release 210901
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.756 %define version 7.0NG.756
%define release 210811 %define release 210901
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.756 %define version 7.0NG.756
%define release 210811 %define release 210901
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -694,7 +694,7 @@ CREATE TABLE IF NOT EXISTS `tevento` (
`owner_user` VARCHAR(100) NOT NULL DEFAULT '', `owner_user` VARCHAR(100) NOT NULL DEFAULT '',
`ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0', `ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0',
`custom_data` TEXT NOT NULL, `custom_data` TEXT NOT NULL,
`data` double(50,5) default NULL, `data` tinytext default NULL,
`module_status` int(4) NOT NULL default '0', `module_status` int(4) NOT NULL default '0',
PRIMARY KEY (`id_evento`), PRIMARY KEY (`id_evento`),
KEY `idx_agente` (`id_agente`), KEY `idx_agente` (`id_agente`),
@ -3291,7 +3291,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` (
`ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0', `ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0',
`server_id` int(10) NOT NULL, `server_id` int(10) NOT NULL,
`custom_data` TEXT NOT NULL DEFAULT '', `custom_data` TEXT NOT NULL DEFAULT '',
`data` double(50,5) default NULL, `data` tinytext default NULL,
`module_status` int(4) NOT NULL default '0', `module_status` int(4) NOT NULL default '0',
PRIMARY KEY (`id_evento`), PRIMARY KEY (`id_evento`),
KEY `idx_agente` (`id_agente`), KEY `idx_agente` (`id_agente`),

View File

@ -105,7 +105,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('show_vc', 1), ('show_vc', 1),
('inventory_changes_blacklist', '1,2,20,21'), ('inventory_changes_blacklist', '1,2,20,21'),
('custom_report_front', 0), ('custom_report_front', 0),
('custom_report_front_font', 'lato.ttf'), ('custom_report_front_font', 'Lato-Regular.ttf'),
('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
('custom_report_front_header', ''), ('custom_report_front_header', ''),
('custom_report_front_footer', ''), ('custom_report_front_footer', ''),
@ -202,7 +202,7 @@ INSERT INTO `tlanguage` VALUES ('en_GB','English (UK)');
INSERT INTO `tlanguage` VALUES ('es','Español'); INSERT INTO `tlanguage` VALUES ('es','Español');
INSERT INTO `tlanguage` VALUES ('ar','العربية'); INSERT INTO `tlanguage` VALUES ('ar','العربية');
INSERT INTO `tlanguage` VALUES ('cs','Česky'); INSERT INTO `tlanguage` VALUES ('cs','Česky');
INSERT INTO `tlanguage` VALUES ('de','Deutch'); INSERT INTO `tlanguage` VALUES ('de','Deutsch');
INSERT INTO `tlanguage` VALUES ('el','Ελληνικά'); INSERT INTO `tlanguage` VALUES ('el','Ελληνικά');
INSERT INTO `tlanguage` VALUES ('fr','Français'); INSERT INTO `tlanguage` VALUES ('fr','Français');
INSERT INTO `tlanguage` VALUES ('it','Italiano'); INSERT INTO `tlanguage` VALUES ('it','Italiano');

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.756-210811 Version: 7.0NG.756-210901
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.756-210811" pandora_version="7.0NG.756-210901"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -17,6 +17,8 @@
. "/etc/rc.subr" . "/etc/rc.subr"
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
name="pandora_ha" name="pandora_ha"
rcvar=pandora_server_enable rcvar=pandora_server_enable

Some files were not shown because too many files have changed in this diff Show More