Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Pablo Aragon 2023-03-17 11:34:00 +01:00
commit b922b50688
61 changed files with 731 additions and 516 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230316
Version: 7.0NG.769-230317
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-230316"
pandora_version="7.0NG.769-230317"
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 => '230316';
use constant AGENT_BUILD => '230317';
# 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 230316
%define release 230317
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 230316
%define release 230317
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

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

View File

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

View File

@ -441,84 +441,95 @@ function quickShellSettings()
}
// Form. Using old style.
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Quickshell').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->class = 'filter-table-adv';
$t->data = [];
$t->style = [];
$t->style[0] = 'font-weight: bold; width: 40%;';
$t->style[0] = 'width: 50%;';
$t->data[0][0] = __('Gotty path');
$t->data[0][1] = html_print_input_text(
'gotty',
$config['gotty'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Gotty path'),
html_print_input_text(
'gotty',
$config['gotty'],
'',
30,
100,
true
)
);
$t->data[1][0] = __('Gotty host');
$t->data[1][1] = html_print_input_text(
'gotty_host',
$config['gotty_host'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Gotty host'),
html_print_input_text(
'gotty_host',
$config['gotty_host'],
'',
30,
100,
true
)
);
$t->data[2][0] = __('Gotty ssh port');
$t->data[2][1] = html_print_input_text(
'gotty_ssh_port',
$config['gotty_ssh_port'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('Gotty ssh port'),
html_print_input_text(
'gotty_ssh_port',
$config['gotty_ssh_port'],
'',
30,
100,
true
)
);
$t->data[3][0] = __('Gotty telnet port');
$t->data[3][1] = html_print_input_text(
'gotty_telnet_port',
$config['gotty_telnet_port'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('Gotty telnet port'),
html_print_input_text(
'gotty_telnet_port',
$config['gotty_telnet_port'],
'',
30,
100,
true
)
);
$hidden = new StdClass();
$hidden = new stdClass();
$hidden->data = [];
$hidden->width = '100%';
$hidden->class = 'databox filters';
$hidden->class = 'filter-table-adv';
$hidden->data = [];
$hidden->style[0] = 'font-weight: bold;width: 40%;';
$hidden->style[0] = 'width: 50%;';
$hidden->data[0][0] = __('Gotty user');
$hidden->data[0][1] = html_print_input_text(
'gotty_user',
$config['gotty_user'],
'',
30,
100,
true
$hidden->data[0][] = html_print_label_input_block(
__('Gotty user'),
html_print_input_text(
'gotty_user',
$config['gotty_user'],
'',
30,
100,
true
)
);
$hidden->data[1][0] = __('Gotty password');
$hidden->data[1][1] = html_print_input_password(
'gotty_pass',
io_output_password($config['gotty_pass']),
'',
30,
100,
true
$hidden->data[0][] = html_print_label_input_block(
__('Gotty password'),
html_print_input_password(
'gotty_pass',
io_output_password($config['gotty_pass']),
'',
30,
100,
true
)
);
$hidden->data[1][1] .= ui_print_reveal_password('gotty_pass', true);
html_print_table($t);

View File

@ -454,6 +454,7 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'class' => 'splash-logo',
'alt' => 'splash',
'border' => 0,
],

View File

@ -1907,62 +1907,64 @@ if ($create_module) {
);
}
if (is_error($id_agent_module) === true) {
switch ($id_agent_module) {
case ERR_EXIST:
$msg = __('There was a problem adding module. Another module already exists with the same name.');
break;
if ($update_module || $create_module) {
if (is_error($id_agent_module) === true) {
switch ($id_agent_module) {
case ERR_EXIST:
$msg = __('There was a problem adding module. Another module already exists with the same name.');
break;
case ERR_INCOMPLETE:
$msg = __('There was a problem adding module. Some required fields are missed : (name)');
break;
case ERR_INCOMPLETE:
$msg = __('There was a problem adding module. Some required fields are missed : (name)');
break;
case ERR_DB:
case ERR_GENERIC:
default:
$msg = __('There was a problem adding module. Processing error');
break;
}
case ERR_DB:
case ERR_GENERIC:
default:
$msg = __('There was a problem adding module. Processing error');
break;
}
// I save the result of the action (insert or update).
$success_action = $id_agent_module;
// I save the result of the action (insert or update).
$success_action = $id_agent_module;
$id_agent_module = false;
ui_print_error_message($msg);
$edit_module = true;
$moduletype = $id_module;
db_pandora_audit(
AUDIT_LOG_AGENT_MANAGEMENT,
"Fail to try added module '".io_safe_output($name)."' for agent ".io_safe_output($agent['alias'])
);
} else {
if ($prediction_module === MODULE_PREDICTION_SYNTHETIC) {
enterprise_hook(
'modules_create_synthetic_operations',
[
$id_agent_module,
$serialize_ops,
]
$id_agent_module = false;
ui_print_error_message($msg);
$edit_module = true;
$moduletype = $id_module;
db_pandora_audit(
AUDIT_LOG_AGENT_MANAGEMENT,
"Fail to try added module '".io_safe_output($name)."' for agent ".io_safe_output($agent['alias'])
);
} else {
if ($prediction_module === MODULE_PREDICTION_SYNTHETIC) {
enterprise_hook(
'modules_create_synthetic_operations',
[
$id_agent_module,
$serialize_ops,
]
);
}
// Update the module interval.
cron_update_module_interval($id_agent_module, $cron_interval);
ui_print_success_message(__('Module added successfully'));
$id_agent_module = false;
$edit_module = false;
$info = '';
$agent = db_get_row('tagente', 'id_agente', $id_agente);
db_pandora_audit(
AUDIT_LOG_AGENT_MANAGEMENT,
"Added module '".db_escape_string_sql($name)."' for agent ".io_safe_output($agent['alias']),
false,
true,
io_json_mb_encode($values)
);
}
// Update the module interval.
cron_update_module_interval($id_agent_module, $cron_interval);
ui_print_success_message(__('Module added successfully'));
$id_agent_module = false;
$edit_module = false;
$info = '';
$agent = db_get_row('tagente', 'id_agente', $id_agente);
db_pandora_audit(
AUDIT_LOG_AGENT_MANAGEMENT,
"Added module '".db_escape_string_sql($name)."' for agent ".io_safe_output($agent['alias']),
false,
true,
io_json_mb_encode($values)
);
}
}

View File

@ -123,7 +123,7 @@ $table->data[1][0] = html_print_label_input_block(
'w100p',
false,
'width: 100%;'
).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span>'.$create_action
).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span><div class="flex_justify_end">'.$create_action.'</div>'
);
$own_info = get_user_info($config['id_user']);
@ -162,7 +162,7 @@ $table->data[1][1] = html_print_label_input_block(
'w100p',
false,
'width: 100%;'
).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a>'.$create_template
).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a><div class="flex_justify_end">'.$create_template.'</div>'
);
$table->data[2][0] = html_print_label_input_block(

View File

@ -132,7 +132,8 @@ $table->data[1][1] = '<a href="javascript:">'.html_print_image(
[
'id' => 'right',
'title' => __('Add fields to select'),
'style' => 'rotate: 180deg; width: 40px',
'style' => 'rotate: 180deg;',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
@ -141,7 +142,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
[
'id' => 'left',
'title' => __('Delete fields to select'),
'style' => 'width: 40px',
'style' => '',
]
).'</a>';
@ -169,6 +170,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[
'onclick' => 'sortUpDown(\'up\');',
'title' => __('Move up selected fields'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
@ -177,6 +179,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[
'onclick' => 'sortUpDown(\'down\');',
'title' => __('Move down selected fields'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][2] .= '</div></div>';

View File

@ -211,7 +211,6 @@ $buttons = html_print_submit_button(
true
);
// hd($filters);
if (empty($filters) === false) {
echo '<form id="multiple_delete" method="POST" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure='.$pure.'">';
html_print_input_hidden('multiple_delete', 1);

View File

@ -55,7 +55,7 @@ $iconData[] = html_print_select(
$iconData[] = html_print_div(
[
'id' => 'icon_image',
'class' => 'inverse_filter main_menu_icon',
'class' => 'invert_filter main_menu_icon',
'style' => 'margin-left: 10px',
'content' => ui_print_os_icon($idOS, false, true),
],

View File

@ -133,7 +133,7 @@ foreach ($osList as $os) {
$data[] = html_print_anchor(
[
'href' => $hrefDelete,
'class' => 'inverse_filter main_menu_icon',
'class' => 'invert_filter main_menu_icon',
'content' => html_print_image('images/delete.svg', true),
],
true

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 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

View File

@ -680,7 +680,7 @@ $table->data[$i][] = html_print_label_input_block(
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=general&amp;pure='.$config['pure'].'">';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('General options').'</legend>';
html_print_input_hidden('update_config', 1);
@ -695,7 +695,7 @@ $encryption = [
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Mail configuration').'</legend>';
ui_print_warning_message(

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 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
@ -37,46 +37,66 @@ $update = (bool) get_parameter('update');
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = 'databox filters';
$table->data = [];
$table->data[0][0] = '<b>'.__('Data storage path').'</b>';
$table->data[0][1] = html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true);
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true)
);
$table->data[1][0] = '<b>'.__('Daemon interval').'</b>';
$table->data[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true);
$table->data[0][] = html_print_label_input_block(
__('Daemon interval'),
html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true)
);
$table->data[2][0] = '<b>'.__('Daemon binary path').'</b>';
$table->data[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true);
$table->data[1][] = html_print_label_input_block(
__('Daemon binary path'),
html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true)
);
$table->data[3][0] = '<b>'.__('Nfdump binary path').'</b>';
$table->data[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true);
$table->data[1][] = html_print_label_input_block(
__('Nfdump binary path'),
html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true)
);
$table->data[4][0] = '<b>'.__('Nfexpire binary path').'</b>';
$table->data[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true);
$table->data[2][] = html_print_label_input_block(
__('Nfexpire binary path'),
html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true)
);
$table->data[5][0] = '<b>'.__('Maximum chart resolution').'</b>';
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
$table->data[2][] = html_print_label_input_block(
__('Maximum chart resolution'),
html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true)
);
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>';
$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true);
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>';
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true);
$table->data[3][] = html_print_label_input_block(
__('Disable custom live view filters'),
html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true)
);
$table->data[3][] = html_print_label_input_block(
__('Netflow max lifetime'),
html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true)
);
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>';
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true);
echo '<form id="netflow_setup" method="post">';
$table->data[4][] = html_print_label_input_block(
__('Name resolution for IP address'),
html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true)
);
echo '<form class="max_floating_element_size" id="netflow_setup" method="post">';
html_print_table($table);
// Update button.
echo '<div class="action-buttons w100p">';
html_print_input_hidden('update_config', 1);
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
echo '</div></form>';
html_print_input_hidden('update_config', 1);
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'upd_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';

View File

@ -352,6 +352,42 @@ $table_styles->data[$row][] = html_print_label_input_block(
'width: 100%'
)
);
$table_styles->data[$row][] = html_print_label_input_block(
__('Status icon set'),
html_print_div(
[
'class' => 'select-with-sibling',
'content' => html_print_select(
$iconsets,
'status_images_set',
$config['status_images_set'],
'',
'',
'',
true,
false,
true,
'',
false,
'width: 240px'
).html_print_button(
__('View'),
'status_set_preview',
false,
'',
[
'icon' => 'camera',
'mode' => 'link',
'class' => 'logo_preview',
],
true
),
],
true
)
);
$row++;
$table_styles->data[$row][] = html_print_label_input_block(
__('Custom favicon'),
@ -374,7 +410,10 @@ $table_styles->data[$row][] = html_print_label_input_block(
).html_print_image(
ui_get_favicon(),
true,
['id' => 'favicon_preview']
[
'id' => 'favicon_preview',
'style' => 'margin-left: 10px',
]
),
],
true
@ -498,7 +537,7 @@ $table_styles->data[$row][] = html_print_label_input_block(
html_print_div(
[
'class' => 'select-with-sibling',
'content' => $entOpenFilesInput.html_print_button(
'content' => $customLogoLoginInput.html_print_button(
__('View'),
'custom_logo_login_preview',
$open,
@ -2041,47 +2080,47 @@ $row++;
*
*/
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Behaviour configuration').' '.ui_print_help_icon('behavoir_conf_tab', true).'</legend>';
html_print_table($table_behaviour);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('GIS configuration').' '.ui_print_help_icon('gis_conf_tab', true).'</legend>';
html_print_table($table_gis);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Style configuration').' '.ui_print_help_icon('style_conf_tab', true).'</legend>';
html_print_table($table_styles);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Charts configuration').' '.ui_print_help_icon('charts_conf_tab', true).'</legend>';
html_print_table($table_chars);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Font and Text configuration').' '.ui_print_help_icon('front_and_text_conf_tab', true).'</legend>';
html_print_table($table_font);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Visual consoles configuration').' '.ui_print_help_icon('visual_consoles_conf_tab', true).'</legend>';
html_print_table($table_vc);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Reports configuration ').ui_print_help_icon('reports_configuration_tab', true).'</legend>';
html_print_table($table_report);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Services configuration').' '.ui_print_help_icon('services_conf_tab', true).'</legend>';
html_print_table($table_ser);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Other configuration').' '.ui_print_help_icon('other_conf_tab', true).'</legend>';
html_print_table($table_other);
echo '</fieldset>';

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 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
@ -32,68 +32,70 @@ $url = ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=websocket_engine&amp;pure='.$config['pure']
);
echo '<form id="form_setup" method="post" action="'.$url.'">';
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="'.$url.'">';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('WebSocket settings').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->class = 'databox filter-table-adv';
$t->data = [];
$t->style[0] = 'font-weight: bold';
$t->data[0][0] = __('Bind address');
$t->data[0][1] = html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Bind address'),
html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
)
);
$t->data[1][0] = __('Bind port');
$t->data[1][2] = html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Bind port'),
html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
)
);
$t->data[2][0] = __('WebSocket proxy url');
$t->data[2][2] = html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('WebSocket proxy url'),
html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
)
);
html_print_input_hidden('update_config', 1);
html_print_table($t);
echo '</fieldset>';
if (function_exists('quickShellSettings') === true) {
quickShellSettings();
}
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

