mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge remote-tracking branch 'origin/develop' into ent-7060-gestion-basica-de-configuracion-de-equipos-de-red
This commit is contained in:
commit
dae8a9ba14
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# define variables
|
# define variables
|
||||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||||
S_VERSION='2021012801'
|
S_VERSION='2021100601'
|
||||||
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
|
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
|
||||||
|
|
||||||
# Ansi color code variables
|
# Ansi color code variables
|
||||||
@ -83,6 +83,7 @@ execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define e
|
|||||||
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||||
|
|
||||||
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
|
||||||
|
[[ $OS == 'fedora' ]] && OS_RELEASE=$OS
|
||||||
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
|
||||||
[[ $OS == 'debian' ]] && OS_RELEASE=$OS
|
[[ $OS == 'debian' ]] && OS_RELEASE=$OS
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.757-211005
|
Version: 7.0NG.757-211006
|
||||||
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.757-211005"
|
pandora_version="7.0NG.757-211006"
|
||||||
|
|
||||||
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.757';
|
use constant AGENT_VERSION => '7.0NG.757';
|
||||||
use constant AGENT_BUILD => '211005';
|
use constant AGENT_BUILD => '211006';
|
||||||
|
|
||||||
# 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.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
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.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
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.757"
|
PI_VERSION="7.0NG.757"
|
||||||
PI_BUILD="211005"
|
PI_BUILD="211006"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{211005}
|
{211006}
|
||||||
|
|
||||||
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.757 Build 211005")
|
#define PANDORA_VERSION ("7.0NG.757 Build 211006")
|
||||||
|
|
||||||
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.757(Build 211005))"
|
VALUE "ProductVersion", "(7.0NG.757(Build 211006))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.757-211005
|
Version: 7.0NG.757-211006
|
||||||
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.757-211005"
|
pandora_version="7.0NG.757-211006"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -331,6 +331,10 @@ function mainAgentsModules()
|
|||||||
$offset = (int) get_parameter('offset', 0);
|
$offset = (int) get_parameter('offset', 0);
|
||||||
$hor_offset = (int) get_parameter('hor_offset', 0);
|
$hor_offset = (int) get_parameter('hor_offset', 0);
|
||||||
$block = $config['block_size'];
|
$block = $config['block_size'];
|
||||||
|
if (intval($block) > 15) {
|
||||||
|
$block = '15';
|
||||||
|
}
|
||||||
|
|
||||||
if (get_parameter('modulegroup') != null) {
|
if (get_parameter('modulegroup') != null) {
|
||||||
$agents_id = (array) get_parameter('id_agents2', null);
|
$agents_id = (array) get_parameter('id_agents2', null);
|
||||||
}
|
}
|
||||||
@ -543,7 +547,7 @@ function mainAgentsModules()
|
|||||||
|
|
||||||
if ($config['pure'] != 1) {
|
if ($config['pure'] != 1) {
|
||||||
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
|
||||||
$show_filters .= '<table class="white_table w100p no-border" cellpadding="0" cellspacing="0" border="0">';
|
$show_filters .= '<table class="w100p no-border" cellpadding="0" cellspacing="0" border="0">';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= '<td>'.$filter_groups_label.'</td>';
|
$show_filters .= '<td>'.$filter_groups_label.'</td>';
|
||||||
$show_filters .= '<td>'.$filter_groups.' '.$filter_recursion_label.$filter_recursion.'</td>';
|
$show_filters .= '<td>'.$filter_groups.' '.$filter_recursion_label.$filter_recursion.'</td>';
|
||||||
@ -561,7 +565,7 @@ function mainAgentsModules()
|
|||||||
$show_filters .= '<td>'.$filter_modules.'</td>';
|
$show_filters .= '<td>'.$filter_modules.'</td>';
|
||||||
$show_filters .= '</tr>';
|
$show_filters .= '</tr>';
|
||||||
$show_filters .= '<tr>';
|
$show_filters .= '<tr>';
|
||||||
$show_filters .= "<td colspan=6 ><span class='right pdd_r_20px'>".$filter_update.'</span></td>';
|
$show_filters .= "<td colspan=6 ><span class='right pdd_r_35px mrgn_top_25px'>".$filter_update.'</span></td>';
|
||||||
$show_filters .= '</tr>';
|
$show_filters .= '</tr>';
|
||||||
$show_filters .= '</table>';
|
$show_filters .= '</table>';
|
||||||
$show_filters .= '</form>';
|
$show_filters .= '</form>';
|
||||||
|
@ -1081,12 +1081,18 @@ function resource_registration_extension_main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. Go to %s to create a policy.',
|
'This node is configured with centralized mode. Go to %s to create a policy.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -111,12 +111,18 @@ ui_print_standard_header(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. Go to %s to delete an agent',
|
'This node is configured with centralized mode. Go to %s to delete an agent',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ function add_component_selection($id_network_component_type)
|
|||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
'width: 460px; '
|
'width: 350px; '
|
||||||
);
|
);
|
||||||
$data[1] .= '</span>';
|
$data[1] .= '</span>';
|
||||||
$data[1] .= ' <span id="component_loading" class="invisible">';
|
$data[1] .= ' <span id="component_loading" class="invisible">';
|
||||||
|
@ -215,12 +215,18 @@ if ($delete_action) {
|
|||||||
|
|
||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -616,12 +616,18 @@ if ($copy_command) {
|
|||||||
|
|
||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -260,12 +260,18 @@ if ($delete_template) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert templates information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert templates information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -104,12 +104,18 @@ if (!$is_in_group && $al_action['id_group'] != 0) {
|
|||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
|
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -159,12 +159,18 @@ if (empty($fields_hidden) === false) {
|
|||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
|
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -373,12 +373,18 @@ function update_template($step)
|
|||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
|
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All alerts templates information is read only. Go to Go to %s to manage it.',
|
'This node is configured with centralized mode. All alerts templates information is read only. Go to Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -92,12 +92,18 @@ if (is_metaconsole() === true) {
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All categories information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All categories information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -382,12 +382,18 @@ if (is_metaconsole() === true) {
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All groups information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All groups information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,18 @@ if (is_metaconsole() === false) {
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -39,12 +39,18 @@ if (!check_acl($config['id_user'], 0, 'UM')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -39,12 +39,18 @@ if (! check_acl($config['id_user'], 0, 'UM')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -334,12 +334,18 @@ $agentstab = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($tab == 'massive_policies' && is_management_allowed() === false) {
|
if ($tab == 'massive_policies' && is_management_allowed() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/policymanager'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All policies information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All policies information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/policymanager'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -401,12 +407,18 @@ $agentstab = [
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (is_management_allowed() === false && $option == 'delete_agents') {
|
if (is_management_allowed() === false && $option == 'delete_agents') {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. To delete agents go to %s',
|
'This node is configured with centralized mode. To delete agents go to %s',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -271,12 +271,18 @@ foreach ($groups as $group) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_management_allowed() === false && is_metaconsole() === false) {
|
if (is_management_allowed() === false && is_metaconsole() === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. Component groups are read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. Component groups are read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -297,12 +297,18 @@ if (is_metaconsole() === true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All remote components are read only. Go to %s to manage them.',
|
'This node is configured with centralized mode. All remote components are read only. Go to %s to manage them.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1251,16 +1251,7 @@ switch ($action) {
|
|||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($columnview) {
|
|
||||||
$count = 0;
|
|
||||||
foreach ($table->data as $datos) {
|
|
||||||
if (!isset($datos[9])) {
|
|
||||||
$table->data[$count][9] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
ui_pagination(
|
ui_pagination(
|
||||||
|
@ -40,12 +40,18 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_management_allowed() === false) {
|
if (is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.',
|
'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ $table->data['editor'] = [
|
|||||||
'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true),
|
'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true),
|
||||||
'description' => html_print_input_text('description_editor', '', '', 40, 255, true),
|
'description' => html_print_input_text('description_editor', '', '', 40, 255, true),
|
||||||
'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true),
|
'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true),
|
||||||
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
|
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save'), 'class' => 'invert_filter']).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,12 +171,18 @@ if ($delete !== 0) {
|
|||||||
|
|
||||||
$is_management_allowed = is_management_allowed();
|
$is_management_allowed = is_management_allowed();
|
||||||
if ($is_management_allowed === false) {
|
if ($is_management_allowed === false) {
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/component_management'
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All tags information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All tags information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/component_management'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -102,12 +102,18 @@ $id_profile = (int) get_parameter('id');
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_metaconsole() === false && is_management_allowed() === false) {
|
if (is_metaconsole() === false && is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All profiles information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All profiles information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -397,12 +397,18 @@ $table->data[0][4] = html_print_submit_button(
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_metaconsole() === false && is_management_allowed() === false) {
|
if (is_metaconsole() === false && is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All users information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All users information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1652,9 +1652,9 @@ class DiscoveryTaskList extends HTML
|
|||||||
$license = enterprise_hook('license_get_info');
|
$license = enterprise_hook('license_get_info');
|
||||||
|
|
||||||
if (is_array($license) === true
|
if (is_array($license) === true
|
||||||
&& $n_agents > ($license['limit'] - $license['count'])
|
&& $n_agents > ($license['limit'] - $license['count_enabled'])
|
||||||
) {
|
) {
|
||||||
$limit = ($license['limit'] - $license['count']);
|
$limit = ($license['limit'] - $license['count_enabled']);
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
[
|
[
|
||||||
'error' => __(
|
'error' => __(
|
||||||
|
@ -1227,7 +1227,7 @@ class AgentWizard extends HTML
|
|||||||
$this->idPolicy,
|
$this->idPolicy,
|
||||||
io_safe_input($module['name'])
|
io_safe_input($module['name'])
|
||||||
);
|
);
|
||||||
$msgError = __('Module exist in policy');
|
$msgError = __('Module exists in policy');
|
||||||
} else {
|
} else {
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
"SELECT id_agente_modulo
|
"SELECT id_agente_modulo
|
||||||
@ -1237,7 +1237,7 @@ class AgentWizard extends HTML
|
|||||||
$this->idAgent,
|
$this->idAgent,
|
||||||
io_safe_input($module['name'])
|
io_safe_input($module['name'])
|
||||||
);
|
);
|
||||||
$msgError = __('Module exist in agent');
|
$msgError = __('Module exists in agent');
|
||||||
}
|
}
|
||||||
|
|
||||||
$existInDb = db_get_value_sql($sql);
|
$existInDb = db_get_value_sql($sql);
|
||||||
@ -1931,7 +1931,7 @@ class AgentWizard extends HTML
|
|||||||
// Already defined.
|
// Already defined.
|
||||||
$this->message['type'][] = 'error';
|
$this->message['type'][] = 'error';
|
||||||
$this->message['message'][] = __(
|
$this->message['message'][] = __(
|
||||||
'Module "%s" exits in this agent',
|
'Module "%s" exists in this agent',
|
||||||
$candidate['name']
|
$candidate['name']
|
||||||
);
|
);
|
||||||
$errorflag = true;
|
$errorflag = true;
|
||||||
@ -3965,7 +3965,7 @@ class AgentWizard extends HTML
|
|||||||
|
|
||||||
$class = '';
|
$class = '';
|
||||||
if ($activeModules === 1) {
|
if ($activeModules === 1) {
|
||||||
$class = 'alpha50';
|
$class = 'alpha50 pdd_0px';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->head[6] = html_print_checkbox_switch_extended(
|
$table->head[6] = html_print_checkbox_switch_extended(
|
||||||
@ -3997,7 +3997,7 @@ class AgentWizard extends HTML
|
|||||||
'',
|
'',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
'alpha50'
|
'alpha50 pdd_0px'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4196,7 +4196,9 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
'switchBlockControl(event)',
|
'switchBlockControl(event)',
|
||||||
'',
|
'',
|
||||||
true
|
true,
|
||||||
|
'',
|
||||||
|
'pdd_0px'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// WIP. Current value of this module.
|
// WIP. Current value of this module.
|
||||||
@ -4222,7 +4224,9 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
'switchBlockControl(event)',
|
'switchBlockControl(event)',
|
||||||
'form="form-create-modules"',
|
'form="form-create-modules"',
|
||||||
true
|
true,
|
||||||
|
'',
|
||||||
|
'pdd_0px'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5681,22 +5685,28 @@ class AgentWizard extends HTML
|
|||||||
.parent()
|
.parent()
|
||||||
.removeClass("alpha50");
|
.removeClass("alpha50");
|
||||||
if (selectedBlock.prop("checked")) {
|
if (selectedBlock.prop("checked")) {
|
||||||
// Set to active the values of fields.
|
// Set all inputs in block to checked.
|
||||||
for (i = 0; i<=15; i++) {
|
var blockItems = document.querySelectorAll('[id^="hidden-module-active-'+switchName[2]+'"]');
|
||||||
document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 1;
|
|
||||||
}
|
blockItems.forEach(function(item) {
|
||||||
// Set checked.
|
item.value = 1;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set block selector to checked.
|
||||||
$("[id*=checkbox-sel_module_" + blockNumber + "]")
|
$("[id*=checkbox-sel_module_" + blockNumber + "]")
|
||||||
.each(function() {
|
.each(function() {
|
||||||
$(this).prop("checked", true);
|
$(this).prop("checked", true);
|
||||||
});
|
});
|
||||||
imageInfoModules.removeClass('hidden');
|
imageInfoModules.removeClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
// Set to inactive the values of fields.
|
// Set all inputs in block to unchecked.
|
||||||
for (i = 0; i<=15; i++) {
|
var blockItems = document.querySelectorAll('[id^="hidden-module-active-'+switchName[2]+'"]');
|
||||||
document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 0;
|
|
||||||
}
|
blockItems.forEach(function(item) {
|
||||||
// Set unchecked.
|
item.value = 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set block selector to unchecked.
|
||||||
$("[id*=checkbox-sel_module_" + blockNumber + "]")
|
$("[id*=checkbox-sel_module_" + blockNumber + "]")
|
||||||
.each(function() {
|
.each(function() {
|
||||||
$(this).prop("checked", false);
|
$(this).prop("checked", false);
|
||||||
|
@ -1400,6 +1400,10 @@ class ConsoleSupervisor
|
|||||||
$PHPmemory_limit_min = config_return_in_bytes('800M');
|
$PHPmemory_limit_min = config_return_in_bytes('800M');
|
||||||
$PHPSerialize_precision = ini_get('serialize_precision');
|
$PHPSerialize_precision = ini_get('serialize_precision');
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$PHPmemory_limit_min = config_return_in_bytes('-1');
|
||||||
|
}
|
||||||
|
|
||||||
// PhantomJS status.
|
// PhantomJS status.
|
||||||
$phantomjs_dir = io_safe_output($config['phantomjs_bin']);
|
$phantomjs_dir = io_safe_output($config['phantomjs_bin']);
|
||||||
$result_ejecution = exec($phantomjs_dir.'/phantomjs --version');
|
$result_ejecution = exec($phantomjs_dir.'/phantomjs --version');
|
||||||
@ -1504,6 +1508,11 @@ class ConsoleSupervisor
|
|||||||
$url = 'http://php.net/manual/es/ini.core.php#ini.memory-limit';
|
$url = 'http://php.net/manual/es/ini.core.php#ini.memory-limit';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$recommended_memory = '800M';
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$recommended_memory = '-1';
|
||||||
|
}
|
||||||
|
|
||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
'type' => 'NOTIF.PHP.MEMORY_LIMIT',
|
'type' => 'NOTIF.PHP.MEMORY_LIMIT',
|
||||||
@ -1513,7 +1522,7 @@ class ConsoleSupervisor
|
|||||||
),
|
),
|
||||||
'message' => sprintf(
|
'message' => sprintf(
|
||||||
__('Recommended value is: %s'),
|
__('Recommended value is: %s'),
|
||||||
sprintf(__('%s or greater'), '800M')
|
sprintf(__('%s or greater'), $recommended_memory)
|
||||||
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
|
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
]
|
]
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC211005';
|
$build_version = 'PC211006';
|
||||||
$pandora_version = 'v7.0NG.757';
|
$pandora_version = 'v7.0NG.757';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -1291,23 +1291,6 @@ function mysql_db_process_sql_rollback()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Put quotes if magic_quotes protection
|
|
||||||
*
|
|
||||||
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
|
|
||||||
*/
|
|
||||||
function mysql_safe_sql_string($string)
|
|
||||||
{
|
|
||||||
if (get_magic_quotes_gpc() == 0) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
return mysql_real_escape_string($config['dbconnection'], $string);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get last error.
|
* Get last error.
|
||||||
*
|
*
|
||||||
|
@ -1496,21 +1496,6 @@ function oracle_db_process_sql_rollback()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Put quotes if magic_quotes protection
|
|
||||||
*
|
|
||||||
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
|
|
||||||
*/
|
|
||||||
function oracle_safe_sql_string($string)
|
|
||||||
{
|
|
||||||
if (get_magic_quotes_gpc() == 0) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
return oracle_escape_string_sql($string);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get last error.
|
* Get last error.
|
||||||
*
|
*
|
||||||
|
@ -1098,23 +1098,6 @@ function postgresql_db_process_sql_rollback()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Put quotes if magic_quotes protection
|
|
||||||
*
|
|
||||||
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
|
|
||||||
*/
|
|
||||||
function postgresql_safe_sql_string($string)
|
|
||||||
{
|
|
||||||
if (get_magic_quotes_gpc() == 0) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
return pg_escape_string($config['dbconnection'], $string);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get last error.
|
* Get last error.
|
||||||
*
|
*
|
||||||
|
@ -1689,32 +1689,6 @@ if (!function_exists('mb_strtoupper')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Put quotes if magic_quotes protection
|
|
||||||
*
|
|
||||||
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
|
|
||||||
*/
|
|
||||||
function safe_sql_string($string)
|
|
||||||
{
|
|
||||||
global $config;
|
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
|
||||||
case 'mysql':
|
|
||||||
return mysql_safe_sql_string($string);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'postgresql':
|
|
||||||
return postgresql_safe_sql_string($string);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'oracle':
|
|
||||||
return oracle_safe_sql_string($string);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies if current Pandora FMS installation is a Metaconsole.
|
* Verifies if current Pandora FMS installation is a Metaconsole.
|
||||||
*
|
*
|
||||||
@ -1753,7 +1727,12 @@ function has_metaconsole()
|
|||||||
*/
|
*/
|
||||||
function is_management_allowed($hkey='')
|
function is_management_allowed($hkey='')
|
||||||
{
|
{
|
||||||
return ( (is_metaconsole() && is_centrallised())
|
$nodes = db_get_value('count(*) as n', 'tmetaconsole_setup');
|
||||||
|
if ($nodes !== false) {
|
||||||
|
$nodes = (int) $nodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( (is_metaconsole() && (is_centrallised() || $nodes === 0))
|
||||||
|| (!is_metaconsole() && !is_centrallised())
|
|| (!is_metaconsole() && !is_centrallised())
|
||||||
|| (!is_metaconsole() && is_centrallised()) && $hkey == generate_hash_to_api());
|
|| (!is_metaconsole() && is_centrallised()) && $hkey == generate_hash_to_api());
|
||||||
}
|
}
|
||||||
|
@ -1162,7 +1162,6 @@ function alerts_duplicate_alert_template($id_alert_template, $id_group)
|
|||||||
unset($template['name']);
|
unset($template['name']);
|
||||||
unset($template['id']);
|
unset($template['id']);
|
||||||
unset($template['type']);
|
unset($template['type']);
|
||||||
$template['value'] = safe_sql_string($template['value']);
|
|
||||||
|
|
||||||
return alerts_create_alert_template($name, $type, $template);
|
return alerts_create_alert_template($name, $type, $template);
|
||||||
}
|
}
|
||||||
|
@ -1574,11 +1574,17 @@ function graphic_combined_module(
|
|||||||
$date_array['final_date'] = $params['date'];
|
$date_array['final_date'] = $params['date'];
|
||||||
$date_array['start_date'] = ($params['date'] - $params['period']);
|
$date_array['start_date'] = ($params['date'] - $params['period']);
|
||||||
|
|
||||||
|
$server_name = metaconsole_get_server_by_id($modules[0]['server']);
|
||||||
|
|
||||||
if ($params_combined['projection']) {
|
if ($params_combined['projection']) {
|
||||||
$output_projection = forecast_projection_graph(
|
$output_projection = forecast_projection_graph(
|
||||||
$module_list[0],
|
$module_list[0],
|
||||||
$params['period'],
|
$params['period'],
|
||||||
$params_combined['projection']
|
$params_combined['projection'],
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
$server_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1982,7 +1982,7 @@ function html_print_extended_select_for_time(
|
|||||||
html_print_select(
|
html_print_select(
|
||||||
$units,
|
$units,
|
||||||
$uniq_name.'_units',
|
$uniq_name.'_units',
|
||||||
'60',
|
'1',
|
||||||
''.$script,
|
''.$script,
|
||||||
$nothing,
|
$nothing,
|
||||||
$nothing_value,
|
$nothing_value,
|
||||||
@ -3752,7 +3752,7 @@ function html_print_checkbox_switch_extended(
|
|||||||
$name.($idcounter[$name] ? $idcounter[$name] : '')
|
$name.($idcounter[$name] ? $idcounter[$name] : '')
|
||||||
);
|
);
|
||||||
|
|
||||||
$output = '<label class="p-switch '.$classParent.'">';
|
$output = '<label class="p-switch pdd_0px'.$classParent.'">';
|
||||||
$output .= '<input name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
|
$output .= '<input name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
|
||||||
if ($id == '') {
|
if ($id == '') {
|
||||||
$output .= ' id="checkbox-'.$id_aux.'"';
|
$output .= ' id="checkbox-'.$id_aux.'"';
|
||||||
@ -3976,6 +3976,7 @@ function html_print_image(
|
|||||||
'onkeypress',
|
'onkeypress',
|
||||||
'onkeydown',
|
'onkeydown',
|
||||||
'onkeyup',
|
'onkeyup',
|
||||||
|
'onload',
|
||||||
'pos_tree',
|
'pos_tree',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -82,11 +82,6 @@ function io_safe_input($value)
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean the trash mix into string because of magic quotes.
|
|
||||||
if (get_magic_quotes_gpc() == 1) {
|
|
||||||
$value = stripslashes($value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! mb_check_encoding($value, 'UTF-8')) {
|
if (! mb_check_encoding($value, 'UTF-8')) {
|
||||||
$value = utf8_encode($value);
|
$value = utf8_encode($value);
|
||||||
}
|
}
|
||||||
@ -158,11 +153,6 @@ function io_safe_input_html($value)
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean the trash mix into string because of magic quotes.
|
|
||||||
if (get_magic_quotes_gpc() == 1) {
|
|
||||||
$value = stripslashes($value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! mb_check_encoding($value, 'UTF-8')) {
|
if (! mb_check_encoding($value, 'UTF-8')) {
|
||||||
$value = utf8_encode($value);
|
$value = utf8_encode($value);
|
||||||
}
|
}
|
||||||
@ -380,21 +370,6 @@ function io_safe_output_xml($string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Avoid magic_quotes protection
|
|
||||||
*
|
|
||||||
* @param string Text string to be stripped of magic_quotes protection
|
|
||||||
*/
|
|
||||||
function io_unsafe_string($string)
|
|
||||||
{
|
|
||||||
if (get_magic_quotes_gpc()) {
|
|
||||||
return stripslashes($string);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a translated string
|
* Get a translated string
|
||||||
*
|
*
|
||||||
|
@ -929,7 +929,12 @@ function netflow_get_filter_arguments($filter, $safe_input=false)
|
|||||||
|
|
||||||
// Normal filter.
|
// Normal filter.
|
||||||
if ($filter['ip_dst'] != '') {
|
if ($filter['ip_dst'] != '') {
|
||||||
$filter_args .= ' (';
|
if ($filter_args != '') {
|
||||||
|
$filter_args .= ' and (';
|
||||||
|
} else {
|
||||||
|
$filter_args .= ' (';
|
||||||
|
}
|
||||||
|
|
||||||
$val_ipdst = explode(',', io_safe_output($filter['ip_dst']));
|
$val_ipdst = explode(',', io_safe_output($filter['ip_dst']));
|
||||||
for ($i = 0; $i < count($val_ipdst); $i++) {
|
for ($i = 0; $i < count($val_ipdst); $i++) {
|
||||||
if ($i > 0) {
|
if ($i > 0) {
|
||||||
@ -1754,7 +1759,9 @@ function netflow_update_second_level_filter(&$filter, $aggregate, $sources)
|
|||||||
$filter[$extra_filter] .= ',';
|
$filter[$extra_filter] .= ',';
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter[$extra_filter] = implode(',', $sources);
|
if (!empty($sources)) {
|
||||||
|
$filter[$extra_filter] = implode(',', $sources);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3032,6 +3032,7 @@ function erase_node($id)
|
|||||||
['deleted' => 1],
|
['deleted' => 1],
|
||||||
['id_parent' => (int) $node['id']]
|
['id_parent' => (int) $node['id']]
|
||||||
);
|
);
|
||||||
|
|
||||||
db_process_sql_update(
|
db_process_sql_update(
|
||||||
'trel_item',
|
'trel_item',
|
||||||
['deleted' => 1],
|
['deleted' => 1],
|
||||||
@ -3045,6 +3046,7 @@ function erase_node($id)
|
|||||||
'type' => 1,
|
'type' => 1,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($node_modules as $node_module) {
|
foreach ($node_modules as $node_module) {
|
||||||
$style = json_decode($node_module['style'], true);
|
$style = json_decode($node_module['style'], true);
|
||||||
|
|
||||||
@ -4035,7 +4037,8 @@ function add_agent_node_in_option($id_networkmap, $id_agent, $x, $y)
|
|||||||
|
|
||||||
$new_node = db_get_row_sql(
|
$new_node = db_get_row_sql(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT * FROM titem WHERE id_map = $id_networkmap AND type = 0 AND source_data = %s',
|
'SELECT * FROM titem WHERE id_map = %s AND type = 0 AND source_data = %s',
|
||||||
|
$id_networkmap,
|
||||||
$id_agent
|
$id_agent
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -4290,10 +4290,6 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
|
|||||||
if (substr($fullurl, -1) != '/') {
|
if (substr($fullurl, -1) != '/') {
|
||||||
$fullurl .= '/';
|
$fullurl .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($url == 'index.php' && is_metaconsole()) {
|
|
||||||
$fullurl .= ENTERPRISE_DIR.'/meta';
|
|
||||||
}
|
|
||||||
} else if (!empty($config['public_url'])
|
} else if (!empty($config['public_url'])
|
||||||
&& (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))
|
&& (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))
|
||||||
) {
|
) {
|
||||||
@ -4332,40 +4328,34 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
|
|||||||
// Only add the home url.
|
// Only add the home url.
|
||||||
$url = $config['homeurl_static'].'/';
|
$url = $config['homeurl_static'].'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole() && $metaconsole_root) {
|
|
||||||
$url .= 'enterprise/meta/';
|
|
||||||
}
|
|
||||||
} else if (!strstr($url, '.php')) {
|
} else if (!strstr($url, '.php')) {
|
||||||
if ($proxy) {
|
if ($proxy) {
|
||||||
$fullurl .= '/';
|
$fullurl .= '/';
|
||||||
} else {
|
} else {
|
||||||
$fullurl .= $config['homeurl_static'].'/';
|
$fullurl .= $config['homeurl_static'].'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole() && $metaconsole_root) {
|
|
||||||
$fullurl .= 'enterprise/meta/';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ($proxy) {
|
if ((bool) $proxy === false) {
|
||||||
$fullurl .= '/';
|
|
||||||
} else {
|
|
||||||
if ($add_name_php_file) {
|
if ($add_name_php_file) {
|
||||||
$fullurl .= $_SERVER['SCRIPT_NAME'];
|
$fullurl .= $_SERVER['SCRIPT_NAME'];
|
||||||
} else {
|
} else {
|
||||||
$fullurl .= $config['homeurl_static'].'/';
|
$fullurl .= $config['homeurl_static'].'/';
|
||||||
|
|
||||||
if (is_metaconsole() && $metaconsole_root) {
|
|
||||||
$fullurl .= 'enterprise/meta/';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($fullurl, -1, 1) === substr($url, 0, 1)) {
|
// Add last slash if missing.
|
||||||
if (substr($fullurl, -1, 1) === '/') {
|
if (substr($fullurl, -1, 1) !== '/') {
|
||||||
$url = substr($url, 1);
|
$fullurl .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove starting slash if present.
|
||||||
|
if (substr($url, 0, 1) === '/') {
|
||||||
|
$url = substr($url, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() && $metaconsole_root) {
|
||||||
|
$fullurl .= 'enterprise/meta/';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $fullurl.$url;
|
return $fullurl.$url;
|
||||||
|
@ -763,7 +763,6 @@ function move_to_networkmap(node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function edit_node(data_node, dblClick) {
|
function edit_node(data_node, dblClick) {
|
||||||
console.log("PATATA");
|
|
||||||
var flag_edit_node = true;
|
var flag_edit_node = true;
|
||||||
var edit_node = null;
|
var edit_node = null;
|
||||||
|
|
||||||
|
@ -1831,13 +1831,13 @@ function getTimeZoneVisualConsole(baseUrl, vcId, zone, callback) {
|
|||||||
* Draw a line between two elements in a div
|
* Draw a line between two elements in a div
|
||||||
*
|
*
|
||||||
* @param line Line to draw. JavaScript object with the following properties:
|
* @param line Line to draw. JavaScript object with the following properties:
|
||||||
- x1 X coordinate of the first point. If not set, it will get the coord from node_begin position
|
- x1 X coordinate of the first point. If not set, it will get the coord from node_begin position
|
||||||
- y1 Y coordinate of the first point. If not set, it will get the coord from node_begin position
|
- y1 Y coordinate of the first point. If not set, it will get the coord from node_begin position
|
||||||
- x2 X coordinate of the second point. If not set, it will get the coord from node_end position
|
- x2 X coordinate of the second point. If not set, it will get the coord from node_end position
|
||||||
- y2 Y coordinate of the second point. If not set, it will get the coord from node_end position
|
- y2 Y coordinate of the second point. If not set, it will get the coord from node_end position
|
||||||
- color Color of the line to draw
|
- color Color of the line to draw
|
||||||
- node_begin Id of the beginning node
|
- node_begin Id of the beginning node
|
||||||
- node_end Id of the finishing node
|
- node_end Id of the finishing node
|
||||||
* @param id_div Div to draw the lines in
|
* @param id_div Div to draw the lines in
|
||||||
* @param editor Boolean variable to set other css selector in editor (when true).
|
* @param editor Boolean variable to set other css selector in editor (when true).
|
||||||
*/
|
*/
|
||||||
|
@ -133,7 +133,7 @@ final class DBMaintainer
|
|||||||
public function __construct(array $params)
|
public function __construct(array $params)
|
||||||
{
|
{
|
||||||
$this->user = $params['user'];
|
$this->user = $params['user'];
|
||||||
$this->pass = $params['pass'];
|
$this->pass = io_output_password($params['pass']);
|
||||||
$this->host = $params['host'];
|
$this->host = $params['host'];
|
||||||
$this->port = $params['port'];
|
$this->port = $params['port'];
|
||||||
$this->name = $params['name'];
|
$this->name = $params['name'];
|
||||||
|
@ -53,6 +53,13 @@ final class Odometer extends Item
|
|||||||
$return['thresholds'] = $this->extractThresholds($data);
|
$return['thresholds'] = $this->extractThresholds($data);
|
||||||
$return['titleColor'] = $this->extractTitleColor($data);
|
$return['titleColor'] = $this->extractTitleColor($data);
|
||||||
$return['title'] = $this->extractTitle($data);
|
$return['title'] = $this->extractTitle($data);
|
||||||
|
|
||||||
|
$return['titleModule'] = $return['moduleName'];
|
||||||
|
|
||||||
|
if (strlen($return['moduleName']) >= 25) {
|
||||||
|
$return['moduleName'] = substr($return['moduleName'], 0, 9).' ... '.substr($return['moduleName'], -9);
|
||||||
|
}
|
||||||
|
|
||||||
$return['minMaxValue'] = $this->extractMinMaxValue($data);
|
$return['minMaxValue'] = $this->extractMinMaxValue($data);
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
|
@ -6571,7 +6571,7 @@ div.graph div.legend table {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.pdd_0px {
|
.pdd_0px {
|
||||||
padding: 0px;
|
padding: 0px !important;
|
||||||
}
|
}
|
||||||
.pdd_4px {
|
.pdd_4px {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
@ -6676,6 +6676,9 @@ div.graph div.legend table {
|
|||||||
.pdd_r_30px {
|
.pdd_r_30px {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
.pdd_r_35px {
|
||||||
|
padding-right: 35px;
|
||||||
|
}
|
||||||
.pdd_r_40px {
|
.pdd_r_40px {
|
||||||
padding-right: 40px;
|
padding-right: 40px;
|
||||||
}
|
}
|
||||||
@ -6808,6 +6811,9 @@ div.graph div.legend table {
|
|||||||
.pdd_t_10px {
|
.pdd_t_10px {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
.pdd_t_15px {
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
.pdd_t_20px {
|
.pdd_t_20px {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
@ -7088,6 +7094,9 @@ div.graph div.legend table {
|
|||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_height150px {
|
||||||
|
max-height: 150px !important;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* HEIGHT PX
|
* HEIGHT PX
|
||||||
*/
|
*/
|
||||||
|
@ -36,7 +36,8 @@ textarea,
|
|||||||
select,
|
select,
|
||||||
.edit_user_comments #textarea_comments,
|
.edit_user_comments #textarea_comments,
|
||||||
.discovery_textarea_input,
|
.discovery_textarea_input,
|
||||||
.selection {
|
.selection,
|
||||||
|
button.sub {
|
||||||
background-color: #111 !important;
|
background-color: #111 !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
@ -1198,3 +1199,6 @@ a.pandora_pagination,
|
|||||||
background-color: #222;
|
background-color: #222;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
.bg_ccc {
|
||||||
|
background-color: #50505050 !important;
|
||||||
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.757';
|
$version = '7.0NG.757';
|
||||||
$build = '211005';
|
$build = '211006';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -13,9 +13,36 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Login check
|
// Login check.
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function get_last_contact(source, agent_id) {
|
||||||
|
var params = {};
|
||||||
|
params["get_last_contact"] = 1;
|
||||||
|
params["page"] = "enterprise/include/ajax/log_viewer.ajax";
|
||||||
|
params["source"] = source;
|
||||||
|
params["agent_id"] = agent_id;
|
||||||
|
|
||||||
|
jQuery.ajax ({
|
||||||
|
data: params,
|
||||||
|
dataType: "html",
|
||||||
|
type: "POST",
|
||||||
|
url: "ajax.php",
|
||||||
|
success: function (data) {
|
||||||
|
var td = $(`#img-${source}`).parent();
|
||||||
|
td.empty();
|
||||||
|
td.html(data);
|
||||||
|
td.css('padding-left', '12px');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
$agent_id = get_parameter_get('id_agente', 0);
|
$agent_id = get_parameter_get('id_agente', 0);
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
@ -46,9 +73,19 @@ $logs = mysql_db_get_all_rows_sql($sql);
|
|||||||
foreach ($logs as $log) {
|
foreach ($logs as $log) {
|
||||||
$row['source'] = $log['source'];
|
$row['source'] = $log['source'];
|
||||||
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
||||||
$row['last_contact'] = human_time_comparation($log['last_contact']);
|
$row['last_contact'] = html_print_image(
|
||||||
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'id' => 'img-'.$log['source'],
|
||||||
|
'border' => '0',
|
||||||
|
'width' => '20px',
|
||||||
|
'heigth' => '20px',
|
||||||
|
'onload' => "get_last_contact('".$log['source']."', '".$agent_id."')",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$table->data[] = $row;
|
$table->data[$log['source']] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -66,10 +66,7 @@ if ($new_networkmap) {
|
|||||||
$disabled_generation_method_select = false;
|
$disabled_generation_method_select = false;
|
||||||
$disabled_source = false;
|
$disabled_source = false;
|
||||||
if ($edit_networkmap) {
|
if ($edit_networkmap) {
|
||||||
if (enterprise_installed()) {
|
$disabled_generation_method_select = true;
|
||||||
$disabled_generation_method_select = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$disabled_source = true;
|
$disabled_source = true;
|
||||||
|
|
||||||
$values = db_get_row('tmap', 'id', $id);
|
$values = db_get_row('tmap', 'id', $id);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -237,12 +237,18 @@ if (is_metaconsole() === true) {
|
|||||||
$is_management_allowed = true;
|
$is_management_allowed = true;
|
||||||
if (is_metaconsole() === false && is_management_allowed() === false) {
|
if (is_metaconsole() === false && is_management_allowed() === false) {
|
||||||
$is_management_allowed = false;
|
$is_management_allowed = false;
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
||||||
|
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure='.(int) $config['pure']
|
||||||
|
).'">'.__('metaconsole').'</a>';
|
||||||
|
} else {
|
||||||
|
$url = __('any node');
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_warning_message(
|
ui_print_warning_message(
|
||||||
__(
|
__(
|
||||||
'This node is configured with centralized mode. All users information is read only. Go to %s to manage it.',
|
'This node is configured with centralized mode. All users information is read only. Go to %s to manage it.',
|
||||||
'<a target="_blank" href="'.ui_get_meta_url(
|
$url
|
||||||
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure=0'
|
|
||||||
).'">'.__('metaconsole').'</a>'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
# 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.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
# 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.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
%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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.757-211005
|
Version: 7.0NG.757-211006
|
||||||
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.757-211005"
|
pandora_version="7.0NG.757-211006"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -738,7 +738,9 @@ sub main() {
|
|||||||
|
|
||||||
# Testing API url
|
# Testing API url
|
||||||
my $curl_execution = "'".$Config{'console_api_url'}."?op=get&op2=test&apipass=".$Config{"console_api_pass"}."&user=".$Config{"console_user"}."&pass=".$Config{"console_pass"}."'";
|
my $curl_execution = "'".$Config{'console_api_url'}."?op=get&op2=test&apipass=".$Config{"console_api_pass"}."&user=".$Config{"console_user"}."&pass=".$Config{"console_pass"}."'";
|
||||||
my $exe_testing_api = `curl $curl_execution 2>/dev/null`;
|
# More than 30 secs is highly unrecommendated
|
||||||
|
my $command = $Config{'plugin_exec'}.' 30 curl '.$curl_execution.' 2>/dev/null';
|
||||||
|
my $exe_testing_api = `$command`;
|
||||||
my @res_testing_api = split(',', $exe_testing_api);
|
my @res_testing_api = split(',', $exe_testing_api);
|
||||||
if ( $res_testing_api[0] ne 'OK' ) {
|
if ( $res_testing_api[0] ne 'OK' ) {
|
||||||
logger(\%Config, "Warning! The server does not have access to the API, this can trigger problems in the generation of reports and graphs.", 1);
|
logger(\%Config, "Warning! The server does not have access to the API, this can trigger problems in the generation of reports and graphs.", 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.757";
|
my $pandora_version = "7.0NG.757";
|
||||||
my $pandora_build = "211005";
|
my $pandora_build = "211006";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -83,7 +83,7 @@ sub g_unicode {
|
|||||||
while ($pos < $len ) {
|
while ($pos < $len ) {
|
||||||
my $item;
|
my $item;
|
||||||
$item = substr($config_word,$pos,1);
|
$item = substr($config_word,$pos,1);
|
||||||
$output = $output.$config_char.decToHex(ord($item));
|
$output = $output.$config_char.g_decToHex(ord($item));
|
||||||
$pos++;
|
$pos++;
|
||||||
}
|
}
|
||||||
$config_word = $output;
|
$config_word = $output;
|
||||||
@ -99,10 +99,10 @@ sub g_trash_unicode {
|
|||||||
my $config_depth = $_[0];
|
my $config_depth = $_[0];
|
||||||
my $config_char="%";
|
my $config_char="%";
|
||||||
my $a;
|
my $a;
|
||||||
my $output;
|
my $output = "";
|
||||||
|
|
||||||
for ($a=0;$a<$config_depth;$a++){
|
for ($a=0;$a<$config_depth;$a++){
|
||||||
$output = $output.$config_char.decToHex(int(rand(25)+97));
|
$output = $output.$config_char.g_decToHex(int(rand(25)+97));
|
||||||
}
|
}
|
||||||
return $output
|
return $output
|
||||||
}
|
}
|
||||||
@ -113,9 +113,8 @@ sub g_trash_unicode {
|
|||||||
|
|
||||||
sub g_trash_ascii {
|
sub g_trash_ascii {
|
||||||
my $config_depth = $_[0];
|
my $config_depth = $_[0];
|
||||||
my $config_char="%";
|
|
||||||
my $a;
|
my $a;
|
||||||
my $output;
|
my $output = "";
|
||||||
|
|
||||||
for ($a=0;$a<$config_depth;$a++){
|
for ($a=0;$a<$config_depth;$a++){
|
||||||
$output = $output.chr(int(rand(25)+97));
|
$output = $output.chr(int(rand(25)+97));
|
||||||
|
@ -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.757";
|
my $pandora_version = "7.0NG.757";
|
||||||
my $pandora_build = "211005";
|
my $pandora_build = "211006";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -28,6 +28,8 @@ use File::Temp qw(tempfile);
|
|||||||
use HTML::Entities;
|
use HTML::Entities;
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
|
use Encode;
|
||||||
|
|
||||||
# Default lib dir for RPM and DEB packages
|
# Default lib dir for RPM and DEB packages
|
||||||
use lib '/usr/lib/perl5';
|
use lib '/usr/lib/perl5';
|
||||||
|
|
||||||
@ -207,7 +209,7 @@ sub data_consumer ($$) {
|
|||||||
$task = subst_alert_macros ($task, \%macros);
|
$task = subst_alert_macros ($task, \%macros);
|
||||||
|
|
||||||
# Goliat has some trouble parsing conf files without the newlines
|
# Goliat has some trouble parsing conf files without the newlines
|
||||||
$fh->print ("\n\n" . $task . "\n\n");
|
$fh->print ("\n\n" . encode_utf8($task) . "\n\n");
|
||||||
close ($fh);
|
close ($fh);
|
||||||
|
|
||||||
# Global vars needed by Goliat
|
# Global vars needed by Goliat
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
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.757
|
%define version 7.0NG.757
|
||||||
%define release 211005
|
%define release 211006
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.757"
|
PI_VERSION="7.0NG.757"
|
||||||
PI_BUILD="211005"
|
PI_BUILD="211006"
|
||||||
|
|
||||||
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.757 Build 211005";
|
my $version = "7.0NG.757 Build 211006";
|
||||||
|
|
||||||
# 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.757 Build 211005";
|
my $version = "7.0NG.757 Build 211006";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
741
visual_console_client/package-lock.json
generated
741
visual_console_client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,7 @@
|
|||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
"mini-css-extract-plugin": "^0.5.0",
|
"mini-css-extract-plugin": "^0.5.0",
|
||||||
|
"npm-watch": "^0.11.0",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"ts-jest": "^24.3.0",
|
"ts-jest": "^24.3.0",
|
||||||
|
@ -8,6 +8,7 @@ export type OdometerProps = {
|
|||||||
value: number;
|
value: number;
|
||||||
status: string;
|
status: string;
|
||||||
title: string | null;
|
title: string | null;
|
||||||
|
titleModule: string;
|
||||||
titleColor: string;
|
titleColor: string;
|
||||||
odometerType: string;
|
odometerType: string;
|
||||||
thresholds: string | any;
|
thresholds: string | any;
|
||||||
@ -32,6 +33,7 @@ export function odometerPropsDecoder(data: AnyObject): OdometerProps | never {
|
|||||||
status: stringIsEmpty(data.status) ? "#B2B2B2" : data.status,
|
status: stringIsEmpty(data.status) ? "#B2B2B2" : data.status,
|
||||||
titleColor: stringIsEmpty(data.titleColor) ? "#3f3f3f" : data.titleColor,
|
titleColor: stringIsEmpty(data.titleColor) ? "#3f3f3f" : data.titleColor,
|
||||||
title: stringIsEmpty(data.title) ? "" : data.title,
|
title: stringIsEmpty(data.title) ? "" : data.title,
|
||||||
|
titleModule: stringIsEmpty(data.titleModule) ? "" : data.titleModule,
|
||||||
thresholds: stringIsEmpty(data.thresholds) ? "" : data.thresholds,
|
thresholds: stringIsEmpty(data.thresholds) ? "" : data.thresholds,
|
||||||
minMaxValue: stringIsEmpty(data.minMaxValue) ? "" : data.minMaxValue,
|
minMaxValue: stringIsEmpty(data.minMaxValue) ? "" : data.minMaxValue,
|
||||||
odometerType: stringIsEmpty(data.odometerType)
|
odometerType: stringIsEmpty(data.odometerType)
|
||||||
@ -208,10 +210,13 @@ export default class Odometer extends Item<OdometerProps> {
|
|||||||
|
|
||||||
const h2 = document.createElement("h2");
|
const h2 = document.createElement("h2");
|
||||||
if (this.props.title == "") {
|
if (this.props.title == "") {
|
||||||
h2.textContent = this.props.moduleName;
|
h2.textContent = this.truncateTitle(this.props.moduleName);
|
||||||
} else {
|
} else {
|
||||||
h2.textContent = this.truncateTitle(this.props.title);
|
h2.textContent = this.truncateTitle(this.props.title);
|
||||||
}
|
}
|
||||||
|
h2.title = this.props.titleModule;
|
||||||
|
h2.setAttribute("title", this.props.titleModule);
|
||||||
|
|
||||||
h2.style.fontSize = `${anchoB * 0.06}px`;
|
h2.style.fontSize = `${anchoB * 0.06}px`;
|
||||||
h2.style.color = `${this.props.titleColor}`;
|
h2.style.color = `${this.props.titleColor}`;
|
||||||
h2.style.lineHeight = "0";
|
h2.style.lineHeight = "0";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user