Merge branch 'develop' into 'ent-4020-cambiar-mensaje-de-bienvenida-tnews'

# Conflicts:
#   pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql

Former-commit-id: b3872691ef8ef136cd921c5eb4365be2b32daf46
This commit is contained in:
Marcos Alconada 2019-05-14 10:03:37 +02:00
commit cf45be2c60
43 changed files with 660 additions and 302 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.734-190510
Version: 7.0NG.734-190514
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.734"
PI_BUILD="190510"
PI_BUILD="190514"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{190510}
{190514}
ViewReadme
{Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.734-190510
Version: 7.0NG.734-190514
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1,4 +1,7 @@
START TRANSACTION;
START TRANSACTION;
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event';
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -> Site news.</p> ',NOW());

View File

@ -1233,13 +1233,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 27);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 28);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '734');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '735');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
-- ---------------------------------------------------------------------
@ -2121,9 +2121,18 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
-- ----------------------------------------------------------------------
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
<<<<<<< pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
------------------------------------------------------------------------
------ ADD message in table 'tnews'
------------------------------------------------------------------------
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome&#x20;to&#x20;Pandora&#x20;FMS&#x20;Console', '&amp;lt;p&#x20;style=&quot;text-align:&#x20;center;&#x20;font-size:&#x20;13px;&quot;&amp;gt;Hello,&#x20;congratulations,&#x20;if&#x20;you&apos;ve&#x20;arrived&#x20;here&#x20;you&#x20;already&#x20;have&#x20;an&#x20;operational&#x20;monitoring&#x20;console.&#x20;Remember&#x20;that&#x20;our&#x20;forums&#x20;and&#x20;online&#x20;documentation&#x20;are&#x20;available&#x20;24x7&#x20;to&#x20;get&#x20;you&#x20;out&#x20;of&#x20;any&#x20;trouble.&#x20;You&#x20;can&#x20;replace&#x20;this&#x20;message&#x20;with&#x20;a&#x20;personalized&#x20;one&#x20;at&#x20;Admin&#x20;tools&#x20;-&amp;amp;gt;&#x20;Site&#x20;news.&amp;lt;/p&amp;gt;&#x20;',NOW());
-- ----------------------------------------------------------------------
-- Alter table `talert_templates`
-- ----------------------------------------------------------------------
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
=======
>>>>>>> pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql

View File

