Merge remote-tracking branch 'origin/develop' into ent-4705-encriptado-de-nuevos-tokens

This commit is contained in:
marcos 2020-02-19 09:31:31 +01:00
commit e265bc2970
31 changed files with 352 additions and 333 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.743-200218 Version: 7.0NG.743-200219
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.743" PI_VERSION="7.0NG.743"
PI_BUILD="200218" PI_BUILD="200219"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{200218} {200219}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.743-200218 Version: 7.0NG.743-200219
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -0,0 +1,14 @@
START TRANSACTION;
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
SET @st_oum744 = (SELECT IF(
(SELECT COUNT(*) FROM tconfig WHERE token LIKE 'server_unique_identifier') > 0,
"SELECT 1",
"INSERT INTO `tconfig` (`token`, `value`) VALUES ('server_unique_identifier', replace(uuid(),'-',''))"
));
PREPARE pr_oum744 FROM @st_oum744;
EXECUTE pr_oum744;
DEALLOCATE PREPARE pr_oum744;
COMMIT;

View File

@ -392,6 +392,8 @@ ALTER TABLE `tmetaconsole_setup` MODIFY COLUMN `meta_dbuser` text NULL,
MODIFY COLUMN `meta_dbport` text NULL, MODIFY COLUMN `meta_dbport` text NULL,
MODIFY COLUMN `meta_dbname` text NULL; MODIFY COLUMN `meta_dbname` text NULL;
ALTER TABLE `tmetaconsole_setup` ADD COLUMN `server_uid` TEXT NOT NULL default '';
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tprofile_view` -- Table `tprofile_view`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------

View File

@ -182,19 +182,11 @@ $table_simple->cellclass = [];
$table_simple->colspan = []; $table_simple->colspan = [];
$table_simple->colspan[6][1] = 3;
$table_simple->rowspan = []; $table_simple->rowspan = [];
if (strstr($page, 'policy_modules')) {
$table_simple->rowspan[3][2] = 3; $table_simple->rowspan[2][2] = 3;
$table_simple->colspan[3][2] = 2; $table_simple->colspan[2][2] = 2;
} else { $table_simple->colspan[3][1] = 3;
$table_simple->rowspan[4][2] = 3;
$table_simple->colspan[4][2] = 2;
$table_simple->colspan[5][1] = 3;
}
$table_simple->data[0][0] = __('Name'); $table_simple->data[0][0] = __('Name');
$table_simple->data[0][1] = html_print_input_text_extended( $table_simple->data[0][1] = html_print_input_text_extended(
@ -264,40 +256,9 @@ if ((isset($id_agent_module) && $id_agent_module) || $id_policy_module != 0) {
} }
$in_policy = strstr($page, 'policy_modules'); $in_policy = strstr($page, 'policy_modules');
if (!$in_policy) {
// Cannot select the current module to be itself parent.
$module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => "<>$id_agent_module"] : '';
$table_simple->data[1][0] = __('Module parent');
$modules_can_be_parent = agents_get_modules(
$id_agente,
false,
$module_parent_filter
);
// If the user cannot have access to parent module, only print the name.
if ($parent_module_id != 0
&& !in_array($parent_module_id, array_keys($modules_can_be_parent))
) {
$table_simple->data[1][1] = db_get_value(
'nombre',
'tagente_modulo',
'id_agente_modulo',
$parent_module_id
);
} else {
$table_simple->data[1][1] = html_print_select(
$modules_can_be_parent,
'parent_module_id',
$parent_module_id,
'',
__('Not assigned'),
'0',
true
);
}
}
$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help'); $table_simple->data[1][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
$table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true); $table_simple->data[1][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
if (!$edit) { if (!$edit) {
$sql = sprintf( $sql = sprintf(
@ -315,8 +276,8 @@ if (!$edit) {
$type_names_hash[$tn['id_tipo']] = $tn['nombre']; $type_names_hash[$tn['id_tipo']] = $tn['nombre'];
} }
$table_simple->data[2][1] = '<em>'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</em>'; $table_simple->data[1][1] = '<em>'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</em>';
$table_simple->data[2][1] .= html_print_input_hidden( $table_simple->data[1][1] .= html_print_input_hidden(
'type_names', 'type_names',
base64_encode(io_json_mb_encode($type_names_hash)), base64_encode(io_json_mb_encode($type_names_hash)),
true true
@ -358,7 +319,7 @@ if (!$edit) {
} }
} }
$table_simple->data[2][1] = html_print_select( $table_simple->data[1][1] = html_print_select(
$type_description_hash, $type_description_hash,
'id_module_type', 'id_module_type',
$idModuleType, $idModuleType,
@ -376,7 +337,7 @@ if (!$edit) {
); );
// Store the relation between id and name of the types on a hidden field. // Store the relation between id and name of the types on a hidden field.
$table_simple->data[2][1] .= html_print_input_hidden( $table_simple->data[1][1] .= html_print_input_hidden(
'type_names', 'type_names',
base64_encode(io_json_mb_encode($type_names_hash)), base64_encode(io_json_mb_encode($type_names_hash)),
true true
@ -409,74 +370,22 @@ if ($edit_module) {
$help_header = 'webserver_module_tab'; $help_header = 'webserver_module_tab';
} }
$table_simple->data[2][0] = __('Type').' '; $table_simple->data[1][0] = __('Type').' ';
$table_simple->data[2][0] .= ui_print_help_icon($help_header, true); $table_simple->data[1][0] .= ui_print_help_icon($help_header, true);
} }
if ($disabledBecauseInPolicy) { if ($disabledBecauseInPolicy) {
$table_simple->data[2][3] .= html_print_input_hidden( $table_simple->data[1][3] .= html_print_input_hidden(
'id_module_group', 'id_module_group',
$id_module_group, $id_module_group,
true true
); );
} }
$table_simple->data[3][0] = __('Dynamic Threshold Interval'); $table_simple->data[2][0] = __('Warning status');
$table_simple->data[3][1] = html_print_extended_select_for_time(
'dynamic_interval',
$dynamic_interval,
'',
'None',
'0',
10,
true,
'width:150px',
false,
$classdisabledBecauseInPolicy,
$disabledBecauseInPolicy
);
$table_simple->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).'</a>';
if ($in_policy) {
$table_simple->cellclass[2][2] = 'hide_dinamic';
$table_simple->cellclass[2][3] = 'hide_dinamic';
} else {
$table_simple->cellclass[3][2] = 'hide_dinamic';
$table_simple->cellclass[3][3] = 'hide_dinamic';
}
$table_simple->data[3][2] = '<span><em>'.__('Dynamic Threshold Min. ').'</em>';
$table_simple->data[3][2] .= html_print_input_text(
'dynamic_min',
$dynamic_min,
'',
10,
255,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
$table_simple->data[3][2] .= '<br /><em>'.__('Dynamic Threshold Max. ').'</em>';
$table_simple->data[3][2] .= html_print_input_text(
'dynamic_max',
$dynamic_max,
'',
10,
255,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
$table_simple->data[3][3] = '<span><em>'.__('Dynamic Threshold Two Tailed: ').'</em>';
$table_simple->data[3][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_tailed, true, $disabledBecauseInPolicy);
$table_simple->data[4][0] = __('Warning status');
if (!modules_is_string_type($id_module_type) || $edit) { if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][1] .= '<span id="minmax_warning"><em>'.__('Min. ').'</em>'; $table_simple->data[2][1] .= '<span id="minmax_warning"><em>'.__('Min. ').'</em>';
$table_simple->data[4][1] .= html_print_input_text( $table_simple->data[2][1] .= html_print_input_text(
'min_warning', 'min_warning',
$min_warning, $min_warning,
'', '',
@ -488,8 +397,8 @@ if (!modules_is_string_type($id_module_type) || $edit) {
'', '',
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
); );
$table_simple->data[4][1] .= '<br /><em>'.__('Max.').'</em>'; $table_simple->data[2][1] .= '<br /><em>'.__('Max.').'</em>';
$table_simple->data[4][1] .= html_print_input_text( $table_simple->data[2][1] .= html_print_input_text(
'max_warning', 'max_warning',
$max_warning, $max_warning,
'', '',
@ -504,8 +413,8 @@ if (!modules_is_string_type($id_module_type) || $edit) {
} }
if (modules_is_string_type($id_module_type) || $edit) { if (modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][1] .= '<span id="string_warning"><em>'.__('Str.').'</em>'; $table_simple->data[2][1] .= '<span id="string_warning"><em>'.__('Str.').'</em>';
$table_simple->data[4][1] .= html_print_input_text( $table_simple->data[2][1] .= html_print_input_text(
'str_warning', 'str_warning',
str_replace('"', '', $str_warning), str_replace('"', '', $str_warning),
'', '',
@ -519,17 +428,17 @@ if (modules_is_string_type($id_module_type) || $edit) {
).'</span>'; ).'</span>';
} }
$table_simple->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table_simple->data[2][1] .= '<br /><em>'.__('Inverse interval').'</em>';
$table_simple->data[4][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy); $table_simple->data[2][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy);
if (!modules_is_string_type($id_module_type) || $edit) { if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>'; $table_simple->data[2][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
} }
$table_simple->data[5][0] = __('Critical status'); $table_simple->data[3][0] = __('Critical status');
if (!modules_is_string_type($id_module_type) || $edit) { if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[5][1] .= '<span id="minmax_critical"><em>'.__('Min. ').'</em>'; $table_simple->data[3][1] .= '<span id="minmax_critical"><em>'.__('Min. ').'</em>';
$table_simple->data[5][1] .= html_print_input_text( $table_simple->data[3][1] .= html_print_input_text(
'min_critical', 'min_critical',
$min_critical, $min_critical,
'', '',
@ -541,8 +450,8 @@ if (!modules_is_string_type($id_module_type) || $edit) {
'', '',
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
); );
$table_simple->data[5][1] .= '<br /><em>'.__('Max.').'</em>'; $table_simple->data[3][1] .= '<br /><em>'.__('Max.').'</em>';
$table_simple->data[5][1] .= html_print_input_text( $table_simple->data[3][1] .= html_print_input_text(
'max_critical', 'max_critical',
$max_critical, $max_critical,
'', '',
@ -557,8 +466,8 @@ if (!modules_is_string_type($id_module_type) || $edit) {
} }
if (modules_is_string_type($id_module_type) || $edit) { if (modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[5][1] .= '<span id="string_critical"><em>'.__('Str.').'</em>'; $table_simple->data[3][1] .= '<span id="string_critical"><em>'.__('Str.').'</em>';
$table_simple->data[5][1] .= html_print_input_text( $table_simple->data[3][1] .= html_print_input_text(
'str_critical', 'str_critical',
str_replace('"', '', $str_critical), str_replace('"', '', $str_critical),
'', '',
@ -572,109 +481,24 @@ if (modules_is_string_type($id_module_type) || $edit) {
).'</span>'; ).'</span>';
} }
$table_simple->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table_simple->data[3][1] .= '<br /><em>'.__('Inverse interval').'</em>';
$table_simple->data[5][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy); $table_simple->data[3][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy);
// FF stands for Flip-flop. $table_simple->data[4][0] = __('Historical data');
$table_simple->data[6][0] = __('FF threshold').' ';
$table_simple->data[6][1] .= __('Keep counters');
$table_simple->data[6][1] .= html_print_checkbox(
'ff_type',
1,
$ff_type,
true,
$disabledBecauseInPolicy
).'<br />';
$table_simple->data[6][1] .= html_print_radio_button(
'each_ff',
0,
'',
$each_ff,
true,
$disabledBecauseInPolicy
);
$table_simple->data[6][1] .= ' '.__('All state changing').' : ';
$table_simple->data[6][1] .= html_print_input_text(
'ff_event',
$ff_event,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).'<br />';
$table_simple->data[6][1] .= html_print_radio_button(
'each_ff',
1,
'',
$each_ff,
true,
$disabledBecauseInPolicy
);
$table_simple->data[6][1] .= ' '.__('Each state changing').' : ';
$table_simple->data[6][1] .= __('To normal');
$table_simple->data[6][1] .= html_print_input_text(
'ff_event_normal',
$ff_event_normal,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).' ';
$table_simple->data[6][1] .= __('To warning');
$table_simple->data[6][1] .= html_print_input_text(
'ff_event_warning',
$ff_event_warning,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).' ';
$table_simple->data[6][1] .= __('To critical');
$table_simple->data[6][1] .= html_print_input_text(
'ff_event_critical',
$ff_event_critical,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
$table_simple->data[7][0] = __('Historical data');
if ($disabledBecauseInPolicy) { if ($disabledBecauseInPolicy) {
// If is disabled, we send a hidden in his place and print a false // If is disabled, we send a hidden in his place and print a false
// checkbox because HTML dont send disabled fields // checkbox because HTML dont send disabled fields
// and could be disabled by error. // and could be disabled by error.
$table_simple->data[7][1] = html_print_checkbox( $table_simple->data[4][1] = html_print_checkbox(
'history_data_fake', 'history_data_fake',
1, 1,
$history_data, $history_data,
true, true,
$disabledBecauseInPolicy $disabledBecauseInPolicy
); );
$table_simple->data[7][1] .= '<input type="hidden" name="history_data" value="'.(int) $history_data.'">'; $table_simple->data[4][1] .= '<input type="hidden" name="history_data" value="'.(int) $history_data.'">';
} else { } else {
$table_simple->data[7][1] = html_print_checkbox( $table_simple->data[4][1] = html_print_checkbox(
'history_data', 'history_data',
1, 1,
$history_data, $history_data,
@ -693,21 +517,11 @@ $table_advanced->style = [];
$table_advanced->style[0] = $table_advanced->style[3] = $table_advanced->style[5] = 'font-weight: bold;'; $table_advanced->style[0] = $table_advanced->style[3] = $table_advanced->style[5] = 'font-weight: bold;';
$table_advanced->colspan = []; $table_advanced->colspan = [];
$table_advanced->data[0][0] = __('Description'); $table_advanced->colspan[17][1] = 3;
$table_advanced->colspan[0][1] = 6;
$table_advanced->data[0][1] = html_print_textarea(
'description',
2,
65,
$description,
$disabledTextBecauseInPolicy,
true,
$largeClassDisabledBecauseInPolicy
);
$table_advanced->data[1][0] = __('Custom ID'); $table_advanced->data[0][0] = __('Custom ID');
$table_advanced->colspan[1][1] = 2; $table_advanced->colspan[0][1] = 2;
$table_advanced->data[1][1] = html_print_input_text( $table_advanced->data[0][1] = html_print_input_text(
'custom_id', 'custom_id',
$custom_id, $custom_id,
'', '',
@ -720,11 +534,11 @@ $table_advanced->data[1][1] = html_print_input_text(
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
); );
$table_advanced->data[1][3] = __('Unit'); $table_advanced->data[0][3] = __('Unit');
// $table_advanced->data[1][4] = html_print_input_text ('unit', $unit, '', 20, 65, true, // $table_advanced->data[1][4] = html_print_input_text ('unit', $unit, '', 20, 65, true,
// $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy); // $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy);
// $table_advanced->colspan[1][4] = 3; // $table_advanced->colspan[1][4] = 3;
$table_advanced->data[1][4] = html_print_extended_select_for_unit( $table_advanced->data[0][4] = html_print_extended_select_for_unit(
'unit', 'unit',
$unit, $unit,
'', '',
@ -735,7 +549,7 @@ $table_advanced->data[1][4] = html_print_extended_select_for_unit(
false, false,
false false
); );
$table_advanced->colspan[1][4] = 3; $table_advanced->colspan[0][4] = 3;
$module_id_policy_module = 0; $module_id_policy_module = 0;
if (isset($module['id_policy_module'])) { if (isset($module['id_policy_module'])) {
@ -745,38 +559,38 @@ if (isset($module['id_policy_module'])) {
// In the data modules, the interval is not in seconds. It is a factor // In the data modules, the interval is not in seconds. It is a factor
// to be multiplied for the agent interval // to be multiplied for the agent interval
if ($moduletype == MODULE_DATA) { if ($moduletype == MODULE_DATA) {
$table_advanced->data[2][0] = __('Interval'); $table_advanced->data[1][0] = __('Interval');
$table_advanced->colspan[2][1] = 2; $table_advanced->colspan[1][1] = 2;
$interval_factor = 1; $interval_factor = 1;
if (isset($id_agente)) { if (isset($id_agente)) {
$agent_interval = agents_get_interval($id_agente); $agent_interval = agents_get_interval($id_agente);
$interval_factor = ($interval / $agent_interval); $interval_factor = ($interval / $agent_interval);
$table_advanced->data[2][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') '; $table_advanced->data[1][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') ';
} else { } else {
$table_advanced->data[2][1] = sprintf(__('Agent interval x %s'), $interval_factor); $table_advanced->data[1][1] = sprintf(__('Agent interval x %s'), $interval_factor);
} }
if ($__code_from == 'policies') { if ($__code_from == 'policies') {
// If is the policy form, module_interval will store the factor (not the seconds). // If is the policy form, module_interval will store the factor (not the seconds).
// So server will transform it to interval in seconds // So server will transform it to interval in seconds
$table_advanced->data[2][1] = sprintf(__('Default').': 1', $interval_factor); $table_advanced->data[1][1] = sprintf(__('Default').': 1', $interval_factor);
$table_advanced->data[2][1] .= html_print_input_hidden('module_interval', $interval_factor, true); $table_advanced->data[1][1] .= html_print_input_hidden('module_interval', $interval_factor, true);
} else if ($module_id_policy_module != 0) { } else if ($module_id_policy_module != 0) {
$table_advanced->data[2][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true); $table_advanced->data[1][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true);
} }
// If it is a non policy form, the module_interval will not provided and will // If it is a non policy form, the module_interval will not provided and will
// be taken the agent interval (this code is at configurar_agente.php) // be taken the agent interval (this code is at configurar_agente.php)
} else { } else {
$table_advanced->data[2][0] = __('Interval'); $table_advanced->data[1][0] = __('Interval');
$table_advanced->colspan[2][1] = 2; $table_advanced->colspan[1][1] = 2;
$table_advanced->data[2][1] = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy); $table_advanced->data[1][1] = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy);
} }
$table_advanced->data[2][1] .= html_print_input_hidden('moduletype', $moduletype, true); $table_advanced->data[1][1] .= html_print_input_hidden('moduletype', $moduletype, true);
$table_advanced->data[2][3] = __('Post process'); $table_advanced->data[1][3] = __('Post process');
$table_advanced->data[2][4] = html_print_extended_select_for_post_process( $table_advanced->data[1][4] = html_print_extended_select_for_post_process(
'post_process', 'post_process',
$post_process, $post_process,
'', '',
@ -788,17 +602,17 @@ $table_advanced->data[2][4] = html_print_extended_select_for_post_process(
false, false,
$disabledBecauseInPolicy $disabledBecauseInPolicy
); );
$table_advanced->colspan[1][4] = 3;
$table_advanced->data[2][0] = __('Min. Value');
$table_advanced->colspan[2][1] = 2;
$table_advanced->data[2][1] = html_print_input_text('min', $min, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value below this number is discarted.'), true);
$table_advanced->data[2][3] = __('Max. Value');
$table_advanced->data[2][4] = html_print_input_text('max', $max, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value over this number is discarted.'), true);
$table_advanced->colspan[2][4] = 3; $table_advanced->colspan[2][4] = 3;
$table_advanced->data[3][0] = __('Min. Value'); $table_advanced->data[3][0] = __('Export target');
$table_advanced->colspan[3][1] = 2;
$table_advanced->data[3][1] = html_print_input_text('min', $min, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value below this number is discarted.'), true);
$table_advanced->data[3][3] = __('Max. Value');
$table_advanced->data[3][4] = html_print_input_text('max', $max, '', 5, 15, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy).' '.ui_print_help_tip(__('Any value over this number is discarted.'), true);
$table_advanced->colspan[3][4] = 3;
$table_advanced->data[4][0] = __('Export target');
// Default text message for export target select and disabled option // Default text message for export target select and disabled option
$none_text = __('None'); $none_text = __('None');
$disabled_export = false; $disabled_export = false;
@ -808,7 +622,7 @@ if ($__code_from == 'policies') {
$disabled_export = true; $disabled_export = true;
} }
$table_advanced->data[4][1] = html_print_select_from_sql( $table_advanced->data[3][1] = html_print_select_from_sql(
'SELECT id, name FROM tserver_export ORDER BY name', 'SELECT id, name FROM tserver_export ORDER BY name',
'id_export', 'id_export',
$id_export, $id_export,
@ -820,7 +634,7 @@ $table_advanced->data[4][1] = html_print_select_from_sql(
false, false,
$disabled_export $disabled_export
).ui_print_help_tip(__('In case you use an Export server you can link this module and export data to one these.'), true); ).ui_print_help_tip(__('In case you use an Export server you can link this module and export data to one these.'), true);
$table_advanced->colspan[4][1] = 2; $table_advanced->colspan[3][1] = 2;
// Code comes from module_editor // Code comes from module_editor
if ($__code_from == 'modules') { if ($__code_from == 'modules') {
@ -831,18 +645,18 @@ if ($__code_from == 'modules') {
$throw_unknown_events_check = policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN); $throw_unknown_events_check = policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
} }
$table_advanced->data[4][3] = __('Discard unknown events'); $table_advanced->data[3][3] = __('Discard unknown events');
$table_advanced->data[4][4] = html_print_checkbox( $table_advanced->data[3][4] = html_print_checkbox(
'throw_unknown_events', 'throw_unknown_events',
1, 1,
$throw_unknown_events_check, $throw_unknown_events_check,
true, true,
$disabledBecauseInPolicy $disabledBecauseInPolicy
); );
$table_advanced->colspan[4][4] = 3; $table_advanced->colspan[3][4] = 3;
$table_advanced->data[5][0] = __('FF interval'); $table_advanced->data[4][0] = __('FF interval');
$table_advanced->data[5][1] = html_print_input_text( $table_advanced->data[4][1] = html_print_input_text(
'module_ff_interval', 'module_ff_interval',
$ff_interval, $ff_interval,
'', '',
@ -854,14 +668,14 @@ $table_advanced->data[5][1] = html_print_input_text(
'', '',
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
).ui_print_help_tip(__('Module execution flip flop time interval (in secs).'), true); ).ui_print_help_tip(__('Module execution flip flop time interval (in secs).'), true);
$table_advanced->colspan[5][1] = 2; $table_advanced->colspan[4][1] = 2;
$table_advanced->data[5][3] = __('FF timeout'); $table_advanced->data[4][3] = __('FF timeout');
$module_type_name = modules_get_type_name($id_module_type); $module_type_name = modules_get_type_name($id_module_type);
$table_advanced->data[5][4] = ''; $table_advanced->data[4][4] = '';
if (preg_match('/async/', $module_type_name) || $edit) { if (preg_match('/async/', $module_type_name) || $edit) {
$table_advanced->data[5][4] .= '<span id="ff_timeout">'.html_print_input_text( $table_advanced->data[4][4] .= '<span id="ff_timeout">'.html_print_input_text(
'ff_timeout', 'ff_timeout',
$ff_timeout, $ff_timeout,
'', '',
@ -873,16 +687,16 @@ if (preg_match('/async/', $module_type_name) || $edit) {
} }
if (!preg_match('/async/', $module_type_name) || $edit) { if (!preg_match('/async/', $module_type_name) || $edit) {
$table_advanced->data[5][4] .= '<span id="ff_timeout_disable">'.__('Disabled').ui_print_help_tip(__('This value can be set only in the async modules.'), true).'</span>'; $table_advanced->data[4][4] .= '<span id="ff_timeout_disable">'.__('Disabled').ui_print_help_tip(__('This value can be set only in the async modules.'), true).'</span>';
} }
$table_advanced->colspan[5][4] = 3; $table_advanced->colspan[4][4] = 3;
/* /*
Tags */ Tags */
// This var comes from module_manager_editor.php or policy_modules.php // This var comes from module_manager_editor.php or policy_modules.php
global $__code_from; global $__code_from;
$table_advanced->data[6][0] = __('Tags available'); $table_advanced->data[5][0] = __('Tags available');
// Code comes from module_editor // Code comes from module_editor
if ($__code_from == 'modules') { if ($__code_from == 'modules') {
$__table_modules = 'ttag_module'; $__table_modules = 'ttag_module';
@ -902,7 +716,7 @@ if ($__code_from == 'modules') {
} }
if (!tags_has_user_acl_tags($config['id_user'])) { if (!tags_has_user_acl_tags($config['id_user'])) {
$table_advanced->data[6][1] = html_print_select_from_sql( $table_advanced->data[5][1] = html_print_select_from_sql(
"SELECT id_tag, name "SELECT id_tag, name
FROM ttag FROM ttag
WHERE id_tag NOT IN ( WHERE id_tag NOT IN (
@ -927,7 +741,7 @@ if (!tags_has_user_acl_tags($config['id_user'])) {
if (!empty($user_tags)) { if (!empty($user_tags)) {
$id_user_tags = array_keys($user_tags); $id_user_tags = array_keys($user_tags);
$table_advanced->data[6][1] = html_print_select_from_sql( $table_advanced->data[5][1] = html_print_select_from_sql(
'SELECT id_tag, name 'SELECT id_tag, name
FROM ttag FROM ttag
WHERE id_tag IN ('.implode(',', $id_user_tags).") AND WHERE id_tag IN ('.implode(',', $id_user_tags).") AND
@ -949,7 +763,7 @@ if (!tags_has_user_acl_tags($config['id_user'])) {
'5' '5'
); );
} else { } else {
$table_advanced->data[6][1] = html_print_select_from_sql( $table_advanced->data[5][1] = html_print_select_from_sql(
"SELECT id_tag, name "SELECT id_tag, name
FROM ttag FROM ttag
WHERE id_tag NOT IN ( WHERE id_tag NOT IN (
@ -972,12 +786,12 @@ if (!tags_has_user_acl_tags($config['id_user'])) {
} }
} }
$table_advanced->data[6][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]); $table_advanced->data[5][2] = html_print_image('images/darrowright.png', true, ['id' => 'right', 'title' => __('Add tags to module')]);
// html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); // html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module')));
$table_advanced->data[6][2] .= '<br><br><br><br>'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]); $table_advanced->data[5][2] .= '<br><br><br><br>'.html_print_image('images/darrowleft.png', true, ['id' => 'left', 'title' => __('Delete tags to module')]);
// html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); // html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module')));
$table_advanced->data[6][3] = '<b>'.__('Tags selected').'</b>'; $table_advanced->data[5][3] = '<b>'.__('Tags selected').'</b>';
$table_advanced->data[6][4] = html_print_select_from_sql( $table_advanced->data[5][4] = html_print_select_from_sql(
"SELECT a.id_tag, name "SELECT a.id_tag, name
FROM ttag a, $__table_modules b FROM ttag a, $__table_modules b
WHERE a.id_tag = b.id_tag AND $__id_where = $__id WHERE a.id_tag = b.id_tag AND $__id_where = $__id
@ -997,8 +811,8 @@ $table_advanced->data[6][4] = html_print_select_from_sql(
); );
if ($__code_from == 'modules') { if ($__code_from == 'modules') {
$table_advanced->data[6][5] = '<b>'.__('Tags from policy').'</b>'; $table_advanced->data[5][5] = '<b>'.__('Tags from policy').'</b>';
$table_advanced->data[6][6] = html_print_select_from_sql( $table_advanced->data[5][6] = html_print_select_from_sql(
"SELECT a.id_tag, name "SELECT a.id_tag, name
FROM ttag a, $__table_modules b FROM ttag a, $__table_modules b
WHERE a.id_tag = b.id_tag AND $__id_where = $__id WHERE a.id_tag = b.id_tag AND $__id_where = $__id
@ -1018,9 +832,9 @@ if ($__code_from == 'modules') {
); );
} }
$table_advanced->data[7][0] = __('Quiet'); $table_advanced->data[6][0] = __('Quiet');
$table_advanced->data[7][0] .= ui_print_help_tip(__('The module still stores data but the alerts and events will be stop'), true); $table_advanced->data[6][0] .= ui_print_help_tip(__('The module still stores data but the alerts and events will be stop'), true);
$table_advanced->data[7][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy); $table_advanced->data[6][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy);
$cps_array[-1] = __('Disabled'); $cps_array[-1] = __('Disabled');
if ($cps_module > 0) { if ($cps_module > 0) {
@ -1037,22 +851,37 @@ if ($cps_module > 0) {
$cps_array[$cps_inc] = __('Enabled'); $cps_array[$cps_inc] = __('Enabled');
} }
$table_advanced->data[7][2] = __('Cascade Protection Services'); $table_advanced->data[6][2] = '';
$table_advanced->data[7][2] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true); $table_advanced->data[6][3] = __('Cascade Protection Services');
$table_advanced->colspan[7][3] = 5; $table_advanced->data[6][3] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
$table_advanced->data[7][3] = html_print_select($cps_array, 'cps_module', $cps_module, '', '', 0, true, false, true, '', $disabledBecauseInPolicy); $table_advanced->colspan[6][4] = 3;
$table_advanced->data[6][4] = html_print_select($cps_array, 'cps_module', $cps_module, '', '', 0, true, false, true, '', $disabledBecauseInPolicy);
$textarea_custom_style = ' style="min-height: 0px;"';
$table_advanced->data[7][0] = __('Description');
$table_advanced->colspan[7][1] = 6;
$table_advanced->data[7][1] = html_print_textarea(
'description',
3,
65,
$description,
$disabledTextBecauseInPolicy.$textarea_custom_style,
true,
$largeClassDisabledBecauseInPolicy
);
$table_advanced->data[8][0] = __('Critical instructions').ui_print_help_tip(__('Instructions when the status is critical'), true); $table_advanced->data[8][0] = __('Critical instructions').ui_print_help_tip(__('Instructions when the status is critical'), true);
$table_advanced->data[8][1] = html_print_textarea('critical_instructions', 2, 65, $critical_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); $table_advanced->data[8][1] = html_print_textarea('critical_instructions', 3, 65, $critical_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy);
$table_advanced->colspan[8][1] = 6; $table_advanced->colspan[8][1] = 6;
$table_advanced->data[9][0] = __('Warning instructions').ui_print_help_tip(__('Instructions when the status is warning'), true); $table_advanced->data[9][0] = __('Warning instructions').ui_print_help_tip(__('Instructions when the status is warning'), true);
$table_advanced->data[9][1] = html_print_textarea('warning_instructions', 2, 65, $warning_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); $table_advanced->data[9][1] = html_print_textarea('warning_instructions', 3, 65, $warning_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy);
$table_advanced->colspan[9][1] = 6; $table_advanced->colspan[9][1] = 6;
$table_advanced->data[10][0] = __('Unknown instructions').ui_print_help_tip(__('Instructions when the status is unknown'), true); $table_advanced->data[10][0] = __('Unknown instructions').ui_print_help_tip(__('Instructions when the status is unknown'), true);
$table_advanced->data[10][1] = html_print_textarea('unknown_instructions', 2, 65, $unknown_instructions, $disabledTextBecauseInPolicy, true, $largeClassDisabledBecauseInPolicy); $table_advanced->data[10][1] = html_print_textarea('unknown_instructions', 3, 65, $unknown_instructions, $disabledTextBecauseInPolicy.$textarea_custom_style, true, $largeClassDisabledBecauseInPolicy);
$table_advanced->colspan[10][1] = 6; $table_advanced->colspan[10][1] = 6;
if (isset($id_agente) && $moduletype == MODULE_DATA) { if (isset($id_agente) && $moduletype == MODULE_DATA) {
@ -1112,6 +941,175 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$table_advanced->data[13][4] .= html_print_input_hidden('id_category', $id_category, true); $table_advanced->data[13][4] .= html_print_input_hidden('id_category', $id_category, true);
} }
if (!$in_policy) {
// Cannot select the current module to be itself parent.
$module_parent_filter = ($id_agent_module) ? ['tagente_modulo.id_agente_modulo' => "<>$id_agent_module"] : '';
$table_advanced->data[15][0] = __('Module parent');
$modules_can_be_parent = agents_get_modules(
$id_agente,
false,
$module_parent_filter
);
// If the user cannot have access to parent module, only print the name.
if ($parent_module_id != 0
&& !in_array($parent_module_id, array_keys($modules_can_be_parent))
) {
$table_advanced->data[15][1] = db_get_value(
'nombre',
'tagente_modulo',
'id_agente_modulo',
$parent_module_id
);
} else {
$table_advanced->data[15][1] = html_print_select(
$modules_can_be_parent,
'parent_module_id',
$parent_module_id,
'',
__('Not assigned'),
'0',
true
);
}
}
$table_advanced->data[16][0] = __('Dynamic Threshold Interval');
$table_advanced->data[16][1] = html_print_extended_select_for_time(
'dynamic_interval',
$dynamic_interval,
'',
'None',
'0',
10,
true,
'width:150px',
false,
$classdisabledBecauseInPolicy,
$disabledBecauseInPolicy
);
$table_advanced->data[16][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).'</a>';
$table_advanced->cellclass[16][2] = 'hide_dinamic';
$table_advanced->cellclass[16][3] = 'hide_dinamic';
$table_advanced->data[16][2] = '<span><em>'.__('Dynamic Threshold Min. ').'</em>';
$table_advanced->data[16][2] .= html_print_input_text(
'dynamic_min',
$dynamic_min,
'',
10,
255,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
$table_advanced->data[16][2] .= '<br /><em>'.__('Dynamic Threshold Max. ').'</em>';
$table_advanced->data[16][2] .= html_print_input_text(
'dynamic_max',
$dynamic_max,
'',
10,
255,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
$table_advanced->data[16][3] = '<span><em>'.__('Dynamic Threshold Two Tailed: ').'</em>';
$table_advanced->data[16][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_tailed, true, $disabledBecauseInPolicy);
// FF stands for Flip-flop.
$table_advanced->data[17][0] = __('FF threshold').' ';
$table_advanced->data[17][1] .= __('Keep counters');
$table_advanced->data[17][1] .= html_print_checkbox(
'ff_type',
1,
$ff_type,
true,
$disabledBecauseInPolicy
).'<br />';
$table_advanced->data[17][1] .= html_print_radio_button(
'each_ff',
0,
'',
$each_ff,
true,
$disabledBecauseInPolicy
);
$table_advanced->data[17][1] .= ' '.__('All state changing').' : ';
$table_advanced->data[17][1] .= html_print_input_text(
'ff_event',
$ff_event,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).'<br />';
$table_advanced->data[17][1] .= html_print_radio_button(
'each_ff',
1,
'',
$each_ff,
true,
$disabledBecauseInPolicy
);
$table_advanced->data[17][1] .= ' '.__('Each state changing').' : ';
$table_advanced->data[17][1] .= __('To normal');
$table_advanced->data[17][1] .= html_print_input_text(
'ff_event_normal',
$ff_event_normal,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).' ';
$table_advanced->data[17][1] .= __('To warning');
$table_advanced->data[17][1] .= html_print_input_text(
'ff_event_warning',
$ff_event_warning,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
).' ';
$table_advanced->data[17][1] .= __('To critical');
$table_advanced->data[17][1] .= html_print_input_text(
'ff_event_critical',
$ff_event_critical,
'',
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
);
// Advanced form part // Advanced form part
$table_macros = new stdClass(); $table_macros = new stdClass();
$table_macros->id = 'module_macros'; $table_macros->id = 'module_macros';

View File

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

View File

@ -1521,8 +1521,10 @@ function paint_graph_status(
//delete elements //delete elements
svg.selectAll("g").remove(); svg.selectAll("g").remove();
width_x = 101; var width_x = 101;
height_x = 50; var height_x = 50;
var legend_width_x = 135;
var legend_height_x = 80;
svg svg
.append("g") .append("g")
@ -1535,8 +1537,8 @@ function paint_graph_status(
.attr("width", 300) .attr("width", 300)
.attr("height", 300) .attr("height", 300)
.append("text") .append("text")
.attr("x", width_x) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x - 20)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1551,8 +1553,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_normal") .attr("id", "legend_normal")
.attr("x", width_x + 80) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x - 30)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#82B92E"); .style("fill", "#82B92E");
@ -1561,8 +1563,8 @@ function paint_graph_status(
svg svg
.append("g") .append("g")
.append("text") .append("text")
.attr("x", width_x + 100) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x + 5)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1575,8 +1577,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_warning") .attr("id", "legend_warning")
.attr("x", width_x + 185) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x - 5)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
@ -1585,8 +1587,8 @@ function paint_graph_status(
svg svg
.append("g") .append("g")
.append("text") .append("text")
.attr("x", width_x + 205) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x + 30)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1599,8 +1601,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_critical") .attr("id", "legend_critical")
.attr("x", width_x + 285) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x + 20)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
@ -1624,7 +1626,7 @@ function paint_graph_status(
.attr("id", "status_rect") .attr("id", "status_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 20)
.attr("height", 200) .attr("height", 200)
.style("fill", "#82B92E"); .style("fill", "#82B92E");
@ -1641,7 +1643,7 @@ function paint_graph_status(
"y", "y",
height_x + (range_max - min_w) * position - (max_w - min_w) * position height_x + (range_max - min_w) * position - (max_w - min_w) * position
) )
.attr("width", 300) .attr("width", 20)
.attr("height", (max_w - min_w) * position) .attr("height", (max_w - min_w) * position)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
} else { } else {
@ -1653,7 +1655,7 @@ function paint_graph_status(
.attr("id", "warning_rect") .attr("id", "warning_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x + 200 - (min_w - range_min) * position) .attr("y", height_x + 200 - (min_w - range_min) * position)
.attr("width", 300) .attr("width", 20)
.attr("height", (min_w - range_min) * position) .attr("height", (min_w - range_min) * position)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
@ -1665,7 +1667,7 @@ function paint_graph_status(
.attr("id", "warning_inverse_rect") .attr("id", "warning_inverse_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 20)
.attr( .attr(
"height", "height",
(range_max - min_w) * position - (max_w - min_w) * position (range_max - min_w) * position - (max_w - min_w) * position
@ -1685,7 +1687,7 @@ function paint_graph_status(
"y", "y",
height_x + (range_max - min_c) * position - (max_c - min_c) * position height_x + (range_max - min_c) * position - (max_c - min_c) * position
) )
.attr("width", 300) .attr("width", 20)
.attr("height", (max_c - min_c) * position) .attr("height", (max_c - min_c) * position)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
} else { } else {
@ -1697,7 +1699,7 @@ function paint_graph_status(
.attr("id", "critical_rect") .attr("id", "critical_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x + 200 - (min_c - range_min) * position) .attr("y", height_x + 200 - (min_c - range_min) * position)
.attr("width", 300) .attr("width", 20)
.attr("height", (min_c - range_min) * position) .attr("height", (min_c - range_min) * position)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
svg svg
@ -1708,7 +1710,7 @@ function paint_graph_status(
.attr("id", "critical_inverse_rect") .attr("id", "critical_inverse_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 20)
.attr( .attr(
"height", "height",
(range_max - min_c) * position - (max_c - min_c) * position (range_max - min_c) * position - (max_c - min_c) * position

View File

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

View File

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

View File

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

View File

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

View File

@ -2579,7 +2579,7 @@ CREATE TABLE IF NOT EXISTS `ttrap_custom_values` (
-- Table `tmetaconsole_setup` -- Table `tmetaconsole_setup`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` ( CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
`id` int(10) NOT NULL auto_increment primary key, `id` int(10) NOT NULL auto_increment,
`server_name` text, `server_name` text,
`server_url` text, `server_url` text,
`dbuser` text, `dbuser` text,
@ -2596,7 +2596,9 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_setup` (
`id_group` int(10) unsigned NOT NULL default 0, `id_group` int(10) unsigned NOT NULL default 0,
`api_password` text NOT NULL, `api_password` text NOT NULL,
`disabled` tinyint(1) unsigned NOT NULL default '0', `disabled` tinyint(1) unsigned NOT NULL default '0',
`last_event_replication` bigint(20) default '0' `last_event_replication` bigint(20) default '0',
`server_uid` text NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB ) ENGINE=InnoDB
COMMENT = 'Table to store metaconsole sources' COMMENT = 'Table to store metaconsole sources'
DEFAULT CHARSET=utf8; DEFAULT CHARSET=utf8;

View File

@ -141,7 +141,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('cr_incident_content', ''), ('cr_incident_content', ''),
('sample_agent', '0'), ('sample_agent', '0'),
('gotty', '/usr/bin/gotty'), ('gotty', '/usr/bin/gotty'),
('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'); ('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'),
('server_unique_identifier', replace(uuid(),'-',''));
UNLOCK TABLES; UNLOCK TABLES;
-- --

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.743-200218 Version: 7.0NG.743-200219
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -45,7 +45,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.743"; my $pandora_version = "7.0NG.743";
my $pandora_build = "200218"; my $pandora_build = "200219";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -33,7 +33,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.743"; my $pandora_version = "7.0NG.743";
my $pandora_build = "200218"; my $pandora_build = "200219";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

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

View File

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

View File

@ -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.743 PS200218"; my $version = "7.0NG.743 PS200219";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);