@ -1645,9 +1645,13 @@ if ($new_user === true) {
html_print_input_hidden('json_profile', $json_profile);
}
echo '</div>';
echo '</form>';
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
echo '</div>';
$actionButtons = [];

View File

@ -451,9 +451,9 @@ if ($delete_user === true) {
}
}
$filter_group = (int) get_parameter('filter_group', 0);
$filter_search = get_parameter('filter_search', '');
$search = (bool) get_parameter('search', false);
$filter_group = (int) get_parameter('filter_group', 0);
$filter_search = get_parameter('filter_search', '');
$search = (bool) get_parameter('search', false);
if (($filter_group == 0) && ($filter_search == '')) {
$search = false;
@ -803,7 +803,6 @@ foreach ($info as $user_id => $user_info) {
);
}
$data[4] .= '<br/>';
$data[4] .= '<br/>';
$total_profile++;

View File

@ -763,23 +763,3 @@ html_print_div(
);
html_print_table($userManagementTable);
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
?>
<!--
<script>
paint_qrcode(
"
<?php
// echo ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente);
?>
",
"#qr_code_agent_view",
128,
128
);
</script>
-->

View File

@ -835,7 +835,10 @@ class DiscoveryTaskList extends HTML
$data[6] = html_print_image(
'images/cluster@os.svg',
true,
['title' => __('Discovery Applications Microsoft SQL Server')]
[
'title' => __('Discovery Applications Microsoft SQL Server'),
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.Microsoft SQL Server');
break;

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<circle cx="10" cy="10" r="10" fill="#3F3F3F"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 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
@ -203,132 +203,161 @@ class ExternalTools extends HTML
}
}
html_print_div(['id' => 'layer_sound_alert']);
html_print_div(['id' => 'layer_sound_critical']);
html_print_div(['id' => 'layer_sound_warning']);
// Make the table for show the form.
$table = new stdClass();
$table->width = '100%';
$table->class = 'filter-table-adv';
$table->id = 'commandsTable';
$table->data = [];
$table->data[$i][0] = __('Sound for Alert fired');
$table->data[$i][1] = html_print_select(
$sounds,
'sound_alert',
$config['sound_alert'],
'replaySound(\'alert\');',
'',
'',
true
);
$table->data[$i][1] .= html_print_anchor(
[
'href' => 'javascript:toggleButton(\'alert\')',
'content' => html_print_image(
'images/control_play_col.png',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle;',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
);
$table->data[$i++][1] .= '<div id="layer_sound_alert"></div>';
$table->data[$i][0] = __('Sound for Monitor critical');
$table->data[$i][1] = html_print_select(
$sounds,
'sound_critical',
$config['sound_critical'],
'replaySound(\'critical\');',
'',
'',
true
);
$table->data[$i][1] .= html_print_anchor(
[
'href' => 'javascript:toggleButton(\'critical\')',
'content' => html_print_image(
'images/control_play_col.png',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle;',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
);
$table->data[$i++][1] .= '<div id="layer_sound_critical"></div>';
$table->data[$i][0] = __('Sound for Monitor warning');
$table->data[$i][1] = html_print_select(
$sounds,
'sound_warning',
$config['sound_warning'],
'replaySound(\'warning\');',
'',
'',
true
);
$table->data[$i][1] .= html_print_anchor(
[
'href' => 'javascript:toggleButton(\'warning\')',
'content' => html_print_image(
'images/control_play_col.png',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle;',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
);
$table->data[$i++][1] .= '<div id="layer_sound_warning"></div>';
$table->data[$i][0] = __('Custom graphviz directory');
$table->data[$i++][1] = html_print_input_text(
'graphviz_bin_dir',
$config['graphviz_bin_dir'],
'',
25,
255,
true
$table->data[$i][] = html_print_label_input_block(
__('Sound for Alert fired'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds,
'sound_alert',
$config['sound_alert'],
'replaySound(\'alert\');',
'',
'',
true
).html_print_anchor(
[
'href' => 'javascript:toggleButton(\'alert\')',
'content' => html_print_image(
'images/change-active.svg',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
),
],
true
),
);
$table->data[$i][0] = __('Traceroute path');
$table->data[$i++][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true);
$table->data[$i++][] = html_print_label_input_block(
__('Sound for Monitor critical'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds,
'sound_critical',
$config['sound_critical'],
'replaySound(\'critical\');',
'',
'',
true
).html_print_anchor(
[
'href' => 'javascript:toggleButton(\'critical\')',
'content' => html_print_image(
'images/change-active.svg',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
),
],
true
),
);
$table->data[$i][0] = __('Ping path');
$table->data[$i++][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true);
$table->data[$i++][] = html_print_label_input_block(
__('Sound for Monitor warning'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds,
'sound_warning',
$config['sound_warning'],
'replaySound(\'warning\');',
'',
'',
true
).html_print_anchor(
[
'href' => 'javascript:toggleButton(\'warning\')',
'content' => html_print_image(
'images/change-active.svg',
true,
[
'id' => 'button_sound_warning',
'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16',
'title' => __('Play sound'),
'class' => 'invert_filter',
]
),
],
true
),
],
true
),
);
$table->data[$i][0] = __('Nmap path');
$table->data[$i++][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true);
$table->data[$i][] = html_print_label_input_block(
__('Custom graphviz directory'),
html_print_input_text(
'graphviz_bin_dir',
$config['graphviz_bin_dir'],
'',
25,
255,
true
)
);
$table->data[$i][0] = __('Dig path');
$table->data[$i++][1] = html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true);
$table->data[$i++][] = html_print_label_input_block(
__('Snmpget path'),
html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true)
);
$table->data[$i][0] = __('Snmpget path');
$table->data[$i++][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true);
$table->data[$i][] = html_print_label_input_block(
__('Traceroute path'),
html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true)
);
$table->data[$i++][] = html_print_label_input_block(
__('Ping path'),
html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true)
);
$table->data[$i][] = html_print_label_input_block(
__('Nmap path'),
html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true)
);
$table->data[$i++][] = html_print_label_input_block(
__('Dig path'),
html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true)
);
$table->data[$i][0] = html_print_div(
[
'class' => 'title_custom_commands bolder float-left',
'content' => __('Custom commands'),
'content' => '<label>'.__('Custom commands').'</label>',
],
true
);
@ -336,13 +365,13 @@ class ExternalTools extends HTML
[
'id' => 'add_button_custom_command',
'content' => html_print_image(
'images/add.png',
'images/plus@svg.svg',
true,
[
'title' => __('Add new custom command'),
'onclick' => 'manageCommandLines(event)',
'id' => 'img_add_button_custom_command',
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
@ -350,8 +379,8 @@ class ExternalTools extends HTML
true
);
$table->data[$i][0] = __('Command');
$table->data[$i++][1] = __('Parameters').ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true);
$table->data[$i][0] = '<div><label>'.__('Command').'</label></div>';
$table->data[$i++][1] = '<div style="flex-direction: row;justify-content: flex-start;"><label>'.__('Parameters').'</label>'.ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true, '', false, 'margin-top: 2px').'</div>';
$y = 1;
$iRow = $i;
@ -378,30 +407,27 @@ class ExternalTools extends HTML
}
}
$form = '<form id="form_setup" method="post" >';
$form = '<form class="max_floating_element_size" id="form_setup" method="POST" >';
$form .= '<fieldset>';
$form .= '<legend>'.__('Options').'</legend>';
$form .= html_print_input_hidden('update_paths', 1, true);
$form .= html_print_table($table, true);
$form .= '</fieldset>';
$form .= html_print_div(
[
'id' => '',
'class' => 'action-buttons',
'style' => 'width: 100%',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
),
],
true
);
$form .= '</form>';
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'update_button',
false,
[
'icon' => 'update',
'form' => 'form_setup',
],
true
)
);
echo $form;
}
@ -436,15 +462,14 @@ class ExternalTools extends HTML
$output = html_print_div(
[
'id' => 'delete_button_custom_'.$index,
'class' => '',
'content' => html_print_image(
'images/delete.png',
'images/delete.svg',
true,
[
'title' => __('Delete this custom command'),
'onclick' => 'manageCommandLines(event)',
'id' => 'img_delete_button_custom_'.$index,
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],

View File

@ -453,7 +453,7 @@ class ManageNetScanScripts extends Wizard
'delete',
'images/delete.svg',
1,
'width:40px;',
'',
true,
[
'title' => __('Delete Script'),

View File

@ -868,7 +868,7 @@ class ModuleTemplates extends HTML
'delete_profile',
'images/delete.svg',
$row['id_np'],
'width:40px',
'',
true,
[
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
@ -1156,7 +1156,7 @@ class ModuleTemplates extends HTML
'del_block_'.$id_group.'_',
'images/delete.svg',
1,
'width: 40px',
'',
true,
[
'title' => __('Delete this block'),
@ -1253,7 +1253,7 @@ class ModuleTemplates extends HTML
'del_module_'.$module['component_id'].'_',
'images/delete.svg',
1,
'width:40px;',
'',
true,
[
'title' => __('Delete this module'),

View File

@ -121,6 +121,10 @@ class TipsWindow
}
ui_require_css_file('tips_window');
if ($config['style'] === 'pandora_black' && is_metaconsole() === false) {
ui_require_css_file('pandora_black');
}
ui_require_css_file('jquery.bxslider');
ui_require_javascript_file('tipsWindow');
ui_require_javascript_file('jquery.bxslider.min');
@ -435,7 +439,14 @@ class TipsWindow
'title',
'text',
'enable',
'actions',
[
'text' => 'edit',
'class' => 'table_action_buttons',
],
[
'text' => 'delete',
'class' => 'table_action_buttons',
],
];
$columnNames = [
@ -443,7 +454,8 @@ class TipsWindow
__('Title'),
__('Text'),
__('Enable'),
__('Actions'),
__('Edit'),
__('Delete'),
];
// Load datatables user interface.
@ -451,7 +463,9 @@ class TipsWindow
[
'id' => 'list_tips_windows',
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'dom_elements' => 'lpfti',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'columns' => $columns,
'column_names' => $columnNames,
'ajax_url' => $this->ajaxController,
@ -474,18 +488,19 @@ class TipsWindow
],
]
);
echo '<div class="action-buttons w100p">';
echo '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create">';
html_print_submit_button(
echo '<div class="action-buttons w100p" style="width: 100%">';
$buttonCreate = html_print_button(
__('Create tip'),
'create',
false,
'window.location.replace("index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create")',
[
'class' => 'sub',
'icon' => 'create_file',
]
'icon' => 'plus',
],
true
);
echo '</a>';
html_print_action_buttons($buttonCreate);
echo '</div>';
} catch (Exception $e) {
echo $e->getMessage();
@ -585,16 +600,15 @@ class TipsWindow
$data[$key]['title'] = io_safe_output($row['title']);
$data[$key]['text'] = io_safe_output($row['text']);
$data[$key]['url'] = io_safe_output($row['url']);
$data[$key]['actions'] = '<div class="buttons_actions">';
$data[$key]['actions'] .= '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&idTip='.$row['id'].'">';
$data[$key]['actions'] .= html_print_image(
$data[$key]['edit'] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&idTip='.$row['id'].'">';
$data[$key]['edit'] .= html_print_image(
'images/edit.svg',
true,
['class' => 'main_menu_icon']
);
$data[$key]['actions'] .= '</a>';
$data[$key]['actions'] .= '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&action=delete">';
$data[$key]['actions'] .= html_print_input_image(
$data[$key]['edit'] .= '</a>';
$data[$key]['delete'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&action=delete">';
$data[$key]['delete'] .= html_print_input_image(
'button_delete_tip',
'images/delete.svg',
'',
@ -602,12 +616,11 @@ class TipsWindow
true,
[
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
'class' => 'main_menu_icon',
'class' => 'main_menu_icon invert_filter',
]
);
$data[$key]['actions'] .= html_print_input_hidden('idTip', $row['id'], true);
$data[$key]['actions'] .= '</form>';
$data[$key]['actions'] .= '</div>';
$data[$key]['delete'] .= html_print_input_hidden('idTip', $row['id'], true);
$data[$key]['delete'] .= '</form>';
}
if (empty($data) === true) {
@ -680,14 +693,50 @@ class TipsWindow
</script>';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filter-table-adv';
$table->style[0] = 'font-weight: bold';
$table->style[0] = 'width: 50%';
$table->data = [];
$table->data[0][0] = __('Images');
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
$table->data[0][1] .= html_print_div(
$table->data[0][0] = html_print_label_input_block(
__('Language'),
html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'id_lang',
'',
'',
'',
'0',
true,
false,
true,
false,
'width: 100%;'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Profile'),
html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true)
);
$table->data[1][0] = html_print_label_input_block(
__('Title'),
html_print_input_text('title', '', '', 35, 100, true)
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', '', '', 35, 100, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),
html_print_textarea('text', 5, 50, '', '', true),
);
$table->data[2][1] = html_print_label_input_block(
__('Enable'),
html_print_checkbox_switch('enable', true, true, true)
);
$inputImages = html_print_div(['id' => 'inputs_images'], true);
$inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible',
@ -695,41 +744,36 @@ class TipsWindow
],
true
);
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
$table->data[1][0] = __('Language');
$table->data[1][1] = html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'id_lang',
'',
'',
'',
'0',
$inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible empty_input_images',
'content' => '<p>'.__('Please select a image').'</p>',
],
true
);
$table->data[2][0] = __('Profile');
$table->data[2][1] = html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true);
$table->data[3][0] = __('Title');
$table->data[3][1] = html_print_input_text('title', '', '', 35, 100, true);
$table->data[4][0] = __('Text');
$table->data[4][1] = html_print_textarea('text', 5, 50, '', '', true);
$table->data[5][0] = __('Url');
$table->data[5][1] = html_print_input_text('url', '', '', 35, 100, true);
$table->data[6][0] = __('Enable');
$table->data[6][1] = html_print_checkbox_switch('enable', true, true, true);
$inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create&action=create" enctype="multipart/form-data">';
$table->data[3][0] = html_print_label_input_block(
__('Images'),
$inputImages
);
echo '<form method="post" class="max_floating_element_size" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create&action=create" enctype="multipart/form-data">';
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Send'),
'submit_button',
false,
[
'class' => 'sub',
'icon' => 'update',
]
],
true
);
html_print_submit_button(
$actionButtons .= html_print_submit_button(
__('Preview'),
'preview_button',
false,
@ -737,8 +781,11 @@ class TipsWindow
'class' => 'sub preview',
'id' => 'prev_button',
'icon' => 'preview',
]
],
true
);
html_print_action_buttons($actionButtons);
echo '</div>';
echo '</form>';
html_print_div(['id' => 'tips_window_modal_preview']);
@ -790,7 +837,7 @@ class TipsWindow
true,
[
'onclick' => 'deleteImage(this, \''.$value['id'].'\', \''.$namePath.'\')',
'class' => 'remove-image',
'class' => 'remove-image main_menu_icon',
]
);
$outputImagesTip .= html_print_div(
@ -812,16 +859,52 @@ class TipsWindow
</script>';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filter-table-adv';
$table->style[0] = 'font-weight: bold';
$table->style[0] = 'width: 50%';
$table->data = [];
$table->data[0][0] = __('Images');
$table->data[0][1] .= $outputImagesTip;
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
$table->data[0][1] .= html_print_input_hidden('images_to_delete', '{}', true);
$table->data[0][1] .= html_print_div(
$table->data[0][0] = html_print_label_input_block(
__('Language'),
html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'id_lang',
$tip['id_lang'],
'',
'',
'0',
true,
false,
true,
false,
'width: 100%;'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Profile'),
html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true)
);
$table->data[1][0] = html_print_label_input_block(
__('Title'),
html_print_input_text('title', $tip['title'], '', 35, 100, true)
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', $tip['url'], '', 35, 100, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),
html_print_textarea('text', 5, 50, $tip['text'], '', true),
);
$table->data[2][1] = html_print_label_input_block(
__('Enable'),
html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true)
);
$inputImages = $outputImagesTip;
$inputImages .= html_print_div(['id' => 'inputs_images'], true);
$inputImages .= html_print_input_hidden('images_to_delete', '{}', true);
$inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible',
@ -829,41 +912,35 @@ class TipsWindow
],
true
);
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
$table->data[1][0] = __('Language');
$table->data[1][1] = html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'id_lang',
$tip['id_lang'],
'',
'',
'0',
$inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible empty_input_images',
'content' => '<p>'.__('Please select a image').'</p>',
],
true
);
$table->data[2][0] = __('Profile');
$table->data[2][1] = html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true);
$table->data[3][0] = __('Title');
$table->data[3][1] = html_print_input_text('title', $tip['title'], '', 35, 100, true);
$table->data[4][0] = __('Text');
$table->data[4][1] = html_print_textarea('text', 5, 50, $tip['text'], '', true);
$table->data[5][0] = __('Url');
$table->data[5][1] = html_print_input_text('url', $tip['url'], '', 35, 100, true);
$table->data[6][0] = __('Enable');
$table->data[6][1] = html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true);
$inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&action=edit&idTip='.$tip['id'].'" enctype="multipart/form-data">';
$table->data[3][0] = html_print_label_input_block(
__('Images'),
$inputImages
);
echo '<form class="max_floating_element_size" name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&action=edit&idTip='.$tip['id'].'" enctype="multipart/form-data">';
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Send'),
'submit_button',
false,
[
'class' => 'sub',
'icon' => 'update',
]
],
true
);
html_print_submit_button(
$actionButtons .= html_print_submit_button(
__('Preview'),
'preview_button',
false,
@ -871,9 +948,12 @@ class TipsWindow
'class' => 'sub preview',
'id' => 'prev_button',
'icon' => 'preview',
]
],
true
);
html_print_action_buttons($actionButtons);
echo '</div>';
echo '</form>';
html_print_div(['id' => 'tips_window_modal_preview']);

