mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge remote-tracking branch 'origin/develop' into ent-7503-Calendarios-para-dias-especiales
Conflicts: pandora_console/extras/mr/51.sql
This commit is contained in:
commit
c52e11e91a
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.758-211108
|
Version: 7.0NG.758-211119
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.758-211108"
|
pandora_version="7.0NG.758-211119"
|
||||||
|
|
||||||
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
|
||||||
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.758';
|
use constant AGENT_VERSION => '7.0NG.758';
|
||||||
use constant AGENT_BUILD => '211108';
|
use constant AGENT_BUILD => '211119';
|
||||||
|
|
||||||
# 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;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758"
|
PI_VERSION="7.0NG.758"
|
||||||
PI_BUILD="211108"
|
PI_BUILD="211119"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{211108}
|
{211119}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -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.758 Build 211108")
|
#define PANDORA_VERSION ("7.0NG.758 Build 211119")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -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.758(Build 211108))"
|
VALUE "ProductVersion", "(7.0NG.758(Build 211119))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# pandora disable listing
|
# pandora disable listing
|
||||||
Options -Indexes
|
Options -Indexes
|
||||||
|
|
||||||
|
# Avoid clickjacking
|
||||||
|
Header always append X-Frame-Options SAMEORIGIN
|
||||||
|
|
||||||
<Files ~ "\.log$">
|
<Files ~ "\.log$">
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Deny from All
|
Deny from All
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.758-211108
|
Version: 7.0NG.758-211119
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.758-211108"
|
pandora_version="7.0NG.758-211119"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -351,7 +351,7 @@ function mainModuleGroups()
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data[$i][$j] = "<div style='".$cell_style.'background:'.$color.";'>";
|
$data[$i][$j] = "<div style='".$cell_style.'background:'.$color.";'>";
|
||||||
$data[$i][$j] .= '<a class="info_cell white font_18px" rel="'.$rel.'" href="'.$url.'">';
|
$data[$i][$j] .= "<a class='info_cell white font_18px' rel='".$rel."' href='".$url."'>";
|
||||||
$data[$i][$j] .= $array_data[$key][$k]['total_count'];
|
$data[$i][$j] .= $array_data[$key][$k]['total_count'];
|
||||||
$data[$i][$j] .= '</a></div>';
|
$data[$i][$j] .= '</a></div>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -206,7 +206,7 @@ function users_extension_main_god($god=true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extensions_add_operation_menu_option(__('Users connected'), 'workspace', 'users/icon.png', 'v1r1', '', 'UM');
|
extensions_add_operation_menu_option(__('Users connected'), 'workspace', 'users/icon.png', 'v1r1', null, 'UM');
|
||||||
|
|
||||||
extensions_add_godmode_function('users_extension_main_god');
|
extensions_add_godmode_function('users_extension_main_god');
|
||||||
extensions_add_main_function('users_extension_main');
|
extensions_add_main_function('users_extension_main');
|
||||||
|
@ -112,3 +112,5 @@ enterprise/include/ajax/map_enterprise.ajax.php
|
|||||||
enterprise/include/javascript/SimpleMapController.js
|
enterprise/include/javascript/SimpleMapController.js
|
||||||
enterprise/include/javascript/tooltipster.bundle.min.js
|
enterprise/include/javascript/tooltipster.bundle.min.js
|
||||||
enterprise/include/styles/tooltipster.bundle.min.css
|
enterprise/include/styles/tooltipster.bundle.min.css
|
||||||
|
mobile/include/javascript/jquery.mobile-1.3.1.js
|
||||||
|
mobile/include/style/jquery.mobile-1.3.1.css
|
@ -25,4 +25,6 @@ UPDATE `talert_special_days` set `day_code` = 7 WHERE `same_day` = 'sunday';
|
|||||||
ALTER TABLE `talert_special_days` DROP COLUMN `same_day`;
|
ALTER TABLE `talert_special_days` DROP COLUMN `same_day`;
|
||||||
ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `talert_calendar`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `talert_calendar`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `tagent_repository` ADD COLUMN `deployment_timeout` INT UNSIGNED DEFAULT 600 AFTER `path`;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
@ -2683,6 +2683,7 @@ CREATE TABLE `tagent_repository` (
|
|||||||
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
||||||
`version` VARCHAR(10) DEFAULT '',
|
`version` VARCHAR(10) DEFAULT '',
|
||||||
`path` text,
|
`path` text,
|
||||||
|
`deployment_timeout` INT UNSIGNED DEFAULT 600,
|
||||||
`uploaded_by` VARCHAR(100) DEFAULT '',
|
`uploaded_by` VARCHAR(100) DEFAULT '',
|
||||||
`uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded",
|
`uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded",
|
||||||
`last_err` text,
|
`last_err` text,
|
||||||
|
@ -64,6 +64,8 @@ $data['monitor_critical'] = (int) $all_data['_monitors_critical_'];
|
|||||||
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
||||||
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
||||||
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
||||||
|
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
||||||
|
|
||||||
|
|
||||||
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
||||||
|
|
||||||
|
@ -341,6 +341,7 @@ if (isset($groups[$grupo]) || $new_agent) {
|
|||||||
'selected' => $grupo,
|
'selected' => $grupo,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'privilege' => 'AW',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -196,6 +196,13 @@ if ($create_agent) {
|
|||||||
|
|
||||||
$nombre_agente = hash('sha256', $alias.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000)));
|
$nombre_agente = hash('sha256', $alias.'|'.$direccion_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000)));
|
||||||
$grupo = (int) get_parameter_post('grupo');
|
$grupo = (int) get_parameter_post('grupo');
|
||||||
|
|
||||||
|
if ((bool) check_acl($config['id_user'], $grupo, 'AW') === false) {
|
||||||
|
db_pandora_audit('ACL Violation', 'Trying to access agent manager');
|
||||||
|
include $config['homedir'].'/general/noaccess.php';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$intervalo = (string) get_parameter_post('intervalo', SECONDS_5MINUTES);
|
$intervalo = (string) get_parameter_post('intervalo', SECONDS_5MINUTES);
|
||||||
$comentarios = (string) get_parameter_post('comentarios', '');
|
$comentarios = (string) get_parameter_post('comentarios', '');
|
||||||
$modo = (int) get_parameter_post('modo');
|
$modo = (int) get_parameter_post('modo');
|
||||||
@ -990,6 +997,8 @@ if ($update_agent) {
|
|||||||
$cps = get_parameter_switch('cps', -1);
|
$cps = get_parameter_switch('cps', -1);
|
||||||
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
|
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
|
||||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||||
|
$secondary_groups = (string) get_parameter('secondary_hidden', '');
|
||||||
|
|
||||||
|
|
||||||
if ($fields === false) {
|
if ($fields === false) {
|
||||||
$fields = [];
|
$fields = [];
|
||||||
@ -1219,7 +1228,16 @@ if ($update_agent) {
|
|||||||
"Quiet":"'.(int) $quiet.'",
|
"Quiet":"'.(int) $quiet.'",
|
||||||
"Cps":"'.(int) $cps.'"}';
|
"Cps":"'.(int) $cps.'"}';
|
||||||
|
|
||||||
enterprise_hook('update_agent', [$id_agente]);
|
// Create the secondary groups.
|
||||||
|
enterprise_hook(
|
||||||
|
'agents_update_secondary_groups',
|
||||||
|
[
|
||||||
|
$id_agente,
|
||||||
|
explode(',', $secondary_groups),
|
||||||
|
[],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
ui_print_success_message(__('Successfully updated'));
|
ui_print_success_message(__('Successfully updated'));
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
'Agent management',
|
'Agent management',
|
||||||
|
@ -237,7 +237,7 @@ $create_ticket_command_id = db_get_value('id', 'talert_commands', 'name', io_saf
|
|||||||
|
|
||||||
$sql_exclude_command_id = '';
|
$sql_exclude_command_id = '';
|
||||||
|
|
||||||
if ($config['integria_enabled'] == 0 && $create_ticket_command_id !== false) {
|
if (!is_metaconsole() && $config['integria_enabled'] == 0 && $create_ticket_command_id !== false) {
|
||||||
$sql_exclude_command_id = ' AND id <> '.$create_ticket_command_id;
|
$sql_exclude_command_id = ' AND id <> '.$create_ticket_command_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,6 +597,7 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
$("#id_command").change (function () {
|
$("#id_command").change (function () {
|
||||||
values = Array ();
|
values = Array ();
|
||||||
|
// No se envia el valor del commando.
|
||||||
values.push({
|
values.push({
|
||||||
name: "page",
|
name: "page",
|
||||||
value: "godmode/alerts/alert_commands"});
|
value: "godmode/alerts/alert_commands"});
|
||||||
|
@ -60,7 +60,7 @@ if (check_acl($config['id_user'], 0, 'AR')
|
|||||||
|
|
||||||
// Add to menu.
|
// Add to menu.
|
||||||
$menu_godmode['discovery']['text'] = __('Discovery');
|
$menu_godmode['discovery']['text'] = __('Discovery');
|
||||||
$menu_godmode['discovery']['sec2'] = 'godmode/servers/discovery';
|
$menu_godmode['discovery']['sec2'] = '';
|
||||||
$menu_godmode['discovery']['id'] = 'god-discovery';
|
$menu_godmode['discovery']['id'] = 'god-discovery';
|
||||||
$menu_godmode['discovery']['sub'] = $sub;
|
$menu_godmode['discovery']['sub'] = $sub;
|
||||||
}
|
}
|
||||||
@ -254,20 +254,20 @@ if (check_acl($config['id_user'], 0, 'LW')
|
|||||||
$sub = [];
|
$sub = [];
|
||||||
if (check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM')) {
|
if (check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM')) {
|
||||||
// Custom event fields
|
// Custom event fields
|
||||||
$sub['godmode/events/events&section=filter']['text'] = __('Event filters');
|
$sub['godmode/events/events§ion=filter']['text'] = __('Event filters');
|
||||||
$sub['godmode/events/events&section=filter']['id'] = 'Event filters';
|
$sub['godmode/events/events§ion=filter']['id'] = 'Event filters';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl($config['id_user'], 0, 'PM')) {
|
if (check_acl($config['id_user'], 0, 'PM')) {
|
||||||
$sub['godmode/events/events&section=fields']['text'] = __('Custom events');
|
$sub['godmode/events/events§ion=fields']['text'] = __('Custom events');
|
||||||
$sub['godmode/events/events&section=fields']['id'] = 'Custom events';
|
$sub['godmode/events/events§ion=fields']['id'] = 'Custom events';
|
||||||
$sub['godmode/events/events&section=responses']['text'] = __('Event responses');
|
$sub['godmode/events/events§ion=responses']['text'] = __('Event responses');
|
||||||
$sub['godmode/events/events&section=responses']['id'] = 'Event responses';
|
$sub['godmode/events/events§ion=responses']['id'] = 'Event responses';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($sub)) {
|
if (!empty($sub)) {
|
||||||
$menu_godmode['geventos']['text'] = __('Events');
|
$menu_godmode['geventos']['text'] = __('Events');
|
||||||
$menu_godmode['geventos']['sec2'] = 'godmode/events/events&section=filter';
|
$menu_godmode['geventos']['sec2'] = 'godmode/events/events§ion=filter';
|
||||||
$menu_godmode['geventos']['id'] = 'god-events';
|
$menu_godmode['geventos']['id'] = 'god-events';
|
||||||
$menu_godmode['geventos']['sub'] = $sub;
|
$menu_godmode['geventos']['sub'] = $sub;
|
||||||
}
|
}
|
||||||
@ -307,7 +307,7 @@ if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, '
|
|||||||
if (check_acl($config['id_user'], 0, 'PM')) {
|
if (check_acl($config['id_user'], 0, 'PM')) {
|
||||||
// Setup
|
// Setup
|
||||||
$menu_godmode['gsetup']['text'] = __('Setup');
|
$menu_godmode['gsetup']['text'] = __('Setup');
|
||||||
$menu_godmode['gsetup']['sec2'] = 'godmode/setup/setup§ion=general';
|
$menu_godmode['gsetup']['sec2'] = 'general';
|
||||||
$menu_godmode['gsetup']['id'] = 'god-setup';
|
$menu_godmode['gsetup']['id'] = 'god-setup';
|
||||||
|
|
||||||
$sub = [];
|
$sub = [];
|
||||||
@ -319,50 +319,50 @@ if (check_acl($config['id_user'], 0, 'PM')) {
|
|||||||
$sub['general']['subtype'] = 'nolink';
|
$sub['general']['subtype'] = 'nolink';
|
||||||
$sub2 = [];
|
$sub2 = [];
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=general']['text'] = __('General Setup');
|
$sub2['godmode/setup/setup§ion=general']['text'] = __('General Setup');
|
||||||
$sub2['godmode/setup/setup&section=general']['id'] = 'General Setup';
|
$sub2['godmode/setup/setup§ion=general']['id'] = 'General Setup';
|
||||||
$sub2['godmode/setup/setup&section=general']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=general']['refr'] = 0;
|
||||||
|
|
||||||
enterprise_hook('password_submenu');
|
enterprise_hook('password_submenu');
|
||||||
enterprise_hook('enterprise_submenu');
|
enterprise_hook('enterprise_submenu');
|
||||||
enterprise_hook('historydb_submenu');
|
enterprise_hook('historydb_submenu');
|
||||||
enterprise_hook('log_collector_submenu');
|
enterprise_hook('log_collector_submenu');
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=auth']['text'] = __('Authentication');
|
$sub2['godmode/setup/setup§ion=auth']['text'] = __('Authentication');
|
||||||
$sub2['godmode/setup/setup&section=auth']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=auth']['refr'] = 0;
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=perf']['text'] = __('Performance');
|
$sub2['godmode/setup/setup§ion=perf']['text'] = __('Performance');
|
||||||
$sub2['godmode/setup/setup&section=perf']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=perf']['refr'] = 0;
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=vis']['text'] = __('Visual styles');
|
$sub2['godmode/setup/setup§ion=vis']['text'] = __('Visual styles');
|
||||||
$sub2['godmode/setup/setup&section=vis']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=vis']['refr'] = 0;
|
||||||
|
|
||||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||||
if ($config['activate_netflow']) {
|
if ($config['activate_netflow']) {
|
||||||
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
|
$sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow');
|
||||||
$sub2['godmode/setup/setup&section=net']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=net']['refr'] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=ehorus']['text'] = __('eHorus');
|
$sub2['godmode/setup/setup§ion=ehorus']['text'] = __('eHorus');
|
||||||
$sub2['godmode/setup/setup&section=ehorus']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=ehorus']['refr'] = 0;
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=integria']['text'] = __('Integria IMS');
|
$sub2['godmode/setup/setup§ion=integria']['text'] = __('Integria IMS');
|
||||||
$sub2['godmode/setup/setup&section=integria']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=integria']['refr'] = 0;
|
||||||
|
|
||||||
enterprise_hook('module_library_submenu');
|
enterprise_hook('module_library_submenu');
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=notifications']['text'] = __('Notifications');
|
$sub2['godmode/setup/setup§ion=notifications']['text'] = __('Notifications');
|
||||||
$sub2['godmode/setup/setup&section=notifications']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=notifications']['refr'] = 0;
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=websocket_engine']['text'] = __('Websocket Engine');
|
$sub2['godmode/setup/setup§ion=websocket_engine']['text'] = __('Websocket Engine');
|
||||||
$sub2['godmode/setup/setup&section=websocket_engine']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=websocket_engine']['refr'] = 0;
|
||||||
|
|
||||||
$sub2['godmode/setup/setup&section=external_tools']['text'] = __('External Tools');
|
$sub2['godmode/setup/setup§ion=external_tools']['text'] = __('External Tools');
|
||||||
$sub2['godmode/setup/setup&section=external_tools']['refr'] = 0;
|
$sub2['godmode/setup/setup§ion=external_tools']['refr'] = 0;
|
||||||
|
|
||||||
if ($config['activate_gis']) {
|
if ($config['activate_gis']) {
|
||||||
$sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS');
|
$sub2['godmode/setup/setup§ion=gis']['text'] = __('Map conections GIS');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub['general']['sub2'] = $sub2;
|
$sub['general']['sub2'] = $sub2;
|
||||||
@ -462,9 +462,9 @@ if (is_array($config['extensions'])) {
|
|||||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
||||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||||
if ($extmenu['name'] == 'Cron jobs') {
|
if ($extmenu['name'] == 'Cron jobs') {
|
||||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'extensions';
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||||
} else {
|
} else {
|
||||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'gextensions';
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
||||||
@ -525,8 +525,8 @@ $menu_godmode['links']['sub'] = $sub;
|
|||||||
// Update Manager
|
// Update Manager
|
||||||
if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager']) {
|
if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager']) {
|
||||||
$menu_godmode['messages']['text'] = __('Update manager');
|
$menu_godmode['messages']['text'] = __('Update manager');
|
||||||
$menu_godmode['messages']['sec2'] = '';
|
|
||||||
$menu_godmode['messages']['id'] = 'god-um_messages';
|
$menu_godmode['messages']['id'] = 'god-um_messages';
|
||||||
|
$menu_godmode['messages']['sec2'] = '';
|
||||||
|
|
||||||
$sub = [];
|
$sub = [];
|
||||||
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
|
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
|
||||||
@ -543,7 +543,6 @@ if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager'])
|
|||||||
// Module library.
|
// Module library.
|
||||||
if (check_acl($config['id_user'], 0, 'AR')) {
|
if (check_acl($config['id_user'], 0, 'AR')) {
|
||||||
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
||||||
$menu_godmode['gmodule_library']['sec2'] = 'godmode/module_library/module_library_view';
|
|
||||||
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
||||||
|
|
||||||
$sub = [];
|
$sub = [];
|
||||||
|
@ -581,7 +581,7 @@ if ($is_management_allowed === true && $multiple_delete) {
|
|||||||
$id = 0;
|
$id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id || $new_component
|
if ((bool) $id !== false || $new_component
|
||||||
|| $create_network_from_module
|
|| $create_network_from_module
|
||||||
|| $create_network_from_snmp_browser
|
|| $create_network_from_snmp_browser
|
||||||
) {
|
) {
|
||||||
@ -598,6 +598,7 @@ $url = ui_get_url_refresh(
|
|||||||
'offset' => false,
|
'offset' => false,
|
||||||
'search_string' => $search_string,
|
'search_string' => $search_string,
|
||||||
'search_id_group' => $search_id_group,
|
'search_id_group' => $search_id_group,
|
||||||
|
'id' => $id,
|
||||||
],
|
],
|
||||||
true,
|
true,
|
||||||
false
|
false
|
||||||
|
@ -3505,7 +3505,7 @@ function print_SLA_list($width, $action, $idItem=null)
|
|||||||
<tr id="sla_template" class="datos">
|
<tr id="sla_template" class="datos">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<?php
|
<?php
|
||||||
echo __('Please save the SLA for start to add items in this list.');
|
echo __('Please save the item before adding entries to this list.');
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1970,9 +1970,11 @@ switch ($action) {
|
|||||||
);
|
);
|
||||||
$values['id_group'] = get_parameter('combo_group');
|
$values['id_group'] = get_parameter('combo_group');
|
||||||
|
|
||||||
|
if ($values['server_name'] == '') {
|
||||||
$values['server_name'] = get_parameter(
|
$values['server_name'] = get_parameter(
|
||||||
'combo_server'
|
'combo_server'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ((($values['type'] == 'custom_graph')
|
if ((($values['type'] == 'custom_graph')
|
||||||
|| ($values['type'] == 'automatic_custom_graph'))
|
|| ($values['type'] == 'automatic_custom_graph'))
|
||||||
|
@ -204,6 +204,15 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||||
|
case CIRCULAR_PROGRESS_BAR:
|
||||||
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
|
'images/percentile_item.png',
|
||||||
|
true,
|
||||||
|
['title' => __('Percentile')]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
case MODULE_GRAPH:
|
case MODULE_GRAPH:
|
||||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
'images/chart_curve.png',
|
'images/chart_curve.png',
|
||||||
@ -306,6 +315,16 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NETWORK_LINK:
|
case NETWORK_LINK:
|
||||||
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
|
'images/network_link_item.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Network link'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
$table->data[($i + 1)]['icon'] = html_print_image(
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
'images/line_item.png',
|
'images/line_item.png',
|
||||||
@ -325,6 +344,30 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case BASIC_CHART:
|
||||||
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
|
'images/basic_chart.png',
|
||||||
|
true,
|
||||||
|
['title' => __('Basic chart')]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ODOMETER:
|
||||||
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
|
'images/odometer.png',
|
||||||
|
true,
|
||||||
|
['title' => __('Odometer')]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CLOCK:
|
||||||
|
$table->data[($i + 1)]['icon'] = html_print_image(
|
||||||
|
'images/clock-tab.png',
|
||||||
|
true,
|
||||||
|
['title' => __('Clock')]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData);
|
$table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData);
|
||||||
@ -394,6 +437,13 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
|
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CIRCULAR_PROGRESS_BAR:
|
||||||
|
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||||
|
case PERCENTILE_BUBBLE:
|
||||||
|
case PERCENTILE_BAR:
|
||||||
|
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true);
|
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true);
|
||||||
break;
|
break;
|
||||||
@ -478,6 +528,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
case LABEL:
|
case LABEL:
|
||||||
case NETWORK_LINK:
|
case NETWORK_LINK:
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
|
case CLOCK:
|
||||||
$table->data[($i + 2)][0] = '';
|
$table->data[($i + 2)][0] = '';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -520,7 +571,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']);
|
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) {
|
if ($layoutData['id_custom_graph'] != 0) {
|
||||||
$table->data[($i + 2)][0] = __('Custom graph');
|
$table->data[($i + 2)][0] = __('Custom graph');
|
||||||
} else {
|
} else {
|
||||||
$table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params);
|
$table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params);
|
||||||
@ -540,6 +591,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
case NETWORK_LINK:
|
case NETWORK_LINK:
|
||||||
case LINE_ITEM:
|
case LINE_ITEM:
|
||||||
case GROUP_ITEM:
|
case GROUP_ITEM:
|
||||||
|
case CLOCK:
|
||||||
$table->data[($i + 2)][1] = '';
|
$table->data[($i + 2)][1] = '';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -569,7 +621,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||||||
|
|
||||||
$modules = io_safe_output($modules);
|
$modules = io_safe_output($modules);
|
||||||
|
|
||||||
if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) {
|
if ($layoutData['id_custom_graph'] != 0) {
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole()) {
|
||||||
$graphs = [];
|
$graphs = [];
|
||||||
$graphs = metaconsole_get_custom_graphs(true);
|
$graphs = metaconsole_get_custom_graphs(true);
|
||||||
|
@ -433,7 +433,10 @@ switch ($activeTab) {
|
|||||||
$idsElements = db_get_all_rows_filter(
|
$idsElements = db_get_all_rows_filter(
|
||||||
'tlayout_data',
|
'tlayout_data',
|
||||||
['id_layout' => $idVisualConsole],
|
['id_layout' => $idVisualConsole],
|
||||||
['id']
|
[
|
||||||
|
'id',
|
||||||
|
'type',
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($idsElements === false) {
|
if ($idsElements === false) {
|
||||||
@ -449,18 +452,33 @@ switch ($activeTab) {
|
|||||||
$values['height'] = get_parameter('height_'.$id, 0);
|
$values['height'] = get_parameter('height_'.$id, 0);
|
||||||
$values['pos_x'] = get_parameter('left_'.$id, 0);
|
$values['pos_x'] = get_parameter('left_'.$id, 0);
|
||||||
$values['pos_y'] = get_parameter('top_'.$id, 0);
|
$values['pos_y'] = get_parameter('top_'.$id, 0);
|
||||||
$type = db_get_value('type', 'tlayout_data', 'id', $id);
|
switch ($idElement['type']) {
|
||||||
switch ($type) {
|
case NETWORK_LINK:
|
||||||
case MODULE_GRAPH:
|
case LINE_ITEM:
|
||||||
|
continue 2;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case SIMPLE_VALUE_MAX:
|
case SIMPLE_VALUE_MAX:
|
||||||
case SIMPLE_VALUE_MIN:
|
case SIMPLE_VALUE_MIN:
|
||||||
case SIMPLE_VALUE_AVG:
|
case SIMPLE_VALUE_AVG:
|
||||||
$values['period'] = get_parameter('period_'.$id, 0);
|
$values['period'] = get_parameter('period_'.$id, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MODULE_GRAPH:
|
||||||
|
$values['period'] = get_parameter('period_'.$id, 0);
|
||||||
|
unset($values['image']);
|
||||||
|
break;
|
||||||
|
|
||||||
case GROUP_ITEM:
|
case GROUP_ITEM:
|
||||||
$values['id_group'] = get_parameter('group_'.$id, 0);
|
$values['id_group'] = get_parameter('group_'.$id, 0);
|
||||||
$values['show_statistics'] = get_parameter('show_statistics', 0);
|
break;
|
||||||
|
|
||||||
|
case CIRCULAR_PROGRESS_BAR:
|
||||||
|
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||||
|
case PERCENTILE_BUBBLE:
|
||||||
|
case PERCENTILE_BAR:
|
||||||
|
unset($values['height']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1513,7 +1513,7 @@ $(document).ready (function () {
|
|||||||
$('#table_macros-field' + i)
|
$('#table_macros-field' + i)
|
||||||
.removeAttr('class');
|
.removeAttr('class');
|
||||||
|
|
||||||
$("[name=field" + i + "_value]").val(old_value);
|
$("[name=field" + i + "_value]").val(old_value).trigger('change');
|
||||||
$('#table_macros-field').show();
|
$('#table_macros-field').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* * Configure profiles.
|
||||||
|
*
|
||||||
|
* @category Profiles
|
||||||
|
* @package Pandora FMS
|
||||||
|
* @subpackage Community
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Pandora FMS - http://pandorafms.com
|
||||||
|
* ==================================================
|
||||||
|
* 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
|
// Global variables.
|
||||||
// ==================================================
|
|
||||||
// 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.
|
|
||||||
// Global variables
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
@ -32,7 +43,7 @@ enterprise_include_once('meta/include/functions_users_meta.php');
|
|||||||
$tab = get_parameter('tab', 'profile');
|
$tab = get_parameter('tab', 'profile');
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
|
|
||||||
// Header
|
// Header.
|
||||||
if (!is_metaconsole()) {
|
if (!is_metaconsole()) {
|
||||||
$buttons = [
|
$buttons = [
|
||||||
'user' => [
|
'user' => [
|
||||||
@ -79,46 +90,46 @@ if (!is_metaconsole()) {
|
|||||||
$new_profile = (bool) get_parameter('new_profile');
|
$new_profile = (bool) get_parameter('new_profile');
|
||||||
$id_profile = (int) get_parameter('id');
|
$id_profile = (int) get_parameter('id');
|
||||||
|
|
||||||
// Edit profile
|
// Edit profile.
|
||||||
if ($id_profile || $new_profile) {
|
if ($id_profile || $new_profile) {
|
||||||
if ($new_profile) {
|
if ($new_profile) {
|
||||||
// Name
|
// Name.
|
||||||
$name = '';
|
$name = '';
|
||||||
|
|
||||||
// Agents
|
// Agents.
|
||||||
$agent_view = 0;
|
$agent_view = 0;
|
||||||
$agent_edit = 0;
|
$agent_edit = 0;
|
||||||
$agent_disable = 0;
|
$agent_disable = 0;
|
||||||
|
|
||||||
// Alerts
|
// Alerts.
|
||||||
$alert_edit = 0;
|
$alert_edit = 0;
|
||||||
$alert_management = 0;
|
$alert_management = 0;
|
||||||
|
|
||||||
// Users
|
// Users.
|
||||||
$user_management = 0;
|
$user_management = 0;
|
||||||
|
|
||||||
// DB
|
// DB.
|
||||||
$db_management = 0;
|
$db_management = 0;
|
||||||
|
|
||||||
// Pandora
|
// Pandora.
|
||||||
$pandora_management = 0;
|
$pandora_management = 0;
|
||||||
|
|
||||||
// Events
|
// Events.
|
||||||
$event_view = 0;
|
$event_view = 0;
|
||||||
$event_edit = 0;
|
$event_edit = 0;
|
||||||
$event_management = 0;
|
$event_management = 0;
|
||||||
|
|
||||||
// Reports
|
// Reports.
|
||||||
$report_view = 0;
|
$report_view = 0;
|
||||||
$report_edit = 0;
|
$report_edit = 0;
|
||||||
$report_management = 0;
|
$report_management = 0;
|
||||||
|
|
||||||
// Network maps
|
// Network maps.
|
||||||
$map_view = 0;
|
$map_view = 0;
|
||||||
$map_edit = 0;
|
$map_edit = 0;
|
||||||
$map_management = 0;
|
$map_management = 0;
|
||||||
|
|
||||||
// Visual console
|
// Visual console.
|
||||||
$vconsole_view = 0;
|
$vconsole_view = 0;
|
||||||
$vconsole_edit = 0;
|
$vconsole_edit = 0;
|
||||||
$vconsole_management = 0;
|
$vconsole_management = 0;
|
||||||
@ -145,43 +156,43 @@ if ($id_profile || $new_profile) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name
|
// Name.
|
||||||
$name = $profile['name'];
|
$name = $profile['name'];
|
||||||
|
|
||||||
// Agents
|
// Agents.
|
||||||
$agent_view = (bool) $profile['agent_view'];
|
$agent_view = (bool) $profile['agent_view'];
|
||||||
$agent_edit = (bool) $profile['agent_edit'];
|
$agent_edit = (bool) $profile['agent_edit'];
|
||||||
$agent_disable = (bool) $profile['agent_disable'];
|
$agent_disable = (bool) $profile['agent_disable'];
|
||||||
|
|
||||||
// Alerts
|
// Alerts.
|
||||||
$alert_edit = (bool) $profile['alert_edit'];
|
$alert_edit = (bool) $profile['alert_edit'];
|
||||||
$alert_management = (bool) $profile['alert_management'];
|
$alert_management = (bool) $profile['alert_management'];
|
||||||
|
|
||||||
// Users
|
// Users.
|
||||||
$user_management = (bool) $profile['user_management'];
|
$user_management = (bool) $profile['user_management'];
|
||||||
|
|
||||||
// DB
|
// DB.
|
||||||
$db_management = (bool) $profile['db_management'];
|
$db_management = (bool) $profile['db_management'];
|
||||||
|
|
||||||
// Pandora
|
// Pandora.
|
||||||
$pandora_management = (bool) $profile['pandora_management'];
|
$pandora_management = (bool) $profile['pandora_management'];
|
||||||
|
|
||||||
// Events
|
// Events.
|
||||||
$event_view = (bool) $profile['event_view'];
|
$event_view = (bool) $profile['event_view'];
|
||||||
$event_edit = (bool) $profile['event_edit'];
|
$event_edit = (bool) $profile['event_edit'];
|
||||||
$event_management = (bool) $profile['event_management'];
|
$event_management = (bool) $profile['event_management'];
|
||||||
|
|
||||||
// Reports
|
// Reports.
|
||||||
$report_view = (bool) $profile['report_view'];
|
$report_view = (bool) $profile['report_view'];
|
||||||
$report_edit = (bool) $profile['report_edit'];
|
$report_edit = (bool) $profile['report_edit'];
|
||||||
$report_management = (bool) $profile['report_management'];
|
$report_management = (bool) $profile['report_management'];
|
||||||
|
|
||||||
// Network maps
|
// Network maps.
|
||||||
$map_view = (bool) $profile['map_view'];
|
$map_view = (bool) $profile['map_view'];
|
||||||
$map_edit = (bool) $profile['map_edit'];
|
$map_edit = (bool) $profile['map_edit'];
|
||||||
$map_management = (bool) $profile['map_management'];
|
$map_management = (bool) $profile['map_management'];
|
||||||
|
|
||||||
// Visual console
|
// Visual console.
|
||||||
$vconsole_view = (bool) $profile['vconsole_view'];
|
$vconsole_view = (bool) $profile['vconsole_view'];
|
||||||
$vconsole_edit = (bool) $profile['vconsole_edit'];
|
$vconsole_edit = (bool) $profile['vconsole_edit'];
|
||||||
$vconsole_management = (bool) $profile['vconsole_management'];
|
$vconsole_management = (bool) $profile['vconsole_management'];
|
||||||
@ -249,14 +260,14 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->style[0] = 'font-weight: bold';
|
$table->style[0] = 'font-weight: bold';
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
|
|
||||||
// Name
|
// Name.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Profile name');
|
$row['name'] = __('Profile name');
|
||||||
$row['input'] = html_print_input_text('name', $name, '', 30, 60, true);
|
$row['input'] = html_print_input_text('name', $name, '', 30, 60, true);
|
||||||
$table->data['name'] = $row;
|
$table->data['name'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Agents
|
// Agents.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View agents');
|
$row['name'] = __('View agents');
|
||||||
$row['input'] = html_print_checkbox('agent_view', 1, $agent_view, true);
|
$row['input'] = html_print_checkbox('agent_view', 1, $agent_view, true);
|
||||||
@ -271,7 +282,7 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->data['AW'] = $row;
|
$table->data['AW'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Alerts
|
// Alerts.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Edit alerts');
|
$row['name'] = __('Edit alerts');
|
||||||
$row['input'] = html_print_checkbox('alert_edit', 1, $alert_edit, true);
|
$row['input'] = html_print_checkbox('alert_edit', 1, $alert_edit, true);
|
||||||
@ -282,7 +293,7 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->data['LM'] = $row;
|
$table->data['LM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Events
|
// Events.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View events');
|
$row['name'] = __('View events');
|
||||||
$row['input'] = html_print_checkbox('event_view', 1, $event_view, true);
|
$row['input'] = html_print_checkbox('event_view', 1, $event_view, true);
|
||||||
@ -297,7 +308,7 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->data['EM'] = $row;
|
$table->data['EM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Reports
|
// Reports.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View reports');
|
$row['name'] = __('View reports');
|
||||||
$row['input'] = html_print_checkbox('report_view', 1, $report_view, true);
|
$row['input'] = html_print_checkbox('report_view', 1, $report_view, true);
|
||||||
@ -312,7 +323,7 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->data['RM'] = $row;
|
$table->data['RM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Network maps
|
// Network maps.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View network maps');
|
$row['name'] = __('View network maps');
|
||||||
$row['input'] = html_print_checkbox('map_view', 1, $map_view, true);
|
$row['input'] = html_print_checkbox('map_view', 1, $map_view, true);
|
||||||
@ -327,7 +338,7 @@ if ($id_profile || $new_profile) {
|
|||||||
$table->data['MM'] = $row;
|
$table->data['MM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Visual console
|
// Visual console.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View visual console');
|
$row['name'] = __('View visual console');
|
||||||
$row['input'] = html_print_checkbox('vconsole_view', 1, $vconsole_view, true);
|
$row['input'] = html_print_checkbox('vconsole_view', 1, $vconsole_view, true);
|
||||||
@ -347,36 +358,36 @@ if ($id_profile || $new_profile) {
|
|||||||
$disable_option = '';
|
$disable_option = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// NCM
|
// NCM.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('View NCM data');
|
$row['name'] = __('View NCM data');
|
||||||
$row['input'] = html_print_checkbox('network_config_view', 1, $network_config_view, true);
|
$row['input'] = html_print_checkbox('network_config_view', 1, $network_config_view, true);
|
||||||
$table->data['VR'] = $row;
|
$table->data['NR'] = $row;
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Operate NCM');
|
$row['name'] = __('Operate NCM');
|
||||||
$row['input'] = html_print_checkbox('network_config_edit', 1, $network_config_edit, true, false, 'autoclick_profile_users(\'network_config_edit\', \'network_config_view\', \'false\')');
|
$row['input'] = html_print_checkbox('network_config_edit', 1, $network_config_edit, true, false, 'autoclick_profile_users(\'network_config_edit\', \'network_config_view\', \'false\')');
|
||||||
$table->data['VW'] = $row;
|
$table->data['NW'] = $row;
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Manage NCM');
|
$row['name'] = __('Manage NCM');
|
||||||
$row['input'] = html_print_checkbox('network_config_management', 1, $network_config_management, true, false, 'autoclick_profile_users(\'network_config_management\', \'network_config_view\', \'network_config_edit\')');
|
$row['input'] = html_print_checkbox('network_config_management', 1, $network_config_management, true, false, 'autoclick_profile_users(\'network_config_management\', \'network_config_view\', \'network_config_edit\')');
|
||||||
$table->data['VM'] = $row;
|
$table->data['NM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Users
|
// Users.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Manage users');
|
$row['name'] = __('Manage users');
|
||||||
$row['input'] = html_print_checkbox('user_management', 1, $user_management, true, false, $disable_option);
|
$row['input'] = html_print_checkbox('user_management', 1, $user_management, true, false, $disable_option);
|
||||||
$table->data['UM'] = $row;
|
$table->data['UM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// DB
|
// DB.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Manage database');
|
$row['name'] = __('Manage database');
|
||||||
$row['input'] = html_print_checkbox('db_management', 1, $db_management, true, false, $disable_option);
|
$row['input'] = html_print_checkbox('db_management', 1, $db_management, true, false, $disable_option);
|
||||||
$table->data['DM'] = $row;
|
$table->data['DM'] = $row;
|
||||||
$table->data[] = '<hr>';
|
$table->data[] = '<hr>';
|
||||||
|
|
||||||
// Pandora
|
// Pandora.
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('%s management', get_product_name());
|
$row['name'] = __('%s management', get_product_name());
|
||||||
$row['input'] = html_print_checkbox('pandora_management', 1, $pandora_management, true, false, $disable_option);
|
$row['input'] = html_print_checkbox('pandora_management', 1, $pandora_management, true, false, $disable_option);
|
||||||
|
@ -140,7 +140,9 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
|
|
||||||
$has_profile = db_get_row('tusuario_perfil', 'id_usuario', $id2);
|
$has_profile = db_get_row('tusuario_perfil', 'id_usuario', $id2);
|
||||||
if ($has_profile == false) {
|
$user_is_global_admin = users_is_admin($id2);
|
||||||
|
|
||||||
|
if ($has_profile === false && $user_is_global_admin === false) {
|
||||||
$result = delete_user($id2);
|
$result = delete_user($id2);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -1544,6 +1546,7 @@ $(document).ready (function () {
|
|||||||
var img_delete = '<?php echo $delete_image; ?>';
|
var img_delete = '<?php echo $delete_image; ?>';
|
||||||
var id_user = '<?php echo io_safe_output($id); ?>';
|
var id_user = '<?php echo io_safe_output($id); ?>';
|
||||||
var is_metaconsole = '<?php echo $meta; ?>';
|
var is_metaconsole = '<?php echo $meta; ?>';
|
||||||
|
var user_is_global_admin = '<?php echo users_is_admin($id); ?>';
|
||||||
var data = [];
|
var data = [];
|
||||||
|
|
||||||
$('input:image[name="add"]').click(function (e) {
|
$('input:image[name="add"]').click(function (e) {
|
||||||
@ -1588,7 +1591,7 @@ $(document).ready (function () {
|
|||||||
$('input:image[name="del"]').click(function (e) {
|
$('input:image[name="del"]').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var rows = $("#table_profiles tr").length;
|
var rows = $("#table_profiles tr").length;
|
||||||
if ((is_metaconsole === '1' && rows <= 4) || (is_metaconsole === '' && rows <= 3)) {
|
if (((is_metaconsole === '1' && rows <= 4) || (is_metaconsole === '' && rows <= 3)) && user_is_global_admin !== '1') {
|
||||||
if (!confirm('<?php echo __('Deleting last profile will delete this user'); ?>' + '. ' + '<?php echo __('Are you sure?'); ?>')) {
|
if (!confirm('<?php echo __('Deleting last profile will delete this user'); ?>' + '. ' + '<?php echo __('Are you sure?'); ?>')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1610,8 +1613,11 @@ $(document).ready (function () {
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
row.remove();
|
row.remove();
|
||||||
var rows = $("#table_profiles tr").length;
|
var rows = $("#table_profiles tr").length;
|
||||||
if ((is_metaconsole === '1' && rows <= 3) || (is_metaconsole === '' && rows <= 2)) {
|
|
||||||
|
if (is_metaconsole === '' && rows <= 2 && user_is_global_admin !== '1') {
|
||||||
window.location.replace("<?php echo ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure=0', false, false, false); ?>");
|
window.location.replace("<?php echo ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/user_list&tab=user&pure=0', false, false, false); ?>");
|
||||||
|
} else if (is_metaconsole === '1' && rows <= 3 && user_is_global_admin !== '1') {
|
||||||
|
window.location.replace("<?php echo ui_get_full_url('index.php?sec=advanced&sec2=advanced/users_setup', false, false, true); ?>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1750,7 +1756,6 @@ function show_double_auth_info () {
|
|||||||
var $dialogContainer = $("div#dialog-double_auth-container");
|
var $dialogContainer = $("div#dialog-double_auth-container");
|
||||||
|
|
||||||
$dialogContainer.html($loadingSpinner);
|
$dialogContainer.html($loadingSpinner);
|
||||||
console.log(userID);
|
|
||||||
// Load the info page
|
// Load the info page
|
||||||
var request = $.ajax({
|
var request = $.ajax({
|
||||||
url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||||
@ -1915,7 +1920,6 @@ function show_double_auth_deactivation () {
|
|||||||
|
|
||||||
},
|
},
|
||||||
success: function(data, textStatus, xhr) {
|
success: function(data, textStatus, xhr) {
|
||||||
console.log(data);
|
|
||||||
if (data === -1) {
|
if (data === -1) {
|
||||||
$dialogContainer.html("<?php echo '<b><div class=\"red\">'.__('Authentication error').'</div></b>'; ?>");
|
$dialogContainer.html("<?php echo '<b><div class=\"red\">'.__('Authentication error').'</div></b>'; ?>");
|
||||||
}
|
}
|
||||||
|
@ -1612,6 +1612,7 @@ if ($get_extended_event) {
|
|||||||
data : {
|
data : {
|
||||||
page: "include/ajax/events",
|
page: "include/ajax/events",
|
||||||
get_comments: 1,
|
get_comments: 1,
|
||||||
|
meta: '.(int) is_metaconsole().',
|
||||||
event: '.json_encode($event).',
|
event: '.json_encode($event).',
|
||||||
},
|
},
|
||||||
dataType : "html",
|
dataType : "html",
|
||||||
|
@ -41,6 +41,8 @@ if ($get_sec_pages) {
|
|||||||
$pages = menu_get_sec_pages($sec, $menu_hash);
|
$pages = menu_get_sec_pages($sec, $menu_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pages = menu_pepare_acl_select_data($pages, $sec);
|
||||||
|
|
||||||
echo json_encode($pages);
|
echo json_encode($pages);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -218,6 +218,11 @@ function process_user_login_remote($login, $pass, $api=false)
|
|||||||
switch ($config['auth']) {
|
switch ($config['auth']) {
|
||||||
// LDAP
|
// LDAP
|
||||||
case 'ldap':
|
case 'ldap':
|
||||||
|
// Use local authentication if user is global admin.
|
||||||
|
if (is_user_admin($login) === true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$sr = ldap_process_user_login($login, $pass);
|
$sr = ldap_process_user_login($login, $pass);
|
||||||
|
|
||||||
if (!$sr) {
|
if (!$sr) {
|
||||||
@ -227,6 +232,11 @@ function process_user_login_remote($login, $pass, $api=false)
|
|||||||
|
|
||||||
// Active Directory
|
// Active Directory
|
||||||
case 'ad':
|
case 'ad':
|
||||||
|
// Use local authentication if user is global admin.
|
||||||
|
if (is_user_admin($login) === true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (enterprise_hook('ad_process_user_login', [$login, $pass]) === false) {
|
if (enterprise_hook('ad_process_user_login', [$login, $pass]) === false) {
|
||||||
$config['auth_error'] = 'User not found in database or incorrect password';
|
$config['auth_error'] = 'User not found in database or incorrect password';
|
||||||
return false;
|
return false;
|
||||||
@ -780,7 +790,7 @@ function ldap_process_user_login($login, $password)
|
|||||||
io_safe_output($config['ldap_base_dn']),
|
io_safe_output($config['ldap_base_dn']),
|
||||||
$config['ldap_login_attr'],
|
$config['ldap_login_attr'],
|
||||||
io_safe_output($config['ldap_admin_login']),
|
io_safe_output($config['ldap_admin_login']),
|
||||||
io_safe_output($config['ldap_admin_pass']),
|
io_output_password($config['ldap_admin_pass']),
|
||||||
io_safe_output($login)
|
io_safe_output($login)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -804,7 +814,7 @@ function ldap_process_user_login($login, $password)
|
|||||||
} else {
|
} else {
|
||||||
// PHP LDAP function
|
// PHP LDAP function
|
||||||
if ($config['ldap_admin_login'] != '' && $config['ldap_admin_pass'] != '') {
|
if ($config['ldap_admin_login'] != '' && $config['ldap_admin_pass'] != '') {
|
||||||
if (!@ldap_bind($ds, io_safe_output($config['ldap_admin_login']), $config['ldap_admin_pass'])) {
|
if (!@ldap_bind($ds, io_safe_output($config['ldap_admin_login']), io_output_password($config['ldap_admin_pass']))) {
|
||||||
$config['auth_error'] = 'Admin ldap connection fail';
|
$config['auth_error'] = 'Admin ldap connection fail';
|
||||||
@ldap_close($ds);
|
@ldap_close($ds);
|
||||||
return false;
|
return false;
|
||||||
|
@ -2423,7 +2423,8 @@ class AgentWizard extends HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get current value.
|
// Get current value.
|
||||||
if (in_array(
|
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
|
|| in_array(
|
||||||
$moduleData['module_type'],
|
$moduleData['module_type'],
|
||||||
[
|
[
|
||||||
MODULE_TYPE_REMOTE_SNMP,
|
MODULE_TYPE_REMOTE_SNMP,
|
||||||
@ -2433,8 +2434,10 @@ class AgentWizard extends HTML
|
|||||||
]
|
]
|
||||||
) === true
|
) === true
|
||||||
) {
|
) {
|
||||||
|
if (isset($moduleData['value']) === true) {
|
||||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// It unit of measure have data, attach to current value.
|
// It unit of measure have data, attach to current value.
|
||||||
if (empty($moduleData['module_unit']) === false) {
|
if (empty($moduleData['module_unit']) === false) {
|
||||||
@ -2593,7 +2596,8 @@ class AgentWizard extends HTML
|
|||||||
// Get current value.
|
// Get current value.
|
||||||
$currentValue = '';
|
$currentValue = '';
|
||||||
|
|
||||||
if (in_array(
|
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
|
|| in_array(
|
||||||
$moduleData['module_type'],
|
$moduleData['module_type'],
|
||||||
[
|
[
|
||||||
MODULE_TYPE_REMOTE_SNMP,
|
MODULE_TYPE_REMOTE_SNMP,
|
||||||
@ -2603,8 +2607,10 @@ class AgentWizard extends HTML
|
|||||||
]
|
]
|
||||||
) === true
|
) === true
|
||||||
) {
|
) {
|
||||||
|
if (isset($moduleData['value']) === true) {
|
||||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Format current value with thousands and decimals.
|
// Format current value with thousands and decimals.
|
||||||
if (is_numeric($currentValue) === true) {
|
if (is_numeric($currentValue) === true) {
|
||||||
@ -3461,7 +3467,7 @@ class AgentWizard extends HTML
|
|||||||
} else {
|
} else {
|
||||||
preg_match('/\.\d+$/', $key, $index);
|
preg_match('/\.\d+$/', $key, $index);
|
||||||
$tmp = explode(': ', $oid_unit);
|
$tmp = explode(': ', $oid_unit);
|
||||||
$output[$index[0]] = ($tmp[1] ?? '');
|
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,9 @@ class AgentsAlerts extends HTML
|
|||||||
// Refresh rate.
|
// Refresh rate.
|
||||||
$this->refreshSelectedRate = (string) get_parameter('refresh-rate', '30');
|
$this->refreshSelectedRate = (string) get_parameter('refresh-rate', '30');
|
||||||
// Show Modules without alerts table.
|
// Show Modules without alerts table.
|
||||||
$this->showWithoutAlertModules = isset($_POST['show-modules-without-alerts']);
|
$this->showWithoutAlertModules = (isset($_POST['show-modules-without-alerts']))
|
||||||
|
? true
|
||||||
|
: isset($_GET['show-modules-without-alerts']);
|
||||||
// Selected group.
|
// Selected group.
|
||||||
$this->groupId = (int) get_parameter('group-id', 0);
|
$this->groupId = (int) get_parameter('group-id', 0);
|
||||||
// Create alert token.
|
// Create alert token.
|
||||||
@ -200,6 +202,8 @@ class AgentsAlerts extends HTML
|
|||||||
*/
|
*/
|
||||||
private function createAlertTable()
|
private function createAlertTable()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
|
|
||||||
if ($this->groupId > 0) {
|
if ($this->groupId > 0) {
|
||||||
@ -219,7 +223,7 @@ class AgentsAlerts extends HTML
|
|||||||
$sql = 'SELECT tagente.alias, tagente_modulo.nombre,
|
$sql = 'SELECT tagente.alias, tagente_modulo.nombre,
|
||||||
tagente_modulo.id_agente_modulo FROM tagente_modulo
|
tagente_modulo.id_agente_modulo FROM tagente_modulo
|
||||||
INNER JOIN tagente ON tagente.id_agente = tagente_modulo.id_agente
|
INNER JOIN tagente ON tagente.id_agente = tagente_modulo.id_agente
|
||||||
WHERE id_agente_modulo NOT IN (SELECT id_agent_module FROM talert_template_modules) '.$grupo.' LIMIT 20 OFFSET '.$offset_modules;
|
WHERE id_agente_modulo NOT IN (SELECT id_agent_module FROM talert_template_modules) '.$grupo.' LIMIT '.$config['block_size'].' OFFSET '.$offset_modules;
|
||||||
|
|
||||||
$agent_modules = db_get_all_rows_sql($sql);
|
$agent_modules = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
@ -227,7 +231,7 @@ class AgentsAlerts extends HTML
|
|||||||
$count_agent_module[0]['COUNT(tagente_modulo.nombre)'],
|
$count_agent_module[0]['COUNT(tagente_modulo.nombre)'],
|
||||||
ui_get_url_refresh(),
|
ui_get_url_refresh(),
|
||||||
0,
|
0,
|
||||||
0,
|
false,
|
||||||
false,
|
false,
|
||||||
'offset',
|
'offset',
|
||||||
true,
|
true,
|
||||||
@ -831,6 +835,7 @@ class AgentsAlerts extends HTML
|
|||||||
'arguments' => [
|
'arguments' => [
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'return' => true,
|
'return' => true,
|
||||||
|
'label' => '',
|
||||||
'name' => 'pure',
|
'name' => 'pure',
|
||||||
'attributes' => 'class="full_screen_button '.$screenSwitchClass.'" title="'.$screenSwitchTitle.'"',
|
'attributes' => 'class="full_screen_button '.$screenSwitchClass.'" title="'.$screenSwitchTitle.'"',
|
||||||
],
|
],
|
||||||
|
@ -52,6 +52,12 @@ class ConsoleSupervisor
|
|||||||
*/
|
*/
|
||||||
public const MIN_PERFORMANCE_MODULES = 100;
|
public const MIN_PERFORMANCE_MODULES = 100;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum queued elements in synchronization queue to be warned..
|
||||||
|
*/
|
||||||
|
public const MIN_SYNC_QUEUE_LENGTH = 200;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show if console supervisor is enabled or not.
|
* Show if console supervisor is enabled or not.
|
||||||
*
|
*
|
||||||
@ -242,6 +248,16 @@ class ConsoleSupervisor
|
|||||||
|
|
||||||
$this->checkAuditLogOldLocation();
|
$this->checkAuditLogOldLocation();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Checks if sync queue is longer than limits.
|
||||||
|
* NOTIF.SYNCQUEUE.LENGTH
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$this->checkSyncQueueLength();
|
||||||
|
$this->checkSyncQueueStatus();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -492,6 +508,16 @@ class ConsoleSupervisor
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$this->checkAuditLogOldLocation();
|
$this->checkAuditLogOldLocation();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Checks if sync queue is longer than limits.
|
||||||
|
* NOTIF.SYNCQUEUE.LENGTH
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$this->checkSyncQueueLength();
|
||||||
|
$this->checkSyncQueueStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2684,4 +2710,117 @@ class ConsoleSupervisor
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verifies the status of synchronization queue and warns if something is
|
||||||
|
* not working as expected.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function checkSyncQueueLength()
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if (is_metaconsole() !== true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer();
|
||||||
|
$counts = $sync->getQueues(true);
|
||||||
|
|
||||||
|
if (count($counts) === 0) {
|
||||||
|
// Clean all.
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.%');
|
||||||
|
}
|
||||||
|
|
||||||
|
$items_min = $config['sync_queue_items_max'];
|
||||||
|
if (is_numeric($items_min) !== true && $items_min <= 0) {
|
||||||
|
$items_min = self::MIN_SYNC_QUEUE_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($counts as $node_id => $count) {
|
||||||
|
if ($count < $items_min) {
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.'.$node_id);
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
$node = new PandoraFMS\Enterprise\Metaconsole\Node($node_id);
|
||||||
|
|
||||||
|
$url = '__url__/index.php?sec=advanced&sec2=advanced/metasetup&tab=consoles';
|
||||||
|
|
||||||
|
$this->notify(
|
||||||
|
[
|
||||||
|
'type' => 'NOTIF.SYNCQUEUE.LENGTH.'.$node_id,
|
||||||
|
'title' => __('Node %s sync queue length exceeded, ', $node->server_name()),
|
||||||
|
'message' => __(
|
||||||
|
'Synchronization queue lenght for node %s is %d items, this value should be 0 or lower than %d, please check the queue status.',
|
||||||
|
$node->server_name(),
|
||||||
|
$count,
|
||||||
|
$items_min
|
||||||
|
),
|
||||||
|
'url' => $url,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// Clean, exception in node finding.
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.LENGTH.'.$node_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verifies the status of synchronization queue and warns if something is
|
||||||
|
* not working as expected.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function checkSyncQueueStatus()
|
||||||
|
{
|
||||||
|
if (is_metaconsole() !== true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer();
|
||||||
|
$queues = $sync->getQueues();
|
||||||
|
if (count($queues) === 0) {
|
||||||
|
// Clean all.
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.STATUS.%');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($queues as $node_id => $queue) {
|
||||||
|
if (count($queue) === 0) {
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.STATUS.'.$node_id);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$item = $queue[0];
|
||||||
|
|
||||||
|
if (empty($item->error()) === false) {
|
||||||
|
try {
|
||||||
|
$node = new PandoraFMS\Enterprise\Metaconsole\Node($node_id);
|
||||||
|
$url = '__url__/index.php?sec=advanced&sec2=advanced/metasetup&tab=consoles';
|
||||||
|
|
||||||
|
$this->notify(
|
||||||
|
[
|
||||||
|
'type' => 'NOTIF.SYNCQUEUE.STATUS.'.$node_id,
|
||||||
|
'title' => __('Node %s sync queue failed, ', $node->server_name()),
|
||||||
|
'message' => __(
|
||||||
|
'Node %s cannot process synchronization queue due %s, please check the queue status.',
|
||||||
|
$node->server_name(),
|
||||||
|
$item->error()
|
||||||
|
),
|
||||||
|
'url' => $url,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// Clean, exception in node finding.
|
||||||
|
$this->cleanNotifications('NOTIF.SYNCQUEUE.STATUS.'.$node_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -600,7 +600,7 @@ class Tree
|
|||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole()) {
|
||||||
$module['serverID'] = $this->serverID;
|
$module['serverID'] = $this->serverID;
|
||||||
$module['serverName'] = $this->serverName;
|
$module['serverName'] = empty($this->serverName) === false ? $this->serverName : servers_get_name($this->serverID);
|
||||||
} else {
|
} else {
|
||||||
$module['serverName'] = false;
|
$module['serverName'] = false;
|
||||||
$module['serverID'] = false;
|
$module['serverID'] = false;
|
||||||
@ -895,10 +895,16 @@ class Tree
|
|||||||
protected function processAgents(&$agents, $server=false)
|
protected function processAgents(&$agents, $server=false)
|
||||||
{
|
{
|
||||||
if (!empty($agents)) {
|
if (!empty($agents)) {
|
||||||
|
$agents_aux = [];
|
||||||
foreach ($agents as $iterator => $agent) {
|
foreach ($agents as $iterator => $agent) {
|
||||||
$this->processAgent($agents[$iterator], $server);
|
$this->processAgent($agents[$iterator], $server);
|
||||||
|
if ($agents[$iterator]['counters']['total'] !== '0') {
|
||||||
|
$agents_aux[] = $agents[$iterator];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$agents = $agents_aux;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -950,10 +956,9 @@ class Tree
|
|||||||
$module_status_inner = '';
|
$module_status_inner = '';
|
||||||
$module_search_inner = '';
|
$module_search_inner = '';
|
||||||
$module_search_filter = '';
|
$module_search_filter = '';
|
||||||
|
|
||||||
if (!empty($this->filter['searchModule'])) {
|
if (!empty($this->filter['searchModule'])) {
|
||||||
$module_search_inner = '
|
$module_search_inner = '
|
||||||
INNER JOIN tagente_modulo tam
|
|
||||||
ON ta.id_agente = tam.id_agente
|
|
||||||
INNER JOIN tagente_estado tae
|
INNER JOIN tagente_estado tae
|
||||||
ON tae.id_agente_modulo = tam.id_agente_modulo';
|
ON tae.id_agente_modulo = tam.id_agente_modulo';
|
||||||
$module_search_filter = "AND tam.disabled = 0
|
$module_search_filter = "AND tam.disabled = 0
|
||||||
|
@ -32,6 +32,8 @@ class TreeOS extends Tree
|
|||||||
'tco.icon_name AS iconHTML',
|
'tco.icon_name AS iconHTML',
|
||||||
];
|
];
|
||||||
$this->L1inner = 'INNER JOIN tconfig_os tco ON tco.id_os = x2.g';
|
$this->L1inner = 'INNER JOIN tconfig_os tco ON tco.id_os = x2.g';
|
||||||
|
$this->L1innerInside = 'INNER JOIN tagente_modulo tam
|
||||||
|
ON ta.id_agente = tam.id_agente';
|
||||||
$this->L1orderByFinal = 'tco.name';
|
$this->L1orderByFinal = 'tco.name';
|
||||||
|
|
||||||
$this->L2condition = 'AND ta.id_os = '.$this->rootID;
|
$this->L2condition = 'AND ta.id_os = '.$this->rootID;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC211108';
|
$build_version = 'PC211119';
|
||||||
$pandora_version = 'v7.0NG.758';
|
$pandora_version = 'v7.0NG.758';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -1181,6 +1181,10 @@ function agents_get_group_agents(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($search['all_agents'])) {
|
||||||
|
unset($search['all_agents']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($search['string']) === true) {
|
if (isset($search['string']) === true) {
|
||||||
$string = io_safe_input($search['string']);
|
$string = io_safe_input($search['string']);
|
||||||
$filter[] = "(nombre COLLATE utf8_general_ci LIKE '%$string%' OR direccion LIKE '%$string%')";
|
$filter[] = "(nombre COLLATE utf8_general_ci LIKE '%$string%' OR direccion LIKE '%$string%')";
|
||||||
@ -1283,7 +1287,7 @@ function agents_get_group_agents(
|
|||||||
if (!$add_alert_bulk_op) {
|
if (!$add_alert_bulk_op) {
|
||||||
// Add the rest of the filter from the search array.
|
// Add the rest of the filter from the search array.
|
||||||
foreach ($search as $key => $value) {
|
foreach ($search as $key => $value) {
|
||||||
$filter[] = $value;
|
$filter[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($filter !== true) {
|
} else if ($filter !== true) {
|
||||||
|
@ -620,7 +620,7 @@ function config_update_config()
|
|||||||
$error_update[] = __('Admin LDAP login');
|
$error_update[] = __('Admin LDAP login');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config_update_value('ldap_admin_pass', get_parameter('ldap_admin_pass'))) {
|
if (!config_update_value('ldap_admin_pass', io_input_password(io_safe_output(get_parameter('ldap_admin_pass'))))) {
|
||||||
$error_update[] = __('Admin LDAP password');
|
$error_update[] = __('Admin LDAP password');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4891,7 +4891,8 @@ function events_page_general($event)
|
|||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
$data[0] = __('Event ID');
|
$data[0] = __('Event ID');
|
||||||
$data[1] = '#'.$event['id_evento'];
|
$table_event_id = (isset($event['max_id_evento']) === true) ? $event['max_id_evento'] : $event['id_evento'];
|
||||||
|
$data[1] = '#'.$table_event_id;
|
||||||
$table_general->data[] = $data;
|
$table_general->data[] = $data;
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
@ -2050,7 +2050,7 @@ function graphic_combined_module(
|
|||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
$color,
|
$color,
|
||||||
$module_name_list,
|
[],
|
||||||
$long_index,
|
$long_index,
|
||||||
ui_get_full_url(
|
ui_get_full_url(
|
||||||
'images/image_problem_area_small.png',
|
'images/image_problem_area_small.png',
|
||||||
|
@ -728,7 +728,8 @@ function html_print_select(
|
|||||||
$simple_multiple_options=false,
|
$simple_multiple_options=false,
|
||||||
$required=false,
|
$required=false,
|
||||||
$truncate_size=false,
|
$truncate_size=false,
|
||||||
$select2_enable=true
|
$select2_enable=true,
|
||||||
|
$multiple_select2=false
|
||||||
) {
|
) {
|
||||||
$output = "\n";
|
$output = "\n";
|
||||||
|
|
||||||
@ -900,7 +901,8 @@ function html_print_select(
|
|||||||
$select2 = 'select2_dark.min';
|
$select2 = 'select2_dark.min';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($multiple === false && $select2_enable === true) {
|
// Note that multiple_select2 is introduced as a workaround to overcome the pointless limitation of preventing "multiple" select inputs from using select2 library without affecting the existing calls to this function.
|
||||||
|
if ($multiple === false && $select2_enable === true || $multiple_select2 === true) {
|
||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
$output .= '<script src="';
|
$output .= '<script src="';
|
||||||
$output .= ui_get_full_url(
|
$output .= ui_get_full_url(
|
||||||
|
@ -454,3 +454,46 @@ function get_tickets_integriaims($tickets_filters)
|
|||||||
|
|
||||||
return $array_get_incidents;
|
return $array_get_incidents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function integriaims_upload_file($filename, $incident_id, $file_description)
|
||||||
|
{
|
||||||
|
if ($_FILES[$filename]['name'] != '') {
|
||||||
|
$filename = io_safe_input($_FILES[$filename]['name']);
|
||||||
|
$filesize = io_safe_input($_FILES[$filename]['size']);
|
||||||
|
|
||||||
|
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
|
$invalid_extensions = '/^(bat|exe|cmd|sh|php|php1|php2|php3|php4|php5|pl|cgi|386|dll|com|torrent|js|app|jar|iso|
|
||||||
|
pif|vb|vbscript|wsf|asp|cer|csr|jsp|drv|sys|ade|adp|bas|chm|cpl|crt|csh|fxp|hlp|hta|inf|ins|isp|jse|htaccess|
|
||||||
|
htpasswd|ksh|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|ops|pcd|prg|reg|scr|sct|shb|shs|url|vbe|vbs|wsc|wsf|wsh)$/i';
|
||||||
|
|
||||||
|
if (!preg_match($invalid_extensions, $extension)) {
|
||||||
|
// The following is if you have clamavlib installed.
|
||||||
|
// (php5-clamavlib) and enabled in php.ini
|
||||||
|
// http://www.howtoforge.com/scan_viruses_with_php_clamavlib
|
||||||
|
if (extension_loaded('clamav')) {
|
||||||
|
cl_setlimits(5, 1000, 200, 0, 10485760);
|
||||||
|
$malware = cl_scanfile($_FILES['file']['tmp_name']);
|
||||||
|
if ($malware) {
|
||||||
|
$error = 'Malware detected: '.$malware.'<br>ClamAV version: '.clam_get_version();
|
||||||
|
die($error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$filecontent = base64_encode(file_get_contents($_FILES[$filename]['tmp_name']));
|
||||||
|
|
||||||
|
$result_api_call = integria_api_call(null, null, null, null, 'attach_file', [$incident_id, $filename, $filesize, $file_description, $filecontent], false, '', '|;|');
|
||||||
|
|
||||||
|
// API method returns '0' string if success.
|
||||||
|
$file_added = ($result_api_call === '0') ? true : false;
|
||||||
|
|
||||||
|
ui_print_result_message(
|
||||||
|
$file_added,
|
||||||
|
__('File successfully added'),
|
||||||
|
__('File could not be added')
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ui_print_error_message(__('File has an invalid extension'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -483,24 +483,16 @@ function menu_add_extras(&$menu)
|
|||||||
$menu_extra['gusuarios']['sub']['godmode/users/configure_user']['text'] = __('Configure user');
|
$menu_extra['gusuarios']['sub']['godmode/users/configure_user']['text'] = __('Configure user');
|
||||||
$menu_extra['gusuarios']['sub']['godmode/users/configure_profile']['text'] = __('Configure profile');
|
$menu_extra['gusuarios']['sub']['godmode/users/configure_profile']['text'] = __('Configure profile');
|
||||||
|
|
||||||
$menu_extra['gservers']['sub']['godmode/servers/manage_recontask_form']['text'] = __('Manage recontask');
|
|
||||||
|
|
||||||
$menu_extra['gmodules']['sub']['godmode/modules/manage_network_templates_form']['text'] = __('Module templates management');
|
$menu_extra['gmodules']['sub']['godmode/modules/manage_network_templates_form']['text'] = __('Module templates management');
|
||||||
$menu_extra['gmodules']['sub']['enterprise/godmode/modules/manage_inventory_modules_form']['text'] = __('Inventory modules management');
|
$menu_extra['gmodules']['sub']['enterprise/godmode/modules/manage_inventory_modules_form']['text'] = __('Inventory modules management');
|
||||||
$menu_extra['gmodules']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management');
|
|
||||||
|
|
||||||
$menu_extra['gagente']['sub']['godmode/agentes/configurar_agente']['text'] = __('Agents management');
|
$menu_extra['gagente']['sub']['godmode/agentes/configurar_agente']['text'] = __('Agents management');
|
||||||
|
|
||||||
$menu_extra['estado']['sub']['operation/agentes/ver_agente']['text'] = __('View agent');
|
|
||||||
|
|
||||||
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_template']['text'] = __('Configure alert template');
|
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_template']['text'] = __('Configure alert template');
|
||||||
|
|
||||||
$menu_extra['network']['sub']['operation/agentes/networkmap']['text'] = __('Manage network map');
|
|
||||||
$menu_extra['network']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
|
$menu_extra['network']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
|
||||||
$menu_extra['network']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Builder visual console');
|
$menu_extra['network']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Builder visual console');
|
||||||
|
|
||||||
$menu_extra['eventos']['sub']['godmode/events/events']['text'] = __('Administration events');
|
|
||||||
|
|
||||||
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
|
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
|
||||||
$menu_extra['reporting']['sub']['operation/reporting/graph_viewer']['text'] = __('Graph viewer');
|
$menu_extra['reporting']['sub']['operation/reporting/graph_viewer']['text'] = __('Graph viewer');
|
||||||
|
|
||||||
@ -516,7 +508,6 @@ function menu_add_extras(&$menu)
|
|||||||
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
|
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu_extra['workspace']['sub']['operation/incidents/incident_statistics']['text'] = __('Incidents statistics');
|
|
||||||
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
|
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
|
||||||
|
|
||||||
$menu_extra['gagente']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
|
$menu_extra['gagente']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
|
||||||
@ -525,14 +516,9 @@ function menu_add_extras(&$menu)
|
|||||||
|
|
||||||
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions');
|
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions');
|
||||||
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands');
|
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands');
|
||||||
$menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_correlation']['text'] = __('Manage event alerts');
|
|
||||||
|
|
||||||
$menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets');
|
$menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets');
|
||||||
|
|
||||||
$menu_extra['estado']['sub']['enterprise/godmode/services/manage_services']['text'] = __('Manage services');
|
|
||||||
$menu_extra['estado']['sub']['godmode/snmpconsole/snmp_alert']['text'] = __('SNMP alerts');
|
|
||||||
$menu_extra['estado']['sub']['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters');
|
|
||||||
$menu_extra['estado']['sub']['enterprise/godmode/snmpconsole/snmp_trap_editor']['text'] = __('SNMP trap editor');
|
|
||||||
$menu_extra['estado']['sub']['snmpconsole']['sub2']['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
|
$menu_extra['estado']['sub']['snmpconsole']['sub2']['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
|
||||||
$menu_extra['estado']['sub']['snmpconsole']['sub2']['operation/snmpconsole/snmp_view']['text'] = __('SNMP console');
|
$menu_extra['estado']['sub']['snmpconsole']['sub2']['operation/snmpconsole/snmp_view']['text'] = __('SNMP console');
|
||||||
|
|
||||||
@ -588,6 +574,10 @@ function menu_get_sec($with_categories=false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($k === 'discovery') {
|
||||||
|
$in_godmode = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ($in_godmode) {
|
if ($in_godmode) {
|
||||||
$category = __('Administration');
|
$category = __('Administration');
|
||||||
} else {
|
} else {
|
||||||
@ -658,12 +648,10 @@ function menu_get_sec_pages($sec, $menu_hash=false)
|
|||||||
foreach ($menu[$sec]['sub'] as $k => $v) {
|
foreach ($menu[$sec]['sub'] as $k => $v) {
|
||||||
// Avoid special cases of standalone windows.
|
// Avoid special cases of standalone windows.
|
||||||
if (preg_match('/^javascript:/', $k) || preg_match('/\.php/', $k)) {
|
if (preg_match('/^javascript:/', $k) || preg_match('/\.php/', $k)) {
|
||||||
|
if ($sec !== 'links') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// If this value has various parameters, we only get the first.
|
|
||||||
$k = explode('&', $k);
|
|
||||||
$k = $k[0];
|
|
||||||
|
|
||||||
$sec2_array[$k] = $v['text'];
|
$sec2_array[$k] = $v['text'];
|
||||||
}
|
}
|
||||||
@ -695,6 +683,7 @@ function menu_get_sec2_pages($sec, $sec2, $menu_hash=false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sec3_array = [];
|
$sec3_array = [];
|
||||||
|
$sec2 = io_safe_output($sec2);
|
||||||
|
|
||||||
if (isset($menu[$sec]['sub']) && isset($menu[$sec]['sub'][$sec2]['sub2'])) {
|
if (isset($menu[$sec]['sub']) && isset($menu[$sec]['sub'][$sec2]['sub2'])) {
|
||||||
// Get the sec2 of the subsections.
|
// Get the sec2 of the subsections.
|
||||||
@ -719,10 +708,6 @@ function menu_sec2_in_sec($sec, $sec2)
|
|||||||
{
|
{
|
||||||
$sec2_array = menu_get_sec_pages($sec);
|
$sec2_array = menu_get_sec_pages($sec);
|
||||||
|
|
||||||
// If this value has various parameters, we only get the first.
|
|
||||||
$sec2 = explode('&', $sec2);
|
|
||||||
$sec2 = $sec2[0];
|
|
||||||
|
|
||||||
if ($sec2_array != null && in_array($sec2, array_keys($sec2_array))) {
|
if ($sec2_array != null && in_array($sec2, array_keys($sec2_array))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -735,13 +720,47 @@ function menu_sec3_in_sec2($sec, $sec2, $sec3)
|
|||||||
{
|
{
|
||||||
$sec3_array = menu_get_sec2_pages($sec, $sec2, $menu_hash = false);
|
$sec3_array = menu_get_sec2_pages($sec, $sec2, $menu_hash = false);
|
||||||
|
|
||||||
// If this value has various parameters, we only get the first.
|
|
||||||
$sec3 = explode('&', $sec3);
|
|
||||||
$sec3 = $sec3[0];
|
|
||||||
|
|
||||||
if ($sec3_array != null && in_array($sec3, array_keys($sec3_array))) {
|
if ($sec3_array != null && in_array($sec3, array_keys($sec3_array))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare menu data for enterprise acl conf.
|
||||||
|
*
|
||||||
|
* @param array $pages
|
||||||
|
* @param string $sec
|
||||||
|
* @return string $pages
|
||||||
|
*/
|
||||||
|
function menu_pepare_acl_select_data($pages, $sec)
|
||||||
|
{
|
||||||
|
$exclude_pages = [
|
||||||
|
'estado' => 'operation/agentes/tactical',
|
||||||
|
'network' => 'operation/agentes/networkmap_list',
|
||||||
|
'extensions' => [
|
||||||
|
'operation/extensions',
|
||||||
|
'enterprise/extensions/vmware',
|
||||||
|
'extensions/users_connected',
|
||||||
|
],
|
||||||
|
'gmodules' => 'godmode/modules/manage_network_templates',
|
||||||
|
'geventos' => 'godmode/events/events&section=filter',
|
||||||
|
'gsetup' => 'godmode/setup/setup§ion=general',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($exclude_pages as $exclude_sec => $sec2) {
|
||||||
|
if ($sec === $exclude_sec) {
|
||||||
|
if (is_array($sec2) === true) {
|
||||||
|
foreach ($sec2 as $value) {
|
||||||
|
unset($pages[$value]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($pages[$sec2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pages;
|
||||||
|
}
|
||||||
|
@ -8700,8 +8700,8 @@ function reporting_increment($report, $content)
|
|||||||
$return['data']['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
|
$return['data']['message'] = __('The monitor have no data in this range of dates or monitor type is not numeric');
|
||||||
$return['data']['error'] = true;
|
$return['data']['error'] = true;
|
||||||
} else if (is_numeric($old_data) && is_numeric($last_data)) {
|
} else if (is_numeric($old_data) && is_numeric($last_data)) {
|
||||||
$return['data']['old'] = $old_data;
|
$return['data']['old'] = round(floatval($old_data), $config['graph_precision']);
|
||||||
$return['data']['now'] = $last_data;
|
$return['data']['now'] = round(floatval($last_data), $config['graph_precision']);
|
||||||
$increment = ($old_data - $last_data);
|
$increment = ($old_data - $last_data);
|
||||||
|
|
||||||
if ($increment < 0) {
|
if ($increment < 0) {
|
||||||
@ -10813,11 +10813,11 @@ function reporting_get_stats_agents_monitors($data)
|
|||||||
if ($mobile) {
|
if ($mobile) {
|
||||||
$urls = [];
|
$urls = [];
|
||||||
$urls['total_agents'] = 'index.php?page=agents';
|
$urls['total_agents'] = 'index.php?page=agents';
|
||||||
$urls['monitor_checks'] = 'index.php?page=modules';
|
$urls['monitor_total'] = 'index.php?page=modules';
|
||||||
} else {
|
} else {
|
||||||
$urls = [];
|
$urls = [];
|
||||||
$urls['total_agents'] = $config['homeurl'].'index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60';
|
$urls['total_agents'] = $config['homeurl'].'index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60';
|
||||||
$urls['monitor_checks'] = $config['homeurl'].'index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1';
|
$urls['monitor_total'] = $config['homeurl'].'index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agents and modules table
|
// Agents and modules table
|
||||||
@ -10839,8 +10839,8 @@ function reporting_get_stats_agents_monitors($data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true);
|
$tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true);
|
||||||
$tdata[4] = $data['monitor_checks'] <= 0 ? '-' : $data['monitor_checks'];
|
$tdata[4] = $data['monitor_total'] <= 0 ? '-' : $data['monitor_total'];
|
||||||
$tdata[4] = '<a class="big_data" href="'.$urls['monitor_checks'].'">'.$tdata[4].'</a>';
|
$tdata[4] = '<a class="big_data" href="'.$urls['monitor_total'].'">'.$tdata[4].'</a>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Hello there! :)
|
Hello there! :)
|
||||||
@ -10848,7 +10848,7 @@ function reporting_get_stats_agents_monitors($data)
|
|||||||
You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years.
|
You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years.
|
||||||
*/
|
*/
|
||||||
if ($data['total_agents']) {
|
if ($data['total_agents']) {
|
||||||
if (($data['monitor_checks'] / $data['total_agents'] > 100) && !enterprise_installed()) {
|
if (($data['monitor_total'] / $data['total_agents'] > 100) && !enterprise_installed()) {
|
||||||
$tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' ><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
|
$tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' ><img data-title='".__('Enterprise version not installed')."' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13669,7 +13669,7 @@ function reporting_label_macro($item, $label)
|
|||||||
if (preg_match('/_agentgroup_/', $label)) {
|
if (preg_match('/_agentgroup_/', $label)) {
|
||||||
$label = str_replace(
|
$label = str_replace(
|
||||||
'_agentgroup_',
|
'_agentgroup_',
|
||||||
$item['agent_group'],
|
groups_get_name($item['agent_group']),
|
||||||
$label
|
$label
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -105,64 +105,119 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||||||
if (is_metaconsole() && !empty($list_groups)) {
|
if (is_metaconsole() && !empty($list_groups)) {
|
||||||
$cache_table = 'tmetaconsole_agent';
|
$cache_table = 'tmetaconsole_agent';
|
||||||
|
|
||||||
$sql_stats = "SELECT id_grupo, COUNT(id_agente) AS agents_total,
|
if (users_is_admin() === false) {
|
||||||
SUM(total_count) AS monitors_total,
|
$user_groups_ids_array = explode(',', $user_groups_ids);
|
||||||
SUM(normal_count) AS monitors_ok,
|
|
||||||
SUM(warning_count) AS monitors_warning,
|
$user_group_children_ids = [];
|
||||||
SUM(critical_count) AS monitors_critical,
|
|
||||||
SUM(unknown_count) AS monitors_unknown,
|
foreach ($user_groups_ids_array as $user_group_id) {
|
||||||
SUM(notinit_count) AS monitors_not_init,
|
$group_children_ids = groups_get_children_ids($user_group_id);
|
||||||
SUM(fired_count) AS alerts_fired
|
$user_group_children_ids = array_merge($user_group_children_ids, $group_children_ids);
|
||||||
FROM $cache_table
|
}
|
||||||
WHERE disabled = 0
|
|
||||||
AND id_grupo IN ($user_groups_ids)
|
$user_groups_ids = implode(',', array_unique($user_group_children_ids));
|
||||||
GROUP BY id_grupo";
|
}
|
||||||
|
|
||||||
|
$sql_stats = sprintf(
|
||||||
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_total,
|
||||||
|
SUM(tma.total_count) AS monitors_total,
|
||||||
|
SUM(tma.normal_count) AS monitors_ok,
|
||||||
|
SUM(tma.warning_count) AS monitors_warning,
|
||||||
|
SUM(tma.critical_count) AS monitors_critical,
|
||||||
|
SUM(tma.unknown_count) AS monitors_unknown,
|
||||||
|
SUM(tma.notinit_count) AS monitors_not_init,
|
||||||
|
SUM(tma.fired_count) AS alerts_fired
|
||||||
|
FROM tmetaconsole_agent tma
|
||||||
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
|
ON tma.id_agente = tmasg.id_agent
|
||||||
|
WHERE tma.disabled = 0
|
||||||
|
AND tma.id_grupo IN (%s) OR tmasg.id_group IN (%s)
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats = db_get_all_rows_sql($sql_stats);
|
$data_stats = db_get_all_rows_sql($sql_stats);
|
||||||
|
|
||||||
$sql_stats_unknown = "SELECT id_grupo, COUNT(id_agente) AS agents_unknown
|
$sql_stats_unknown = sprintf(
|
||||||
FROM $cache_table
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_unknown
|
||||||
WHERE disabled = 0
|
FROM tmetaconsole_agent tma
|
||||||
AND id_grupo IN ($user_groups_ids)
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
AND critical_count = 0
|
ON tma.id_agente = tmasg.id_agent
|
||||||
AND warning_count = 0
|
WHERE tma.disabled = 0
|
||||||
AND unknown_count > 0
|
AND (tma.id_grupo IN (%s) OR tmasg.id_group IN (%s))
|
||||||
GROUP BY id_grupo";
|
AND tma.critical_count = 0
|
||||||
|
AND tma.warning_count = 0
|
||||||
|
AND tma.unknown_count > 0
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats_unknown = db_get_all_rows_sql($sql_stats_unknown);
|
$data_stats_unknown = db_get_all_rows_sql($sql_stats_unknown);
|
||||||
|
|
||||||
$sql_stats_not_init = "SELECT id_grupo, COUNT(id_agente) AS agents_not_init
|
$sql_stats_not_init = sprintf(
|
||||||
FROM $cache_table
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_not_init
|
||||||
WHERE disabled = 0
|
FROM tmetaconsole_agent tma
|
||||||
AND id_grupo IN ($user_groups_ids)
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
AND (total_count = 0 OR total_count = notinit_count)
|
ON tma.id_agente = tmasg.id_agent
|
||||||
GROUP BY id_grupo";
|
WHERE tma.disabled = 0
|
||||||
|
AND (tma.id_grupo IN (%s) OR tmasg.id_group IN (%s))
|
||||||
|
AND (tma.total_count = 0 OR tma.total_count = tma.notinit_count)
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats_not_init = db_get_all_rows_sql($sql_stats_not_init);
|
$data_stats_not_init = db_get_all_rows_sql($sql_stats_not_init);
|
||||||
|
|
||||||
$sql_stats_ok = "SELECT id_grupo, COUNT(id_agente) AS agents_ok
|
$sql_stats_ok = sprintf(
|
||||||
FROM $cache_table
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_ok
|
||||||
WHERE disabled = 0
|
FROM tmetaconsole_agent tma
|
||||||
AND id_grupo IN ($user_groups_ids)
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
AND critical_count = 0
|
ON tma.id_agente = tmasg.id_agent
|
||||||
AND warning_count = 0
|
WHERE tma.disabled = 0
|
||||||
AND unknown_count = 0
|
AND (tma.id_grupo IN (%s) OR tmasg.id_group IN (%s))
|
||||||
AND normal_count > 0
|
AND tma.critical_count = 0
|
||||||
GROUP BY id_grupo";
|
AND tma.warning_count = 0
|
||||||
|
AND tma.unknown_count = 0
|
||||||
|
AND tma.normal_count > 0
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats_ok = db_get_all_rows_sql($sql_stats_ok);
|
$data_stats_ok = db_get_all_rows_sql($sql_stats_ok);
|
||||||
|
|
||||||
$sql_stats_warning = "SELECT id_grupo, COUNT(id_agente) AS agents_warning
|
$sql_stats_warning = sprintf(
|
||||||
FROM $cache_table
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_warning
|
||||||
WHERE disabled = 0
|
FROM tmetaconsole_agent tma
|
||||||
AND id_grupo IN ($user_groups_ids)
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
AND critical_count = 0
|
ON tma.id_agente = tmasg.id_agent
|
||||||
AND warning_count > 0
|
WHERE tma.disabled = 0
|
||||||
GROUP BY id_grupo";
|
AND (tma.id_grupo IN (%s) OR tmasg.id_group IN (%s))
|
||||||
|
AND tma.critical_count = 0
|
||||||
|
AND tma.warning_count > 0
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats_warning = db_get_all_rows_sql($sql_stats_warning);
|
$data_stats_warning = db_get_all_rows_sql($sql_stats_warning);
|
||||||
|
|
||||||
$sql_stats_critical = "SELECT id_grupo, COUNT(id_agente) AS agents_critical
|
$sql_stats_critical = sprintf(
|
||||||
FROM $cache_table
|
'SELECT tma.id_grupo, COUNT(tma.id_agente) AS agents_critical
|
||||||
WHERE disabled = 0
|
FROM tmetaconsole_agent tma
|
||||||
AND id_grupo IN ($user_groups_ids)
|
LEFT JOIN tmetaconsole_agent_secondary_group tmasg
|
||||||
AND critical_count > 0
|
ON tma.id_agente = tmasg.id_agent
|
||||||
GROUP BY id_grupo";
|
WHERE tma.disabled = 0
|
||||||
|
AND (tma.id_grupo IN (%s) OR tmasg.id_group IN (%s))
|
||||||
|
AND tma.critical_count > 0
|
||||||
|
GROUP BY tma.id_grupo',
|
||||||
|
$user_groups_ids,
|
||||||
|
$user_groups_ids
|
||||||
|
);
|
||||||
|
|
||||||
$data_stats_critical = db_get_all_rows_sql($sql_stats_critical);
|
$data_stats_critical = db_get_all_rows_sql($sql_stats_critical);
|
||||||
|
|
||||||
if (!empty($data_stats)) {
|
if (!empty($data_stats)) {
|
||||||
@ -332,7 +387,7 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||||||
|
|
||||||
$list['_server_sanity_'] = format_numeric((100 - $list['_module_sanity_']), 1);
|
$list['_server_sanity_'] = format_numeric((100 - $list['_module_sanity_']), 1);
|
||||||
} else {
|
} else {
|
||||||
if (users_is_admin()) {
|
if (users_is_admin() || users_can_manage_group_all()) {
|
||||||
$result_list = db_get_all_rows_sql(
|
$result_list = db_get_all_rows_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT COUNT(*) as contado, estado FROM tagente_estado tae
|
'SELECT COUNT(*) as contado, estado FROM tagente_estado tae
|
||||||
@ -415,7 +470,7 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||||||
|
|
||||||
$total_agentes = agents_get_agents(false, ['count(DISTINCT id_agente) as total_agents'], 'AR', false, false, 1);
|
$total_agentes = agents_get_agents(false, ['count(DISTINCT id_agente) as total_agents'], 'AR', false, false, 1);
|
||||||
$list['_total_agents_'] = $total_agentes[0]['total_agents'];
|
$list['_total_agents_'] = $total_agentes[0]['total_agents'];
|
||||||
|
$list['_monitor_total_'] = ($list['_monitors_not_init_'] + $list['_monitors_unknown_'] + $list['_monitors_warning_'] + $list['_monitors_critical_'] + $list['_monitors_ok_']);
|
||||||
$list['_monitor_checks_'] = ($list['_monitors_unknown_'] + $list['_monitors_warning_'] + $list['_monitors_critical_'] + $list['_monitors_ok_']);
|
$list['_monitor_checks_'] = ($list['_monitors_unknown_'] + $list['_monitors_warning_'] + $list['_monitors_critical_'] + $list['_monitors_ok_']);
|
||||||
|
|
||||||
// Calculate not_normal monitors
|
// Calculate not_normal monitors
|
||||||
|
@ -596,7 +596,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||||||
$hashdata = md5($hashdata);
|
$hashdata = md5($hashdata);
|
||||||
$url = $server_data['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agent['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user);
|
$url = $server_data['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agent['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user);
|
||||||
|
|
||||||
if ($grants_on_node) {
|
if ($grants_on_node && (bool) $user_access_node !== false) {
|
||||||
$cellName .= '<a href="'.$url.'">'.'<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>';
|
$cellName .= '<a href="'.$url.'">'.'<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b></a>';
|
||||||
} else {
|
} else {
|
||||||
$cellName .= '<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b>';
|
$cellName .= '<b><span class="bolder pandora_upper" title="'.$agent['nombre'].'">'.$agent['alias'].'</span></b>';
|
||||||
|
@ -225,14 +225,14 @@ function d3_bullet_chart(
|
|||||||
.bullet .range.s2 { fill: #ccc; }
|
.bullet .range.s2 { fill: #ccc; }
|
||||||
.bullet .measure.s0 { fill: steelblue; }
|
.bullet .measure.s0 { fill: steelblue; }
|
||||||
.bullet .measure.s1 { fill: steelblue; }
|
.bullet .measure.s1 { fill: steelblue; }
|
||||||
.bullet .title { font-size: 7pt; font-weight: bold; text-align:left; }
|
.bullet .title { font-size: 9pt; font-weight: bold; text-align:left; cursor: help;}
|
||||||
.bullet .subtitle { fill: #999; font-size: 7pt;}
|
.bullet .subtitle { fill: #999; font-size: 7pt;}
|
||||||
.bullet g text { font-size:'.$font_size.'pt; '.$invert_color.' }
|
.bullet g text { font-size:'.$font_size.'pt; '.$invert_color.' }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
var margin = {top: 5, right: 40, bottom: 20, left: 120};
|
var margin = {top: 5, right: 40, bottom: 20, left: 130};
|
||||||
|
|
||||||
var width = ('.$width.'+10);
|
var width = ('.$width.'+10);
|
||||||
var height = '.$height.'- margin.top - margin.bottom;
|
var height = '.$height.'- margin.top - margin.bottom;
|
||||||
@ -251,13 +251,14 @@ function d3_bullet_chart(
|
|||||||
$name = io_safe_output($data['nombre']);
|
$name = io_safe_output($data['nombre']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = ui_print_truncate_text($name, 15, false, true, false, '...', false);
|
$long_name = $name;
|
||||||
|
$name = ui_print_truncate_text($name, 20, false, true, false, '...', false);
|
||||||
$marker = '';
|
$marker = '';
|
||||||
if ($data['value'] == 0) {
|
if ($data['value'] == 0) {
|
||||||
$marker = ', 0';
|
$marker = ', 0';
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp[] = '{"title":"'.$name.'","subtitle":"'.$data['unit'].'",
|
$temp[] = '{"longTitle":"'.$long_name.'", "title":"'.$name.'","subtitle":"'.$data['unit'].'",
|
||||||
"ranges":['.((float) $data['max']).'],"measures":['.$data['value'].'],
|
"ranges":['.((float) $data['max']).'],"measures":['.$data['value'].'],
|
||||||
"markers":['.$data['min_warning'].','.$data['min_critical'].$marker.']}';
|
"markers":['.$data['min_warning'].','.$data['min_critical'].$marker.']}';
|
||||||
}
|
}
|
||||||
@ -276,12 +277,19 @@ function d3_bullet_chart(
|
|||||||
.call(chart);
|
.call(chart);
|
||||||
|
|
||||||
var title = svg.append("g")
|
var title = svg.append("g")
|
||||||
|
.attr("width", "120px")
|
||||||
.style("text-anchor", "end")
|
.style("text-anchor", "end")
|
||||||
.attr("transform", "translate(-10, 15)");
|
.attr("transform", "translate(-10, 15)");
|
||||||
|
|
||||||
title.append("text")
|
title.append("text")
|
||||||
.attr("class", "'.$font.' invert_filter")
|
.attr("class", "title '.$font.' invert_filter")
|
||||||
.text(function(d) { return d.title; });
|
.attr("textLength","120")
|
||||||
|
.attr("lengthAdjust", "spacingAndGlyphs")
|
||||||
|
.text(function(d) { return d.title; })
|
||||||
|
.append("title")
|
||||||
|
.text(function(d) { return d.longTitle; });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
title.append("text")
|
title.append("text")
|
||||||
.attr("class", "subtitle")
|
.attr("class", "subtitle")
|
||||||
|
@ -33,7 +33,7 @@ function include_javascript_dependencies_flot_graph($return=false, $mobile=false
|
|||||||
if ($mobile === true) {
|
if ($mobile === true) {
|
||||||
$output .= '
|
$output .= '
|
||||||
<script language="javascript" type="text/javascript" src="'.ui_get_full_url($metaconsole_hack.'/mobile/include/javascript/jquery.js').'"></script>
|
<script language="javascript" type="text/javascript" src="'.ui_get_full_url($metaconsole_hack.'/mobile/include/javascript/jquery.js').'"></script>
|
||||||
<script language="javascript" type="text/javascript" src="'.ui_get_full_url($metaconsole_hack.'/mobile/include/javascript/jquery.mobile-1.3.1.js').'"></script>';
|
<script language="javascript" type="text/javascript" src="'.ui_get_full_url($metaconsole_hack.'/mobile/include/javascript/jquery.mobile-1.4.5.js').'"></script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: jquery.flot.threshold is not te original file. Is patched to allow multiple thresholds and filled area
|
// NOTE: jquery.flot.threshold is not te original file. Is patched to allow multiple thresholds and filled area
|
||||||
|
@ -134,7 +134,8 @@ function agent_changed_by_multiple_agents(event, id_agent, selected) {
|
|||||||
$("input.module_types_excluded").each(function(index, el) {
|
$("input.module_types_excluded").each(function(index, el) {
|
||||||
var module_type = parseInt($(el).val());
|
var module_type = parseInt($(el).val());
|
||||||
|
|
||||||
if (module_type !== NaN) module_types_excluded.push(module_type);
|
if (isNaN(module_type) == false)
|
||||||
|
module_types_excluded.push(module_type);
|
||||||
});
|
});
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
|
@ -1242,9 +1242,8 @@ var TreeController = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(typeof element.searchChildren != "undefined" &&
|
typeof element.searchChildren != "undefined" &&
|
||||||
element.searchChildren) ||
|
element.searchChildren
|
||||||
element.disabled == true
|
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
element.rootType == "group_edition" &&
|
element.rootType == "group_edition" &&
|
||||||
|
@ -304,8 +304,21 @@ class MapsMadeByUser extends Widget
|
|||||||
// Retrieve global - common inputs.
|
// Retrieve global - common inputs.
|
||||||
$inputs = parent::getFormInputs();
|
$inputs = parent::getFormInputs();
|
||||||
|
|
||||||
|
$node_id = $this->nodeId;
|
||||||
|
if (\is_metaconsole() === true && $node_id > 0) {
|
||||||
|
if (\metaconsole_connect(null, $node_id) !== NOERR) {
|
||||||
|
echo json_encode(
|
||||||
|
['error' => __('Failed to connect to node %d', $node_id) ]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$fields = $this->getVisualConsoles();
|
$fields = $this->getVisualConsoles();
|
||||||
|
|
||||||
|
if (\is_metaconsole() === true && $node_id > 0) {
|
||||||
|
\metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
// Visual console.
|
// Visual console.
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'label' => __('Visual console'),
|
'label' => __('Visual console'),
|
||||||
|
@ -339,6 +339,7 @@ class TacticalWidget extends Widget
|
|||||||
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
||||||
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
||||||
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
||||||
|
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
||||||
|
|
||||||
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
||||||
|
|
||||||
|
@ -327,6 +327,10 @@ final class ModuleGraph extends Item
|
|||||||
$width = (int) $data['width'];
|
$width = (int) $data['width'];
|
||||||
$height = (int) $data['height'];
|
$height = (int) $data['height'];
|
||||||
|
|
||||||
|
if ($height == 0) {
|
||||||
|
$height = 15;
|
||||||
|
}
|
||||||
|
|
||||||
// Custom graph.
|
// Custom graph.
|
||||||
if (empty($customGraphId) === false) {
|
if (empty($customGraphId) === false) {
|
||||||
$customGraph = \db_get_row('tgraph', 'id_graph', $customGraphId);
|
$customGraph = \db_get_row('tgraph', 'id_graph', $customGraphId);
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
|
|
||||||
/* --- Sidebar --- */
|
/* --- Sidebar --- */
|
||||||
.sidebar_library {
|
.sidebar_library {
|
||||||
min-width: 360px;
|
width: 240px;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
border-left: 1px solid #d0d0d0;
|
border-left: 1px solid #d0d0d0;
|
||||||
padding: 0px 0px 0px 30px;
|
padding: 0px 0px 0px 30px;
|
||||||
@ -151,7 +151,7 @@
|
|||||||
#category_result,
|
#category_result,
|
||||||
#search_result {
|
#search_result {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, minmax(300px, 1fr));
|
grid-template-columns: repeat(3, minmax(175px, 1fr));
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3000,7 +3000,7 @@ input.search_input {
|
|||||||
background-color: #f2f6f7;
|
background-color: #f2f6f7;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 300px;
|
width: 150px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
@ -6162,9 +6162,8 @@ div.graph div.legend table {
|
|||||||
|
|
||||||
.sound_events {
|
.sound_events {
|
||||||
background-color: #494949;
|
background-color: #494949;
|
||||||
max-width: 550px;
|
margin: 40px 2em 0;
|
||||||
max-height: 400px;
|
min-height: auto;
|
||||||
margin-top: 40px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.w16px {
|
.w16px {
|
||||||
|
@ -58,7 +58,8 @@ input.sub,
|
|||||||
button.sub,
|
button.sub,
|
||||||
.bg_general,
|
.bg_general,
|
||||||
.show_result_interpreter,
|
.show_result_interpreter,
|
||||||
div#rules::after table.agent_info_table thead > tr:first-child th,
|
div#rules::after,
|
||||||
|
table.agent_info_table thead > tr:first-child th,
|
||||||
table.agent_info_table tr {
|
table.agent_info_table tr {
|
||||||
background-color: #222 !important;
|
background-color: #222 !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
@ -220,8 +220,6 @@ echo '<head>'."\n";
|
|||||||
// This starts the page head. In the callback function,
|
// This starts the page head. In the callback function,
|
||||||
// $page['head'] array content will be processed into the head.
|
// $page['head'] array content will be processed into the head.
|
||||||
ob_start('ui_process_page_head');
|
ob_start('ui_process_page_head');
|
||||||
// Avoid clickjacking.
|
|
||||||
header('X-Frame-Options: SAMEORIGIN');
|
|
||||||
// Enterprise main.
|
// Enterprise main.
|
||||||
enterprise_include_once('index.php');
|
enterprise_include_once('index.php');
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.758';
|
$version = '7.0NG.758';
|
||||||
$build = '211108';
|
$build = '211119';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
File diff suppressed because it is too large
Load Diff
15454
pandora_console/mobile/include/javascript/jquery.mobile-1.4.5.js
Normal file
15454
pandora_console/mobile/include/javascript/jquery.mobile-1.4.5.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
5096
pandora_console/mobile/include/style/jquery.mobile-1.4.5.css
Normal file
5096
pandora_console/mobile/include/style/jquery.mobile-1.4.5.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -147,7 +147,7 @@ legend {
|
|||||||
|
|
||||||
tr.group_view_crit,
|
tr.group_view_crit,
|
||||||
.group_view_crit {
|
.group_view_crit {
|
||||||
background-color: #fa3030;
|
background-color: #fa3030 !important;
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.group_view_crit * {
|
.group_view_crit * {
|
||||||
@ -155,7 +155,7 @@ tr.group_view_crit,
|
|||||||
}
|
}
|
||||||
.ui-btn-up-group_view_crit,
|
.ui-btn-up-group_view_crit,
|
||||||
.ui-btn-hover-group_view_crit {
|
.ui-btn-hover-group_view_crit {
|
||||||
background-color: #f85858;
|
background-color: #f85858 !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -166,7 +166,7 @@ tr.group_view_crit,
|
|||||||
.group_view_normal *,
|
.group_view_normal *,
|
||||||
.group_view_norm,
|
.group_view_norm,
|
||||||
.group_view_norm * {
|
.group_view_norm * {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff !important;
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.group_view_norm * {
|
.group_view_norm * {
|
||||||
@ -175,7 +175,7 @@ tr.group_view_crit,
|
|||||||
|
|
||||||
.group_view_not_init,
|
.group_view_not_init,
|
||||||
.group_view_not_init * {
|
.group_view_not_init * {
|
||||||
background-color: #5ab7e5;
|
background-color: #5ab7e5 !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ tr.group_view_crit,
|
|||||||
.ui-btn-hover-group_view_normal,
|
.ui-btn-hover-group_view_normal,
|
||||||
.ui-btn-up-group_view_norm,
|
.ui-btn-up-group_view_norm,
|
||||||
.ui-btn-hover-group_view_norm {
|
.ui-btn-hover-group_view_norm {
|
||||||
background-color: #6eb432;
|
background-color: #6eb432 !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -192,7 +192,7 @@ tr.group_view_crit,
|
|||||||
|
|
||||||
.group_view_ok,
|
.group_view_ok,
|
||||||
.group_view_ok * {
|
.group_view_ok * {
|
||||||
background-color: #00c000;
|
background-color: #00c000 !important;
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.group_view_ok * {
|
.group_view_ok * {
|
||||||
@ -200,7 +200,7 @@ tr.group_view_crit,
|
|||||||
}
|
}
|
||||||
.ui-btn-up-group_view_ok,
|
.ui-btn-up-group_view_ok,
|
||||||
.ui-btn-hover-group_view_ok {
|
.ui-btn-hover-group_view_ok {
|
||||||
background-color: #6eb432;
|
background-color: #6eb432 !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -212,14 +212,14 @@ tr.group_view_warn,
|
|||||||
tr.group_view_warn.a,
|
tr.group_view_warn.a,
|
||||||
a.group_view_warn,
|
a.group_view_warn,
|
||||||
tr.a.group_view_warn {
|
tr.a.group_view_warn {
|
||||||
background-color: #f5e535;
|
background-color: #f5e535 !important;
|
||||||
}
|
}
|
||||||
a.group_view_warn {
|
a.group_view_warn {
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.ui-btn-up-group_view_warn,
|
.ui-btn-up-group_view_warn,
|
||||||
.ui-btn-hover-group_view_warn {
|
.ui-btn-hover-group_view_warn {
|
||||||
background-color: #ffea59;
|
background-color: #ffea59 !important;
|
||||||
color: #111;
|
color: #111;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -228,14 +228,14 @@ a.group_view_warn {
|
|||||||
|
|
||||||
tr.group_view_alrm,
|
tr.group_view_alrm,
|
||||||
.group_view_alrm {
|
.group_view_alrm {
|
||||||
background-color: #ed8701;
|
background-color: #ed8701 !important;
|
||||||
}
|
}
|
||||||
.group_view_alrm * {
|
.group_view_alrm * {
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.ui-btn-up-group_view_alrm,
|
.ui-btn-up-group_view_alrm,
|
||||||
.ui-btn-hover-group_view_alrm {
|
.ui-btn-hover-group_view_alrm {
|
||||||
background-color: #f7931e;
|
background-color: #f7931e !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -244,14 +244,14 @@ tr.group_view_alrm,
|
|||||||
|
|
||||||
tr.group_view_unk,
|
tr.group_view_unk,
|
||||||
.group_view_unk {
|
.group_view_unk {
|
||||||
background-color: #c4c4c4;
|
background-color: #c4c4c4 !important;
|
||||||
}
|
}
|
||||||
.group_view_unk * {
|
.group_view_unk * {
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
.ui-btn-up-group_view_unk,
|
.ui-btn-up-group_view_unk,
|
||||||
.ui-btn-hover-group_view_unk {
|
.ui-btn-hover-group_view_unk {
|
||||||
background-color: #999999;
|
background-color: #999999 !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: 1px solid #111111;
|
border: 1px solid #111111;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -302,10 +302,15 @@ tr.group_view_data,
|
|||||||
|
|
||||||
.list_groups .number_count {
|
.list_groups .number_count {
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_groups .name_count {
|
.list_groups .name_count {
|
||||||
left: 10px;
|
left: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_groups .name_count img {
|
.list_groups .name_count img {
|
||||||
@ -316,13 +321,13 @@ tr.group_view_data,
|
|||||||
/* For mobiles */
|
/* For mobiles */
|
||||||
@media screen and (max-width: 750px) {
|
@media screen and (max-width: 750px) {
|
||||||
.list_groups .name_count img {
|
.list_groups .name_count img {
|
||||||
margin-top: -7px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* For tablets */
|
/* For tablets */
|
||||||
@media screen and (min-width: 750px) {
|
@media screen and (min-width: 750px) {
|
||||||
.list_groups .name_count img {
|
.list_groups .name_count img {
|
||||||
margin-top: -3px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,134 +455,13 @@ table.event_details td.cell_event_name {
|
|||||||
|
|
||||||
#validate_button {
|
#validate_button {
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
display: block;
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@media screen and (max-width: 25em)
|
|
||||||
{
|
|
||||||
.pandora_responsive th {
|
|
||||||
padding-right: 10px;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pandora_responsive .event_id td,
|
|
||||||
.pandora_responsive .event_id th,
|
|
||||||
.pandora_responsive .event_name td,
|
|
||||||
.pandora_responsive .event_name th,
|
|
||||||
.pandora_responsive .event_owner th,
|
|
||||||
.pandora_responsive .event_timestamp th,
|
|
||||||
.pandora_responsive .event_timestamp td,
|
|
||||||
.pandora_responsive .event_type td,
|
|
||||||
.pandora_responsive .event_type th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pandora_responsive .event_id {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pandora_responsive .event_name {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_name {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_timestamp td,
|
|
||||||
.event_timestamp th {
|
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_name {
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_owner {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_type th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_type {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_owner {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_type {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_repeated {
|
|
||||||
clear: left;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_repeated > th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.cell_event_repeated {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_severity {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_severity > th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_severity {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_status > th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_status {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_acknowledged_by > th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_acknowledged_by {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_group > th {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_group {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event_tags > th {
|
|
||||||
float: left;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell_event_tags {
|
|
||||||
float: left;
|
|
||||||
padding-left: 10px;
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
@media screen and (max-width: 35em) {
|
@media screen and (max-width: 35em) {
|
||||||
/* Hide the title of event name */
|
/* Hide the title of event name */
|
||||||
#list_events tbody tr.events td.cell_0 b.ui-table-cell-label {
|
#list_events tbody tr.events td.cell_0 b.ui-table-cell-label {
|
||||||
@ -1149,6 +1033,8 @@ li.ui-btn {
|
|||||||
|
|
||||||
.groups_sublist li {
|
.groups_sublist li {
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
|
margin-top: 5px !important;
|
||||||
|
margin-bottom: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
@ -1188,7 +1074,6 @@ li.ui-btn {
|
|||||||
/* For tablets */
|
/* For tablets */
|
||||||
@media screen and (min-width: 750px) {
|
@media screen and (min-width: 750px) {
|
||||||
.ui-content > .ui-btn {
|
.ui-content > .ui-btn {
|
||||||
width: 31%;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 8px 5px;
|
margin: 8px 5px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -1278,42 +1163,61 @@ table.tactical_bars {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*INIT-----------Icons styles---------------------------------------*/
|
/*INIT-----------Icons styles--------------------------------------- 1.3.1*/
|
||||||
|
|
||||||
.ui-icon-tactical_view {
|
.ui-icon-tactical_view:after {
|
||||||
background-image: url(../../../images/op_monitoring.menu.png) !important;
|
background-image: url(../../../images/op_monitoring.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
|
background-size: 21px 21px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-events {
|
.ui-icon-events:after {
|
||||||
background-image: url(../../../images/op_events.menu.png) !important;
|
background-image: url(../../../images/op_events.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-groups {
|
.ui-icon-groups:after {
|
||||||
background-image: url(../../../images/group.menu.png) !important;
|
background-image: url(../../../images/group.menu.png) !important;
|
||||||
|
background-color: #333 !important;
|
||||||
|
background-size: 20px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-alerts {
|
.ui-icon-alerts:after {
|
||||||
background-image: url(../../../images/op_alerts.menu.png) !important;
|
background-image: url(../../../images/op_alerts.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-agents {
|
.ui-icon-agents:after {
|
||||||
background-image: url(../../../images/agent_mc.menu.png) !important;
|
background-image: url(../../../images/agent_mc.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-modules {
|
.ui-icon-modules:after {
|
||||||
background-image: url(../../../images/brick.menu.png) !important;
|
background-image: url(../../../images/brick.menu.png) !important;
|
||||||
|
background-color: #333 !important;
|
||||||
|
background-size: 20px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-network_maps {
|
.ui-icon-network_maps:after {
|
||||||
background-image: url(../../../images/op_network.menu.png) !important;
|
background-image: url(../../../images/op_network.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-visual_console {
|
.ui-icon-visual_console:after {
|
||||||
background-image: url(../../../images/visual_console.menu.png) !important;
|
background-image: url(../../../images/visual_console.menu.png) !important;
|
||||||
|
background-color: #333 !important;
|
||||||
|
background-size: 20px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-dashboard {
|
.ui-icon-dashboard:after {
|
||||||
background-image: url(../../../images/dashboard.menu.png) !important;
|
background-image: url(../../../images/dashboard.menu.png) !important;
|
||||||
|
background-position: unset !important;
|
||||||
|
background-color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-icon-tactical_view,
|
.ui-icon-tactical_view,
|
||||||
@ -1325,10 +1229,13 @@ table.tactical_bars {
|
|||||||
.ui-icon-network_maps,
|
.ui-icon-network_maps,
|
||||||
.ui-icon-visual_console,
|
.ui-icon-visual_console,
|
||||||
.ui-icon-dashboard {
|
.ui-icon-dashboard {
|
||||||
background-color: #333 !important;
|
|
||||||
background-position: center;
|
background-position: center;
|
||||||
border-radius: 15px !important;
|
border-radius: 15px !important;
|
||||||
-webkit-border-radius: 15px !important;
|
-webkit-border-radius: 15px !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-header.ui-bar-a .ui-btn-icon-notext .ui-btn-inner .ui-icon {
|
.ui-header.ui-bar-a .ui-btn-icon-notext .ui-btn-inner .ui-icon {
|
||||||
@ -1353,10 +1260,8 @@ table.tactical_bars {
|
|||||||
.ui-icon-network_maps,
|
.ui-icon-network_maps,
|
||||||
.ui-icon-visual_console,
|
.ui-icon-visual_console,
|
||||||
.ui-icon-dashboard {
|
.ui-icon-dashboard {
|
||||||
width: 22px !important;
|
height: 28px !important;
|
||||||
height: 22px !important;
|
margin-top: 0px !important;
|
||||||
margin-top: -13px !important;
|
|
||||||
background-size: 16px 16px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* For tablets */
|
/* For tablets */
|
||||||
@ -1370,18 +1275,20 @@ table.tactical_bars {
|
|||||||
.ui-icon-network_maps,
|
.ui-icon-network_maps,
|
||||||
.ui-icon-visual_console,
|
.ui-icon-visual_console,
|
||||||
.ui-icon-dashboard {
|
.ui-icon-dashboard {
|
||||||
width: 32px !important;
|
|
||||||
height: 32px !important;
|
height: 32px !important;
|
||||||
margin-top: -17px !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*END-----------Network maps styles---------------------------------------*/
|
/*END-----------Network maps styles---------------------------------------*/
|
||||||
|
|
||||||
#logout_dialog-button_close {
|
#logout_dialog-button_close {
|
||||||
display: block;
|
display: flex;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-btn-active * {
|
.ui-btn-active * {
|
||||||
@ -1506,3 +1413,13 @@ div.nodata_container {
|
|||||||
.ui-popup-hidden {
|
.ui-popup-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-collapsible-inset.ui-collapsible-themed-content .ui-collapsible-content {
|
||||||
|
border-width: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-listview > .ui-li-static,
|
||||||
|
.ui-listview > .ui-li-divider,
|
||||||
|
.ui-listview > li > a.ui-btn {
|
||||||
|
border-width: 0 !important;
|
||||||
|
}
|
||||||
|
@ -731,7 +731,7 @@ class Ui
|
|||||||
$html_title_close_button = "data-close-btn='yes'";
|
$html_title_close_button = "data-close-btn='yes'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$dialogHtml = "<div id='".$dialog_id."' class='".$dialog_class."' data-role='dialog' ".$html_title_close_button.">\n";
|
$dialogHtml = "<div data-close-btn='right' id='".$dialog_id."' class='".$dialog_class."' data-role='dialog' ".$html_title_close_button.">\n";
|
||||||
$dialogHtml .= "<div data-role='header'>\n";
|
$dialogHtml .= "<div data-role='header'>\n";
|
||||||
$dialogHtml .= "<h1 class='dialog_title'>".$title_text."</h1>\n";
|
$dialogHtml .= "<h1 class='dialog_title'>".$title_text."</h1>\n";
|
||||||
$dialogHtml .= "</div>\n";
|
$dialogHtml .= "</div>\n";
|
||||||
@ -785,10 +785,9 @@ class Ui
|
|||||||
echo " <meta charset='UTF-8' />\n";
|
echo " <meta charset='UTF-8' />\n";
|
||||||
echo " <meta name='viewport' content='width=device-width, initial-scale=1'>\n";
|
echo " <meta name='viewport' content='width=device-width, initial-scale=1'>\n";
|
||||||
echo " <link rel='stylesheet' href='include/style/main.css' />\n";
|
echo " <link rel='stylesheet' href='include/style/main.css' />\n";
|
||||||
|
echo " <link rel='stylesheet' href='include/style/jquery.mobile-1.4.5.css' />\n";
|
||||||
echo " <link rel='stylesheet' href='include/style/jquery.mobile-1.3.1.css' />\n";
|
|
||||||
echo " <script src='include/javascript/jquery.js'></script>\n";
|
echo " <script src='include/javascript/jquery.js'></script>\n";
|
||||||
echo " <script src='include/javascript/jquery.mobile-1.3.1.js'></script>\n";
|
echo " <script src='include/javascript/jquery.mobile-1.4.5.js'></script>\n";
|
||||||
echo " <script src='../include/javascript/pandora.js'></script>\n";
|
echo " <script src='../include/javascript/pandora.js'></script>\n";
|
||||||
echo " <script src='../include/javascript/pandora_ui.js'></script>\n";
|
echo " <script src='../include/javascript/pandora_ui.js'></script>\n";
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ class Agent
|
|||||||
});
|
});
|
||||||
|
|
||||||
function agent_filter_modules() {
|
function agent_filter_modules() {
|
||||||
$.mobile.showPageLoadingMsg();
|
$.mobile.loading('show');
|
||||||
$.ajax ({
|
$.ajax ({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'index.php',
|
url: 'index.php',
|
||||||
@ -423,7 +423,7 @@ class Agent
|
|||||||
'filter': $('#filter-modules').val()
|
'filter': $('#filter-modules').val()
|
||||||
},
|
},
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
$.mobile.hidePageLoadingMsg();
|
$.mobile.loading('hide');
|
||||||
var className = $('#list_agent_Modules').attr('class');
|
var className = $('#list_agent_Modules').attr('class');
|
||||||
if (document.getElementById('list_agent_Modules') == null) {
|
if (document.getElementById('list_agent_Modules') == null) {
|
||||||
$($('p.empty_advice')[0]).parent().html(r);
|
$($('p.empty_advice')[0]).parent().html(r);
|
||||||
@ -434,7 +434,7 @@ class Agent
|
|||||||
$('#list_agent_Modules').addClass(className);
|
$('#list_agent_Modules').addClass(className);
|
||||||
},
|
},
|
||||||
error: function(r, t, e) {
|
error: function(r, t, e) {
|
||||||
$.mobile.hidePageLoadingMsg();
|
$.mobile.loading('hide');
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -893,7 +893,7 @@ class Events
|
|||||||
'
|
'
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function openDetails(id_event) {
|
function openDetails(id_event) {
|
||||||
$.mobile.showPageLoadingMsg();
|
$.mobile.loading("show");
|
||||||
|
|
||||||
postvars = {};
|
postvars = {};
|
||||||
postvars["action"] = "ajax";
|
postvars["action"] = "ajax";
|
||||||
@ -958,18 +958,18 @@ class Events
|
|||||||
$("#validate_button_fail").hide();
|
$("#validate_button_fail").hide();
|
||||||
$("#validate_button_correct").hide();
|
$("#validate_button_correct").hide();
|
||||||
|
|
||||||
$.mobile.hidePageLoadingMsg();
|
$.mobile.loading( "hide" );
|
||||||
|
|
||||||
$("#detail_event_dialog_hook").click();
|
$("#detail_event_dialog_hook").click();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$.mobile.hidePageLoadingMsg();
|
$.mobile.loading( "hide" );
|
||||||
$("#detail_event_dialog_error_hook").click();
|
$("#detail_event_dialog_error_hook").click();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error:
|
error:
|
||||||
function (jqXHR, textStatus, errorThrown) {
|
function (jqXHR, textStatus, errorThrown) {
|
||||||
$.mobile.hidePageLoadingMsg();
|
$.mobile.loading( "hide" );
|
||||||
$("#detail_event_dialog_error_hook").click();
|
$("#detail_event_dialog_error_hook").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -93,36 +93,45 @@ class Groups
|
|||||||
$url_modules = 'index.php?page=modules&group=%s&status=%s';
|
$url_modules = 'index.php?page=modules&group=%s&status=%s';
|
||||||
|
|
||||||
foreach ($this->groups as $group) {
|
foreach ($this->groups as $group) {
|
||||||
// Calculate entire row color
|
// Calculate entire row color.
|
||||||
if ($group['_monitors_alerts_fired_'] > 0) {
|
if ($group['_monitors_alerts_fired_'] > 0) {
|
||||||
$color_class = 'group_view_alrm';
|
$color_class = 'group_view_alrm';
|
||||||
|
$color = ' #f7931e';
|
||||||
$status_image = ui_print_status_image('agent_alertsfired_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_alertsfired_ball.png', '', true);
|
||||||
} else if ($group['_monitors_critical_'] > 0) {
|
} else if ($group['_monitors_critical_'] > 0) {
|
||||||
$color_class = 'group_view_crit';
|
$color_class = 'group_view_crit';
|
||||||
|
$color = ' #f85858';
|
||||||
$status_image = ui_print_status_image('agent_critical_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_critical_ball.png', '', true);
|
||||||
} else if ($group['_monitors_warning_'] > 0) {
|
} else if ($group['_monitors_warning_'] > 0) {
|
||||||
$color_class = 'group_view_warn';
|
$color_class = 'group_view_warn';
|
||||||
|
$color = '#ffea59';
|
||||||
$status_image = ui_print_status_image('agent_warning_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_warning_ball.png', '', true);
|
||||||
} else if ($group['_monitors_ok_'] > 0) {
|
} else if ($group['_monitors_ok_'] > 0) {
|
||||||
$color_class = 'group_view_ok';
|
$color_class = 'group_view_ok';
|
||||||
|
$color = '#6eb432';
|
||||||
$status_image = ui_print_status_image('agent_ok_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_ok_ball.png', '', true);
|
||||||
} else if (($group['_monitors_unknown_'] > 0) || ($group['_agents_unknown_'] > 0)) {
|
} else if (($group['_monitors_unknown_'] > 0) || ($group['_agents_unknown_'] > 0)) {
|
||||||
$color_class = 'group_view_unk';
|
$color_class = 'group_view_unk';
|
||||||
|
$color = '#999999';
|
||||||
$status_image = ui_print_status_image('agent_no_monitors_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_no_monitors_ball.png', '', true);
|
||||||
} else {
|
} else {
|
||||||
$color_class = '';
|
$color_class = '';
|
||||||
|
$color = '';
|
||||||
$status_image = ui_print_status_image('agent_no_data_ball.png', '', true);
|
$status_image = ui_print_status_image('agent_no_data_ball.png', '', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$group['icon'] = ($group['icon'] == '') ? 'world' : $group['icon'];
|
$group['_iconImg_'] = ($group['_iconImg_'] == '') ? 'world.png' : $group['_iconImg_'];
|
||||||
$ui->contentAddHtml(
|
$ui->contentAddHtml(
|
||||||
'
|
'
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.ui-icon-group_'.$count.' {
|
.ui-icon-group_'.$count.' {
|
||||||
background: url("../images/groups_small/'.$group['icon'].'.png") no-repeat scroll 0 0 #F3F3F3 !important;
|
background-color: '.$color.' !important;
|
||||||
width: 24px;
|
}
|
||||||
height: 24px;
|
|
||||||
margin-top: -12px !important;
|
.ui-icon-group_'.$count.':after {
|
||||||
|
background-color = #333 !important;
|
||||||
|
background: url("../images/groups_small/'.$group['_iconImg_'].'") no-repeat scroll 0 0 #F3F3F3 !important;
|
||||||
|
background-size: 22px 22px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
'
|
'
|
||||||
|
@ -120,6 +120,7 @@ class Tactical
|
|||||||
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
||||||
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
||||||
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
||||||
|
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
||||||
|
|
||||||
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
||||||
|
|
||||||
|
@ -982,7 +982,6 @@ if (!empty($table->data)) {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
$("[class^='left']").mouseenter (function () {
|
$("[class^='left']").mouseenter (function () {
|
||||||
console.log($(this));
|
|
||||||
$(".agent"+$(this)[0].className).css('visibility', '');
|
$(".agent"+$(this)[0].className).css('visibility', '');
|
||||||
}).mouseleave(function () {
|
}).mouseleave(function () {
|
||||||
$(".agent"+$(this)[0].className).css('visibility', 'hidden');
|
$(".agent"+$(this)[0].className).css('visibility', 'hidden');
|
||||||
|
@ -391,7 +391,7 @@ $sql_conditions_tags = '';
|
|||||||
if (!users_is_admin()) {
|
if (!users_is_admin()) {
|
||||||
$sql_conditions_tags = tags_get_acl_tags(
|
$sql_conditions_tags = tags_get_acl_tags(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
$ag_group,
|
($recursion) ? $all_groups : $ag_group,
|
||||||
'AR',
|
'AR',
|
||||||
'module_condition',
|
'module_condition',
|
||||||
'AND',
|
'AND',
|
||||||
@ -769,9 +769,11 @@ if ($not_condition !== '') {
|
|||||||
$check_not_condition = true;
|
$check_not_condition = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[4][0] .= __('Not condition');
|
$table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you check this option, those elements that do NOT meet any of the requirements will be shown'), true);
|
||||||
$table->data[4][1] .= '<div class="w120px mrgn_top_20px">';
|
$table->data[4][1] = html_print_div(
|
||||||
$table->data[4][1] .= html_print_input(
|
[
|
||||||
|
'class' => 'w120px mrgn_5px mrgn_lft_0px mrgn_right_0px',
|
||||||
|
'content' => html_print_input(
|
||||||
[
|
[
|
||||||
'type' => 'switch',
|
'type' => 'switch',
|
||||||
'name' => 'not_condition',
|
'name' => 'not_condition',
|
||||||
@ -781,27 +783,28 @@ $table->data[4][0] .= __('Not condition');
|
|||||||
'id' => 'not_condition_switch',
|
'id' => 'not_condition_switch',
|
||||||
'onclick' => 'changeNotConditionStatus(this)',
|
'onclick' => 'changeNotConditionStatus(this)',
|
||||||
]
|
]
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
);
|
);
|
||||||
$table->data[4][1] .= ui_print_help_tip(__('If you check this option, those elements that do NOT meet any of the requirements will be shown'), true);
|
|
||||||
$table->data[4][1] .= '</div>';
|
|
||||||
|
|
||||||
$table_custom_fields = new stdClass();
|
$table_custom_fields = new stdClass();
|
||||||
$table_custom_fields->class = 'filters';
|
$table_custom_fields->class = 'filters';
|
||||||
$table_custom_fields->width = '100%';
|
$table_custom_fields->width = '100%';
|
||||||
|
$table_custom_fields->style = [];
|
||||||
|
$table_custom_fields->style[0] = 'font-weight: bold;';
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
// Style is different in metaconsole.
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$table_custom_fields->style[0] = 'font-weight: bold; width: 150px;';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
$table_custom_fields->styleTable = 'margin-left:0px; margin-top:15px;';
|
$table_custom_fields->styleTable = 'margin-left:0px; margin-top:15px;';
|
||||||
$table_custom_fields->cellpadding = '0';
|
$table_custom_fields->cellpadding = '0';
|
||||||
$table_custom_fields->cellspacing = '0';
|
$table_custom_fields->cellspacing = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_custom_fields->style = [];
|
|
||||||
if (!is_metaconsole()) {
|
|
||||||
$table_custom_fields->style[0] = 'font-weight: bold; width: 150px;';
|
|
||||||
} else {
|
|
||||||
$table_custom_fields->style[0] = 'font-weight: bold;';
|
|
||||||
}
|
|
||||||
|
|
||||||
$table_custom_fields->colspan = [];
|
$table_custom_fields->colspan = [];
|
||||||
$table_custom_fields->data = [];
|
$table_custom_fields->data = [];
|
||||||
|
|
||||||
@ -815,9 +818,9 @@ $table->data[4][0] .= __('Not condition');
|
|||||||
$row[0] = $custom_field['name'];
|
$row[0] = $custom_field['name'];
|
||||||
|
|
||||||
$custom_field_value = '';
|
$custom_field_value = '';
|
||||||
if (!empty($ag_custom_fields)) {
|
if (empty($ag_custom_fields) === false) {
|
||||||
$custom_field_value = $ag_custom_fields[$custom_field['id_field']];
|
$custom_field_value = $ag_custom_fields[$custom_field['id_field']];
|
||||||
if (empty($custom_field_value)) {
|
if (empty($custom_field_value) === true) {
|
||||||
$custom_field_value = '';
|
$custom_field_value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -830,7 +833,7 @@ $table->data[4][0] .= __('Not condition');
|
|||||||
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
|
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
|
||||||
|
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole() === true) {
|
||||||
$table->colspan[5][0] = 7;
|
$table->colspan[5][0] = 7;
|
||||||
$table->cellstyle[5][0] = 'padding: 10px;';
|
$table->cellstyle[5][0] = 'padding: 10px;';
|
||||||
$table->data[5][0] = ui_toggle(
|
$table->data[5][0] = ui_toggle(
|
||||||
|
@ -98,6 +98,7 @@ $data['monitor_critical'] = (int) $all_data['_monitors_critical_'];
|
|||||||
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_'];
|
||||||
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_'];
|
||||||
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_'];
|
||||||
|
$data['monitor_total'] = (int) $all_data['_monitor_total_'];
|
||||||
|
|
||||||
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
$data['total_agents'] = (int) $all_data['_total_agents_'];
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ if (is_ajax()) {
|
|||||||
|
|
||||||
if ($get_agents_group_json) {
|
if ($get_agents_group_json) {
|
||||||
$id_group = (int) get_parameter('id_group');
|
$id_group = (int) get_parameter('id_group');
|
||||||
$recursion = (get_parameter_switch('recursion', 'false') === 'true');
|
$recursion = filter_var(get_parameter_switch('recursion', 'false'), FILTER_VALIDATE_BOOLEAN);
|
||||||
$id_os = get_parameter('id_os', '');
|
$id_os = get_parameter('id_os', '');
|
||||||
$agent_name = get_parameter('name', '');
|
$agent_name = get_parameter('name', '');
|
||||||
|
|
||||||
@ -801,7 +801,7 @@ if (is_ajax()) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT DISTINCT t1.nombre, t1.id_agente_modulo FROM tagente_modulo t1
|
'SELECT t1.nombre, t1.id_agente_modulo FROM tagente_modulo t1
|
||||||
INNER JOIN tagente_estado t2 ON t1.id_agente_modulo = t2.id_agente_modulo
|
INNER JOIN tagente_estado t2 ON t1.id_agente_modulo = t2.id_agente_modulo
|
||||||
%s WHERE %s AND t1.delete_pending = 0
|
%s WHERE %s AND t1.delete_pending = 0
|
||||||
AND t1.id_agente IN ('.implode(',', $idAgents).')
|
AND t1.id_agente IN ('.implode(',', $idAgents).')
|
||||||
|
@ -90,6 +90,7 @@ $incident_creator = get_parameter('creator');
|
|||||||
$incident_status = (int) get_parameter('status');
|
$incident_status = (int) get_parameter('status');
|
||||||
$incident_title = events_get_field_value_by_event_id($event_id, get_parameter('incident_title'));
|
$incident_title = events_get_field_value_by_event_id($event_id, get_parameter('incident_title'));
|
||||||
$incident_content = events_get_field_value_by_event_id($event_id, get_parameter('incident_content'));
|
$incident_content = events_get_field_value_by_event_id($event_id, get_parameter('incident_content'));
|
||||||
|
$file_description = get_parameter('file_description');
|
||||||
|
|
||||||
// Separator conversions.
|
// Separator conversions.
|
||||||
$incident_title = str_replace(',', ':::', $incident_title);
|
$incident_title = str_replace(',', ':::', $incident_title);
|
||||||
@ -100,7 +101,11 @@ if ($create_incident === true) {
|
|||||||
// Call Integria IMS API method to create an incident.
|
// Call Integria IMS API method to create an incident.
|
||||||
$result_api_call = integria_api_call(null, null, null, null, 'create_incident', [$incident_title, $incident_group_id, $incident_criticity_id, $incident_content, '', $incident_type, '', $incident_owner, '0', $incident_status], false, '', ',');
|
$result_api_call = integria_api_call(null, null, null, null, 'create_incident', [$incident_title, $incident_group_id, $incident_criticity_id, $incident_content, '', $incident_type, '', $incident_owner, '0', $incident_status], false, '', ',');
|
||||||
|
|
||||||
// Necessary to explicitly set true if not false because function returns api call result in case of success instead of true value.
|
if ($userfile !== '' && $result_api_call !== false) {
|
||||||
|
integriaims_upload_file('userfile', $result_api_call, $file_description);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Necessary to explicitly set true if not false because function returns result of api call in case of success instead of true value.
|
||||||
$incident_created_ok = ($result_api_call != false) ? true : false;
|
$incident_created_ok = ($result_api_call != false) ? true : false;
|
||||||
|
|
||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
@ -112,6 +117,10 @@ if ($create_incident === true) {
|
|||||||
// Call Integria IMS API method to update an incident.
|
// Call Integria IMS API method to update an incident.
|
||||||
$result_api_call = integria_api_call(null, null, null, null, 'update_incident', [$incident_id_edit, $incident_title, $incident_content, '', $incident_group_id, $incident_criticity_id, 0, $incident_status, $incident_owner, 0, $incident_type], false, '', ',');
|
$result_api_call = integria_api_call(null, null, null, null, 'update_incident', [$incident_id_edit, $incident_title, $incident_content, '', $incident_group_id, $incident_criticity_id, 0, $incident_status, $incident_owner, 0, $incident_type], false, '', ',');
|
||||||
|
|
||||||
|
if ($userfile !== '') {
|
||||||
|
integriaims_upload_file('userfile', $incident_id_edit, $file_description);
|
||||||
|
}
|
||||||
|
|
||||||
// Necessary to explicitly set true if not false because function returns api call result in case of success instead of true value.
|
// Necessary to explicitly set true if not false because function returns api call result in case of success instead of true value.
|
||||||
$incident_updated_ok = ($result_api_call != false) ? true : false;
|
$incident_updated_ok = ($result_api_call != false) ? true : false;
|
||||||
|
|
||||||
@ -153,6 +162,7 @@ $table->style[1] = 'width: 33%; padding-right: 50px; padding-left: 50px;';
|
|||||||
$table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;';
|
$table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;';
|
||||||
$table->colspan[0][0] = 2;
|
$table->colspan[0][0] = 2;
|
||||||
$table->colspan[3][0] = 3;
|
$table->colspan[3][0] = 3;
|
||||||
|
$table->colspan[5][0] = 3;
|
||||||
|
|
||||||
$help_macros = isset($_GET['from_event']) ? ui_print_help_icon('response_macros', true) : '';
|
$help_macros = isset($_GET['from_event']) ? ui_print_help_icon('response_macros', true) : '';
|
||||||
|
|
||||||
@ -303,8 +313,20 @@ $table->data[3][0] .= '<div class="label_select_parent">'.html_print_textarea(
|
|||||||
true
|
true
|
||||||
).'</div>';
|
).'</div>';
|
||||||
|
|
||||||
|
$table->data[4][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
|
||||||
|
$table->data[4][0] .= html_print_input_file('userfile', true);
|
||||||
|
$table->data[5][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
|
||||||
|
$table->data[5][0] .= html_print_textarea(
|
||||||
|
'file_description',
|
||||||
|
3,
|
||||||
|
20,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Print forms and stuff.
|
// Print forms and stuff.
|
||||||
echo '<form id="create_integria_incident_form" name="create_integria_incident_form" method="POST">';
|
echo '<form id="create_integria_incident_form" name="create_integria_incident_form" method="POST" enctype="multipart/form-data">';
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
if (!$update) {
|
if (!$update) {
|
||||||
|
@ -90,7 +90,7 @@ $resolution_text = integriaims_get_details('resolution', $resolution);
|
|||||||
$type_text = integriaims_get_details('type', $type);
|
$type_text = integriaims_get_details('type', $type);
|
||||||
|
|
||||||
// Incident file management.
|
// Incident file management.
|
||||||
$upload_file = get_parameter('upload_file');
|
$upload_file = (bool) get_parameter('upload_file');
|
||||||
$delete_file_id = get_parameter('delete_file');
|
$delete_file_id = get_parameter('delete_file');
|
||||||
$download_file_id = get_parameter('download_file');
|
$download_file_id = get_parameter('download_file');
|
||||||
$download_file_name = get_parameter('download_file_name');
|
$download_file_name = get_parameter('download_file_name');
|
||||||
@ -121,47 +121,10 @@ $table_files->head[5] = __('Delete');
|
|||||||
|
|
||||||
$table_files->data = [];
|
$table_files->data = [];
|
||||||
|
|
||||||
// Upload file.
|
|
||||||
if ($upload_file && ($_FILES['userfile']['name'] != '')) {
|
|
||||||
$filedescription = get_parameter('file_description', __('No description available'));
|
$filedescription = get_parameter('file_description', __('No description available'));
|
||||||
|
|
||||||
$filename = io_safe_input($_FILES['userfile']['name']);
|
if ($upload_file === true) {
|
||||||
$filesize = io_safe_input($_FILES['userfile']['size']);
|
integriaims_upload_file('userfile', $incident_id, $filedescription);
|
||||||
|
|
||||||
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
|
||||||
$invalid_extensions = '/^(bat|exe|cmd|sh|php|php1|php2|php3|php4|php5|pl|cgi|386|dll|com|torrent|js|app|jar|iso|
|
|
||||||
pif|vb|vbscript|wsf|asp|cer|csr|jsp|drv|sys|ade|adp|bas|chm|cpl|crt|csh|fxp|hlp|hta|inf|ins|isp|jse|htaccess|
|
|
||||||
htpasswd|ksh|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|ops|pcd|prg|reg|scr|sct|shb|shs|url|vbe|vbs|wsc|wsf|wsh)$/i';
|
|
||||||
|
|
||||||
if (!preg_match($invalid_extensions, $extension)) {
|
|
||||||
// The following is if you have clamavlib installed.
|
|
||||||
// (php5-clamavlib) and enabled in php.ini
|
|
||||||
// http://www.howtoforge.com/scan_viruses_with_php_clamavlib
|
|
||||||
if (extension_loaded('clamav')) {
|
|
||||||
cl_setlimits(5, 1000, 200, 0, 10485760);
|
|
||||||
$malware = cl_scanfile($_FILES['file']['tmp_name']);
|
|
||||||
if ($malware) {
|
|
||||||
$error = 'Malware detected: '.$malware.'<br>ClamAV version: '.clam_get_version();
|
|
||||||
die($error);
|
|
||||||
// On malware, we die because it's not good to handle it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$filecontent = base64_encode(file_get_contents($_FILES['userfile']['tmp_name']));
|
|
||||||
|
|
||||||
$result_api_call = integria_api_call(null, null, null, null, 'attach_file', [$incident_id, $filename, $filesize, $filedescription, $filecontent], false, '', '|;|');
|
|
||||||
|
|
||||||
// API method returns '0' string if success.
|
|
||||||
$file_added = ($result_api_call === '0') ? true : false;
|
|
||||||
|
|
||||||
ui_print_result_message(
|
|
||||||
$file_added,
|
|
||||||
__('File successfully added'),
|
|
||||||
__('File could not be added')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
ui_print_error_message(__('File has an invalid extension'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete file.
|
// Delete file.
|
||||||
@ -242,7 +205,7 @@ foreach ($files as $key => $value) {
|
|||||||
|
|
||||||
$table_files_section->data[0][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
|
$table_files_section->data[0][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
|
||||||
$table_files_section->data[0][0] .= html_print_input_file('userfile', true);
|
$table_files_section->data[0][0] .= html_print_input_file('userfile', true);
|
||||||
$table_files_section->data[1][0] = '<div class="label_select"><p class="input_label">'.__('Description').':</p>';
|
$table_files_section->data[1][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
|
||||||
$table_files_section->data[1][0] .= html_print_textarea(
|
$table_files_section->data[1][0] .= html_print_textarea(
|
||||||
'file_description',
|
'file_description',
|
||||||
3,
|
3,
|
||||||
@ -256,7 +219,7 @@ $table_files_section->data[2][0] .= '<div class="w100p right">'.html_print_submi
|
|||||||
|
|
||||||
$upload_file_form = '<div class="w100p">';
|
$upload_file_form = '<div class="w100p">';
|
||||||
|
|
||||||
$upload_file_form .= '<form method="post" id="file_control" enctype="multipart/form-data">'.'<h4>'.__('Add attachment').'</h4>'.html_print_table($table_files_section, true).html_print_input_hidden('upload_file', 1, true);
|
$upload_file_form .= '<form method="post" id="file_control" enctype="multipart/form-data">'.'<h4>'.__('Add attachment').'</h4>'.html_print_table($table_files_section, true).html_print_input_hidden('upload_file', true, true);
|
||||||
|
|
||||||
$upload_file_form .= '<h4>'.__('Attached files').'</h4>'.html_print_table($table_files, true).'</form></div>';
|
$upload_file_form .= '<h4>'.__('Attached files').'</h4>'.html_print_table($table_files, true).'</form></div>';
|
||||||
|
|
||||||
|
@ -60,6 +60,223 @@ $created_to = (string) get_parameter('created_to', '');
|
|||||||
$offset = (int) get_parameter('offset');
|
$offset = (int) get_parameter('offset');
|
||||||
|
|
||||||
$delete_incident = get_parameter('delete_incident');
|
$delete_incident = get_parameter('delete_incident');
|
||||||
|
|
||||||
|
// Sorting.
|
||||||
|
$sort_field = get_parameter('sort_field');
|
||||||
|
$sort = get_parameter('sort', 'none');
|
||||||
|
|
||||||
|
$selected = true;
|
||||||
|
$select_incident_id_up = false;
|
||||||
|
$select_incident_id_down = false;
|
||||||
|
$select_title_up = false;
|
||||||
|
$select_title_down = false;
|
||||||
|
$select_group_company_up = false;
|
||||||
|
$select_group_company_down = false;
|
||||||
|
$select_status_resolution_up = false;
|
||||||
|
$select_status_resolution_down = false;
|
||||||
|
$select_priority_up = false;
|
||||||
|
$select_priority_down = false;
|
||||||
|
$select_creator_up = false;
|
||||||
|
$select_creator_down = false;
|
||||||
|
$select_owner_up = false;
|
||||||
|
$select_owner_down = false;
|
||||||
|
|
||||||
|
$order[] = [
|
||||||
|
'field' => 'incident_id',
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
|
||||||
|
switch ($sort_field) {
|
||||||
|
case 'incident_id':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_incident_id_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 0,
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_incident_id_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 0,
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'title':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_title_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 3,
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_title_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 3,
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'group_company':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_group_company_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 'group_company',
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_group_company_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 'group_company',
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'status_resolution':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_status_resolution_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 'status_resolution',
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_status_resolution_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 'status_resolution',
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'priority':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_priority_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 7,
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_priority_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 7,
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'creator':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_creator_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 10,
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_creator_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 10,
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'owner':
|
||||||
|
switch ($sort) {
|
||||||
|
case 'up':
|
||||||
|
$select_owner_up = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 5,
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'down':
|
||||||
|
$select_owner_down = $selected;
|
||||||
|
$order = [
|
||||||
|
'field' => 5,
|
||||||
|
'order' => 'DESC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$select_incident_id_up = $selected;
|
||||||
|
$select_incident_id_down = false;
|
||||||
|
$select_title_up = false;
|
||||||
|
$select_title_down = false;
|
||||||
|
$select_group_company_up = false;
|
||||||
|
$select_group_company_down = false;
|
||||||
|
$select_status_resolution_up = false;
|
||||||
|
$select_status_resolution_down = false;
|
||||||
|
$select_priority_up = false;
|
||||||
|
$select_priority_down = false;
|
||||||
|
$select_creator_up = false;
|
||||||
|
$select_creator_down = false;
|
||||||
|
$select_owner_up = false;
|
||||||
|
$select_owner_down = false;
|
||||||
|
$order = [
|
||||||
|
'field' => 'id_user',
|
||||||
|
'order' => 'ASC',
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ($delete_incident) {
|
if ($delete_incident) {
|
||||||
// Call Integria IMS API method to delete an incident.
|
// Call Integria IMS API method to delete an incident.
|
||||||
$result_api_call_delete = integria_api_call(
|
$result_api_call_delete = integria_api_call(
|
||||||
@ -80,12 +297,6 @@ if ($delete_incident) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Full url with all filters.
|
|
||||||
$url = ui_get_full_url(
|
|
||||||
'index.php?sec=incident&sec2=operation/incidents/list_integriaims_incidents&incident_text='.$incident_text.'&incident_status='.$incident_status.'&incident_group='.$incident_group.'&incident_owner='.$incident_owner.'&incident_creator='.$incident_creator.'&incident_priority='.$incident_priority.'&incident_resolution='.$incident_resolution.'&created_from='.$created_from.'&created_to='.$created_to.'&offset='.$offset
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// ---- FILTERS ----
|
// ---- FILTERS ----
|
||||||
// API calls to fill the filters.
|
// API calls to fill the filters.
|
||||||
$status_incident = integriaims_get_details('status');
|
$status_incident = integriaims_get_details('status');
|
||||||
@ -204,6 +415,10 @@ $tickets_filters = [
|
|||||||
// Data to export to csv file.
|
// Data to export to csv file.
|
||||||
$decode_csv = base64_encode(json_encode($tickets_filters));
|
$decode_csv = base64_encode(json_encode($tickets_filters));
|
||||||
|
|
||||||
|
// Full url with all filters.
|
||||||
|
$url = ui_get_full_url(
|
||||||
|
'index.php?sec=incident&sec2=operation/incidents/list_integriaims_incidents&incident_text='.$incident_text.'&incident_status='.$incident_status.'&incident_group='.$incident_group.'&incident_owner='.$incident_owner.'&incident_creator='.$incident_creator.'&incident_priority='.$incident_priority.'&incident_resolution='.$incident_resolution.'&created_from='.$created_from.'&created_to='.$created_to.'&offset='.$offset.'&sort_field='.$sort_field.'&sort='.$sort
|
||||||
|
);
|
||||||
|
|
||||||
// ---- PRINT TABLE FILTERS ----
|
// ---- PRINT TABLE FILTERS ----
|
||||||
$integria_incidents_form = '<form method="post" action="'.$url.'" class="pdd_0px">';
|
$integria_incidents_form = '<form method="post" action="'.$url.'" class="pdd_0px">';
|
||||||
@ -241,6 +456,37 @@ ui_toggle($integria_incidents_form, __('Filter'), '', '', false);
|
|||||||
// Get list of incidents.
|
// Get list of incidents.
|
||||||
$array_get_incidents = get_tickets_integriaims($tickets_filters);
|
$array_get_incidents = get_tickets_integriaims($tickets_filters);
|
||||||
|
|
||||||
|
$props = [
|
||||||
|
'order' => $order,
|
||||||
|
'group_incident' => $group_incident,
|
||||||
|
'status_incident' => $status_incident,
|
||||||
|
'resolution_incident' => $resolution_incident,
|
||||||
|
];
|
||||||
|
|
||||||
|
usort(
|
||||||
|
$array_get_incidents,
|
||||||
|
function ($a, $b) use ($props) {
|
||||||
|
$order_field = $props['order']['field'];
|
||||||
|
|
||||||
|
$item_a = $a[$order_field];
|
||||||
|
$item_b = $b[$order_field];
|
||||||
|
|
||||||
|
if ($order_field === 'group_company') {
|
||||||
|
$item_a = $props['group_incident'][$a[8]];
|
||||||
|
$item_b = $props['group_incident'][$b[8]];
|
||||||
|
} else if ($order_field === 'status_resolution') {
|
||||||
|
$item_a = $props['status_incident'][$a[6]].' / '.$props['resolution_incident'][$a[12]];
|
||||||
|
$item_b = $props['status_incident'][$b[6]].' / '.$props['resolution_incident'][$b[12]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($props['order']['order'] === 'DESC') {
|
||||||
|
return $item_a < $item_b;
|
||||||
|
} else {
|
||||||
|
return $item_a > $item_b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// Prepare pagination.
|
// Prepare pagination.
|
||||||
$incidents_limit = $config['block_size'];
|
$incidents_limit = $config['block_size'];
|
||||||
$incidents_paginated = array_slice($array_get_incidents, $offset, $incidents_limit, true);
|
$incidents_paginated = array_slice($array_get_incidents, $offset, $incidents_limit, true);
|
||||||
@ -251,14 +497,29 @@ $table->width = '100%';
|
|||||||
$table->class = 'info_table';
|
$table->class = 'info_table';
|
||||||
$table->head = [];
|
$table->head = [];
|
||||||
|
|
||||||
$table->head[0] = __('ID');
|
$url_incident_id_up = $url.'&sort_field=incident_id&sort=up';
|
||||||
$table->head[1] = __('Ticket');
|
$url_incident_id_down = $url.'&sort_field=incident_id&sort=down';
|
||||||
$table->head[2] = __('Group/Company');
|
$url_title_up = $url.'&sort_field=title&sort=up';
|
||||||
$table->head[3] = __('Status/Resolution');
|
$url_title_down = $url.'&sort_field=title&sort=down';
|
||||||
$table->head[4] = __('Prior');
|
$url_group_company_up = $url.'&sort_field=group_company&sort=up';
|
||||||
|
$url_group_company_down = $url.'&sort_field=group_company&sort=down';
|
||||||
|
$url_status_resolution_up = $url.'&sort_field=status_resolution&sort=up';
|
||||||
|
$url_status_resolution_down = $url.'&sort_field=status_resolution&sort=down';
|
||||||
|
$url_priority_up = $url.'&sort_field=priority&sort=up';
|
||||||
|
$url_priority_down = $url.'&sort_field=priority&sort=down';
|
||||||
|
$url_creator_up = $url.'&sort_field=creator&sort=up';
|
||||||
|
$url_creator_down = $url.'&sort_field=creator&sort=down';
|
||||||
|
$url_owner_up = $url.'&sort_field=owner&sort=up';
|
||||||
|
$url_owner_down = $url.'&sort_field=owner&sort=down';
|
||||||
|
|
||||||
|
$table->head[0] = __('ID').ui_get_sorting_arrows($url_incident_id_up, $url_incident_id_down, $select_incident_id_up, $select_incident_id_down);
|
||||||
|
$table->head[1] = __('Title').ui_get_sorting_arrows($url_title_up, $url_title_down, $select_title_up, $select_title_down);
|
||||||
|
$table->head[2] = __('Group/Company').ui_get_sorting_arrows($url_group_company_up, $url_group_company_down, $select_group_company_up, $select_group_company_down);
|
||||||
|
$table->head[3] = __('Status/Resolution').ui_get_sorting_arrows($url_status_resolution_up, $url_status_resolution_down, $select_status_resolution_up, $select_status_resolution_down);
|
||||||
|
$table->head[4] = __('Priority').ui_get_sorting_arrows($url_priority_up, $url_priority_down, $select_priority_up, $select_priority_down);
|
||||||
$table->head[5] = __('Updated/Started');
|
$table->head[5] = __('Updated/Started');
|
||||||
$table->head[6] = __('Creator');
|
$table->head[6] = __('Creator').ui_get_sorting_arrows($url_creator_up, $url_creator_down, $select_creator_up, $select_creator_down);
|
||||||
$table->head[7] = __('Owner');
|
$table->head[7] = __('Owner').ui_get_sorting_arrows($url_owner_up, $url_owner_down, $select_owner_up, $select_owner_down);
|
||||||
$table->head[8] = '';
|
$table->head[8] = '';
|
||||||
|
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
|
@ -427,11 +427,18 @@ if (check_acl($config['id_user'], 0, 'ER')
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function openSoundEventWindow() {
|
function openSoundEventWindow() {
|
||||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
||||||
|
// devicePixelRatio knows how much zoom browser applied.
|
||||||
|
var windowScale = parseFloat(window.devicePixelRatio);
|
||||||
|
var defaultWidth = 600;
|
||||||
|
var defaultHeight = 450;
|
||||||
|
// If the scale is 1, no zoom has been applied.
|
||||||
|
var windowWidth = windowScale <= 1 ? defaultWidth : windowScale*defaultWidth;
|
||||||
|
var windowHeight = windowScale <= 1 ? defaultHeight : windowScale*defaultHeight + (defaultHeight*0.1);
|
||||||
|
|
||||||
window.open(
|
window.open(
|
||||||
url,
|
url,
|
||||||
'<?php __('Sound Alerts'); ?>',
|
'<?php __('Sound Alerts'); ?>',
|
||||||
'width=600, height=450, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -545,7 +552,7 @@ if (is_array($config['extensions'])) {
|
|||||||
if (array_key_exists('fatherId', $extension_menu)) {
|
if (array_key_exists('fatherId', $extension_menu)) {
|
||||||
// Check that extension father ID exists previously on the menu.
|
// Check that extension father ID exists previously on the menu.
|
||||||
if ((strlen($extension_menu['fatherId']) > 0)) {
|
if ((strlen($extension_menu['fatherId']) > 0)) {
|
||||||
if (array_key_exists('subfatherId', $extension_menu)) {
|
if (array_key_exists('subfatherId', $extension_menu) && empty($extension_menu['subfatherId']) === false) {
|
||||||
if ((strlen($extension_menu['subfatherId']) > 0)) {
|
if ((strlen($extension_menu['subfatherId']) > 0)) {
|
||||||
$menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['text'] = __($extension_menu['name']);
|
$menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['text'] = __($extension_menu['name']);
|
||||||
$menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['id'] = $extension_menu['name'];
|
$menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['id'] = $extension_menu['name'];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
%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
|
||||||
|
@ -3865,6 +3865,7 @@ CREATE TABLE `tagent_repository` (
|
|||||||
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
||||||
`version` VARCHAR(10) DEFAULT '',
|
`version` VARCHAR(10) DEFAULT '',
|
||||||
`path` text,
|
`path` text,
|
||||||
|
`deployment_timeout` INT UNSIGNED DEFAULT 600,
|
||||||
`uploaded_by` VARCHAR(100) DEFAULT '',
|
`uploaded_by` VARCHAR(100) DEFAULT '',
|
||||||
`uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded",
|
`uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded",
|
||||||
`last_err` text,
|
`last_err` text,
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
// Button for display full screen mode.
|
// Button for display full screen mode.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$queryFull = [
|
$queryFull = [
|
||||||
'dashboardId' => $dashboardId,
|
'dashboardId' => $dashboardId,
|
||||||
'refr' => $refr,
|
'refr' => $refr,
|
||||||
@ -141,10 +139,11 @@ $publiclink['text'] .= html_print_image(
|
|||||||
);
|
);
|
||||||
$publiclink['text'] .= '</a>';
|
$publiclink['text'] .= '</a>';
|
||||||
|
|
||||||
|
// Check if it is a public dashboard.
|
||||||
|
$public_dashboard_hash = get_parameter('hash', false);
|
||||||
|
|
||||||
// Refresh selector time dashboards.
|
// Refresh selector time dashboards.
|
||||||
if (isset($config['public_dashboard']) === true
|
if ($public_dashboard_hash !== false) {
|
||||||
&& (bool) $config['public_dashboard'] === true
|
|
||||||
) {
|
|
||||||
$urlRefresh = $publicUrl;
|
$urlRefresh = $publicUrl;
|
||||||
} else {
|
} else {
|
||||||
$queryRefresh = [
|
$queryRefresh = [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.758-211108
|
Version: 7.0NG.758-211119
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.758-211108"
|
pandora_version="7.0NG.758-211119"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758";
|
my $pandora_version = "7.0NG.758";
|
||||||
my $pandora_build = "211108";
|
my $pandora_build = "211119";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -1093,6 +1093,15 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
my ($field1, $field2, $field3, $field4, $field5, $field6, $field7, $field8, $field9, $field10);
|
my ($field1, $field2, $field3, $field4, $field5, $field6, $field7, $field8, $field9, $field10);
|
||||||
my ($field11, $field12, $field13, $field14, $field15, $field16, $field17, $field18, $field19, $field20);
|
my ($field11, $field12, $field13, $field14, $field15, $field16, $field17, $field18, $field19, $field20);
|
||||||
|
|
||||||
|
# Check for empty alert fields and assign command field.
|
||||||
|
my $index = 1;
|
||||||
|
my @command_fields = split(/,|\[|\]/, $action->{'fields_values'});
|
||||||
|
foreach my $field (@command_fields) {
|
||||||
|
unless (defined($action->{'field'.$index}) && $action->{'field'.$index} ne "") {
|
||||||
|
$action->{'field'.$index} = defined($field) ? $field : "" ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined($alert->{'snmp_alert'})) {
|
if (!defined($alert->{'snmp_alert'})) {
|
||||||
# Regular alerts
|
# Regular alerts
|
||||||
$field1 = defined($action->{'field1'}) && $action->{'field1'} ne "" ? $action->{'field1'} : $alert->{'field1'};
|
$field1 = defined($action->{'field1'}) && $action->{'field1'} ne "" ? $action->{'field1'} : $alert->{'field1'};
|
||||||
@ -1139,6 +1148,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
$field20 = defined($alert->{'field20'}) && $alert->{'field20'} ne "" ? $alert->{'field20'} : $action->{'field20'};
|
$field20 = defined($alert->{'field20'}) && $alert->{'field20'} ne "" ? $alert->{'field20'} : $action->{'field20'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Recovery fields, thanks to Kato Atsushi
|
# Recovery fields, thanks to Kato Atsushi
|
||||||
if ($alert_mode == RECOVERED_ALERT) {
|
if ($alert_mode == RECOVERED_ALERT) {
|
||||||
# Field 1 is a special case where [RECOVER] prefix is not added even when it is defined
|
# Field 1 is a special case where [RECOVER] prefix is not added even when it is defined
|
||||||
@ -1330,7 +1340,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
_phone_tag_ => undef,
|
_phone_tag_ => undef,
|
||||||
_name_tag_ => undef,
|
_name_tag_ => undef,
|
||||||
_all_address_ => undef,
|
_all_address_ => undef,
|
||||||
'_address_\d+_' => undef,
|
'_addressn_\d+_' => undef,
|
||||||
_secondarygroups_ => undef,
|
_secondarygroups_ => undef,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4506,16 +4516,12 @@ sub on_demand_macro($$$$$$;$) {
|
|||||||
}
|
}
|
||||||
$field_value .= "</pre>";
|
$field_value .= "</pre>";
|
||||||
return(defined($field_value)) ? $field_value : '';
|
return(defined($field_value)) ? $field_value : '';
|
||||||
} elsif ($macro =~ /_address_(\d+)_/) {
|
} elsif ($macro =~ /_addressn_(\d+)_/) {
|
||||||
return '' unless defined ($module);
|
return '' unless defined ($module);
|
||||||
my $field_number = $1 - 1;
|
my $field_number = $1 - 1;
|
||||||
my @rows = get_db_rows ($dbh, 'SELECT ip FROM taddress_agent taag, taddress ta WHERE ta.id_a = taag.id_a AND id_agent = ?', $module->{'id_agente'});
|
my @rows = get_db_rows ($dbh, 'SELECT ip FROM taddress_agent taag, taddress ta WHERE ta.id_a = taag.id_a AND id_agent = ? ORDER BY ip ASC', $module->{'id_agente'});
|
||||||
|
|
||||||
my $field_value = $rows[$field_number]->{'ip'};
|
my $field_value = $rows[$field_number]->{'ip'};
|
||||||
if($field_value == ''){
|
|
||||||
$field_value = 'Ip not defined';
|
|
||||||
}
|
|
||||||
|
|
||||||
return(defined($field_value)) ? $field_value : '';
|
return(defined($field_value)) ? $field_value : '';
|
||||||
} elsif ($macro =~ /_moduledata_(\S+)_/) {
|
} elsif ($macro =~ /_moduledata_(\S+)_/) {
|
||||||
my $field_number = $1;
|
my $field_number = $1;
|
||||||
|
@ -347,6 +347,8 @@ sub pandora_query_snmp ($$$$) {
|
|||||||
# Initialize macros.
|
# Initialize macros.
|
||||||
my %macros = (
|
my %macros = (
|
||||||
'_agentcustomfield_\d+_' => undef,
|
'_agentcustomfield_\d+_' => undef,
|
||||||
|
'_addressn_\d+_' => undef,
|
||||||
|
'_address_' => undef,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -479,8 +481,17 @@ sub exec_network_module ($$$$) {
|
|||||||
$target_os = $agent_row->{'id_os'};
|
$target_os = $agent_row->{'id_os'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Initialize macros.
|
||||||
|
my %macros = (
|
||||||
|
'_agentcustomfield_\d+_' => undef,
|
||||||
|
'_addressn_\d+_' => undef,
|
||||||
|
'_address_' => undef,
|
||||||
|
);
|
||||||
|
|
||||||
|
$ip_target = safe_output(subst_column_macros($ip_target, \%macros, $pa_config, $dbh, $agent_row, $module));
|
||||||
|
|
||||||
# Use the agent address by default
|
# Use the agent address by default
|
||||||
if (! defined($ip_target) || $ip_target eq '' || $ip_target eq 'auto'|| $ip_target eq '_address_') {
|
if (! defined($ip_target) || $ip_target eq '' || $ip_target eq 'auto') {
|
||||||
$ip_target = $agent_row->{'direccion'};
|
$ip_target = $agent_row->{'direccion'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,6 +242,7 @@ sub data_consumer ($$) {
|
|||||||
_phone_tag_ => undef,
|
_phone_tag_ => undef,
|
||||||
_name_tag_ => undef,
|
_name_tag_ => undef,
|
||||||
'_agentcustomfield_\d+_' => undef,
|
'_agentcustomfield_\d+_' => undef,
|
||||||
|
'_addressn_\d+_' => undef,
|
||||||
);
|
);
|
||||||
$parameters = subst_alert_macros ($parameters, \%macros, $pa_config, $dbh, $agent, $module);
|
$parameters = subst_alert_macros ($parameters, \%macros, $pa_config, $dbh, $agent, $module);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758";
|
my $pandora_version = "7.0NG.758";
|
||||||
my $pandora_build = "211108";
|
my $pandora_build = "211119";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758
|
||||||
%define release 211108
|
%define release 211119
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758"
|
PI_VERSION="7.0NG.758"
|
||||||
PI_BUILD="211108"
|
PI_BUILD="211119"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758 Build 211108";
|
my $version = "7.0NG.758 Build 211119";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758 Build 211108";
|
my $version = "7.0NG.758 Build 211119";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
@ -88,12 +88,6 @@ export function moduleGraphPropsDecoder(
|
|||||||
export default class ModuleGraph extends Item<ModuleGraphProps> {
|
export default class ModuleGraph extends Item<ModuleGraphProps> {
|
||||||
protected createDomElement(): HTMLElement {
|
protected createDomElement(): HTMLElement {
|
||||||
const element = document.createElement("div");
|
const element = document.createElement("div");
|
||||||
//element.className = "module-graph";
|
|
||||||
//element.style.backgroundImage = `url(${this.props.html})`;
|
|
||||||
//element.style.backgroundRepeat = "no-repeat";
|
|
||||||
//element.style.backgroundSize = `${this.props.width}px ${
|
|
||||||
// this.props.height
|
|
||||||
//}px`;
|
|
||||||
|
|
||||||
element.innerHTML = this.props.html;
|
element.innerHTML = this.props.html;
|
||||||
element.className = "module-graph";
|
element.className = "module-graph";
|
||||||
@ -128,18 +122,10 @@ export default class ModuleGraph extends Item<ModuleGraphProps> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// element.innerHTML = this.props.html;
|
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updateDomElement(element: HTMLElement): void {
|
protected updateDomElement(element: HTMLElement): void {
|
||||||
//element.style.backgroundImage = `url(${this.props.html})`;
|
|
||||||
//element.style.backgroundRepeat = "no-repeat";
|
|
||||||
//element.style.backgroundSize = `${this.props.width}px ${
|
|
||||||
// this.props.height
|
|
||||||
//}px`;
|
|
||||||
|
|
||||||
element.innerHTML = this.props.html;
|
element.innerHTML = this.props.html;
|
||||||
|
|
||||||
// Remove the overview graph.
|
// Remove the overview graph.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user