@ -167,27 +167,18 @@ if ($disk_conf_delete) {
echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 150px;';
$table->data = [];
$table->align[2] = 'center';
if (!$new_agent && $alias != '') {
$table->data[0][0] = __('Agent name').ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true);
$table->data[0][1] = html_print_input_text('agente', $nombre_agente, '', 50, 100, true);
$table_agent_name = '<div class="label_select"><p class="input_label">'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'</p>';
$table_agent_name .= '<div class="label_select_parent">';
$table_agent_name .= '<div class="label_select_child_left">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>';
$table_agent_name .= '<div class="label_select_child_right agent_options_agent_name">';
$table->data[0][2] = __('QR Code Agent view');
$table_qr_code = '<div class="agent_qr white_box"><p class="input_label">'.__('QR Code Agent view').': </p>';
if ($id_agente) {
$table->data[0][1] .= '&nbsp;<b>'.__('ID')."</b>&nbsp; $id_agente &nbsp;";
$table->data[0][1] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">';
$table->data[0][1] .= html_print_image(
$table_agent_name .= '<span>'.__('ID').' '.$id_agente.'</span>';
$table_agent_name .= '<a href="index.php?sec=gagente&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">';
$table_agent_name .= html_print_image(
'images/zoom.png',
true,
[
@ -195,20 +186,23 @@ if (!$new_agent && $alias != '') {
'title' => __('Agent detail'),
]
);
$table->data[0][1] .= '</a>';
$table_agent_name .= '</a>';
}
}
// Remote configuration available
if (!$new_agent) {
$agent_options_update = 'agent_options_update';
// Delete link from here.
$table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
// Remote configuration available.
if (isset($filename)) {
if (file_exists($filename['md5'])) {
$agent_name = agents_get_name($id_agente);
$agent_name = io_safe_output($agent_name);
$agent_md5 = md5($agent_name, false);
$table->data[0][1] .= '&nbsp;&nbsp;'.'<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=remote_configuration&amp;'.'id_agente='.$id_agente.'&amp;'.'disk_conf='.$agent_md5.'">';
$table->data[0][1] .= html_print_image(
$table_agent_name .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=remote_configuration&amp;'.'id_agente='.$id_agente.'&amp;'.'disk_conf='.$agent_md5.'">';
$table_agent_name .= html_print_image(
'images/application_edit.png',
true,
[
@ -216,35 +210,44 @@ if (!$new_agent) {
'title' => __('This agent can be remotely configured'),
]
);
$table->data[0][1] .= '</a>'.ui_print_help_tip(
$table_agent_name .= '</a>'.ui_print_help_tip(
__('You can remotely edit this agent configuration'),
true
);
}
}
$table_agent_name .= '</div></div></div>';
}
// Delete link from here
if (!$new_agent) {
$table->data[0][1] .= "&nbsp;&nbsp;<span align='right'><a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
}
$table->data[1][0] = __('Alias').ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</span>';
$table->data[1][1] = html_print_input_text('alias', $alias, '', 50, 100, true);
if ($new_agent) {
$table->data[1][1] .= html_print_checkbox('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name');
$label_select_child_left = 'label_select_child_left';
$label_select_parent = 'label_select_parent';
}
$table->data[2][0] = __('IP Address');
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
$table_alias = '<div class="label_select"><p class="input_label">'.__('Alias').': '.ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</p>';
$table_alias .= '<div class='.$label_select_parent.'>';
$table_alias .= '<div class='.$label_select_child_left.'>'.html_print_input_text('alias', $alias, '', 50, 100, true).'</div>';
if ($new_agent) {
$table_alias .= '<div class="label_select_child_right">'.html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name').'</div>';
}
$table_alias .= '</div></div>';
$table_ip = '<div class="label_select"><p class="input_label">'.__('IP Address').': </p>';
$table_ip .= '<div class="label_select_parent">';
$table_ip .= '<div class="label_select_child_left">'.html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).'</div>';
$table_ip .= '<div class="label_select_child_right">'.html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true).'</div>';
$table_ip .= '</div></div>';
if ($id_agente) {
$table->data[2][1] .= '&nbsp;&nbsp;&nbsp;&nbsp;';
$ip_all = agents_get_addresses($id_agente);
$table->data[2][1] .= html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true);
$table->data[2][1] .= '&nbsp;'.html_print_checkbox('delete_ip', 1, false, true).__('Delete selected');
$table_ip .= '<div class="label_select">';
$table_ip .= '<div class="label_select_parent">';
$table_ip .= '<div class="label_select_child_left">'.html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true).'</div>';
$table_ip .= '<div class="label_select_child_right">'.html_print_checkbox_switch('delete_ip', 1, false, true).__('Delete selected').'</div>';
$table_ip .= '</div></div>';
}
?>
@ -254,13 +257,12 @@ if ($id_agente) {
}
</style>
<?php
if (!$new_agent) {
$table->rowspan[2][2] = 3;
if (!$new_agent && $alias != '') {
if ($id_agente) {
$table->data[2][2] = "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
} else {
$table->data[2][2] = __('Only it is show when<br />the agent is saved.');
$table_qr_code .= "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
}
$table_qr_code .= '</div>';
}
$groups = users_get_groups($config['id_user'], 'AR', false);
@ -277,28 +279,32 @@ if (is_array($modules)) {
}
}
$table->data[4][0] = __('Primary group');
// Cannot change primary group if user have not permission for that group
$table_primary_group = '<div class="label_select"><p class="input_label">'.__('Primary group').': </p>';
$table_primary_group .= '<div class="label_select_parent">';
// Cannot change primary group if user have not permission for that group.
if (isset($groups[$grupo]) || $new_agent) {
$table->data[4][1] = html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true);
$table_primary_group .= html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true);
} else {
$table->data[4][1] = groups_get_name($grupo);
$table->data[4][1] .= html_print_input_hidden('grupo', $grupo, true);
$table_primary_group .= groups_get_name($grupo);
$table_primary_group .= html_print_input_hidden('grupo', $grupo, true);
}
$table->data[4][1] .= ' <span id="group_preview">';
$table->data[4][1] .= ui_print_group_icon($grupo, true);
$table->data[4][1] .= '</span>';
$table_primary_group .= '<div class="label_select_child_icons"><span id="group_preview">';
$table_primary_group .= ui_print_group_icon($grupo, true);
$table_primary_group .= '</span></div></div></div>';
$table->data[5][0] = __('Interval');
$table->data[5][1] = html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true);
$table_interval = '<div class="label_select"><p class="input_label">'.__('Interval').': </p>';
$table_interval .= '<div class="label_select_parent">';
$table_interval .= html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true);
if ($intervalo < SECONDS_5MINUTES) {
$table->data[5][1] .= clippy_context_help('interval_agent_min');
$table_interval .= clippy_context_help('interval_agent_min');
}
$table->data[6][0] = __('OS');
$table->data[6][1] = html_print_select_from_sql(
$table_interval .= '</div></div>';
$table_os = '<div class="label_select"><p class="input_label">'.__('OS').': </p>';
$table_os .= '<div class="label_select_parent">';
$table_os .= html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os',
'id_os',
$id_os,
@ -307,18 +313,19 @@ $table->data[6][1] = html_print_select_from_sql(
'0',
true
);
$table->data[6][1] .= ' <span id="os_preview">';
$table->data[6][1] .= ui_print_os_icon($id_os, false, true);
$table->data[6][1] .= '</span>';
$table_os .= '<div class="label_select_child_icons"> <span id="os_preview">';
$table_os .= ui_print_os_icon($id_os, false, true);
$table_os .= '</span></div></div></div>';
// Network server
// Network server.
$servers = servers_get_names();
if (!array_key_exists($server_name, $servers)) {
$server_Name = 0;
// Set the agent have not server.
}
$table->data[7][0] = __('Server');
$table_server = '<div class="label_select"><p class="input_label">'.__('Server').': </p>';
$table_server .= '<div class="label_select_parent">';
if ($new_agent) {
// Set first server by default.
$servers_get_names = servers_get_names();
@ -326,7 +333,7 @@ if ($new_agent) {
$server_name = reset($array_keys_servers_get_names);
}
$table->data[7][1] = html_print_select(
$table_server .= html_print_select(
servers_get_names(),
'server_name',
$server_name,
@ -334,36 +341,35 @@ $table->data[7][1] = html_print_select(
__('None'),
0,
true
).' '.ui_print_help_icon('agent_server', true);
).'<div class="label_select_child_icons">'.ui_print_help_icon('agent_server', true).'</div></div></div>';
// Description
$table->data[8][0] = __('Description');
$table->data[8][1] = html_print_input_text(
// Description.
$table_description = '<div class="label_select"><p class="input_label">'.__('Description').': </p>';
$table_description .= html_print_input_text(
'comentarios',
$comentarios,
'',
45,
200,
true
);
).'</div>';
html_print_table($table);
unset($table);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
echo '<div class="first_row">
<div class="agent_options '.$agent_options_update.' white_box">
<div class="agent_options_column_left">'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'</div>
<div class="agent_options_column_right">'.$table_interval.$table_os.$table_server.$table_description.'</div>
</div>';
if (!$new_agent && $alias != '') {
echo $table_qr_code;
}
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; ';
$table->style[4] = 'font-weight: bold;';
$table->data = [];
echo '</div>';
if (enterprise_installed()) {
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
$table->data['secondary_groups'][0] = __('Secondary groups').ui_print_help_icon('secondary_groups', true);
$table->data['secondary_groups'][1] = html_print_select_groups(
$table_adv_secondary_groups = '<div class="label_select"><p class="input_label">'.__('Secondary groups').': '.ui_print_help_icon('secondary_groups', true).'</p></div>';
$table_adv_secondary_groups_left = html_print_select_groups(
false,
// Use the current user to select the groups
'AR',
@ -390,7 +396,7 @@ if (enterprise_installed()) {
// CSS classnames (default)
false,
// Not disabled (default)
false,
'width:50%; min-width:170px; text-align:center',
// Inline styles (default)
false,
// Option style select (default)
@ -404,29 +410,31 @@ if (enterprise_installed()) {
// Do not show the primary group in this selection
);
$table->data['secondary_groups'][2] = html_print_input_image(
$table_adv_secondary_groups_arrows = html_print_input_image(
'add_secondary',
'images/darrowright.png',
'images/darrowright_green.png',
1,
'',
true,
[
'id' => 'right_autorefreshlist',
'title' => __('Add secondary groups'),
'onclick' => 'agent_manager_add_secondary_groups(event, '.$id_agente.');',
]
).'<br /><br /><br /><br />'.html_print_input_image(
).html_print_input_image(
'remove_secondary',
'images/darrowleft.png',
'images/darrowleft_green.png',
1,
'',
true,
[
'id' => 'left_autorefreshlist',
'title' => __('Remove secondary groups'),
'onclick' => 'agent_manager_remove_secondary_groups(event, '.$id_agente.');',
]
);
$table->data['secondary_groups'][3] = html_print_select(
$table_adv_secondary_groups_right .= html_print_select(
$secondary_groups_selected['for_select'],
// Values
'secondary_groups_selected',
@ -441,8 +449,16 @@ if (enterprise_installed()) {
// Nothing selected
true,
// Return HTML (not echo)
true
true,
// Multiple selection
true,
// Sort
'',
// Class
false,
// Disabled
'width:50%; min-width:170px; text-align:center'
// Style
);
// safe operation mode
@ -457,47 +473,42 @@ if (enterprise_installed()) {
$safe_mode_modules[$m['id_module']] = $m['name'];
}
$table->data[2][0] = __('Safe operation mode').ui_print_help_tip(
$table_adv_safe = '<div class="label_select_simple label_simple_items"><p class="input_label input_label_simple">'.__('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules
of this agent while the selected module is on CRITICAL status',
get_product_name()
),
true
);
$table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true);
$table->data[2][1] .= '&nbsp;&nbsp;'.__('Module').'&nbsp;'.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true);
).'</p>';
$table_adv_safe .= html_print_checkbox_switch('safe_mode', 1, $safe_mode, true);
$table_adv_safe .= __('Module').'&nbsp;'.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true).'</div>';
}
// Remote configuration
$table->data[5][0] = __('Remote configuration');
$table_adv_remote = '<div class="label_select"><p class="input_label">'.__('Remote configuration').': </p>';
if (!$new_agent) {
$table->data[5][1] = '<em>'.__('Not available').'</em>';
if (isset($filename)) {
if (file_exists($filename['md5'])) {
$table->data[5][1] = date('F d Y H:i:s', fileatime($filename['md5']));
// Delete remote configuration
$table->data[5][1] .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=main&amp;'.'disk_conf_delete=1&amp;'.'id_agente='.$id_agente.'">';
$table->data[5][1] .= html_print_image(
'images/cross.png',
true,
[
'title' => __('Delete remote configuration file'),
'style' => 'vertical-align: middle;',
]
).'</a>';
$table->data[5][1] .= '</a>'.ui_print_help_tip(
__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'),
true
);
}
}
if (!$new_agent && isset($filename) && file_exists($filename['md5'])) {
$table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5']));
// Delete remote configuration
$table_adv_remote .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=main&amp;'.'disk_conf_delete=1&amp;'.'id_agente='.$id_agente.'">';
$table_adv_remote .= html_print_image(
'images/cross.png',
true,
[
'title' => __('Delete remote configuration file'),
'style' => 'vertical-align: middle;',
]
).'</a>';
$table_adv_remote .= '</a>'.ui_print_help_tip(
__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'),
true
);
} else {
$table->data[5][1] = '<em>'.__('Not available').'</em>';
$table_adv_remote .= '<em>'.__('Not available').'</em>';
}
$table_adv_remote .= '</div>';
$cps_array[-1] = __('Disabled');
if ($cps > 0) {
@ -511,16 +522,16 @@ if (enterprise_installed()) {
$cps_array[$cps_inc] = __('Enabled');
}
$table->data[6][0] = __('Cascade protection services');
$table->data[6][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
$table->data[6][1] = html_print_select($cps_array, 'cps', $cps, '', '', 0, true);
$table_adv_cascade = '<div class="label_select"><p class="input_label">'.__('Cascade protection services').': ';
$table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'</p>';
$table_adv_cascade .= html_print_select($cps_array, 'cps', $cps, '', '', 0, true).'</div>';
}
// Custom ID
$table->data[0][0] = __('Custom ID');
$table->data[0][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, true);
$table_adv_custom_id = '<div class="label_select"><p class="input_label">'.__('Custom ID').': </p>';
$table_adv_custom_id .= html_print_input_text('custom_id', $custom_id, '', 16, 255, true).'</div>';
$table->data[1][0] = __('Parent');
$table_adv_parent = '<div class="label_select"><p class="input_label">'.__('Parent').': </p>';
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
@ -532,75 +543,79 @@ $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
$params['selectbox_id'] = 'cascade_protection_module';
$params['javascript_is_function_select'] = true;
$params['cascade_protection'] = true;
$table->data[1][1] = ui_print_agent_autocomplete_input($params);
$table_adv_parent .= '<div class="label_simple_items">';
$table_adv_parent .= ui_print_agent_autocomplete_input($params);
if (enterprise_installed()) {
$table->data[1][1] .= html_print_checkbox('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').'&nbsp;'.ui_print_help_icon('cascade_protection', true);
$table_adv_parent .= html_print_checkbox_switch('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').'&nbsp;'.ui_print_help_icon('cascade_protection', true);
}
$table->data[1][1] .= '&nbsp;&nbsp;'.__('Module').'&nbsp;'.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true);
$table_adv_parent .= __('Module').'&nbsp;'.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true).'</div></div>';
// Learn mode / Normal mode
$table->data[3][0] = __('Module definition').ui_print_help_icon('module_definition', true);
$table->data[3][1] = __('Learning mode').' '.html_print_radio_button_extended(
$table_adv_module_mode = '<div class="label_select"><p class="input_label">'.__('Module definition').': '.ui_print_help_icon('module_definition', true).'</p>';
$table_adv_module_mode .= '<div class="switch_radio_button">';
$table_adv_module_mode .= html_print_radio_button_extended(
'modo',
1,
'',
__('Learning mode'),
$modo,
false,
'show_modules_not_learning_mode_context_help();',
'style="margin-right: 40px;"',
'',
true
);
$table->data[3][1] .= __('Normal mode').' '.html_print_radio_button_extended(
$table_adv_module_mode .= html_print_radio_button_extended(
'modo',
0,
'',
__('Normal mode'),
$modo,
false,
'show_modules_not_learning_mode_context_help();',
'style="margin-right: 40px;"',
'',
true
);
$table->data[3][1] .= __('Autodisable mode').' '.html_print_radio_button_extended(
$table_adv_module_mode .= html_print_radio_button_extended(
'modo',
2,
'',
__('Autodisable mode'),
$modo,
false,
'show_modules_not_learning_mode_context_help();',
'style="margin-right: 40px;"',
'',
true
);
$table_adv_module_mode .= '</div></div>';
// Status (Disabled / Enabled)
$table->data[4][0] = __('Status');
$table->data[4][1] = __('Disabled').' '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).' '.html_print_radio_button_extended('disabled', 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
$table->data[4][1] .= __('Enabled').' '.html_print_radio_button_extended('disabled', 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
$table_adv_status = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'</p>';
$table_adv_status .= html_print_checkbox_switch('disabled', 1, $disabled, true).'</div>';
// Url address.
if (enterprise_installed()) {
$table->data[4][2] = __('Url address').ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true);
$table->data[4][3] = html_print_input_text(
$table_adv_url = '<div class="label_select"><p class="input_label">'.__('Url address').': '.ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true).'</p>';
$table_adv_url .= html_print_input_text(
'url_description',
$url_description,
'',
45,
255,
true
);
).'</div>';
} else {
$table->data[5][0] = __('Url address');
$table->data[5][1] = html_print_input_text(
$table_adv_url = '<div class="label_select"><p class="input_label">'.__('Url address').': </p></div>';
$table_adv_url .= html_print_input_text(
'url_description',
$url_description,
'',
45,
255,
true
);
).'</div>';
}
$table->data[5][2] = __('Quiet');
$table->data[5][3] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true);
$table->data[5][3] = html_print_checkbox('quiet', 1, $quiet, true);
$table_adv_quiet = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Quiet').': ';
$table_adv_quiet .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true).'</p>';
$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true).'</div>';
$listIcons = gis_get_array_list_icons();
@ -611,7 +626,7 @@ foreach ($listIcons as $index => $value) {
$path = 'images/gis_map/icons/';
// TODO set better method the path
$table->data[0][2] = __('Agent icon').ui_print_help_tip(__('Agent icon for GIS Maps.'), true);
$table_adv_agent_icon = '<div class="label_select"><p class="input_label">'.__('Agent icon').': '.ui_print_help_tip(__('Agent icon for GIS Maps.'), true).'</p>';
if ($icon_path == '') {
$display_icons = 'none';
// Hack to show no icon. Use any given image to fix not found image errors
@ -629,7 +644,7 @@ if ($icon_path == '') {
$path_warning = $path.$icon_path.'.warning.png';
}
$table->data[0][3] = html_print_select(
$table_adv_agent_icon .= html_print_select(
$arraySelectIcon,
'icon_path',
$icon_path,
@ -637,63 +652,68 @@ $table->data[0][3] = html_print_select(
__('None'),
'',
true
).'&nbsp;'.html_print_image(
).html_print_image(
$path_ok,
true,
[
'id' => 'icon_ok',
'style' => 'display:'.$display_icons.';',
]
).'&nbsp;'.html_print_image(
).html_print_image(
$path_bad,
true,
[
'id' => 'icon_bad',
'style' => 'display:'.$display_icons.';',
]
).'&nbsp;'.html_print_image(
).html_print_image(
$path_warning,
true,
[
'id' => 'icon_warning',
'style' => 'display:'.$display_icons.';',
]
);
).'</div>';
if ($config['activate_gis']) {
$table->data[3][2] = __('Ignore new GIS data:');
$table->data[3][3] = __('Yes').' '.html_print_radio_button_extended(
'update_gis_data',
0,
'',
$update_gis_data,
false,
'',
'style="margin-right: 40px;"',
true
);
$table->data[3][3] .= __('No').' '.html_print_radio_button_extended(
'update_gis_data',
1,
'',
$update_gis_data,
false,
'',
'style="margin-right: 40px;"',
true
);
$table_adv_gis = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Ignore new GIS data:').'</p>';
if ($new_agent) {
$update_gis_data = true;
}
$table_adv_gis .= html_print_checkbox_switch('update_gis_data', 1, $update_gis_data, true).'No / Yes</div>';
}
ui_toggle(html_print_table($table, true), __('Advanced options'));
unset($table);
$table_adv_options = $table_adv_secondary_groups.'<div class="secondary_groups_select" style="margin-bottom:30px;">
<div class="secondary_groups_list_left">
'.$table_adv_secondary_groups_left.'
</div>
<div class="secondary_groups_select_arrows">
'.$table_adv_secondary_groups_arrows.'
</div>
<div class="secondary_groups_list_right">
'.$table_adv_secondary_groups_right.'
</div>
</div>
<div class="agent_options agent_options_adv">
<div class="agent_options_column_left" >'.$table_adv_parent.$table_adv_custom_id.$table_adv_module_mode.$table_adv_cascade.$table_adv_gis.'</div>
<div class="agent_options_column_right" >'.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'</div>
</div>';
echo '<div class="ui_toggle">';
ui_toggle($table_adv_options, __('Advanced options'), '', true, false, 'white_box white_box_opened');
echo '</div>';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'custom_fields_table';
$table->head = [];
$table->style = [];
$table->style[0] = 'font-weight: bold; width: 100px;';
$table->style[0] = 'font-weight: bold;';
$table->data = [];
$fields = db_get_all_fields_in_table('tagent_custom_fields');
@ -703,11 +723,15 @@ if ($fields === false) {
}
foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>';
$id_custom_field = $field['id_field'];
$data[0] = '<div class="field_title" onclick="show_custom_field_row('.$id_custom_field.')">';
$data[0] .= '<b>'.$field['name'].'</b>';
$data[0] .= ui_print_help_tip(
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
true
);
$data[0] .= '</div>';
$combo = [];
$combo = $field['combo_values'];
$combo = explode(',', $combo);
@ -730,7 +754,7 @@ foreach ($fields as $field) {
}
if ($field['is_password_type']) {
$data[1] = html_print_input_text_extended(
$data_field[1] = html_print_input_text_extended(
'customvalue_'.$field['id_field'],
$custom_value,
'customvalue_'.$field['id_field'],
@ -744,18 +768,18 @@ foreach ($fields as $field) {
true
);
} else {
$data[1] = html_print_textarea(
$data_field[1] = html_print_textarea(
'customvalue_'.$field['id_field'],
2,
65,
$custom_value,
'style="min-height: 30px; width:96%;"',
'style="min-height: 30px;"',
true
);
}
if ($field['combo_values'] !== '') {
$data[1] = html_print_select(
$data_field[1] = html_print_select(
$combo_values,
'customvalue_'.$field['id_field'],
$custom_value,
@ -776,19 +800,25 @@ foreach ($fields as $field) {
);
};
$table->rowid[] = 'name_field-'.$id_custom_field;
array_push($table->data, $data);
$table->rowid[] = 'field-'.$id_custom_field;
array_push($table->data, $data_field);
}
if (!empty($fields)) {
ui_toggle(html_print_table($table, true), __('Custom fields'));
echo '<div class="ui_toggle">';
ui_toggle(html_print_table($table, true), __('Custom fields'), '', true, false, 'white_box white_box_opened');
echo '</div>';
}
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
// The context help about the learning mode.
if ($modo == 0) {
echo "<span id='modules_not_learning_mode_context_help' style=''>";
echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>";
} else {
echo "<span id='modules_not_learning_mode_context_help' style='display: none;'>";
}
@ -798,7 +828,7 @@ echo '</span>';
if ($id_agente) {
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<div class="action-buttons">';
html_print_submit_button(
__('Update'),
'updbutton',
@ -825,6 +855,19 @@ ui_require_jquery_file('bgiframe');
?>
<script type="text/javascript">
// Show/Hide custom field row.
function show_custom_field_row(id){
if( $('#field-'+id).css('display') == 'none'){
$('#field-'+id).css('display','table-row');
$('#name_field-'+id).addClass('custom_field_row_opened');
}
else{
$('#field-'+id).css('display','none');
$('#name_field-'+id).removeClass('custom_field_row_opened');
}
}
//Use this function for change 3 icons when change the selectbox
function changeIcons() {
var icon = $("#icon_path :selected").val();
@ -863,7 +906,7 @@ ui_require_jquery_file('bgiframe');
function show_modules_not_learning_mode_context_help() {
if ($("input[name='modo'][value=0]").is(':checked')) {
$("#modules_not_learning_mode_context_help").show();
$("#modules_not_learning_mode_context_help").show().css('padding-right','8px');
}
else {
$("#modules_not_learning_mode_context_help").hide();

View File

@ -186,6 +186,10 @@ switch ($template['type']) {
$condition = __('The alert would fire when the module is in critical status');
break;
case 'not_normal':
$condition = __('The alert would fire when the module is in not normal status');
break;
case 'unknown':
$condition = __('The alert would fire when the module is in unknown status');
break;

View File

@ -679,7 +679,7 @@ if ($step == 2) {
'type',
$type,
'',
__('Select'),
__('None'),
0,
true,
false,
@ -1018,6 +1018,7 @@ var onchange_msg = <?php echo '"'.__('The alert would fire when the module value
var onchange_not = <?php echo '"'.__('The alert would fire when the module value does not change').'"'; ?>;
var unknown = <?php echo "'".__('The alert would fire when the module is in unknown status')."'"; ?>;
var error_message_min_max_zero = <?php echo "'".__('The alert template cannot have the same value for min and max thresholds.')."'"; ?>;
var not_normal = <?php echo "'".__('The alert would fire when the module is in not normal status')."'"; ?>;
function check_fields_step2() {
var correct = true;
@ -1174,6 +1175,13 @@ if ($step == 2) {
/* Show example */
$("span#example").empty ().append (critical);
break;
case "not_normal":
$("#template-value, #template-max, span#matches_value, #template-min").hide ();
$("#template-example").show ();
/* Show example */
$("span#example").empty ().append (not_normal);
break;
case "onchange":
$("#template-value, #template-max, #template-min").hide ();
$("#template-example, span#matches_value").show ();

View File

@ -742,7 +742,7 @@ class HostDevices extends Wizard
echo '<div class="white_box">
<div class="edit_discovery_info" style="margin-bottom: 15px;">
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close'), 'style' => 'width: 60%;'], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'.'</div>'.'<div style="width: 35%;">'.$group_select.'</div>'.'</div>'.'<div class="edit_discovery_info">

View File

@ -443,7 +443,7 @@ class CustomNetScan extends Wizard
'name' => 'taskname',
'value' => $this->task['name'],
'type' => 'text',
'size' => 25,
'size' => 50,
],
];
@ -465,7 +465,7 @@ class CustomNetScan extends Wizard
'name' => 'comment',
'value' => $this->task['description'],
'type' => 'text',
'size' => 25,
'size' => 50,
],
];
@ -652,7 +652,7 @@ class CustomNetScan extends Wizard
'value' => $explanation,
'return' => true,
'attributes' => 'style="width: 388px;"',
'class' => 'discovery_textarea_input'
'class' => 'discovery_textarea_input',
],
];

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC190510';
$build_version = 'PC190514';
$pandora_version = 'v7.0NG.734';
// Do not overwrite default timezone set if defined.

View File

@ -3545,7 +3545,13 @@ function series_type_graph_array($data, $show_elements_graph)
&& is_array($show_elements_graph['labels'])
&& (count($show_elements_graph['labels']) > 0)
) {
$name_legend = $data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].' ';
if ($show_elements_graph['unit']) {
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
} else {
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].': ';
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].': ';
}
} else {
if (strpos($key, 'baseline') !== false) {
if ($value['unit']) {

View File

@ -664,6 +664,7 @@ function alerts_get_alert_templates_types()
$types['unknown'] = __('Unknown status');
$types['onchange'] = __('On Change');
$types['always'] = __('Always');
$types['not_normal'] = __('Not normal status');
return $types;
}
@ -680,7 +681,7 @@ function alerts_get_alert_templates_type_name($type)
{
$types = alerts_get_alert_templates_types();
if (! isset($type[$type])) {
if (!isset($types[$type])) {
return __('Unknown');
}

View File

@ -1646,7 +1646,7 @@ function events_get_agent(
$sql_where,
0,
1000,
is_metaconsole(),
(is_metaconsole() && $id_server) ? true : false,
false,
false,
$history

View File

@ -1361,7 +1361,7 @@ function graphic_combined_module(
$data_module_graph['module_id'] = $agent_module_id;
$data_module_graph['unit'] = $module_data['unit'];
// stract data
// Stract data.
$array_data_module = grafico_modulo_sparse_data(
$agent_module_id,
$date_array,
@ -1372,12 +1372,14 @@ function graphic_combined_module(
$series_suffix = $i;
// convert to array graph and weight
// Convert to array graph and weight.
foreach ($array_data_module as $key => $value) {
$array_data[$key] = $value;
if ($params_combined['weight_list'][$i] > 1) {
if ($params_combined['weight_list'][$i] != 1) {
foreach ($value['data'] as $k => $v) {
$array_data[$key]['data'][$k][1] = ($v[1] * $params_combined['weight_list'][$i]);
if ($v[1] != false) {
$array_data[$key]['data'][$k][1] = ($v[1] * $params_combined['weight_list'][$i]);
}
}
}
}

View File

@ -2437,7 +2437,7 @@ function ui_print_status_image($type, $title='', $return=false, $options=false,
*/
function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false)
function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false, $toggle_class='')
{
// Generate unique Id
$uniqid = uniqid('');
@ -2458,12 +2458,11 @@ function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false)
// Link to toggle
$output = '';
$output .= '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image($original, true, ['title' => $title, 'id' => 'image_'.$uniqid]).'&nbsp;&nbsp;<b>'.$name.'</b></a>';
$output .= '<br />';
// $output .= '<br />';
// if (!defined("METACONSOLE"))
// $output .= '<br />';
// Code into a div
$output .= "<div id='tgl_div_".$uniqid."' style='".$style."'>\n";
$output .= "<div id='tgl_div_".$uniqid."' style='".$style."' class='".$toggle_class."'>\n";
$output .= $code;
$output .= '</div>';

View File

@ -162,7 +162,7 @@ span.breadcrumb_link {
.edit_discovery_info {
display: flex;
align-items: center;
align-items: flex-start;
padding-top: 25px;
}
@ -181,63 +181,41 @@ span.breadcrumb_link {
label {
color: #343434 !important;
font-size: 1.5em;
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-weight: bold;
margin: 0px 0px 5px 0px;
}
.discovery_full_width_input {
width: 100%;
}
select {
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1.6em !important;
color: #686868;
li > input[type="text"],
li > input[type="password"],
.discovery_text_input > input[type="password"],
.discovery_text_input > input[type="text"],
#interval_manual > input[type="text"] {
background-color: transparent !important;
border: none;
border-radius: 0 !important;
border-bottom: 1px solid #343434;
padding: 0px 0px 2px 0px;
box-sizing: border-box;
margin-bottom: 4px;
}
select > option {
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1em !important;
}
li > input[type=text], li > input[type=password], .discovery_text_input > input[type=password], .discovery_text_input > input[type=text], #interval_manual > input[type=text] {
background-color: transparent !important;
border: none;
border-radius: 0 !important;
border-bottom: 1px solid #343434;
padding: 0px 0px 2px 0px;
box-sizing: border-box;
margin-bottom: 4px;
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1.6em;
}
li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_input > input[type=password]:focus, .discovery_text_input > input[type=text]:focus, #interval_manual > input[type=text]:focus {
font-weight: bold;
}
#interval_manual > input[type=text] {
#interval_manual > input[type="text"] {
width: 50px;
margin-left: 10px;
margin-right: 10px;
}
.discovery_list_input {
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1.6em !important;
color: #686868;
width: 100%;
height: 240px;
border: 1px solid #CBCBCB;
border: 1px solid #cbcbcb;
overflow-y: auto;
}
.discovery_list_input option {
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1.1em !important;
padding-left: 30%;
text-align: center;
}
.discovery_list_input option:checked {
@ -253,11 +231,9 @@ li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_in
max-height: 100px;
max-width: 100%;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box;
resize: none;
font-family: "lato-bolder", "Open Sans", sans-serif !important;
font-size: 1.4em !important;
}
a.tip {
@ -270,4 +246,4 @@ a.tip {
.discovery_interval_select_width {
width: 90%;
}
}

View File

@ -266,6 +266,38 @@ th {
letter-spacing: 0.3pt;
}
/* Remove background when autocomplete */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus textarea:-webkit-autofill,
textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}
/* All select type multiple */
select[multiple] option:checked,
select[multiple] option:checked {
background: #82b92e linear-gradient(0deg, #82b92e 0%, #82b92e 100%);
color: #fff !important;
}
select option:checked,
select option:checked {
background-color: #82b92e;
color: #fff !important;
}
select > option:hover {
background-color: #cbcbcb;
}
select:-internal-list-box {
border: none;
}
/* --- Font ttf --- */
@font-face {
font-family: "DejaVuSerif-BoldFont";
@ -5011,28 +5043,6 @@ input:checked + .p-slider:before {
text-align: center;
}
select#autorefresh_list_out[multiple] option:checked,
select#autorefresh_list[multiple] option:checked {
background: #82b92e linear-gradient(0deg, #82b92e 0%, #82b92e 100%);
color: #fff !important;
}
select#autorefresh_list_out option:checked,
select#autorefresh_list option:checked {
background-color: #82b92e;
color: #fff !important;
}
select#autorefresh_list_out > option:hover,
select#autorefresh_list > option:hover {
background-color: #cbcbcb;
}
select#autorefresh_list_out:-internal-list-box,
select#autorefresh_list:-internal-list-box {
border: none;
}
.autorefresh_select .autorefresh_select_list_out,
.autorefresh_select .autorefresh_select_list {
width: 45%;
@ -5511,6 +5521,297 @@ table.info_table.policy_sub_table {
align-items: flex-start;
}
/*
* ---------------------------------------------------------------------
* - Layout for the new forms
* ---------------------------------------------------------------------
*/
.first_row {
margin-bottom: 20px;
display: flex;
}
.label_simple_one_item {
display: flex;
align-items: flex-end;
}
.label_simple_items {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.label_simple_items > * {
margin-right: 5px;
}
.input_label {
color: #343434 !important;
font-weight: bold;
padding-right: 10px;
margin: 0px 0px 5px 0px;
}
.input_label_simple {
margin-bottom: 0;
margin-top: 0;
display: inline;
}
.label_select_parent {
display: flex;
justify-content: space-between;
align-items: center;
}
.label_select_child_left {
width: 80%;
min-width: 100px;
}
.label_select_child_right {
width: 20%;
min-width: 140px;
align-items: center;
display: flex;
}
.label_select_child_icons {
text-align: right;
width: 5%;
min-width: 30px;
}
/* Inputs type text shown as a black line */
.agent_options input[type="text"] {
background-color: transparent !important;
border: none;
border-radius: 0 !important;
border-bottom: 1px solid #343434;
padding: 2px 5px;
box-sizing: border-box;
background-repeat: no-repeat;
background-position: left bottom 2px;
margin-bottom: 4px;
}
/*
* ---------------------------------------------------------------------
* - Create/Update Agent - agent_manager.php
* ---------------------------------------------------------------------
*/
.agent_options {
width: 100%;
margin-right: 0px;
display: flex;
flex-flow: row wrap;
flex-direction: row;
justify-content: space-between;
box-sizing: border-box;
}
.agent_options_update {
width: 85%;
margin-right: 20px;
}
.agent_options_column_left,
.agent_options_column_right {
width: 50%;
box-sizing: border-box;
}
.agent_options_column_left {
padding-right: 50px;
}
.agent_qr {
width: 15%;
text-align: center;
box-sizing: border-box;
padding: 20px 0px;
display: flex;
justify-content: center;
flex-direction: column;
min-width: 150px;
}
a#qr_code_agent_view {
margin-top: 5px;
}
.first_row .agent_options_column_right select,
.first_row .agent_options_column_right input,
.first_row .agent_options_column_left select#grupo {
width: 95%;
box-sizing: border-box;
}
.first_row .agent_options_column_left .p-switch {
margin-right: 5px;
margin-left: 10px;
}
.agent_options_column_left input#text-direccion,
.agent_options_column_left select#address_list,
.agent_options_column_left input#text-agente,
.agent_options_column_left input#text-alias {
width: 100%;
box-sizing: border-box;
}
.agent_options_agent_name > * {
margin-left: 5px;
}
.custom_fields_table {
border-spacing: 0px;
}
.custom_fields_table tr.datos {
background-color: #f7f7f7;
display: none;
}
.custom_fields_table tr.datos2 {
cursor: pointer;
}
.custom_fields_table tr td {
border: 1px solid #e0e0e0;
}
.custom_fields_table tr.datos2 td div.field_title {
padding: 10px;
}
.custom_fields_table tr.datos2 td {
border-radius: 4px;
padding: 0px;
}
.custom_fields_table tr.datos td {
padding: 15px 10px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.custom_fields_table .custom_field_row_opened td {
border-bottom-left-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
.secondary_groups_select {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
}
.secondary_groups_select .secondary_groups_select_arrows input {
display: grid;
margin: 0 auto;
}
.secondary_groups_select .secondary_groups_list_left {
text-align: right;
width: 50%;
}
.secondary_groups_select .secondary_groups_list_right {
text-align: left;
width: 50%;
}
.secondary_groups_select .secondary_groups_select_arrows {
padding: 0 50px;
}
.secondary_groups_select_arrows a {
display: block;
}
.agent_options_adv .agent_options_column_right .label_select select,
.agent_options_adv .agent_options_column_right .label_select input[type="text"],
.agent_options_adv #text-custom_id,
.agent_options_adv #cps {
width: 100%;
box-sizing: border-box;
}
.agent_options_adv .label_select_simple.label_simple_one_item .p-switch {
margin-right: 5px;
}
/*
* ---------------------------------------------------------------------
* - CLASSES FOR THE NEW TOGGLES -
* ---------------------------------------------------------------------
*/
.ui_toggle {
margin-bottom: 20px;
}
.ui_toggle > a:first-child {
background-color: #fff;
border: 1px solid #f3f3f3;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding: 5px;
display: block;
}
.white_box_opened {
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
/*
* ---------------------------------------------------------------------
* - SWITCH RADIO BUTTONS -
* ---------------------------------------------------------------------
*/
.switch_radio_button {
display: flex;
overflow: hidden;
}
.switch_radio_button input {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
border: 0;
overflow: hidden;
}
.switch_radio_button label {
background-color: #fff;
color: rgba(0, 0, 0, 0.6);
line-height: 1;
text-align: center;
padding: 7px 14px;
margin-right: -1px;
border: 1px solid #cbcbcb;
border-radius: 4px;
transition: all 0.1s ease-in-out;
}
.switch_radio_button label:hover {
cursor: pointer;
}
.switch_radio_button input:checked + label {
background-color: #82b92e;
box-shadow: none;
color: #fff;
}
.switch_radio_button label:last-child {
margin-right: 0px;
}
/*
* ---------------------------------------------------------------------
* - MODULE GRAPHS

View File

@ -6,7 +6,8 @@ ul.wizard {
}
ul.wizard li {
padding: 10px;
padding-bottom: 10px;
padding-top: 10px;
}
ul.wizard li > label:not(.p-switch) {

View File

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

View File

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

View File

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

View File

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

View File

@ -448,7 +448,7 @@ CREATE TABLE IF NOT EXISTS `talert_templates` (
`field13` text NOT NULL,
`field14` text NOT NULL,
`field15` text NOT NULL,
`type` ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always'),
`type` ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always', 'not_normal'),
`value` varchar(255) default '',
`matches_value` tinyint(1) default 0,
`max_value` double(18,2) default NULL,

View File

@ -114,10 +114,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
('custom_report_front_header', ''),
('custom_report_front_footer', ''),
('MR', 27),
('MR', 28),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '734'),
('current_package_enterprise', '735'),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}'),
('custom_docs_logo', 'default_docs.png'),
('custom_support_logo', 'default_support.png'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.734-190510
Version: 7.0NG.734-190514
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.734";
my $pandora_build = "190510";
my $pandora_build = "190514";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -391,7 +391,11 @@ sub pandora_generate_alerts ($$$$$$$$;$$$) {
}
# Get enabled alerts associated with this module
my $alert_type_filter = defined ($alert_type) ? " AND type = '$alert_type'" : '';
my $alert_type_filter = '';
if (defined($alert_type)) {
# not_normal includes unknown!
$alert_type_filter = $alert_type eq 'unknown' ? " AND (type = 'unknown' OR type = 'not_normal')" : " AND type = '$alert_type'";
}
my @alerts = get_db_rows ($dbh, '
SELECT talert_template_modules.id as id_template_module,
talert_template_modules.*, talert_templates.*
@ -566,6 +570,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$) {
return $status if ($last_status != 1 && $alert->{'type'} eq 'critical');
return $status if ($last_status != 2 && $alert->{'type'} eq 'warning');
return $status if ($last_status != 3 && $alert->{'type'} eq 'unknown');
return $status if ($last_status == 0 && $alert->{'type'} eq 'not_normal');
}
# Event alert
else {
@ -4238,7 +4243,7 @@ sub get_module_status ($$$) {
$critical_str = (defined ($critical_str) && valid_regex ($critical_str) == 1) ? safe_output($critical_str) : '';
$warning_str = (defined ($warning_str) && valid_regex ($warning_str) == 1) ? safe_output($warning_str) : '';
if ($module_type =~ m/_proc$/ && ($critical_min eq $critical_max)) {
if (($module_type =~ m/_proc$/ || $module_type =~ /web_analysis/) && ($critical_min eq $critical_max)) {
($critical_min, $critical_max) = (0, 1);
}
elsif ($module_type =~ m/keep_alive/ && ($critical_min eq $critical_max)) {

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.734";
my $pandora_build = "190510";
my $pandora_build = "190514";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.734
%define release 190510
%define release 190514
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.734
%define release 190510
%define release 190514
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.734"
PI_BUILD="190510"
PI_BUILD="190514"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.734 PS190510";
my $version = "7.0NG.734 PS190514";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.734 PS190510";
my $version = "7.0NG.734 PS190514";
# save program name for logging
my $progname = basename($0);