View File

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

View File

@ -4565,12 +4565,6 @@ function html_print_image(
// Dont use safe_input here or the performance will dead.
$style = '';
if (empty($options) === false && isset($options['class']) === true) {
$options['class'] .= ' main_menu_icon';
} else {
$options['class'] = 'main_menu_icon invert_filter';
}
if (!empty($options)) {
// Deprecated or value-less attributes.
if (isset($options['align'])) {

View File

@ -192,7 +192,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$table->width = '100%';
$table->class = 'info_table';
echo '<div id="edit_user_profiles" class="floating_form white_box">';
echo '<div id="edit_user_profiles" class="max_floating_element_size white_box">';
echo '<p class="subsection_header_title padding-lft-10">'.$title.'</p>';
$table->data = [];
@ -312,12 +312,12 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
true,
[
'onclick' => 'delete_profile(event, this)',
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
} else {
$data['actions'] = '<form method="post" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
$data['actions'] .= html_print_input_image('del', 'images/delete.svg', 1, 'width:40px; height: 28px', true);
$data['actions'] .= html_print_input_image('del', 'images/delete.svg', 1, '', true, ['class' => 'main_menu_icon invert_filter']);
$data['actions'] .= html_print_input_hidden('delete_profile', 1, true);
$data['actions'] .= html_print_input_hidden('id_user_profile', $profile['id_up'], true);
$data['actions'] .= html_print_input_hidden('id_user', $id, true);
@ -391,7 +391,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$data['last_hierarchy'] = html_print_checkbox('no_hierarchy', 1, false, true);
$data['last_actions'] = html_print_input_image('add', 'images/validate.svg', 1, 'width: 40px; height: 28px', true);
$data['last_actions'] = html_print_input_image('add', 'images/validate.svg', 1, '', true, ['class' => 'main_menu_icon invert_filter']);
$data['last_actions'] .= html_print_input_hidden('id', $id, true);
$data['last_actions'] .= html_print_input_hidden('add_profile', 1, true);
$data['last_actions'] .= '</form>';

View File

@ -972,6 +972,9 @@ function openSoundEventModal(settings) {
width: 600,
height: 600,
open: function() {
$(".ui-widget-overlay")
.css("background", "black")
.css("opacity", 0.5);
$.ajax({
method: "post",
url: settings.url,

View File

@ -352,10 +352,10 @@ function load_modal(settings) {
}
} else {
// No onsumbit configured. Directly close.
d.dialog("close");
if (document.getElementById(settings.form) != undefined) {
document.getElementById(settings.form).submit();
}
d.dialog("close");
}
};

View File

@ -2,15 +2,16 @@
$(document).ready(function() {
$("#button-button_add_image").on("click", function() {
var numberImages = $("#inputs_images").children().length;
$(".input-file").each(function(index) {
$(this).attr("name", "file_" + index);
});
var div_image = document.createElement("div");
$(div_image).attr("class", "action_image");
$(div_image).append(
`<input type="file" accept="image/png,image/jpeg,image/gif" name="file_${numberImages +
1}" onchange="checkImage(this)"/>`
`<input type="file" accept="image/png,image/jpeg,image/gif" class="input-file" name="file_${numberImages}" onchange="checkImage(this)" required/>`
);
$(div_image).append(
`<input type="image" src="images/delete.svg" onclick="removeInputImage('file_${numberImages +
1}');" class="remove-image" value="-"/>`
`<input type="image" src="images/delete.svg" onclick="removeInputImage(this);" class="remove-image main_menu_icon" value="-"/>`
);
$("#inputs_images").append(div_image);
});
@ -72,8 +73,8 @@ function activeCarousel() {
$(".carousel .images").bxSlider({ controls: true });
}
}
function removeInputImage(name) {
$(`input[name=${name}]`)
function removeInputImage(e) {
$(e)
.parent()
.remove();
if ($(".action_image").length === 0) {
@ -314,7 +315,7 @@ function previewTip() {
//Images in client
var totalInputsFiles = $("input[type=file]").length;
if (totalInputsFiles > 0) {
if (totalInputsFiles > 0 && validateImages()) {
extradata["totalFiles64"] = totalInputsFiles;
$("input[type=file]").each(function(index) {
var reader = new FileReader();
@ -352,3 +353,15 @@ function previewTip() {
});
}
}
function validateImages() {
$(".empty_input_images").addClass("invisible");
let validate = true;
$("input[type=file]").each(function() {
if (this.files.length == 0) {
$(".empty_input_images").removeClass("invisible");
validate = false;
}
});
return validate;
}

View File

@ -304,6 +304,8 @@ td input[type="checkbox"] {
input[type="image"] {
border: 0px;
background-color: transparent;
height: auto;
padding: 0px;
}
.container-div-input-password input {
@ -1421,7 +1423,7 @@ div#menu_container {
div#menu {
width: 45px;
float: left;
z-index: 2;
z-index: 3;
position: absolute;
}
@ -1436,7 +1438,7 @@ div#head {
min-width: 882px;
background-color: #fff;
color: #000;
z-index: 2;
z-index: 3;
}
.fixed_header {
@ -1793,7 +1795,7 @@ div.title_line {
#menu_tab_frame_view_bc {
position: sticky;
top: 61px;
z-index: 1;
z-index: 2;
display: flex;
align-items: flex-end;
justify-content: space-between;
@ -8255,6 +8257,11 @@ div.graph div.legend table {
justify-content: center;
}
.flex_justify_end {
display: flex;
justify-content: end;
}
.span_priority {
width: 20px;
height: 10px;
@ -10546,6 +10553,18 @@ button div.cog.rotation {
animation: rotation 4s infinite linear;
}
div.status_dot {
mask: url(../../images/status_dot.svg) no-repeat center / contain;
-webkit-mask: url(../../images/status_dot.svg) no-repeat center / contain;
}
.status_dot.ok {
background-color: #82b92e;
}
.status_dot.critical {
background-color: #e63c52;
}
@keyframes rotation {
from {
transform: rotate(0deg);
@ -11245,8 +11264,9 @@ img.main_menu_icon[src$=".svg"] {
}
input.main_menu_icon[src$=".svg"] {
width: 22px;
height: 22px;
width: 20px;
height: 20px;
padding: 0px;
}
.header_help_icon {

View File

@ -1515,3 +1515,13 @@ div.fixed-bottom-box
span.select2 {
border-radius: 6px;
}
.ui-dialog .tips_header.ui-dialog-titlebar {
color: white !important;
background-color: #222222 !important;
}
#tips_window_modal > div.window > div.description > #title_tip,
#tips_window_modal > div.window > div.description > #text_tip {
color: white !important;
}

View File

@ -236,7 +236,8 @@
.table_action_buttons > a,
.table_action_buttons > img,
.table_action_buttons > button,
.table_action_buttons > form {
.table_action_buttons > form,
.table_action_buttons > div {
visibility: hidden;
}
.info_table > tbody > tr:hover {
@ -248,7 +249,8 @@
.info_table > tbody > tr:hover .table_action_buttons > a,
.info_table > tbody > tr:hover .table_action_buttons > img,
.info_table > tbody > tr:hover .table_action_buttons > button,
.info_table > tbody > tr:hover .table_action_buttons > form {
.info_table > tbody > tr:hover .table_action_buttons > form,
.info_table > tbody > tr:hover .table_action_buttons > div {
visibility: visible;
}
@ -460,9 +462,6 @@ a.pandora_pagination.current:hover {
.table_action_buttons input[type="image"],
.action_button_img {
border-radius: 4px;
/*border: 1px solid #dcdcdc !important;*/
padding: 1px !important;
/*box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);*/
}
/* This class is for only one icon to be a button type. */

View File

@ -172,17 +172,17 @@ span.count-round-tip.active {
}
span.enable {
display: block;
width: 15px;
height: 15px;
border-radius: 15px;
width: 40px;
height: 20px;
border-radius: 4px;
background-color: #82b92e;
margin: 0 auto;
}
span.disable {
display: block;
width: 15px;
height: 15px;
border-radius: 15px;
width: 40px;
height: 20px;
border-radius: 4px;
background-color: #e63c52;
margin: 0 auto;
}
@ -212,3 +212,12 @@ span.disable {
opacity: 0;
pointer-events: none;
}
#list_tips_windows .main_menu_icon {
padding: 0px;
}
#list_tips_windows .table_action_buttons {
text-align: center;
}
.button-add-image {
max-width: fit-content;
}

View File

@ -1522,13 +1522,6 @@ require 'include/php_to_js_values.php';
<script type="text/javascript" language="javascript">
// Handle the scroll.
$(document).ready(scrollFunction());
// When there are less than 5 rows, all rows must be white
var theme = "<?php echo $config['style']; ?>";
if (theme === 'pandora') {
if ($('table.info_table tr').length < 5) {
$('table.info_table tbody > tr').css('background-color', '#fff');
}
}
// When the user scrolls down 400px from the top of the document, show the
// button.

View File

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

View File

@ -1759,7 +1759,7 @@ if (empty($result) === false) {
true,
[
'title' => $row['tags'],
'class' => 'inverse_filter main_menu_icon',
'class' => 'invert_filter main_menu_icon',
]
);
}

View File

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

View File

@ -71,7 +71,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $model->ajaxController,

View File

@ -192,7 +192,7 @@ if ($in_planned_downtime && !$cluster->agent()->disabled() && !$cluster->agent()
$table_agent_header = '<div class="agent_details_agent_alias">';
$table_agent_header .= $agent_name;
$table_agent_header .= '</div>';
$table_agent_header .= '<div class="agent_details_agent_name">';
$table_agent_header .= '<div class="agent_details_agent_name mrgn_lft_10px">';
if (!$config['show_group_name']) {
$table_agent_header .= ui_print_group_icon(
$cluster->agent()->id_grupo(),
@ -385,7 +385,7 @@ $table_events .= '</div>';
<div class="agent_details_header">
<?php echo $table_agent_header; ?>
</div>
<div class="agent_details_content">
<div class="agent_details_content pdd_l_50px">
<div class="agent_details_graph">
<?php echo $table_agent_graph; ?>
<div class="agent_details_bullets">

View File

@ -49,11 +49,11 @@ $output .= '<div class="images">';
if ($files !== false) {
if ($preview === true) {
foreach ($files as $key => $file) {
$output .= html_print_image($file, true);
$output .= html_print_image($file, true, ['class' => 'main_menu_icon']);
}
} else {
foreach ($files as $key => $file) {
$output .= html_print_image($file['path'].$file['filename'], true);
$output .= html_print_image($file['path'].$file['filename'], true, ['class' => 'main_menu_icon']);
}
}
}
@ -83,7 +83,7 @@ $output .= '<a href="'.$url.'" class="'.$link_class.'" target="_blank" id="url_t
$output .= '</div>';
$output .= '<div class="ui-dialog-buttonset">';
// TODO Delete this buttons and use html_print_button when merge new design
$output .= html_print_button(
__('Maybe later'),
'',

View File

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

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 = "230316";
my $pandora_build = "230317";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

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 = "230316";
my $pandora_build = "230317";
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 230316
%define release 230317
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.769
%define release 230316
%define release 230317
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.769 Build 230316";
my $version = "7.0NG.769 Build 230317";
# Pandora server configuration
my %conf;

View File

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