Merge conflict solution

This commit is contained in:
Jonathan 2023-03-27 08:31:00 +02:00
commit f8aefa6e34
90 changed files with 1937 additions and 812 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230322
Version: 7.0NG.769-230327
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.769-230322"
pandora_version="7.0NG.769-230327"
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

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230322
%define release 230327
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230322
%define release 230327
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230322"
PI_BUILD="230327"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230322}
{230327}
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.769 Build 230322")
#define PANDORA_VERSION ("7.0NG.769 Build 230327")
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.769(Build 230322))"
VALUE "ProductVersion", "(7.0NG.769(Build 230327))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.769-230322
Version: 7.0NG.769-230327
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.769-230322"
pandora_version="7.0NG.769-230327"
package_pear=0
package_pandora=1

View File

@ -1,5 +1,14 @@
START TRANSACTION;
ALTER TABLE `tdatabase` ADD COLUMN `ssh_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `db_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `replication_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `replication_delay` BIGINT DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `master` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `utimestamp` BIGINT DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `mysql_version` VARCHAR(10) DEFAULT '';
ALTER TABLE `tdatabase` ADD COLUMN `pandora_version` VARCHAR(10) DEFAULT '';
UPDATE tconfig_os SET `icon_name` = 'linux@os.svg' WHERE `id_os` = 1;
UPDATE tconfig_os SET `icon_name` = 'solaris@os.svg' WHERE `id_os` = 2;
UPDATE tconfig_os SET `icon_name` = 'aix@os.svg' WHERE `id_os` = 3;
@ -166,4 +175,6 @@ CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
`section` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
COMMIT;

View File

@ -30,7 +30,7 @@ require_once __DIR__.'/../include/functions_html.php';
echo '<style>
:root {';
if ($config['style'] === 'pandora') {
echo '--login-background-color: rgba(255, 255, 255, 0.2);';
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
echo '--login-label-color: #545454;';
echo '--login-text-color: #000;';
$style_theme = 'white-theme';
@ -213,7 +213,7 @@ echo '<div class="login_page">';
if (is_metaconsole() === true) {
if (!isset($config['custom_logo_login'])) {
html_print_image(
'enterprise/images/custom_logo_login/login_logo.png',
'enterprise/images/custom_logo_login/Pandora-FMS-1.png',
false,
[
'class' => 'login_logo',
@ -238,13 +238,13 @@ if (is_metaconsole() === true) {
}
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (!isset($config['custom_logo_login'])) {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/login_logo_v7.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
}
} else {
if (empty($config['custom_logo_login']) === true) {
html_print_image(ui_get_full_url('images/custom_logo_login/pandora_logo.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(ui_get_full_url('images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else {
html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
}
@ -472,17 +472,19 @@ html_print_csrf_hidden();
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'class' => 'splash-logo',
'alt' => 'splash',
'border' => 0,
],
false,
false
);
if ($config['custom_splash_login'] !== 'none.png') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'class' => 'splash-logo',
'alt' => 'splash',
'border' => 0,
],
false,
false
);
}
} else {
echo '
<div class="loginimg-container">
@ -522,10 +524,10 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title1_login']) {
echo io_safe_output($config['custom_title1_login']);
} else {
echo __('ONE TOOL TO MONITOR THEM ALL');
echo __('ONE TOOL TO RULE THEM ALL');
}
} else {
echo __('ONE TOOL TO MONITOR THEM ALL');
echo __('ONE TOOL TO RULE THEM ALL');
}
echo '</span></div>';

View File

@ -184,7 +184,7 @@ if (!$double_auth_enabled
background: "black"
},
width: 500,
height: 400,
height: 'auto',
close: function (event, ui) {
// Abort the ajax request
if (typeof request != 'undefined'){

View File

@ -57,14 +57,33 @@ if ($id_field) {
$combo_values = $field['combo_values'] ? $field['combo_values'] : '';
$is_combo_enable = $config['is_combo_enable'];
$is_link_enabled = $field['is_link_enabled'];
ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, '');
$header_title = __('Update agent custom field');
} else {
ui_print_page_header(__('Create agent custom field'), 'images/custom_field.png', false, '', true, '');
$header_title = __('Create agent custom field');
}
$table = new stdClass();
$table->class = 'databox';
$table->id = 'configure_field';
ui_print_standard_header(
$header_title,
'images/custom_field.png',
false,
'',
true,
[],
[
[
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
'label' => __('Resources'),
],
[
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
'label' => __('Custom field'),
],
[
'link' => '',
'label' => __('Edit'),
],
]
);
echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>";
echo "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>';
@ -82,80 +101,96 @@ echo "<div id='message_no_set_combo' title='".__('Agent Custom Fields Informati
echo "<p class='center bolder'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>';
echo '</div>';
$table = new stdClass();
$table->class = 'databox filter-table-adv';
$table->id = 'configure_field';
$table->width = '100%';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$table->data[0][0] = __('Name');
$table->data[1][0] = html_print_input_text(
'name',
$name,
'',
35,
100,
true
$table->data[0][0] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$name,
'',
35,
100,
true
)
);
$table->data[2][0] = __('Pass type').ui_print_help_tip(
__('The fields with pass type enabled will be displayed like html input type pass in html'),
true
);
$table->data[2][1] = __('Display on front').ui_print_help_tip(
__('The fields with display on front enabled will be displayed into the agent details'),
true
);
$table->data[2][2] = __('Link type');
$table->data[3][0] = html_print_checkbox_switch(
'is_password_type',
1,
$is_password_type,
true
);
$table->data[3][1] = html_print_checkbox_switch(
'display_on_front',
1,
$display_on_front,
true
);
$table->data[3][2] = html_print_checkbox_switch_extended(
'is_link_enabled',
1,
$is_link_enabled,
false,
'',
'',
true
);
$table->data[4][0] = __('Enabled combo');
$table->data[5][0] = html_print_checkbox_switch_extended(
'is_combo_enable',
0,
$config['is_combo_enable'],
false,
'',
'',
true
$table->data[0][1] = html_print_label_input_block(
__('Display on front').ui_print_help_tip(
__('The fields with display on front enabled will be displayed into the agent details'),
true
),
html_print_checkbox_switch(
'display_on_front',
1,
$display_on_front,
true
)
);
$table->cellstyle[4][1] = 'display: none;';
$table->cellstyle[5][1] = 'display: none;';
$table->data[4][1] = __('Combo values').ui_print_help_tip(
__('Set values separated by comma'),
true
);
$table->data[5][1] = html_print_textarea(
'combo_values',
3,
65,
io_safe_output($combo_values),
'',
true
$table->data[1][0] = html_print_label_input_block(
__('Link type'),
html_print_checkbox_switch_extended(
'is_link_enabled',
1,
$is_link_enabled,
false,
'',
'',
true
)
);
$table->data[2][0] = html_print_label_input_block(
__('Pass type').ui_print_help_tip(
__('The fields with pass type enabled will be displayed like html input type pass in html'),
true
),
html_print_checkbox_switch(
'is_password_type',
1,
$is_password_type,
true
)
);
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
$table->data[2][1] = html_print_label_input_block(
__('Enabled combo'),
html_print_checkbox_switch_extended(
'is_combo_enable',
0,
$config['is_combo_enable'],
false,
'',
'',
true
)
);
$table->data[3][0] = html_print_label_input_block(
__('Combo values').ui_print_help_tip(
__('Set values separated by comma'),
true
),
html_print_textarea(
'combo_values',
3,
65,
io_safe_output($combo_values),
'',
true
)
);
echo '<form class="max_floating_element_size" name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
html_print_table($table);
if ($id_field > 0) {
@ -194,65 +229,65 @@ echo '</form>';
<script>
$(document).ready (function () {
if($('input[type=hidden][name=update_field]').val() == 1 && $('#textarea_combo_values').val() != ''){
console.log('entra2');
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show();
$('#configure_field-3').show();
$('input[type=checkbox][name=is_password_type]').change(function (e) {
dialog_message("#message_set_password");
$('input[type=checkbox][name=is_password_type]').prop('checked', false);
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show();
$('#configure_field-3').show();
e.preventDefault();
});
$('input[type=checkbox][name=is_combo_enable]').change(function (e) {
if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){
dialog_message("#message_set_combo");
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show();
e.preventDefault();
}
});
});
$('input[type=checkbox][name=is_combo_enable]').change(function (e) {
if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){
dialog_message("#message_set_combo");
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-3').show();
e.preventDefault();
}
});
} else {
console.log('entra');
$('#configure_field-3').hide();
}
if ($('input[type=checkbox][name=is_link_enabled]').is(":checked") === true) {
$('#configure_field-1').hide();
$('#configure_field-3').hide();
$('#configure_field-2').hide();
} else {
$('#configure_field-1').show();
$('#configure_field-3').show();
$('#configure_field-2').show();
}
$('input[type=checkbox][name=is_link_enabled]').change(function () {
if( $(this).is(":checked") ){
$('#configure_field-1').hide();
$('#configure_field-2').hide();
$('#configure_field-3').hide();
} else{
$('#configure_field-1').show();
$('#configure_field-2').show();
$('#configure_field-3').show();
}
});
$('input[type=checkbox][name=is_combo_enable]').change(function () {
if( $(this).is(":checked") ){
$('#configure_field-4').show();
$('#configure_field-3').show();
dialog_message("#message_no_set_password");
$('#configure_field-1').hide();
$('#configure_field-5').hide();
}
else{
$('#configure_field-4').hide();
$('#configure_field-3').hide();
$('#configure_field-1').show();
$('#configure_field-5').show();
}
});
$('input[type=checkbox][name=is_password_type]').change(function () {
if( $(this).is(":checked")){
dialog_message("#message_no_set_combo");
$('#configure_field-3').hide();
$('#configure_field-5').hide();
}
else{
$('#configure_field-3').show();
$('#configure_field-5').show();
}
});
});

View File

@ -704,6 +704,19 @@ if ($step == 2) {
)
);
$usr_groups = implode(
',',
array_keys(users_get_groups($config['id_user'], 'LM', true))
);
$sql_query = sprintf(
'SELECT id, name
FROM talert_actions
WHERE id_group IN (%s)
ORDER BY name',
$usr_groups
);
$table->data[2][1] = html_print_label_input_block(
__('Default action').ui_print_help_tip(
__('Unless they\'re left blank, the fields from the action will override those set on the template.'),
@ -801,19 +814,6 @@ if ($step == 2) {
)
);
$usr_groups = implode(
',',
array_keys(users_get_groups($config['id_user'], 'LM', true))
);
$sql_query = sprintf(
'SELECT id, name
FROM talert_actions
WHERE id_group IN (%s)
ORDER BY name',
$usr_groups
);
$table->data[5][0] = html_print_label_input_block(
__('Condition type'),
html_print_select(

View File

@ -445,7 +445,7 @@ if ($is_management_allowed === true
if ($aviable_name === true) {
$values = [
'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
'icon' => $icon,
'parent' => $id_parent,
'disabled' => $alerts_disabled,
'custom_id' => $custom_id,
@ -513,7 +513,7 @@ if ($is_management_allowed === true && $update_group === true) {
if ($aviable_name === true) {
$values = [
'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
'icon' => $icon,
'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled,
'custom_id' => $custom_id,
@ -741,12 +741,11 @@ if ($is_management_allowed === true
// Credential store is loaded previously in this document to avoid
// process group tree - list forms.
ui_print_spinner(__('Loading'));
if ($tab == 'tree') {
/*
* Group tree view.
*/
ui_print_spinner(__('Loading'));
echo "<div id='tree-controller-recipient'></div>";
} else {
/*
@ -986,7 +985,7 @@ if ($tab == 'tree') {
true,
'offset',
false,
'pagination-bottom'
''
);
} else {
ui_print_info_message(
@ -1038,6 +1037,7 @@ $tab = 'group_edition';
<script type="text/javascript">
var treeController = TreeController.getController();
treeController.meta = <?php echo (is_metaconsole() === true) ? 1 : 0; ?>;
if (typeof treeController.recipient != 'undefined' && treeController.recipient.length > 0)
treeController.recipient.empty();

View File

@ -364,6 +364,11 @@ if ($access_console_node === true) {
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
$sub2['godmode/setup/setup&section=net']['refr'] = 0;
}
if ((bool) $config['activate_sflow'] === true) {
$sub2['godmode/setup/setup&section=sflow']['text'] = __('Sflow');
$sub2['godmode/setup/setup&section=sflow']['refr'] = 0;
}
}
$sub2['godmode/setup/setup&section=ehorus']['text'] = __('eHorus');

View File

@ -297,7 +297,7 @@ if (!empty($table->data)) {
html_print_input_hidden('multiple_delete', 1);
ui_pagination($count_network_templates, false, $offset);
html_print_table($table);
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, '');
echo "<div class='pdd_l_5px right'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</div>';

View File

@ -445,7 +445,7 @@ if (!empty($graphs)) {
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
html_print_input_hidden('multiple_delete', 1);
html_print_table($table);
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom');
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, '');
echo "<div class='right'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</form>';

View File

@ -115,6 +115,7 @@ $exception_condition_value = 10;
$modulegroup = 0;
$period = SECONDS_1DAY;
$search = '';
$full_text = 0;
$log_number = 1000;
// Added support for projection graphs.
$period_pg = SECONDS_5DAY;
@ -316,6 +317,7 @@ switch ($action) {
$source = $es['source'];
$search = $es['search'];
$log_number = empty($es['log_number']) ? $log_number : $es['log_number'];
$full_text = empty($es['full_text']) ? 0 : $es['full_text'];
break;
case 'simple_graph':
@ -1313,6 +1315,14 @@ $class = 'databox filters';
<td >
<?php
html_print_input_text('search', $search, '', 40, 100);
html_print_checkbox(
'full_text',
1,
$full_text,
false,
false
);
ui_print_help_tip(__('Full context'), false);
?>
</td>
</tr>

View File

@ -1597,11 +1597,13 @@ switch ($action) {
$agents_to_report = get_parameter('id_agents3');
$source = get_parameter('source', '');
$search = get_parameter('search', '');
$full_text = (integer) get_parameter('full_text', 0);
$log_number = get_parameter('log_number', '');
$es['source'] = $source;
$es['id_agents'] = $agents_to_report;
$es['search'] = $search;
$es['full_text'] = $full_text;
$es['log_number'] = $log_number;
$values['external_source'] = json_encode($es);
@ -2542,11 +2544,13 @@ switch ($action) {
$agents_to_report = get_parameter('id_agents3');
$source = get_parameter('source', '');
$search = get_parameter('search', '');
$full_text = (integer) get_parameter('full_text', 0);
$log_number = get_parameter('log_number', '');
$es['source'] = $source;
$es['id_agents'] = $agents_to_report;
$es['search'] = $search;
$es['full_text'] = $full_text;
$es['log_number'] = $log_number;
$values['external_source'] = json_encode($es);

View File

@ -137,8 +137,6 @@ echo $formHidden;
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->size = [];
$table->size[0] = '50%';
@ -369,69 +367,65 @@ $(document).ready (function () {
$("#button-getsize").click(function(event){
event.preventDefault();
if ($('#imagen').attr('src') != '') {
if (parseInt($('#imagen').width()) < 1024){
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
if (parseInt($('#imagen').width()) < 1024){
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
} else{
$('input[name=width]').val($('#imagen').width());
$('#preimagew').html($('#imagen').width());
}
if (parseInt($('#imagen').height()) < 768){
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
} else{
$('input[name=height]').val($('#imagen').height());
$('#preimageh').html($('#imagen').height());
}
} else {
original_image=new Image();
url_hack_metaconsole = metaconsole_url();
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
if (parseInt(original_image.width) < 1024){
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
} else {
$('input[name=width]').val(original_image.height);
$('#preimagew').html(original_image.height);
}
if (parseInt(original_image.height) < 768){
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
} else {
$('input[name=height]').val(original_image.height);
$('#preimageh').html(original_image.height);
}
}
else{
$('input[name=width]').val($('#imagen').width());
$('#preimagew').html($('#imagen').width());
}
if (parseInt($('#imagen').height()) < 768){
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
}
else{
$('input[name=height]').val($('#imagen').height());
$('#preimageh').html($('#imagen').height());
}
}
else{
original_image=new Image();
url_hack_metaconsole = metaconsole_url();
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
if (parseInt(original_image.width) < 1024){
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
}
else{
$('input[name=width]').val(original_image.height);
$('#preimagew').html(original_image.height);
}
if (parseInt(original_image.height) < 768){
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
}
else{
$('input[name=height]').val(original_image.height);
$('#preimageh').html(original_image.height);
}
}
});
$( "input[type=submit]" ).click(function( event ) {
if (parseInt($('input[name=width]').val()) < 1024){
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html('1024');
var x = 1;
}
$( "button[type=submit]" ).click(function( event ) {
console.log('aaaaaaaaaaa');
if (parseInt($('input[name=width]').val()) < 1024){
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html('1024');
var x = 1;
}
if (parseInt($('input[name=height]').val()) < 768){
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html('768');
var y = 1;
}
if (x || y){
return false;
}
if (parseInt($('input[name=height]').val()) < 768){
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html('768');
var y = 1;
}
if (x || y){
return false;
}
});
//Preload image size and activate auto image size changer when user click over a image in the selector

View File

@ -63,7 +63,7 @@ if (empty($idVisualConsole) === true) {
$idVisualConsole = get_parameter('id', 0);
}
if (!defined('METACONSOLE')) {
if (is_metaconsole() === false) {
$action_name_parameter = 'action';
} else {
$action_name_parameter = 'action2';
@ -93,7 +93,6 @@ $activeTab = get_parameterBetweenListValues(
'data'
);
// Visual console creation tab and actions.
if (empty($idVisualConsole)) {
$visualConsole = null;
@ -137,7 +136,6 @@ $refr = (int) get_parameter('refr', $config['vc_refr']);
$id_layout = 0;
// Save/Update data in DB
global $statusProcessInDB;
if (empty($statusProcessInDB)) {
@ -786,7 +784,7 @@ if (isset($config['vc_refr']) and $config['vc_refr'] != 0) {
$view_refresh = '300';
}
if (!defined('METACONSOLE')) {
if (is_metaconsole() === false) {
$url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action=';
$url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh;
} else {
@ -798,14 +796,18 @@ if (!defined('METACONSOLE')) {
$hash = User::generatePublicHash();
$buttons = [];
$buttons['consoles_list'] = [
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr='.$refr.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Visual consoles list'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
$buttons['public_link'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user']).'">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public Visual Console'), 'class' => 'main_menu_icon invert_filter']).'</a>',
'text' => '<a href="'.ui_get_full_url(
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user'],
false,
false,
false
).'">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public Visual Console'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
$buttons['data'] = [
'active' => false,
@ -839,7 +841,7 @@ $buttons['view'] = [
'text' => '<a href="'.$url_view.'">'.html_print_image('images/enable.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
if ($idVisualConsole === false) {
if (empty($idVisualConsole) === true) {
$buttons = ['data' => $buttons['data']];
// Show only the data tab
// If it is a fail try, reset the values
@ -850,9 +852,8 @@ if ($idVisualConsole === false) {
$buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
ui_print_standard_header(
$visualConsoleName,
($visualConsoleName ?? ''),
'images/visual_console.png',
false,
$tab_builder,

View File

@ -65,7 +65,7 @@ switch ($action) {
$table = new stdClass();
$table->class = 'info_table';
$table->width = '98%';
$table->width = '100%';
$table->head[0] = __('Map connection name');
$table->head[1] = __('Group');
$table->head[3] = __('Delete');
@ -84,7 +84,7 @@ if ($mapsConnections !== false) {
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>',
ui_print_group_icon($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>',
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>',
];
$table->cellclass[][2] = 'table_action_buttons';
}
@ -95,6 +95,14 @@ html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="post">';
html_print_input_hidden('action', 'create_connection_map');
html_print_submit_button(__('Create'), '', false, 'class="sub next"');
html_print_action_buttons(
html_print_submit_button(
__('Create'),
'',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
echo '</div>';

View File

@ -146,17 +146,41 @@ foreach ($osList as $os) {
$table->data[] = $data;
}
$tablePagination = '';
if (isset($data) === true) {
html_print_table($table);
ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset, 0, false, 'offset', true, 'pagination-bottom');
$tablePagination = ui_pagination(
$count_osList,
ui_get_url_refresh(['message' => false]),
$offset,
0,
true,
'offset',
false,
''
);
} else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
}
$buttons = '';
if (is_metaconsole() === true) {
echo '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
echo "<div style='text-align:right;width:".$table->width."'>";
html_print_submit_button(__('Create OS'), '', false, 'class="sub next"');
echo '</div>';
echo '</form>';
$buttons .= '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
$buttons .= html_print_submit_button(
__('Create OS'),
'',
false,
['icon' => 'next'],
true
);
$buttons .= '</form>';
}
html_print_action_buttons(
$buttons,
[
'type' => 'data_table',
'class' => 'fixed_action_buttons',
'right_content' => $tablePagination,
]
);

View File

@ -154,6 +154,20 @@ if (check_acl($config['id_user'], 0, 'AW')) {
).'</a>',
];
}
if ($config['activate_sflow']) {
$buttons['sflow'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=sflow').'">'.html_print_image(
'images/op_recon.png',
true,
[
'title' => __('Sflow'),
'class' => 'invert_filter',
]
).'</a>',
];
}
}
$buttons['integria'] = [
@ -277,6 +291,12 @@ switch ($section) {
$help_header = 'setup_netflow_tab';
break;
case 'sflow':
$buttons['sflow']['active'] = true;
$subpage = __('Sflow');
$help_header = 'setup_flow_tab';
break;
case 'ehorus':
$buttons['ehorus']['active'] = true;
$subpage = __('eHorus');
@ -410,6 +430,10 @@ switch ($section) {
include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
break;
case 'sflow':
include_once $config['homedir'].'/godmode/setup/setup_sflow.php';
break;
case 'vis':
include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
break;

View File

@ -43,7 +43,7 @@ if (is_ajax() === true) {
$table = new StdClass();
$table->data = [];
$table->width = '100%';
$table->class = 'databox filters table_result_auth';
$table->class = 'databox filters table_result_auth filter-table-adv';
$table->size['name'] = '30%';
$table->style['name'] = 'font-weight: bold';
@ -94,7 +94,11 @@ if (is_ajax() === true) {
'',
30,
100,
true
true,
false,
false,
'',
'w400px'
);
$table->data['ldap_server'] = $row;
@ -107,7 +111,11 @@ if (is_ajax() === true) {
'',
10,
100,
true
true,
false,
false,
'',
'w400px'
);
$table->data['ldap_port'] = $row;
@ -126,7 +134,10 @@ if (is_ajax() === true) {
'',
'',
0,
true
true,
false,
true,
'w400px'
);
$table->data['ldap_version'] = $row;
@ -189,12 +200,12 @@ if (is_ajax() === true) {
$alt = '',
60,
100,
true
);
$row['control'] .= ui_print_reveal_password(
'ldap_admin_pass',
true
true,
false,
false,
'w400px-important'
);
$table->data['ldap_admin_pass'] = $row;
// Ldapsearch timeout.
@ -208,7 +219,11 @@ if (is_ajax() === true) {
'',
10,
10,
true
true,
false,
false,
'',
'w400px'
);
$table->data['ldap_search_timeout'] = $row;
@ -239,7 +254,11 @@ if (is_ajax() === true) {
'',
30,
100,
true
true,
false,
false,
'',
'w400px'
);
$table->data['ldap_server_secondary'] = $row;
@ -252,7 +271,11 @@ if (is_ajax() === true) {
'',
10,
100,
true
true,
false,
false,
'',
'w400px'
);
$table->data['ldap_port_secondary'] = $row;
@ -271,7 +294,10 @@ if (is_ajax() === true) {
'',
'',
0,
true
true,
false,
true,
'w400px'
);
$table->data['ldap_version_secondary'] = $row;
@ -334,11 +360,10 @@ if (is_ajax() === true) {
$alt = '',
60,
100,
true
);
$row['control'] .= ui_print_reveal_password(
'ldap_admin_pass_secondary',
true
true,
false,
false,
'w400px-important'
);
$table->data['ldap_admin_pass_secondary'] = $row;
break;
@ -407,7 +432,11 @@ if (is_ajax() === true) {
'',
10,
10,
true
true,
false,
false,
'',
'w400px'
);
$table->data['session_timeout'] = $row;
@ -421,7 +450,7 @@ require_once $config['homedir'].'/include/functions_profile.php';
$table = new StdClass();
$table->data = [];
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->size['name'] = '30%';
$table->style['name'] = 'font-weight: bold';
@ -459,12 +488,15 @@ $row['control'] = html_print_select(
'',
'',
0,
true
true,
false,
true,
'w400px'
);
$table->data['auth'] = $row;
// Form.
echo '<form id="form_setup" method="post">';
echo '<form id="form_setup" class="max_floating_element_size" method="post">';
if (is_metaconsole() === false) {
html_print_input_hidden('update_config', 1);
@ -478,17 +510,14 @@ html_print_csrf_hidden();
html_print_table($table);
html_print_div([ 'id' => 'table_auth_result' ]);
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
)
);
echo '</form>';

View File

@ -74,82 +74,98 @@ $table_remote->data = [];
$table_remote->width = '100%';
$table_remote->styleTable = 'margin-bottom: 10px;';
$table_remote->id = 'ehorus-remote-setup';
$table_remote->class = 'databox filters';
$table_remote->size['name'] = '30%';
$table_remote->style['name'] = 'font-weight: bold';
$table_remote->style['control'] = 'display: flex;align-items: center;';
$table_remote->class = 'databox filters filter-table-adv';
$table_remote->size['ehorus_hostname'] = '50%';
$table_remote->size['ehorus_port'] = '50%';
// Enable eHorus user configuration.
$row = [];
$row['name'] = ('eHorus configuration at user level');
$row['control'] = html_print_checkbox_switch('ehorus_user_level_conf', 1, $config['ehorus_user_level_conf'], true);
$row['ehorus_user_level_conf'] = html_print_label_input_block(
__('eHorus configuration at user level'),
html_print_checkbox_switch(
'ehorus_user_level_conf',
1,
$config['ehorus_user_level_conf'],
true
)
);
$table_remote->data['ehorus_user_level_conf'] = $row;
// User.
$row = [];
$row['name'] = __('User');
$row['control'] = html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true);
$table_remote->data['ehorus_user'] = $row;
$row['ehorus_user'] = html_print_label_input_block(
__('User'),
html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true),
['div_class' => 'ehorus-remote-setup-ehorus_user']
);
// Pass.
$row = [];
$row['name'] = __('Password');
$row['control'] = html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true);
$row['control'] .= ui_print_reveal_password('ehorus_pass', true);
$row['ehorus_pass'] = html_print_label_input_block(
__('Password'),
html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true),
['div_class' => 'ehorus-remote-setup-ehorus_user']
);
$table_remote->data['ehorus_pass'] = $row;
// Directory hostname.
$row = [];
$row['name'] = __('API Hostname');
$row['control'] = html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true);
$table_remote->data['ehorus_hostname'] = $row;
$row['ehorus_hostname'] = html_print_label_input_block(
__('API Hostname'),
html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true)
);
// Directory port.
$row = [];
$row['name'] = __('API Port');
$row['control'] = html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true);
$row['ehorus_port'] = html_print_label_input_block(
__('API Port'),
html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true)
);
$table_remote->data['ehorus_port'] = $row;
// Request timeout.
$row = [];
$row['name'] = __('Request timeout');
$row['control'] = html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true);
$row['ehorus_req_timeout'] = html_print_label_input_block(
__('Request timeout'),
html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true)
);
$table_remote->data['ehorus_req_timeout'] = $row;
// Test.
$row = [];
$row['name'] = __('Test');
$row['control'] = html_print_button(
__('Start'),
'test-ehorus',
false,
'',
[
'icon' => 'cog',
'mode' => 'secondary mini',
],
true
$test_start = '<span id="test-ehorus-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$test_start .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$test_start .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$test_start .= '&nbsp;<span id="test-ehorus-message" class="invisible"></span>';
$row['ehorus_test'] = html_print_label_input_block(
__('Test'),
html_print_button(
__('Start'),
'test-ehorus',
false,
'',
[
'icon' => 'cog',
'mode' => 'secondary mini',
'style' => 'width: 115px;',
],
true
).$test_start
);
$row['control'] .= '<span id="test-ehorus-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$row['control'] .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$row['control'] .= '&nbsp;<span id="test-ehorus-message" class="invisible"></span>';
$table_remote->data['ehorus_test'] = $row;
// Print.
echo '<div class="center pdd_b_20px mrgn_top_20px">';
echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://ehorus.com">';
if ($config['style'] === 'pandora_black' && is_metaconsole() === true) {
html_print_image(
'include/ehorus/images/ehorus-logo.png',
false,
['class' => 'w400px']
['class' => 'w400px mrgn_top_15px']
);
} else {
html_print_image(
'include/ehorus/images/ehorus-logo-grey.png',
false,
['class' => 'w400px']
['class' => 'w400px mrgn_top_15px']
);
}
@ -179,7 +195,7 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) {
ui_print_error_message($error_message);
}
echo "<form method='post'>";
echo "<form method='post' class='max_floating_element_size'>";
// Form enable.
echo '<div id="form_enable">';
html_print_input_hidden('update_config', 1);
@ -195,17 +211,14 @@ echo '</div>';
echo '</fieldset>';
echo '</div>';
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'update'],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';
@ -220,8 +233,8 @@ if(!$('input:checkbox[name="ehorus_enabled"]').is(':checked'))
if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
{
$('#ehorus-remote-setup-ehorus_user').hide();
$('#ehorus-remote-setup-ehorus_pass').hide()
$('.ehorus-remote-setup-ehorus_user').hide();
$('.ehorus-remote-setup-ehorus_pass').hide()
}
@ -234,13 +247,13 @@ if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
}
var hideUserPass = function () {
$('#ehorus-remote-setup-ehorus_user').hide();
$('#ehorus-remote-setup-ehorus_pass').hide();
$('.ehorus-remote-setup-ehorus_user').hide();
$('.ehorus-remote-setup-ehorus_pass').hide();
}
var showUserPass = function () {
$('#ehorus-remote-setup-ehorus_user').show();
$('#ehorus-remote-setup-ehorus_pass').show();
$('.ehorus-remote-setup-ehorus_user').show();
$('.ehorus-remote-setup-ehorus_pass').show();
}
var handleEnable = function (event) {

View File

@ -403,6 +403,32 @@ $table->data[$i++][] = html_print_label_input_block(
)
);
$table->data[$i][] = html_print_label_input_block(
__('Enable Sflow'),
html_print_checkbox_switch_extended(
'activate_sflow',
1,
$config['activate_sflow'],
$rbt_disabled,
'',
'',
true
),
);
$table->data[$i++][] = html_print_label_input_block(
__('General network path'),
html_print_input_text(
'general_network_path',
$config['general_network_path'],
'',
40,
255,
true
)
);
$table->colspan[$i][] = 2;
$table->data[$i++][] = html_print_label_input_block(
__('Timezone setup'),

View File

@ -269,52 +269,102 @@ $table_remote->data = [];
$table_remote->width = '100%';
$table_remote->styleTable = 'margin-bottom: 10px;';
$table_remote->id = 'integria-remote-setup';
$table_remote->class = 'databox filters';
$table_remote->size['name'] = '30%';
$table_remote->style['name'] = 'font-weight: bold';
$table_remote->style['control'] = 'display: flex;align-items: center;';
$table_remote->class = 'databox filters filter-table-adv';
$table_remote->size['hostname'] = '50%';
$table_remote->size['api_pass'] = '50%';
// Enable eHorus user configuration.
// Enable Integria user configuration.
$row = [];
$row['name'] = ('Integria configuration at user level');
$row['control'] = html_print_checkbox_switch('integria_user_level_conf', 1, $config['integria_user_level_conf'], true);
$row['user_level'] = html_print_label_input_block(
__('Integria configuration at user level'),
html_print_checkbox_switch(
'integria_user_level_conf',
1,
$config['integria_user_level_conf'],
true
)
);
$table_remote->data['integria_user_level_conf'] = $row;
// Integria user.
$row = [];
$row['name'] = __('User');
$row['control'] = html_print_input_text('integria_user', $config['integria_user'], '', 30, 100, true);
$table_remote->data['integria_user'] = $row;
$row['user'] = html_print_label_input_block(
__('User'),
html_print_input_text(
'integria_user',
$config['integria_user'],
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_user']
);
// Integria password.
$row = [];
$row['name'] = __('Password');
$row['control'] = html_print_input_password('integria_pass', io_output_password($config['integria_pass']), '', 30, 100, true);
$row['control'] .= ui_print_reveal_password('integria_pass', true);
$row['password'] = html_print_label_input_block(
__('Password'),
html_print_input_password(
'integria_pass',
io_output_password($config['integria_pass']),
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_pass']
);
$table_remote->data['integria_pass'] = $row;
// Integria hostname.
$row = [];
$row['name'] = __('URL to Integria IMS setup').ui_print_help_tip(__('Full URL to your Integria IMS setup (e.g., http://192.168.1.20/integria, https://support.mycompany.com).'), true);
$row['control'] = html_print_input_text('integria_hostname', $config['integria_hostname'], '', 30, 100, true);
$table_remote->data['integria_hostname'] = $row;
$row['hostname'] = html_print_label_input_block(
__('URL to Integria IMS setup').ui_print_help_tip(__('Full URL to your Integria IMS setup (e.g., http://192.168.1.20/integria, https://support.mycompany.com).'), true),
html_print_input_text(
'integria_hostname',
$config['integria_hostname'],
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_hostname']
);
// API password.
$row = [];
$row['name'] = __('API Password');
$row['control'] = html_print_input_password('integria_api_pass', io_output_password($config['integria_api_pass']), '', 30, 100, true);
$row['control'] .= ui_print_reveal_password('integria_api_pass', true);
$row['api_pass'] = html_print_label_input_block(
__('API Password'),
html_print_input_password(
'integria_api_pass',
io_output_password($config['integria_api_pass']),
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_api_pass']
);
$table_remote->data['integria_api_pass'] = $row;
// Request timeout.
$row = [];
$row['name'] = __('Request timeout');
$row['control'] = html_print_input_text('integria_req_timeout', $config['integria_req_timeout'], '', 3, 10, true);
$row['req_timeout'] = html_print_label_input_block(
__('Request timeout'),
html_print_input_text(
'integria_req_timeout',
$config['integria_req_timeout'],
'',
3,
10,
true
),
['div_class' => 'integria-remote-setup-integria_req_timeout']
);
$table_remote->data['integria_req_timeout'] = $row;
$row = [];
$row['name'] = __('Inventory');
$row['control'] = html_print_button(
$row['control'] = __('Inventory');
$row['control'] .= html_print_button(
__('Sync inventory'),
'sync-inventory',
false,
@ -336,120 +386,132 @@ $table_alert_settings->data = [];
$table_alert_settings->width = '100%';
$table_alert_settings->styleTable = 'margin-bottom: 10px;';
$table_alert_settings->id = 'integria-cr-settings-setup';
$table_alert_settings->class = 'databox filters';
$table_alert_settings->size['name'] = '30%';
$table_alert_settings->style['name'] = 'font-weight: bold';
$table_alert_settings->class = 'databox filters filter-table-adv';
$table_alert_settings->size[0] = '50%';
$table_alert_settings->size[1] = '50%';
// Alert incident title.
$row = [];
$row['name'] = __('Title');
$row['control'] = html_print_input_text(
'incident_title',
$config['incident_title'],
__('Name'),
50,
100,
true,
false,
false
$row[0] = html_print_label_input_block(
__('Title'),
html_print_input_text(
'incident_title',
$config['incident_title'],
__('Name'),
50,
100,
true,
false,
false
)
);
$table_alert_settings->data['custom_response_incident_title'] = $row;
// Alert incident description.
$row = [];
$row['name'] = __('Ticket body');
$row['control'] = html_print_textarea(
'incident_content',
7,
25,
$config['incident_content'],
'',
true
$row[1] = html_print_label_input_block(
__('Ticket body'),
html_print_textarea(
'incident_content',
3,
25,
$config['incident_content'],
'',
true
)
);
$table_alert_settings->data['custom_response_incident_content'] = $row;
$table_alert_settings->data[0] = $row;
// Alert default group.
$row = [];
$row['name'] = __('Group');
$row['control'] = html_print_select(
$integria_group_values,
'default_group',
$config['default_group'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[0] = html_print_label_input_block(
__('Group'),
html_print_select(
$integria_group_values,
'default_group',
$config['default_group'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_alert_settings->data['custom_response_def_group'] = $row;
// Alert default criticity.
$row = [];
$row['name'] = __('Priority');
$row['control'] = html_print_select(
$integria_criticity_values,
'default_criticity',
$config['default_criticity'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[1] = html_print_label_input_block(
__('Priority'),
html_print_select(
$integria_criticity_values,
'default_criticity',
$config['default_criticity'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_alert_settings->data['custom_response_def_criticity'] = $row;
$table_alert_settings->data[1] = $row;
// Alert default owner.
$row = [];
$row['name'] = __('Owner');
$row['control'] = html_print_autocomplete_users_from_integria(
'default_owner',
$config['default_owner'],
true
$row[0] = html_print_label_input_block(
__('Owner'),
html_print_autocomplete_users_from_integria(
'default_owner',
$config['default_owner'],
true,
'30',
false,
false,
'w100p'
),
['div_class' => 'inline']
);
$table_alert_settings->data['custom_response_def_owner'] = $row;
// Alert default incident type.
$row = [];
$row['name'] = __('Type');
$row['control'] = html_print_select(
$integria_types_values,
'incident_type',
$config['incident_type'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[1] = html_print_label_input_block(
__('Type'),
html_print_select(
$integria_types_values,
'incident_type',
$config['incident_type'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_alert_settings->data['custom_response_incident_type'] = $row;
$table_alert_settings->data[2] = $row;
// Alert default incident status.
$row = [];
$row['name'] = __('Status');
$row['control'] = html_print_select(
$integria_status_values,
'incident_status',
$config['incident_status'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[0] = html_print_label_input_block(
__('Status'),
html_print_select(
$integria_status_values,
'incident_status',
$config['incident_status'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_alert_settings->data['custom_response_incident_status'] = $row;
$table_alert_settings->data[3] = $row;
// Custom response settings.
$table_cr_settings = new StdClass();
@ -457,126 +519,138 @@ $table_cr_settings->data = [];
$table_cr_settings->width = '100%';
$table_cr_settings->styleTable = 'margin-bottom: 10px;';
$table_cr_settings->id = 'integria-cr-settings-setup';
$table_cr_settings->class = 'databox filters';
$table_cr_settings->size['name'] = '30%';
$table_cr_settings->style['name'] = 'font-weight: bold';
$table_cr_settings->class = 'databox filters filter-table-adv';
$table_cr_settings->size[0] = '50%';
$table_cr_settings->size[1] = '50%';
// Custom response incident title.
$row = [];
$row['name'] = __('Title');
$row['control'] = html_print_input_text(
'cr_incident_title',
$config['cr_incident_title'],
__('Name'),
50,
100,
true,
false,
false
$row[0] = html_print_label_input_block(
__('Title'),
html_print_input_text(
'cr_incident_title',
$config['cr_incident_title'],
__('Name'),
50,
100,
true,
false,
false
)
);
$table_cr_settings->data['custom_response_incident_title'] = $row;
// Custom response incident description.
$row = [];
$row['name'] = __('Ticket body');
$row['control'] = html_print_textarea(
'cr_incident_content',
7,
25,
$config['cr_incident_content'],
'',
true
$row[1] = html_print_label_input_block(
__('Ticket body'),
html_print_textarea(
'cr_incident_content',
3,
25,
$config['cr_incident_content'],
'',
true
)
);
$table_cr_settings->data['custom_response_incident_content'] = $row;
$table_cr_settings->data[0] = $row;
// Custom response default group.
$row = [];
$row['name'] = __('Group');
$row['control'] = html_print_select(
$integria_group_values,
'cr_default_group',
$config['cr_default_group'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[0] = html_print_label_input_block(
__('Group'),
html_print_select(
$integria_group_values,
'cr_default_group',
$config['cr_default_group'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_cr_settings->data['custom_response_def_group'] = $row;
// Custom response default criticity.
$row = [];
$row['name'] = __('Priority');
$row['control'] = html_print_select(
$integria_criticity_values,
'cr_default_criticity',
$config['cr_default_criticity'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[1] = html_print_label_input_block(
__('Priority'),
html_print_select(
$integria_criticity_values,
'cr_default_criticity',
$config['cr_default_criticity'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_cr_settings->data['custom_response_def_criticity'] = $row;
$table_cr_settings->data[1] = $row;
// Custom response default owner.
$row = [];
$row['name'] = __('Owner');
$row['control'] = html_print_autocomplete_users_from_integria(
'cr_default_owner',
$config['cr_default_owner'],
true
$row[0] = html_print_label_input_block(
__('Owner'),
html_print_autocomplete_users_from_integria(
'cr_default_owner',
$config['cr_default_owner'],
true,
'30',
false,
false,
'w100p'
),
['div_class' => 'inline']
);
$table_cr_settings->data['custom_response_def_owner'] = $row;
// Custom response default incident type.
$row = [];
$row['name'] = __('Type');
$row['control'] = html_print_select(
$integria_types_values,
'cr_incident_type',
$config['cr_incident_type'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[1] = html_print_label_input_block(
__('Type'),
html_print_select(
$integria_types_values,
'cr_incident_type',
$config['cr_incident_type'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_cr_settings->data['custom_response_incident_type'] = $row;
$table_cr_settings->data[2] = $row;
// Custom response default incident status.
$row = [];
$row['name'] = __('Status');
$row['control'] = html_print_select(
$integria_status_values,
'cr_incident_status',
$config['cr_incident_status'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
$row[0] = html_print_label_input_block(
__('Status'),
html_print_select(
$integria_status_values,
'cr_incident_status',
$config['cr_incident_status'],
'',
__('Select'),
0,
true,
false,
true,
'',
false
)
);
$table_cr_settings->data['custom_response_incident_status'] = $row;
$table_cr_settings->data[3] = $row;
// Test.
$row = [];
$row['name'] = __('Test');
$row['control'] = html_print_button(
$row['control'] = __('Test');
$row['control'] .= html_print_button(
__('Start'),
'test-integria',
false,
@ -594,12 +668,12 @@ $row['control'] .= '&nbsp;<span id="test-integria-message" class="invisible"></s
$table_remote->data['integria_test'] = $row;
// Print.
echo '<div class="center pdd_b_20px mrgn_top_20px">';
echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">';
html_print_image(
'images/integria_logo.svg',
false,
['class' => 'w400px' ]
['class' => 'w400px mrgn_top_15px']
);
echo '</a>';
echo '<br />';
@ -611,7 +685,7 @@ echo 'https://integriaims.com';
echo '</a>';
echo '</div>';
echo "<form method='post'>";
echo "<form method='post' class='max_floating_element_size'>";
html_print_input_hidden('update_config', 1);
// Form enable.
@ -632,7 +706,7 @@ echo '</div>';
if ($has_connection != false) {
// Form alert default settings.
echo '<div id="form_alert_settings">';
echo '<fieldset>';
echo '<fieldset class="mrgn_top_15px">';
echo '<legend>'.__('Alert default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>';
html_print_table($table_alert_settings);
@ -642,7 +716,7 @@ if ($has_connection != false) {
// Form custom response default settings.
echo '<div id="form_custom_response_settings">';
echo '<fieldset>';
echo '<fieldset class="mrgn_top_15px">';
echo '<legend>'.__('Event custom response default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>';
html_print_table($table_cr_settings);
@ -650,33 +724,24 @@ if ($has_connection != false) {
echo '</fieldset>';
echo '</div>';
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'update'],
true
),
]
$update_button = html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'update'],
true
);
} else {
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update and continue'),
'update_button',
false,
['icon' => 'update'],
true
),
]
$update_button = html_print_submit_button(
__('Update and continue'),
'update_button',
false,
['icon' => 'update'],
true
);
}
html_print_action_buttons($update_button);
echo '</form>';
@ -686,8 +751,8 @@ echo '</form>';
if($('input:checkbox[name="integria_user_level_conf"]').is(':checked'))
{
$('#integria-remote-setup-integria_user').hide();
$('#integria-remote-setup-integria_pass').hide()
$('.integria-remote-setup-integria_user').hide();
$('.integria-remote-setup-integria_pass').hide()
}
var handleUserLevel = function(event) {
@ -726,13 +791,13 @@ echo '</form>';
}
var hideUserPass = function () {
$('#integria-remote-setup-integria_user').hide();
$('#integria-remote-setup-integria_pass').hide();
$('.integria-remote-setup-integria_user').hide();
$('.integria-remote-setup-integria_pass').hide();
}
var showUserPass = function () {
$('#integria-remote-setup-integria_user').show();
$('#integria-remote-setup-integria_pass').show();
$('.integria-remote-setup-integria_user').show();
$('.integria-remote-setup-integria_pass').show();
}
var handleEnable = function (event) {

View File

@ -43,7 +43,7 @@ $table->data = [];
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true)
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
);
$table->data[0][] = html_print_label_input_block(
@ -100,3 +100,9 @@ html_print_action_buttons(
)
);
echo '</form>';
?>
<script>
$("input[name=netflow_name_dir]").on("input", function() {
$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));
});
</script>

View File

@ -0,0 +1,108 @@
<?php
/**
* Setup view for sflow
*
* @category Setup
* @package Pandora FMS
* @subpackage Configuration
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
require_once 'include/functions_ui.php';
check_login();
$update = (bool) get_parameter('update');
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->data = [];
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
html_print_input_text('sflow_name_dir', $config['sflow_name_dir'], false, 50, 200, true)
);
$table->data[0][] = html_print_label_input_block(
__('Daemon interval'),
html_print_input_text('sflow_interval', $config['sflow_interval'], false, 50, 200, true)
);
$table->data[1][] = html_print_label_input_block(
__('Daemon binary path'),
html_print_input_text('sflow_daemon', $config['sflow_daemon'], false, 50, 200, true)
);
$table->data[1][] = html_print_label_input_block(
__('Nfdump binary path'),
html_print_input_text('sflow_nfdump', $config['sflow_nfdump'], false, 50, 200, true)
);
$table->data[2][] = html_print_label_input_block(
__('Nfexpire binary path'),
html_print_input_text('sflow_nfexpire', $config['sflow_nfexpire'], false, 50, 200, true)
);
$table->data[2][] = html_print_label_input_block(
__('Maximum chart resolution'),
html_print_input_text('sflow_max_resolution', $config['sflow_max_resolution'], false, 50, 200, true)
);
$table->data[3][] = html_print_label_input_block(
__('Disable custom live view filters'),
html_print_checkbox_switch('sflow_disable_custom_lvfilters', 1, $config['sflow_disable_custom_lvfilters'], true)
);
$table->data[3][] = html_print_label_input_block(
__('Sflow max lifetime'),
html_print_input_text('sflow_max_lifetime', $config['sflow_max_lifetime'], false, 50, 200, true)
);
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[4][] = html_print_label_input_block(
__('Name resolution for IP address'),
html_print_checkbox_switch_extended('sflow_get_ip_hostname', 1, $config['sflow_get_ip_hostname'], false, $onclick, '', true)
);
echo '<form class="max_floating_element_size" id="sflow_setup" method="post">';
html_print_table($table);
html_print_input_hidden('update_config', 1);
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'upd_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';
?>
<script>
$("input[name=sflow_name_dir]").on("input", function() {
$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));
});
</script>

View File

@ -50,7 +50,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/update_manager',
@ -66,12 +66,13 @@ try {
[
'label' => __('Free search'),
'type' => 'text',
'class' => 'mw250px',
'class' => 'w400px',
'id' => 'free_search',
'name' => 'free_search',
],
],
],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ',
]
);
} catch (Exception $e) {

View File

@ -256,133 +256,158 @@ if ((bool) is_metaconsole() === true) {
);
}
echo '<form method="post" action="'.$action.'">';
echo '<form method="post" action="'.$action.'" class="max_floating_element_size">';
html_print_input_hidden('update_config', 1);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$i = 0;
$table->style[$i] = 'font-weight: bolder;width:250px';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$url_update_manager = update_manager_get_url();
$table->data[$i][0] = __('Warp Update URL');
$table->data[$i++][1] = html_print_input_text(
'url_update_manager',
$url_update_manager,
__('URL update manager'),
80,
255,
true,
true
$table->data[0][0] = html_print_label_input_block(
__('Warp Update URL'),
html_print_input_text(
'url_update_manager',
$url_update_manager,
__('URL update manager'),
80,
255,
true,
true
)
);
$table->data[$i][0] = __('Use secured Warp Update');
$table->data[$i++][1] = html_print_input(
[
'type' => 'switch',
'name' => 'secure_update_manager',
'value' => ($secure_update_manager ?? 1),
]
$table->data[0][1] = html_print_label_input_block(
__('Use secured Warp Update'),
html_print_input(
[
'type' => 'switch',
'name' => 'secure_update_manager',
'value' => ($secure_update_manager ?? 1),
]
)
);
$table->data[$i][0] = __('Proxy server');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_server',
$update_manager_proxy_server,
$table->data[1][0] = html_print_label_input_block(
__('Proxy server'),
80,
60,
true
html_print_input_text(
'update_manager_proxy_server',
$update_manager_proxy_server,
__('Proxy server'),
80,
60,
true
)
);
$table->data[$i][0] = __('Proxy port');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_port',
$update_manager_proxy_port,
$table->data[1][1] = html_print_label_input_block(
__('Proxy port'),
80,
60,
true
html_print_input_text(
'update_manager_proxy_port',
$update_manager_proxy_port,
__('Proxy port'),
80,
60,
true
)
);
$table->data[$i][0] = __('Proxy user');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_user',
$update_manager_proxy_user,
$table->data[2][0] = html_print_label_input_block(
__('Proxy user'),
80,
60,
true
html_print_input_text(
'update_manager_proxy_user',
$update_manager_proxy_user,
__('Proxy user'),
80,
60,
true
)
);
$table->data[$i][0] = __('Proxy password');
$table->data[$i++][1] = html_print_input_password(
'update_manager_proxy_password',
$update_manager_proxy_password,
$table->data[2][1] = html_print_label_input_block(
__('Proxy password'),
80,
60,
true
html_print_input_password(
'update_manager_proxy_password',
$update_manager_proxy_password,
__('Proxy password'),
80,
60,
true
)
);
$table->data[$i][0] = __('Allow no-consecutive patches');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'allow_offline_patches',
'value' => $allow_offline_patches,
'return' => true,
]
$table->data[3][0] = html_print_label_input_block(
__('Allow no-consecutive patches'),
html_print_switch(
[
'name' => 'allow_offline_patches',
'value' => $allow_offline_patches,
'return' => true,
]
)
);
$table->data[$i][0] = __('Limit to LTS updates');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'lts_updates',
'value' => $lts_updates,
'return' => true,
]
$table->data[3][1] = html_print_label_input_block(
__('Limit to LTS updates'),
html_print_switch(
[
'name' => 'lts_updates',
'value' => $lts_updates,
'return' => true,
]
)
);
$table->data[$i][0] = __('Registration ID');
$table->data[$i++][1] = '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>';
$table->data[4][0] = html_print_label_input_block(
__('Registration ID'),
'<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>'
);
if (update_manager_verify_registration() === true && users_is_admin()) {
$table->data[$i][0] = __('Cancel registration');
$table->data[$i][1] = '<a href="';
$url = '<a href="';
if ((bool) is_metaconsole() === true) {
$table->data[$i][1] .= ui_get_full_url(
$url .= ui_get_full_url(
'index.php?sec=advanced&sec2=advanced/metasetup&pure=0&tab=update_manager_setup&um_disconnect_console=1'
);
} else {
$table->data[$i][1] .= ui_get_full_url(
$url .= ui_get_full_url(
'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup&um_disconnect_console=1'
);
}
$table->data[$i++][1] .= '" onclick="if(confirm(\'Are you sure?\')) {return true;} else { return false; }">'.__('Unregister').'</a>';
$url .= '" onclick="if(confirm(\'Are you sure?\')) {return true;} else { return false; }">'.__('Unregister').'</a>';
$table->data[4][1] = html_print_label_input_block(
__('Cancel registration'),
$url
);
}
if (license_free()) {
$config['identification_reminder'] = isset($config['identification_reminder']) ? $config['identification_reminder'] : 1;
$table->data[$i][0] = __('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true);
$table->data[$i][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 1, '', $config['identification_reminder'], true).'&nbsp;&nbsp;';
$table->data[$i++][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 0, '', $config['identification_reminder'], true);
$table->data[4][1] = html_print_label_input_block(
__('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true),
'<div class="inline-radio-button">
'.__('Yes').html_print_radio_button('realtimestats', 1, '', $config['realtimestats'], true).'&nbsp;&nbsp;
'.__('No').html_print_radio_button('realtimestats', 0, '', $config['realtimestats'], true).'</div>'
);
}
html_print_input_hidden('action_update_url_update_manager', 1);
html_print_input_hidden('update_config', 1);
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(
__('Update'),
'update_button',
false,
'class="sub upd"'
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'update_button',
false,
['icon' => 'wand'],
true
)
);
echo '</div>';
echo '</form>';

View File

@ -393,6 +393,7 @@ if ($create_user === true) {
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0);
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -216,11 +216,8 @@ if ($get_double_auth_info_page) {
$html .= '</p>';
$html .= '</div>';
$html .= '<br>';
$html .= '<div class="center_align">';
$html .= '<div class="flex flex-space-around">';
$html .= html_print_button(__('Download the app'), 'google_authenticator_download', false, '', '', true);
$html .= '</div>';
$html .= '<br>';
$html .= '<div class="center_align">';
$html .= html_print_button(__('Continue'), 'continue_to_generate', false, '', '', true);
$html .= '</div>';
@ -311,11 +308,11 @@ if ($get_double_auth_generation_page) {
$html .= '<br>';
$html .= __('QR').': <br>';
$html .= '<div id="qr-container"></div>';
$html .= '<br>';
$html .= '<br><div class="flex flex-space-around">';
$html .= html_print_button(__('Refresh code'), 'continue_to_generate', false, '', '', true);
$html .= '&nbsp;';
$html .= html_print_button(__('Continue'), 'continue_to_validate', false, '', '', true);
$html .= '</div>';
$html .= '</div>';
ob_clean();
?>
@ -453,7 +450,7 @@ if ($get_double_auth_validation_page) {
$html .= html_print_input_text('code', '', '', 50, $secret_lenght, true);
$html .= '<div id="code_input_message" class="red"></div>';
$html .= '<br><br>';
$html .= '<div id="button-container">';
$html .= '<div id="button-container" class="flex flex-space-around">';
$html .= html_print_button(__('Validate code'), 'continue_to_validate', false, '', '', true);
$html .= html_print_image('images/spinner.gif', true);
$html .= '</div>';

View File

@ -91,9 +91,8 @@ $node_id = (int) get_parameter('node_id', 0);
if ($get_comments === true) {
$event = get_parameter('event', false);
$event_rep = (int) get_parameter('event_rep', 0);
$event_rep = get_parameter_post('event')['event_rep'];
$group_rep = get_parameter_post('event')['group_rep'];
$event_rep = (int) get_parameter_post('event')['event_rep'];
$group_rep = (int) get_parameter_post('event')['group_rep'];
if ($event === false) {
return __('Failed to retrieve comments');
@ -126,7 +125,7 @@ if ($get_comments === true) {
} else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) {
$whereGrouped = sprintf(
'`id_extra` = "%s"',
$event['id_extra']
io_safe_output($event['id_extra'])
);
} else {
$whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']);

View File

@ -1390,7 +1390,7 @@ if (check_login()) {
false,
'offset',
true,
'pagination-bottom',
'',
'pagination_list_modules(offset_param)',
[
'count' => '',
@ -1692,6 +1692,18 @@ if (check_login()) {
$where = 'tagente_modulo.nombre LIKE "%%'.$search.'%%" AND ';
}
if (str_contains($status, '6') === true) {
$expl = explode(',', $status);
$exist = array_search('6', $expl);
if (isset($exist) === true) {
unset($expl[$exist]);
}
array_push($expl, '1', '2');
$status = implode(',', $expl);
}
$where .= sprintf(
'tagente_estado.estado IN (%s)
AND tagente_modulo.delete_pending = 0',

View File

@ -234,7 +234,7 @@ class ExternalTools extends HTML
'images/change-active.svg',
true,
[
'id' => 'button_sound_warning',
'id' => 'button_sound_alert',
'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16',
'title' => __('Play sound'),
@ -269,7 +269,7 @@ class ExternalTools extends HTML
'images/change-active.svg',
true,
[
'id' => 'button_sound_warning',
'id' => 'button_sound_critical',
'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16',
'title' => __('Play sound'),

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC230322';
$build_version = 'PC230327';
$pandora_version = 'v7.0NG.769';
// Do not overwrite default timezone set if defined.
@ -153,6 +153,19 @@ if (! defined('ENTERPRISE_DIR')) {
}
db_select_engine();
if (empty($config['remote_config']) === false
&& file_exists($config['remote_config'].'/conf/'.PANDORA_HA_FILE)
&& filesize($config['remote_config'].'/conf/'.PANDORA_HA_FILE) > 0
) {
$data = file_get_contents($config['remote_config'].'/conf/'.PANDORA_HA_FILE);
if (empty($data) === false) {
$ip_list = explode(',', $data);
// Connects to the first pandora_ha_dbs.conf database.
$config['dbhost'] = trim($ip_list[0]);
}
}
$config['dbconnection'] = db_connect();
require_once $ownDir.'functions_config.php';

View File

@ -1,4 +1,5 @@
<?php
/**
* Constants definitions.
*
@ -703,6 +704,11 @@ define('HA_ACTION_ENABLE', 6);
define('HA_ACTION_CLEANUP', 7);
define('HA_ACTION_RESYNC', 8);
define('HA_RESYNC', 1);
define('HA_DISABLE', 5);
define('HA_ENABLE', 6);
define('HA_UNINITIALIZED', 0);
define('HA_ONLINE', 1);
define('HA_PENDING', 2);
@ -864,6 +870,8 @@ define(
// Pandora FMS Enterprise license.
define('LICENSE_FILE', 'customer_key');
// Pandora HA database list.
define('PANDORA_HA_FILE', 'pandora_ha_hosts.conf');
// Home screen values for user definition.
define('HOME_SCREEN_DEFAULT', 'default');

View File

@ -260,6 +260,24 @@ function config_update_config()
$error_update[] = __('Enable Netflow');
}
if (config_update_value('activate_sflow', (bool) get_parameter('activate_sflow'), true) === false) {
$error_update[] = __('Enable Sflow');
}
if (config_update_value('general_network_path', get_parameter('general_network_path'), true) === false) {
$error_update[] = __('General network path');
} else {
if (empty($config['netflow_name_dir']) === false && $config['netflow_name_dir'] !== '') {
$path = get_parameter('general_network_path');
config_update_value('netflow_path', $path.$config['netflow_name_dir']);
}
if (empty($config['sflow_name_dir']) === false && $config['sflow_name_dir'] !== '') {
$path = get_parameter('general_network_path');
config_update_value('sflow_path', $path.$config['sflow_name_dir']);
}
}
$timezone = (string) get_parameter('timezone');
if (empty($timezone) === true || config_update_value('timezone', $timezone, true) === false) {
$error_update[] = __('Timezone setup');
@ -456,6 +474,10 @@ function config_update_config()
$error_update[] = __('Enable Update Manager');
}
if (config_update_value('legacy_database_ha', get_parameter('legacy_database_ha'), true) === false) {
$error_update[] = __('Legacy database HA');
}
if (config_update_value('ipam_ocuppied_critical_treshold', get_parameter('ipam_ocuppied_critical_treshold'), true) === false) {
$error_update[] = __('Ipam Ocuppied Manager Critical');
}
@ -1501,8 +1523,13 @@ function config_update_config()
break;
case 'net':
if (config_update_value('netflow_path', get_parameter('netflow_path'), true) === false) {
$error_update[] = __('Data storage path');
if (config_update_value('netflow_name_dir', get_parameter('netflow_name_dir'), true) === false) {
$error_update[] = __('Name storage path');
} else {
if (empty($config['general_network_path']) === false && $config['general_network_path'] !== '') {
$name = get_parameter('netflow_name_dir');
config_update_value('netflow_path', $config['general_network_path'].$name);
}
}
if (config_update_value('netflow_interval', (int) get_parameter('netflow_interval'), true) === false) {
@ -1538,6 +1565,49 @@ function config_update_config()
}
break;
case 'sflow':
if (config_update_value('sflow_name_dir', get_parameter('sflow_name_dir'), true) === false) {
$error_update[] = __('Sflow name dir');
} else {
if (empty($config['general_network_path']) === false && $config['general_network_path'] !== '') {
$name = get_parameter('sflow_name_dir');
config_update_value('sflow_path', $config['general_network_path'].$name);
}
}
if (config_update_value('sflow_interval', (int) get_parameter('sflow_interval'), true) === false) {
$error_update[] = __('Daemon interval');
}
if (config_update_value('sflow_daemon', get_parameter('sflow_daemon'), true) === false) {
$error_update[] = __('Daemon binary path');
}
if (config_update_value('sflow_nfdump', get_parameter('sflow_nfdump'), true) === false) {
$error_update[] = __('Nfdump binary path');
}
if (config_update_value('sflow_nfexpire', get_parameter('sflow_nfexpire'), true) === false) {
$error_update[] = __('Nfexpire binary path');
}
if (config_update_value('sflow_max_resolution', (int) get_parameter('sflow_max_resolution'), true) === false) {
$error_update[] = __('Maximum chart resolution');
}
if (config_update_value('sflow_disable_custom_lvfilters', get_parameter('sflow_disable_custom_lvfilters'), true) === false) {
$error_update[] = __('Disable custom live view filters');
}
if (config_update_value('sflow_max_lifetime', (int) get_parameter('sflow_max_lifetime'), true) === false) {
$error_update[] = __('Sflow max lifetime');
}
if (config_update_value('sflow_get_ip_hostname', (int) get_parameter('sflow_get_ip_hostname'), true) === false) {
$error_update[] = __('Name resolution for IP address');
}
break;
case 'log':
if (config_update_value('elasticsearch_ip', get_parameter('elasticsearch_ip'), true) === false) {
$error_update[] = __('IP ElasticSearch server');
@ -2237,6 +2307,10 @@ function config_process_config()
config_update_value('enable_update_manager', 1);
}
if (!isset($config['legacy_database_ha'])) {
config_update_value('legacy_database_ha', 0);
}
if (!isset($config['disabled_newsletter'])) {
config_update_value('disabled_newsletter', 0);
}
@ -2557,7 +2631,7 @@ function config_process_config()
}
if (!isset($config['custom_logo_login'])) {
config_update_value('custom_logo_login', 'login_logo_v7.png');
config_update_value('custom_logo_login', 'Pandora-FMS-1.png');
}
if (!isset($config['custom_splash_login'])) {
@ -2597,7 +2671,7 @@ function config_process_config()
}
if (!isset($config['custom_title1_login'])) {
config_update_value('custom_title1_login', __('ONE TOOL TO MONITOR THEM ALL'));
config_update_value('custom_title1_login', __('ONE TOOL TO RULE THEM ALL'));
}
if (!isset($config['custom_title2_login'])) {
@ -2621,7 +2695,7 @@ function config_process_config()
}
if (!isset($config['background_opacity'])) {
config_update_value('background_opacity', 30);
config_update_value('background_opacity', 20);
}
if (!isset($config['meta_background_opacity'])) {
@ -2641,7 +2715,7 @@ function config_process_config()
}
if (!isset($config['meta_custom_logo_login'])) {
config_update_value('meta_custom_logo_login', 'pandora_logo.png');
config_update_value('meta_custom_logo_login', 'Pandora-FMS-1.png');
}
if (!isset($config['meta_custom_splash_login'])) {
@ -2649,7 +2723,7 @@ function config_process_config()
}
if (!isset($config['meta_custom_title1_login'])) {
config_update_value('meta_custom_title1_login', __('ONE TOOL TO MONITOR THEM ALL'));
config_update_value('meta_custom_title1_login', __('ONE TOOL TO RULE THEM ALL'));
}
if (!isset($config['meta_custom_title2_login'])) {
@ -2768,6 +2842,28 @@ function config_process_config()
config_update_value('activate_netflow', 0);
}
if (!isset($config['activate_sflow'])) {
config_update_value('activate_sflow', 0);
}
if (!isset($config['general_network_path'])) {
if ($is_windows) {
$default = 'C:\PandoraFMS\Pandora_Server\data_in\\';
} else {
$default = '/var/spool/pandora/data_in/';
}
config_update_value('general_network_path', $default);
}
if (!isset($config['netflow_name_dir'])) {
config_update_value('netflow_name_dir', 'netflow');
}
if (!isset($config['sflow_name_dir'])) {
config_update_value('sflow_name_dir', 'sflow');
}
if (!isset($config['netflow_path'])) {
if ($is_windows) {
$default = 'C:\PandoraFMS\Pandora_Server\data_in\netflow';
@ -2806,6 +2902,48 @@ function config_process_config()
config_update_value('netflow_max_lifetime', '5');
}
if (!isset($config['sflow_interval'])) {
config_update_value('sflow_interval', SECONDS_10MINUTES);
}
if (!isset($config['sflow_daemon'])) {
config_update_value('sflow_daemon', '/usr/bin/sfcapd');
}
if (!isset($config['sflow_nfdump'])) {
config_update_value('sflow_nfdump', '/usr/bin/nfdump');
}
if (!isset($config['sflow_nfexpire'])) {
config_update_value('sflow_nfexpire', '/usr/bin/nfexpire');
}
if (!isset($config['sflow_max_resolution'])) {
config_update_value('sflow_max_resolution', '50');
}
if (!isset($config['sflow_disable_custom_lvfilters'])) {
config_update_value('sflow_disable_custom_lvfilters', 0);
}
if (!isset($config['sflow_max_lifetime'])) {
config_update_value('sflow_max_lifetime', '5');
}
if (!isset($config['sflow_name_dir'])) {
config_update_value('sflow_name_dir', 'sflow');
}
if (!isset($config['sflow_path'])) {
if ($is_windows) {
$default = 'C:\PandoraFMS\Pandora_Server\data_in\sflow';
} else {
$default = '/var/spool/pandora/data_in/sflow';
}
config_update_value('sflow_path', $default);
}
if (!isset($config['auth'])) {
config_update_value('auth', 'mysql');
}

View File

@ -1494,7 +1494,8 @@ function events_get_all(
break;
case EVENT_GROUP_REP_EXTRAIDS:
// Group by events.
// Group by events and ignore null.
$sql_filters[] = 'AND te.id_extra IS NOT NULL AND te.id_extra <> ""';
$group_by .= 'te.id_extra';
break;
}

View File

@ -626,7 +626,7 @@ function filemanager_file_explorer(
$table->width = '100%';
$table->id = 'table_filemanager';
$table->class = (is_metaconsole() === true) ? 'databox_tactical' : 'info_table';
$table->class = 'info_table';
$table->title = '<span>'.__('Index of %s', $relative_directory).'</span>';
$table->colspan = [];
$table->data = [];
@ -751,7 +751,7 @@ function filemanager_file_explorer(
&& ($readOnly === false)
) {
$data[4] .= '<form method="post" action="'.$url.'" style="">';
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter" src="images/delete.svg" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter main_menu_icon" src="../../images/delete.svg" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[4] .= html_print_input_hidden('filename', $fileinfo['realpath'], true);
$data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'].$config['server_unique_identifier']), true);
$data[4] .= html_print_input_hidden('delete_file', 1, true);
@ -896,7 +896,7 @@ function filemanager_file_explorer(
$uploadFileElements .= html_print_input_hidden('upload_file', 1, true);
}
$uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, [ 'class' => 'submitButton', 'style' => 'float:right', 'icon' => 'next'], true);
$uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, [ 'class' => 'submitButton', 'style' => 'float:right; margin-top: 10px;', 'icon' => 'next'], true);
$uploadFileElements .= html_print_input_hidden('real_directory', $real_directory, true);
$uploadFileElements .= html_print_input_hidden('directory', $relative_directory, true);
$uploadFileElements .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['server_unique_identifier']), true);

View File

@ -3261,6 +3261,7 @@ function html_print_input_image($name, $src, $value, $style='', $return=false, $
'onkeyup',
'class',
'form',
'disabled',
];
foreach ($attrs as $attribute) {
@ -4787,13 +4788,16 @@ function html_print_input_file($name, $return=false, $options=false)
if (isset($options['accept']) === true) {
$output .= ' accept="'.$options['accept'].'"';
}
$label = '';
if (isset($options['label']) === true) {
$label = $options['label'];
}
}
// Close input.
$output .= '/>';
if (is_metaconsole() === false) {
$output .= ($options['caption'] ?? __('Select a file'));
}
$output .= ($options['caption'] ?? __('Select a file'));
$output .= '</label>';
$output .= '<span class="inputFileSpan" id="span-'.$name.'">&nbsp;</span>';

View File

@ -72,8 +72,10 @@ function menu_print_menu(&$menu)
$map_id = (string) get_parameter('map_id');
$sec2 = 'operation/gis_maps/render_view&map_id='.$map_id;
} else if ($sec2 === 'operation/gis_maps/render_view') {
$map_id = (string) get_parameter('map_id');
$sec2 = 'operation/gis_maps/render_view&map_id='.$map_id;
$map_id = (int) get_parameter('map_id');
if (empty($map_id) === false) {
$sec2 .= '&map_id='.$map_id;
}
} else if ($sec2 === 'godmode/servers/discovery') {
$wiz = (string) get_parameter('wiz');
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;

View File

@ -1025,9 +1025,29 @@ function netflow_get_command($options, $filter)
// Build command.
$command = io_safe_output($config['netflow_nfdump']).' -N';
// Netflow data path.
if (isset($config['netflow_path']) && $config['netflow_path'] != '') {
$command .= ' -R. -M '.$config['netflow_path'];
if ($config['activate_sflow'] && $config['activate_netflow']) {
if (isset($config['sflow_name_dir']) && $config['sflow_name_dir'] !== ''
&& isset($config['netflow_name_dir']) && $config['netflow_name_dir'] !== ''
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
) {
$command .= ' -R. -M '.$config['general_network_path'].$config['netflow_name_dir'].':'.$config['sflow_name_dir'];
}
} else {
if ($config['activate_sflow']) {
if (isset($config['sflow_name_dir']) && $config['sflow_name_dir'] !== ''
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
) {
$command .= ' -R. -M '.$config['general_network_path'].$config['sflow_name_dir'];
}
}
if ($config['activate_netflow']) {
if (isset($config['netflow_name_dir']) && $config['netflow_name_dir'] !== ''
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
) {
$command .= ' -R. -M '.$config['general_network_path'].$config['netflow_name_dir'];
}
}
}
// Add options.
@ -1035,7 +1055,6 @@ function netflow_get_command($options, $filter)
// Filter options.
$command .= ' '.netflow_get_filter_arguments($filter);
return $command;
}

View File

@ -946,6 +946,20 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
function widthGraph () {
var parentWidth = $('.max-graph-tree-view').parent().width();
$('.max-graph-tree-view').children().width(parentWidth + 5);
$('<input>').attr({
type: 'hidden',
id: 'graph-counter',
value: 1
}).appendTo('#container');
if ($('#graph-counter').val() == 1) {
$('.max-graph-tree-view div.flot-x-axis').css('inset', '-25px').css('margin-top', '10px').css('margin-left', '10px');
$('.max-graph-tree-view canvas.flot-base').css('height', '85px');
$('#graph-counter').val(2);
}
}
</script>";

View File

@ -269,6 +269,7 @@
$(this).change(function() {
var id_os = this.value;
$("select#id_os").select2("close");
var home_url;
if (typeof settings == "undefined") home_url = "./";

View File

@ -652,10 +652,15 @@ var TreeController = {
typeof element.icon != "undefined" &&
element.icon.length > 0
) {
console.log("a");
console.log(controller);
$content.append(
'<div class="node-icon"><div class="node-icon-container"><img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +
"images/" +
(treeController.meta != undefined &&
treeController.meta == 1
? "../../images/"
: "images/") +
element.icon +
'" class="invert_filter"/></div></div>'
);
@ -679,7 +684,10 @@ var TreeController = {
var $deleteBtn = $(
'<a style="float: right; margin-top: 5px;"><img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +
'images/delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
(controller.meta != undefined && controller.meta == 1
? "../../images/"
: "images/") +
'delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
);
$deleteBtn.click(function(event) {
var ok_function = function() {
@ -703,7 +711,10 @@ var TreeController = {
var $updateicon = $(
'<img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +
'images/edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
(controller.meta != undefined && controller.meta == 1
? "../../images/"
: "images/") +
'edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
);
var $updatebtn = $(
'<a style="float: right; margin-top: 5px;" href = "' +

View File

@ -474,7 +474,7 @@ class Manager implements PublicLogin
"SELECT *
FROM tdashboard
WHERE id = %d
AND (id_group IN (%s) AND id_user = '') OR id_user = '%s'",
AND ((id_group IN (%s) AND id_user = '') OR id_user = '%s')",
$this->dashboardId,
$this->stringGroups,
$config['id_user']
@ -1047,6 +1047,7 @@ class Manager implements PublicLogin
'hash' => self::generatePublicHash(),
'publicLink' => $this->publicLink,
'dashboardGroup' => $this->dashboardFields['id_group'],
'dashboardUser' => $this->dashboardFields['id_user'],
]
);
} else {

View File

@ -269,7 +269,6 @@ class ModulesByStatus extends Widget
'selected' => $status_selected,
'return' => true,
'multiple' => true,
'class' => 'overflow-hidden',
'size' => count($status_fields),
'select_all' => false,
'required' => true,
@ -488,6 +487,18 @@ class ModulesByStatus extends Widget
$where = 'tagente_modulo.nombre LIKE "%%'.$search.'%%" AND ';
}
if (str_contains($status, '6') === true) {
$expl = explode(',', $status);
$exist = array_search('6', $expl);
if (isset($exist) === true) {
unset($expl[$exist]);
}
array_push($expl, '1', '2');
$status = implode(',', $expl);
}
$where .= sprintf(
'tagente_estado.estado IN (%s)
AND tagente_modulo.delete_pending = 0',

View File

@ -226,7 +226,7 @@ final class DonutGraph extends Item
'module_input' => true,
'module_name' => 'moduleId',
'module_none' => false,
'get_only_string_modules' => true,
'get_only_string_modules' => false,
],
];
@ -235,14 +235,13 @@ final class DonutGraph extends Item
'label' => __('Module'),
'arguments' => [
'type' => 'autocomplete_module',
'fields' => $fields,
'name' => 'moduleId',
'selected' => $values['moduleId'],
'return' => true,
'sort' => false,
'agent_id' => $values['agentId'],
'metaconsole_id' => $values['metaconsoleId'],
'get_only_string_modules' => true,
'get_only_string_modules' => false,
],
];

View File

@ -68,7 +68,7 @@ div#login_f {
#ver_num {
width: 100%;
color: #dddddd;
color: #fff;
text-align: center;
font-weight: 350;
font-size: 10px;

View File

@ -530,15 +530,6 @@ ul li {
width: 35px;
}
/* Menu height: 601px, 720px, 735px */
@media screen and (max-height: 750px) {
.menu li,
.menu li a,
.menu li div {
min-height: 28px;
}
}
@media screen and (max-height: 750px) {
.operation {
padding-top: 10px;

View File

@ -509,6 +509,10 @@ select:-internal-list-box {
width: 400px;
}
.w400px-important {
width: 400px !important;
}
.w450px {
width: 450px;
}
@ -11578,6 +11582,12 @@ div[role="dialog"] {
margin: 0 auto;
}
.database_background_state {
mask: url(../../images/database@groups.svg) no-repeat center / contain;
-webkit-mask: url(../../images/database@groups.svg) no-repeat center / contain;
margin: 0 auto;
}
.filter-list-adv .wizard li {
display: grid;
}
@ -11752,3 +11762,7 @@ div.relative > div > div#ui-datepicker-div {
border-radius: 0px;
margin-left: 10px;
}
.container-div-input-password:has(.w400px-important) {
width: 400px;
}

View File

@ -12,8 +12,8 @@ span.subtitle-2 {
border: 0 !important;
}
input[type="text"],
input[type="number"] {
input[type="text"]:not(.w100p-important),
input[type="number"]:not(.w100p-important) {
width: 220px;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.769';
$build = '230322';
$build = '230327';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -230,10 +230,15 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che
'title' => __('Standby'),
'text' => __('Standby'),
],
[
'title' => __('Operations'),
'text' => __('Operations'),
],
);
$columns = array_merge(
['standby'],
['force'],
$columns
);
@ -270,7 +275,11 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che
$column_names,
['text' => 'Module'],
['text' => 'Template'],
['text' => 'Operation'],
[
'title' => __('Actions'),
'text' => __('Actions'),
'style' => 'min-width: 15%;',
],
['text' => 'Last fired'],
['text' => 'Status']
);
@ -279,25 +288,12 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che
$columns,
['agent_module_name'],
['template_name'],
['operation'],
['actions'],
['last_fired'],
['status']
);
}
if ($print_agent === true) {
array_push(
$column_names,
['text' => 'Agent']
);
$columns = array_merge(
$columns,
['agent_name']
);
}
if (is_metaconsole() === false) {
if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) {
array_unshift(
@ -315,22 +311,6 @@ if (is_metaconsole() === false) {
$columns
);
}
if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) {
array_push(
$column_names,
[
'title' => __('Actions'),
'text' => __('Actions'),
'style' => 'min-width: 15%;',
]
);
$columns = array_merge(
$columns,
['actions']
);
}
}
if (is_metaconsole() === true) {

View File

@ -375,10 +375,12 @@ $table->data[1][0] = html_print_label_input_block(
html_print_select($fields, 'os', $os, '', 'All', 0, true)
);
$pre_fields = policies_get_policies(false, ['id', 'name']);
$fields = [];
foreach ($pre_fields as $value) {
$fields[$value['id']] = $value['name'];
if (function_exists('policies_get_policies') === true) {
$pre_fields = policies_get_policies(false, ['id', 'name']);
$fields = [];
foreach ($pre_fields as $value) {
$fields[$value['id']] = $value['name'];
}
}
$table->data[1][1] = html_print_label_input_block(

View File

@ -791,7 +791,7 @@ function print_table(
html_print_table($table);
if (count($selected_interfaces) > $config['block_size']) {
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, 'pagination-bottom');
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, '');
}
} else {
ui_print_info_message(['no_close' => true, 'message' => __('No search parameters')]);

View File

@ -30,7 +30,7 @@ use PandoraFMS\Enterprise\Metaconsole\Node;
global $config;
require_once 'include/functions_gis.php';
require_once $config['homedir'].'/include/functions_gis.php';
require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_modules.php';
@ -1481,12 +1481,13 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) {
// Omnishell.
$tasks = count_tasks_agent($id_agente);
if ($tasks === true) {
$omnishellTab = enterprise_hook('omnishell_tab');
if ($omnishellTab == -1) {
$omnishellTab = '';
if (function_exists('count_tasks_agent')) {
$tasks = count_tasks_agent($id_agente);
if ($tasks === true) {
$omnishellTab = enterprise_hook('omnishell_tab');
if ($omnishellTab == -1) {
$omnishellTab = '';
}
}
}

View File

@ -21,13 +21,15 @@ global $config;
require_once 'include/functions_gis.php';
// ui_require_javascript_file('openlayers.pandora');
$buttons['gis_maps_list'] = [
'active' => true,
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/list.png',
'images/logs@svg.svg',
true,
['title' => __('GIS Maps list')]
[
'title' => __('GIS Maps list'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];

View File

@ -116,33 +116,34 @@ $controls = [
$layers = gis_get_layers($idMap);
// Render map
// Render map.
$has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_id'], 'MW')
|| check_acl_restricted_all($config['id_user'], $map['group_id'], 'MM');
$buttons = [];
$buttons['gis_maps_list'] = [
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/list.png',
'active' => false,
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/logs@svg.svg',
true,
[
'title' => __('GIS Maps list'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
if ($config['pure'] == 0) {
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>';
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure=1">'.html_print_image('images/fullscreen@svg.svg', true, ['title' => __('Full screen mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
} else {
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/normalscreen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']).'</a>';
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/exit_fullscreen@svg.svg', true, ['title' => __('Back to normal mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
if ($has_management_acl) {
if ($has_management_acl === true) {
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
).'" target="_blank">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public GIS map'), 'class' => 'invert_filter']).'</a>';
).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
$times = [
@ -170,7 +171,7 @@ $status = [
$buttons[]['text'] = "<div class='mrgn_top_6px'>".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'</div>';
if ($has_management_acl) {
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>';
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$buttons['setup']['godmode'] = 1;
}
@ -179,7 +180,7 @@ ui_print_standard_header(
__('Map').': '.$map['map_name'],
'images/op_snmp.png',
false,
'snmp_console',
'',
false,
$buttons,
[

View File

@ -643,7 +643,7 @@ if (empty($table->data) === true) {
true,
'offset',
false,
'pagination-bottom'
''
);
}

View File

@ -205,7 +205,7 @@ if ($access_console_node === true) {
$sub['operation/inventory/inventory']['refr'] = 0;
}
if ($config['activate_netflow']) {
if ($config['activate_netflow'] || $config['activate_sflow']) {
$sub['network_traffic'] = [
'text' => __('Network'),
'id' => 'Network',
@ -213,34 +213,20 @@ if ($access_console_node === true) {
'subtype' => 'nolink',
'refr' => 0,
];
// Initialize the submenu.
$netflow_sub = [];
$netflow_sub = array_merge(
$netflow_sub,
[
'operation/netflow/netflow_explorer' => [
'text' => __('Netflow explorer'),
'id' => 'Netflow explorer',
],
'operation/netflow/nf_live_view' => [
'text' => __('Netflow Live View'),
'id' => 'Netflow Live View',
],
]
);
$netflow_sub = array_merge(
$netflow_sub,
[
'operation/network/network_usage_map' => [
'text' => __('Network usage map'),
'id' => 'Network usage map',
],
]
);
$netflow_sub = [
'operation/netflow/netflow_explorer' => [
'text' => __('Netflow explorer'),
'id' => 'Netflow explorer',
],
'operation/netflow/nf_live_view' => [
'text' => __('Netflow Live View'),
'id' => 'Netflow Live View',
],
'operation/network/network_usage_map' => [
'text' => __('Network usage map'),
'id' => 'Network usage map',
],
];
$sub['network_traffic']['sub2'] = $netflow_sub;
}
@ -411,7 +397,7 @@ if ($access_console_node === true) {
// INI GIS Maps.
if ($config['activate_gis']) {
$sub['gismaps']['text'] = __('GIS Maps');
$sub['gismaps']['id'] = 'GIS Maps';
$sub['gismaps']['id'] = 'GIS_Maps';
$sub['gismaps']['type'] = 'direct';
$sub['gismaps']['subtype'] = 'nolink';
$sub2 = [];

View File

@ -62,7 +62,13 @@ require_once 'include/functions_visual_map.php';
$hash = (string) get_parameter('hash');
$visualConsoleId = (int) get_parameter('id_layout');
$config['id_user'] = (string) get_parameter('id_user');
$userAccessMaintenance = null;
if (empty($config['id_user']) === true) {
$config['id_user'] = (string) get_parameter('id_user');
} else {
$userAccessMaintenance = $config['id_user'];
}
$refr = (int) get_parameter('refr', ($config['refr'] ?? null));
if (!isset($config['pure'])) {
@ -179,6 +185,7 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
<script type="text/javascript">
var container = document.getElementById("visual-console-container");
var user = "<?php echo $userAccessMaintenance; ?>";
var props = <?php echo (string) $visualConsole; ?>;
var items = <?php echo '['.implode(',', $visualConsoleItems).']'; ?>;
var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>";
@ -282,7 +289,9 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
);
if(props.maintenanceMode != null) {
visualConsoleManager.visualConsole.enableMaintenanceMode();
if(props.maintenanceMode.user !== user) {
visualConsoleManager.visualConsole.enableMaintenanceMode();
}
}
var controls = document.getElementById('vc-controls');

View File

@ -118,8 +118,12 @@ if ($aclRead === false && $aclWrite === false && $aclManage === false) {
// Render map.
$options = [];
$baseUrlList = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
if (is_metaconsole() === true) {
$baseUrlList = 'index.php?sec=screen&sec2=screens/screens&action=visualmap';
}
$options['consoles_list']['text'] = '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">'.html_print_image(
$options['consoles_list']['text'] = '<a href="'.$baseUrlList.'">'.html_print_image(
'images/logs@svg.svg',
true,
[
@ -142,11 +146,17 @@ if ($aclWrite === true || $aclManage === true) {
);
$baseUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='.$action;
if (is_metaconsole() === true) {
$baseUrl = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&action2='.$action;
}
$hash = md5($config['dbpass'].$visualConsoleId.$config['id_user']);
$options['public_link']['text'] = '<a href="'.ui_get_full_url(
'operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$visualConsoleId.'&refr='.$refr.'&id_user='.$config['id_user']
'operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$visualConsoleId.'&refr='.$refr.'&id_user='.$config['id_user'],
false,
false,
false
).'" target="_blank">'.html_print_image(
'images/item-icon.svg',
true,

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.769
%define release 230322
%define release 230327
# 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.769
%define release 230322
%define release 230327
# 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.769
%define release 230322
%define release 230327
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -2634,9 +2634,17 @@ CREATE TABLE IF NOT EXISTS `tdatabase` (
`action` TINYINT UNSIGNED DEFAULT 0,
`ssh_key` TEXT,
`ssh_pubkey` TEXT,
`ssh_status` TINYINT UNSIGNED DEFAULT 0,
`last_error` TEXT,
`db_status` TINYINT UNSIGNED DEFAULT 0,
`replication_status` TINYINT UNSIGNED DEFAULT 0,
`replication_delay` BIGINT DEFAULT 0,
`master` TINYINT UNSIGNED DEFAULT 0,
`utimestamp` BIGINT DEFAULT 0,
`mysql_version` VARCHAR(10) DEFAULT '',
`pandora_version` VARCHAR(10) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4 ;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- -----------------------------------------------------
-- Table `twidget`

View File

@ -72,6 +72,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('stats_interval', '60'),
('activate_gis', '0'),
('activate_netflow', '0'),
('activate_sflow', '0'),
('timezone', 'Europe/Berlin'),
('string_purge', 7),
('audit_purge', 15),
@ -87,6 +88,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('netflow_daemon', '/usr/bin/nfcapd'),
('netflow_nfdump', '/usr/bin/nfdump'),
('netflow_max_resolution', '50'),
('sflow_interval', '3600'),
('sflow_daemon', '/usr/bin/sfcapd'),
('sflow_nfdump', '/usr/bin/nfdump'),
('sflow_max_resolution', '50'),
('event_fields', 'mini_severity,evento,estado,agent_name,timestamp'),
('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,last_status_change,graph,warn,data,timestamp'),
('list_ACL_IPs_for_API', '127.0.0.1'),

View File

@ -260,7 +260,7 @@ if (isset($config['public_dashboard']) === true
}
}
} else {
if (check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) {
if ($dashboardUser !== $config['id_user'] && check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) {
$buttons = [
'back_to_dashboard_list' => $back_to_dashboard_list,
'fullscreen' => $fullscreen,

View File

@ -212,7 +212,7 @@ if (empty($dashboards) === true) {
true,
'offset',
false,
'pagination-bottom'
''
);
}

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.769-230322
Version: 7.0NG.769-230327
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.769-230322"
pandora_version="7.0NG.769-230327"
package_cpan=0
package_pandora=1

View File

@ -76,6 +76,9 @@ sub pandora_shutdown () {
# Stop the netflow daemon
pandora_stop_netflow_daemon ();
# Stop the sflow daemon
pandora_stop_sflow_daemon ();
# Stop server threads.
stop_server_threads();
@ -167,6 +170,9 @@ sub pandora_startup () {
# Start the netflow daemon if necessary
pandora_start_netflow_daemon ();
# Start the sflow daemon if necessary
pandora_start_sflow_daemon ();
# Remove disabled servers
@Servers = grep { defined ($_) } @Servers;
@ -262,8 +268,8 @@ sub pandora_start_netflow_daemon () {
# Check if netflow is enabled
if ($Config{'activate_netflow'} != 1) {
logger (\%Config, " [*] Netflow daemon disabled.", 1);
print_message (\%Config, " [*] Netflow daemon disabled.", 1);
logger (\%Config, " [*] NetFlow daemon disabled.", 1);
print_message (\%Config, " [*] NetFlow daemon disabled.", 1);
return;
}
@ -282,8 +288,8 @@ sub pandora_start_netflow_daemon () {
return;
}
logger (\%Config, "[*] Netflow daemon started.", 1);
print_message (\%Config, "[*] Netflow daemon started.", 1);
logger (\%Config, "[*] NetFlow daemon started.", 1);
print_message (\%Config, "[*] NetFlow daemon started.", 1);
}
########################################################################################
@ -310,6 +316,62 @@ sub pandora_stop_netflow_daemon () {
return 0;
}
########################################################################################
# Start the sflow daemon if necessary.
########################################################################################
sub pandora_start_sflow_daemon () {
my $pid_file = '/var/run/pandora_sfcapd.pid';
# Check if sflow is enabled
if ($Config{'activate_sflow'} != 1) {
logger (\%Config, " [*] sFlow daemon disabled.", 1);
print_message (\%Config, " [*] sFlow daemon disabled.", 1);
return;
}
# Stop sfcapd if it's already running
my $pid = pandora_stop_sflow_daemon ();
if (pandora_stop_sflow_daemon () != 0) {
logger (\%Config, "sfcapd (pid $pid) is already running, attempting to kill it...", 1);
print_message (\%Config, "sfcapd (pid $pid) is already running, attempting to kill it...", 1);
}
# Start sfcapd
my $command = $Config{'sflow_daemon'} . ' -D -T all -w -t ' . $Config{'sflow_interval'} . ' -P ' . $pid_file . ' -l ' . $Config{'sflow_path'};
if (system ("$command >/dev/null 2>&1") != 0) {
logger (\%Config, " [E] Could not start sfcapd: $command", 1);
print_message (\%Config, " [E] Could not start sfcapd: $command", 1);
return;
}
logger (\%Config, "[*] sFlow daemon started.", 1);
print_message (\%Config, "[*] sFlow daemon started.", 1);
}
########################################################################################
# Stop the sflow daemon if it's running.
########################################################################################
sub pandora_stop_sflow_daemon () {
my $pid_file = '/var/run/pandora_sfcapd.pid';
# Open the pid file
if ( ! (-e $pid_file && open (PIDFILE, $pid_file))) {
return 0;
}
my $pid = <PIDFILE>;
close PIDFILE;
# Check if sfcapd is running
if (kill (0, $pid) > 0) {
kill (9, $pid);
return $pid;
}
return 0;
}
sub pandora_agent_autoconfiguration_scheduled($) {
my $pa_config = shift;

View File

@ -331,17 +331,18 @@ recon_timing_template 3
snmpget /usr/bin/snmpget
# Location of the braa binary needed by the Enterprise SNMP Server
# /usr/bin/braa by default (PANDORA FMS ENTERPRISE ONLY).
# Location of the pandorafsnmp/braa binary needed by the Enterprise SNMP Server v1 and v2c
# /usr/bin/pandorafsnmp by default for v1 and v2c (PANDORA FMS ENTERPRISE ONLY).
# /usr/bin/braa could be set as optional legacy binary for snmp v1 and v2c (PANDORA FMS ENTERPRISE ONLY).
braa /usr/bin/braa
braa /usr/bin/pandorafsnmp
# Number of retries before braa hands a module over to the Network Server (PANDORA FMS ENTERPRISE ONLY).
braa_retries 3
# Location of the pandorafsnmp binary needed by the Enterprise SNMP Server.
# /usr/bin/pandorafsnmp by default (PANDORA FMS ENTERPRISE ONLY).
# Location of the pandorafsnmp binary needed by the Enterprise SNMP Server v3.
# /usr/bin/pandorafsnmp by default for snmp version 3 (PANDORA FMS ENTERPRISE ONLY).
fsnmp /usr/bin/pandorafsnmp
@ -701,8 +702,35 @@ ncm_ssh_utility /usr/share/pandora_server/util/ncm_ssh_extension
# Pandora FMS Daemon Watchdog execution interval in seconds (PANDORA FMS ENTERPRISE ONLY).
ha_interval 30
# Pandora FMS Daemon Watchdog monitoring interval in seconds. Must be a multiple of ha_interval (PANDORA FMS ENTERPRISE ONLY).
ha_monitoring_interval 60
# HA operation mode. For backward compatibility with pacemaker. Do not change this value (PANDORA FMS ENTERPRISE ONLY).
ha_mode pandora
# Comma separated list of HA host IPs or FQDNs (PANDORA FMS ENTERPRISE ONLY).
#ha_hosts 172.16.0.8,172.168.0.16
# Database username for pandora_ha (PANDORA FMS ENTERPRISE ONLY).
#ha_dbuser pandora
# Database password for pandora_ha (PANDORA FMS ENTERPRISE ONLY).
#ha_dbpass pandora
# SSH username for pandora_ha (PANDORA FMS ENTERPRISE ONLY).
#ha_sshuser pandora
# SSH port for pandora_ha (PANDORA FMS ENTERPRISE ONLY).
#ha_sshport 22
# Absolute path to the HA slave resync script (PANDORA FMS ENTERPRISE ONLY).
#ha_resync /usr/share/pandora_server/util/pandora_ha_resync_slave.sh
# Database username for HA replication (PANDORA FMS ENTERPRISE ONLY).
#repl_dbuser pandora
# Database password for HA replication (PANDORA FMS ENTERPRISE ONLY).
#repl_dbpass pandora
# Number of retries for connection attempts to HA databases.
#ha_connect_retries 2
# Enable (1) or disable (0) Pandora FMS Alert Server.
alertserver 0

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.769";
my $pandora_build = "230322";
my $pandora_build = "230327";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -144,6 +144,12 @@ sub pandora_get_sharedconfig ($$) {
$pa_config->{"netflow_interval"} = pandora_get_tconfig_token ($dbh, 'netflow_interval', 300);
$pa_config->{"netflow_daemon"} = pandora_get_tconfig_token ($dbh, 'netflow_daemon', '/usr/bin/nfcapd');
# Sflow configuration options
$pa_config->{"activate_sflow"} = pandora_get_tconfig_token ($dbh, 'activate_sflow', 0);
$pa_config->{"sflow_path"} = pandora_get_tconfig_token ($dbh, 'sflow_path', '/var/spool/pandora/data_in/sflow');
$pa_config->{"sflow_interval"} = pandora_get_tconfig_token ($dbh, 'sflow_interval', 300);
$pa_config->{"sflow_daemon"} = pandora_get_tconfig_token ($dbh, 'sflow_daemon', '/usr/bin/nfcapd');
# Log module configuration
$pa_config->{"log_dir"} = pandora_get_tconfig_token ($dbh, 'log_dir', '/var/spool/pandora/data_in/log');
$pa_config->{"log_interval"} = pandora_get_tconfig_token ($dbh, 'log_interval', 3600);
@ -553,6 +559,25 @@ sub pandora_load_config {
$pa_config->{"unknown_block_size"} = 1000; # 7.0.769
$pa_config->{"ha_mode"} = "pacemaker"; # 7.0.770
$pa_config->{"ha_file"} = undef; # 7.0.770
$pa_config->{"ha_hosts_file"} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'; # 7.0.770
$pa_config->{"ha_connect_retries"} = 2; # 7.0.770
$pa_config->{"ha_connect_delay"} = 1; # 7.0.770
$pa_config->{"ha_dbuser"} = undef; # 7.0.770
$pa_config->{"ha_dbpass"} = undef; # 7.0.770
$pa_config->{"ha_hosts"} = undef; # 7.0.770
$pa_config->{"ha_resync"} = '/usr/share/pandora_server/util/pandora_ha_resync_slave.sh'; # 7.0.770
$pa_config->{"ha_resync_log"} = '/var/log/pandora/pandora_ha_resync.log'; # 7.0.770
$pa_config->{"ha_sshuser"} = 'pandora'; # 7.0.770
$pa_config->{"ha_sshport"} = 22; # 7.0.770
$pa_config->{"ha_max_splitbrain_retries"} = 2;
$pa_config->{"ha_resync_sleep"} = 10;
$pa_config->{"repl_dbuser"} = undef; # 7.0.770
$pa_config->{"repl_dbpass"} = undef; # 7.0.770
# Check for UID0
if ($pa_config->{"quiet"} != 0){
if ($> == 0){
@ -1283,9 +1308,36 @@ sub pandora_load_config {
}
# Pandora HA extra
elsif ($parametro =~ m/^ha_mode\s(.*)/i) {
$pa_config->{'ha_mode'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_file\s(.*)/i) {
$pa_config->{'ha_file'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_hosts_file\s(.*)/i) {
$pa_config->{'ha_hosts_file'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_dbuser\s(.*)/i) {
$pa_config->{'ha_dbuser'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_dbpass\s(.*)/i) {
$pa_config->{'ha_dbpass'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_sshuser\s(.*)/i) {
$pa_config->{'ha_sshuser'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_sshport\s(.*)/i) {
$pa_config->{'ha_sshport'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_hosts\s(.*)/i) {
$pa_config->{'ha_hosts'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_resync\s(.*)/i) {
$pa_config->{'ha_resync'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_resync_log\s(.*)/i) {
$pa_config->{'ha_resync_log'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_pid_file\s(.*)/i) {
$pa_config->{'ha_pid_file'} = clean_blank($1);
}
@ -1313,9 +1365,42 @@ sub pandora_load_config {
elsif ($parametro =~ m/^dataserver_smart_queue\s([0-1])/i) {
$pa_config->{'dataserver_smart_queue'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_connect_retries\s+([0-9]*)/i) {
$pa_config->{'ha_connect_retries'} = clean_blank($1);
}
elsif ($parametro =~ m/^ha_connect_delay\s+([0-9]*)/i) {
$pa_config->{'ha_connect_delay'} = clean_blank($1);
}
elsif ($parametro =~ m/^repl_dbuser\s(.*)/i) {
$pa_config->{'repl_dbuser'} = clean_blank($1);
}
elsif ($parametro =~ m/^repl_dbpass\s(.*)/i) {
$pa_config->{'repl_dbpass'} = clean_blank($1);
}
} # end of loop for parameter #
# The DB host was overridden by pandora_ha.
if (-f $pa_config->{'ha_hosts_file'}) {
eval {
open(my $fh, '<', $pa_config->{'ha_hosts_file'}) or return;
my $dbhost = <$fh>;
chomp($dbhost);
if (defined($dbhost) && $dbhost ne '') {
$pa_config->{'dbhost'} = $dbhost;
}
close($fh);
};
}
print " [*] DB Host is " . $pa_config->{'dbhost'} . "\n";
# ha_dbuser and ha_dbpass default to dbuser and dbpass respectively.
$pa_config->{'ha_dbuser'} = $pa_config->{'dbuser'} unless defined($pa_config->{'ha_dbuser'});
$pa_config->{'ha_dbpass'} = $pa_config->{'dbpass'} unless defined($pa_config->{'ha_dbpass'});
# repl_dbuser and repl_dbpass default to dbuser and dbpass respectively.
$pa_config->{'repl_dbuser'} = $pa_config->{'dbuser'} unless defined($pa_config->{'repl_dbuser'});
$pa_config->{'repl_dbpass'} = $pa_config->{'dbpass'} unless defined($pa_config->{'repl_dbpass'});
# Generate the encryption key after reading the passphrase.
$pa_config->{"encryption_key"} = enterprise_hook('pandora_get_encryption_key', [$pa_config, $pa_config->{"encryption_passphrase"}]);

View File

@ -54,6 +54,8 @@ Exported Functions:
=item * C<pandora_event>
=item * C<pandora_timed_event>
=item * C<pandora_execute_alert>
=item * C<pandora_execute_action>
@ -194,6 +196,7 @@ our @EXPORT = qw(
pandora_evaluate_alert
pandora_evaluate_snmp_alerts
pandora_event
pandora_timed_event
pandora_extended_event
pandora_execute_alert
pandora_execute_action
@ -3996,7 +3999,8 @@ Generate an event.
=cut
##########################################################################
sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$$) {
#sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$$) {
sub pandora_event {
my ($pa_config, $evento, $id_grupo, $id_agente, $severity,
$id_alert_am, $id_agentmodule, $event_type, $event_status, $dbh,
$source, $user_name, $comment, $id_extra, $tags,
@ -4113,6 +4117,28 @@ sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$$) {
return $event_id;
}
##########################################################################
=head2 C<< pandora_timed_event (I<$time_limit>, I<@event>) >>
Generate an event, but no more than one every $time_limit seconds.
=cut
##########################################################################
my %TIMED_EVENTS :shared;
sub pandora_timed_event ($@) {
my ($time_limit, @event) = @_;
# Match events by message.
my $event_msg = $event[1];
# Do not generate more than one event every $time_limit seconds.
my $now = time();
if (!defined($TIMED_EVENTS{$event_msg}) || $TIMED_EVENTS{$event_msg} + $time_limit < $now) {
$TIMED_EVENTS{$event_msg} = $now;
pandora_event(@event);
}
}
##########################################################################
=head2 C<< pandora_extended_event (I<$pa_config>, I<$dbh>, I<$event_id>, I<$description>) >>

View File

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.769
%define release 230322
%define release 230327
Summary: Pandora FMS Server
Name: %{name}
@ -55,6 +55,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/md5
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/collections
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/netflow
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/sflow
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/trans
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
@ -237,5 +238,6 @@ exit 0
%{_localstatedir}/spool/pandora/data_in/collections
%{_localstatedir}/spool/pandora/data_in/conf
%{_localstatedir}/spool/pandora/data_in/netflow
%{_localstatedir}/spool/pandora/data_in/sflow
%{_localstatedir}/spool/pandora/data_in/trans
%{_localstatedir}/spool/pandora/data_in/commands

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.769
%define release 230322
%define release 230327
Summary: Pandora FMS Server
Name: %{name}
@ -62,6 +62,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/conf
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/md5
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/collections
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/netflow
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/sflow
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/trans
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
@ -235,6 +236,7 @@ rm -Rf /usr/share/man/man1/tentacle_server.1.gz
/var/spool/pandora/data_in/md5
/var/spool/pandora/data_in/collections
/var/spool/pandora/data_in/netflow
/var/spool/pandora/data_in/sflow
/var/spool/pandora/data_in/conf
/var/spool/pandora/data_in/trans
/var/spool/pandora/data_in/commands

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230322"
PI_BUILD="230327"
MODE=$1
if [ $# -gt 1 ]; then
@ -308,6 +308,8 @@ install () {
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/collections
mkdir $DESTDIR$PANDORA_SPOOL/data_in/netflow 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/netflow
mkdir $DESTDIR$PANDORA_SPOOL/data_in/sflow 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/sflow
mkdir $DESTDIR$PANDORA_SPOOL/data_in/trans 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/trans
mkdir $DESTDIR$PANDORA_SPOOL/data_in/commands 2> /dev/null

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.769 Build 230322";
my $version = "7.0NG.769 Build 230327";
# Pandora server configuration
my %conf;
@ -353,6 +353,23 @@ sub pandora_purgedb ($$$) {
else {
log_message ('PURGE', 'netflow_max_lifetime is set to 0. Old netflow data will not be deleted.');
}
# Delete old sflow data
if ($conf->{'_sflow_max_lifetime'} > 0) {
log_message ('PURGE', "Deleting old sflow data.");
if (! defined ($conf->{'_sflow_path'}) || ! -d $conf->{'_sflow_path'}) {
log_message ('!', "sflow data directory does not exist, skipping.");
}
elsif (! -x $conf->{'_sflow_nfexpire'}) {
log_message ('!', "Cannot execute " . $conf->{'_sflow_nfexpire'} . ", skipping.");
}
else {
`yes 2>/dev/null | $conf->{'_sflow_nfexpire'} -r "$conf->{'_sflow_path'}" -t $conf->{'_sflow_max_lifetime'}d`;
}
}
else {
log_message ('PURGE', 'sflow_max_lifetime is set to 0. Old sflow data will not be deleted.');
}
# Delete old log data
log_message ('PURGE', "Deleting old log data.");
@ -629,6 +646,21 @@ sub pandora_load_config_pdb ($) {
$conf->{'errorlogfile'} = $conf->{'errorlog_file'};
$conf->{'errorlogfile'} = "/var/log/pandora_server.error" unless defined ($conf->{'errorlogfile'});
# The DB host was overridden by pandora_ha.
$conf->{'ha_hosts_file'} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf' unless defined($conf->{'ha_hosts_file'});
if (-f $conf->{'ha_hosts_file'}) {
eval {
open(my $fh, '<', $conf->{'ha_hosts_file'}) or return;
my $dbhost = <$fh>;
chomp($dbhost);
if (defined($dbhost) && $dbhost ne '') {
$conf->{'dbhost'} = $dbhost;
}
close($fh);
};
}
print " [*] DB Host is " . $conf->{'dbhost'} . "\n";
# Read additional tokens from the DB
my $dbh = db_connect ($conf->{'dbengine'}, $conf->{'dbname'}, $conf->{'dbhost'}, $conf->{'dbport'}, $conf->{'dbuser'}, $conf->{'dbpass'});

View File

@ -34,15 +34,27 @@ my %Opts;
# Run as a daemon.
my $DAEMON = 0;
# Timeout for the HA DB lock.
my $LOCK_TIMEOUT = 300;
# Avoid retry old processing orders.
my $First_Cleanup = 1;
# List of known HA DB hosts.
my @HA_DB_Hosts;
# Current master node.
my $DB_Host = '';
# PID file.
my $PID_FILE = '/var/run/pandora_ha.pid';
# Server service handler.
my $Pandora_Service;
# Restart the Pandora FMS Server.
my $Restart = 0;
# Controlled exit
my $Running = 0;
@ -55,6 +67,10 @@ sub log_message($$$;$) {
my $level = $verbosity_level;
$level = 5 unless defined($level);
if ($source eq 'DEBUG' && !defined($ENV{'PANDORA_DEBUG'})) {
return;
}
if (ref($conf) eq "HASH") {
logger($conf, 'HA (' . $source . ') ' . "$message", $level);
}
@ -169,6 +185,17 @@ sub ha_keep_pandora_running($$) {
my ($conf, $dbh) = @_;
my $OSNAME = $^O;
my $control_command;
$Pandora_Service = $conf->{'pandora_service_cmd'};
# A restart was requested.
if ($Restart == 1) {
$Restart = 0;
log_message($conf, 'LOG', 'Restarting Pandora service');
$control_command = $^O eq "freebsd" ? "restart_server" : 'restart-server';
`$Pandora_Service $control_command $ENV{'PANDORA_DBHOST'} 2>/dev/null`;
return;
}
# Check if all servers are running
# Restart if crashed or keep interval is over.
@ -185,8 +212,6 @@ sub ha_keep_pandora_running($$) {
my $nservers = get_db_value ($dbh, 'SELECT count(*) FROM tserver where name = ?', $conf->{'servername'});
$Pandora_Service = $conf->{'pandora_service_cmd'};
# Check if service is running
$control_command = "status-server";
if ($OSNAME eq "freebsd") {
@ -308,6 +333,37 @@ sub ha_update_server($$) {
}
################################################################################
# Dump the list of known databases to disk.
################################################################################
sub ha_dump_databases($) {
my ($conf) = @_;
# HA is not configured.
return unless defined($conf->{'ha_hosts'});
eval {
open(my $fh, '>', $conf->{'ha_hosts_file'});
print $fh $DB_Host; # The console only needs the master DB.
close($fh);
log_message($conf, 'DEBUG', "Dumped master database $DB_Host to disk");
};
log_message($conf, 'WARNING', $@) if ($@);
}
################################################################################
# Read the list of known databases from disk.
################################################################################
sub ha_load_databases($) {
my ($conf) = @_;
# HA is not configured.
return unless defined($conf->{'ha_hosts'});
@HA_DB_Hosts = grep { !/^#/ } map { s/^\s+|\s+$//g; $_; } split(/,/, $conf->{'ha_hosts'});
log_message($conf, 'DEBUG', "Loaded databases from disk (@HA_DB_Hosts)");
}
###############################################################################
# Connect to ha database, falling back to direct connection to db.
###############################################################################
@ -324,9 +380,111 @@ sub ha_database_connect($) {
}
###############################################################################
# Main
# Connect to ha database, falling back to direct connection to db.
###############################################################################
sub ha_main($) {
sub ha_database_connect_pandora($) {
my $conf = shift;
my $dbhost = $conf->{'dbhost'};
# Load the list of HA databases.
ha_load_databases($conf);
# Select a new master database.
my ($dbh, $utimestamp, $max_utimestamp) = (undef, undef, -1);
foreach my $ha_dbhost (@HA_DB_Hosts) {
# Retry each database ha_connect_retries times.
for (my $i = 0; $i < $conf->{'ha_connect_retries'}; $i++) {
eval {
log_message($conf, 'DEBUG', "Trying database $ha_dbhost...");
$dbh= db_connect('mysql',
$conf->{'dbname'},
$ha_dbhost,
$conf->{'dbport'},
$conf->{'ha_dbuser'},
$conf->{'ha_dbpass'});
log_message($conf, 'DEBUG', "Connected to database $ha_dbhost");
};
log_message($conf, 'WARNING', $@) if ($@);
# Connection successful.
last if defined($dbh);
# Wait for the next retry.
sleep($conf->{'ha_connect_delay'});
}
# No luck. Try the next database.
next unless defined($dbh);
eval {
# Get the most recent utimestamp from the database.
$utimestamp = get_db_value($dbh, 'SELECT UNIX_TIMESTAMP(MAX(keepalive)) FROM tserver');
db_disconnect($dbh);
# Did we find a more recent database?
$utimestamp = 0 unless defined($utimestamp);
if ($utimestamp > $max_utimestamp) {
$dbhost = $ha_dbhost;
$max_utimestamp = $utimestamp;
}
};
log_message($conf, 'WARNING', $@) if ($@);
}
# Return a connection to the selected master.
eval {
log_message($conf, 'DEBUG', "Connecting to selected master $dbhost...");
$dbh = db_connect('mysql',
$conf->{'dbname'},
$dbhost,
$conf->{'dbport'},
$conf->{'ha_dbuser'},
$conf->{'ha_dbpass'});
# Restart if a new master was selected.
if ($dbhost ne $DB_Host) {
log_message($conf, 'DEBUG', "Setting master database to $dbhost");
$DB_Host = $dbhost;
$Restart = 1;
}
};
log_message($conf, 'WARNING', $@) if ($@);
# Save the list of HA databases.
ha_dump_databases($conf);
return $dbh;
}
###############################################################################
# Return 1 if the given DB is read-only, 0 otherwise.
###############################################################################
sub ha_read_only($$) {
my ($conf, $dbh) = @_;
my $read_only = get_db_value($dbh, 'SELECT @@global.read_only');
return 1 if (defined($read_only) && $read_only == 1);
return 0;
}
###############################################################################
# Restart the Pandora FMS Server.
###############################################################################
sub ha_restart_pandora($) {
my ($config) = @_;
my $control_command = $^O eq 'freebsd' ?
'restart_server' :
'restart-server';
`$config->{'pandora_service_cmd'} $control_command 2>/dev/null`;
}
###############################################################################
# Main (Pacemaker)
###############################################################################
sub ha_main_pacemaker($) {
my ($conf) = @_;
# Set the PID file.
@ -404,6 +562,100 @@ sub ha_main($) {
}
}
###############################################################################
# Main (Pandora)
###############################################################################
sub ha_main_pandora($) {
my ($conf) = @_;
# Set the PID file.
$conf->{'PID'} = $PID_FILE;
# Log to a separate file if needed.
$conf->{'log_file'} = $conf->{'ha_log_file'} if defined ($conf->{'ha_log_file'});
# Run in the background.
ha_daemonize($conf) if ($DAEMON == 1);
# Main loop.
$Running = 1;
while ($Running) {
my $dbh = undef;
eval {
# Connect to a DB.
log_message($conf, 'LOG', "Looking for databases");
$dbh = ha_database_connect_pandora($conf);
if (!defined($dbh)) {
log_message($conf, 'LOG', 'No databases available');
return;
}
# Make the DB host available to the Pandora FMS Server.
$ENV{'PANDORA_DBHOST'} = $DB_Host;
# Needed for the Enterprise module.
$conf->{'dbhost'} = $DB_Host;
# Enterprise capabilities need access to the DB.
eval {
local $SIG{__DIE__};
# Load enterprise components.
enterprise_load($conf, 1);
# Register Enterprise logger
enterprise_hook('pandoraha_logger', [\&log_message]);
log_message($conf, 'LOG', 'Enterprise capabilities loaded');
};
log_message($conf, 'LOG', "No enterprise capabilities: $@") if ($@);
log_message($conf, 'LOG', "Connected to database $DB_Host");
enterprise_hook('pandoraha_stop_slave', [$conf, $dbh]);
if (ha_read_only($conf, $dbh) == 1) {
log_message($conf, 'LOG', "The database is read-only.");
return;
}
# Check if there are updates pending.
ha_update_server($conf, $dbh);
# Keep pandora running
ha_keep_pandora_running($conf, $dbh);
# Keep Tentacle running
ha_keep_tentacle_running($conf, $dbh);
# Are we the master?
pandora_set_master($conf, $dbh);
if (!pandora_is_master($conf)) {
log_message($conf, 'LOG', $conf->{'servername'} . ' is not the current master. Skipping DB-HA actions and monitoring.');
return;
}
# Check the status of slave databases.
enterprise_hook('pandoraha_check_slaves', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]);
# Update the status of HA databases.
enterprise_hook('pandoraha_update_dbs', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]);
# Execute resync actions.
enterprise_hook('pandoraha_resync_dbs', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]);
};
log_message($conf, 'WARNING', $@) if ($@);
# Cleanup.
eval {
db_disconnect($dbh) if defined($dbh);
};
# Go to sleep.
log_message($conf, 'LOG', "Sleep.");
sleep($conf->{'ha_interval'});
}
}
################################################################################
# Stop pandora server
################################################################################
@ -429,7 +681,6 @@ END {
stop();
}
$SIG{INT} = \&stop;
$SIG{TERM} = \&stop;
@ -440,6 +691,10 @@ ha_init_pandora(\%Conf);
ha_load_pandora_conf (\%Conf);
# Main
ha_main(\%Conf);
if (defined($Conf{'ha_mode'}) && lc($Conf{'ha_mode'}) eq 'pandora') {
ha_main_pandora(\%Conf);
} else {
ha_main_pacemaker(\%Conf);
}
exit 0;

View File

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