Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round
This commit is contained in:
commit
6e4fe7bc48
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.769-230313
|
||||
Version: 7.0NG.769-230314
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -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-230313"
|
||||
pandora_version="7.0NG.769-230314"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1023,7 +1023,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.769';
|
||||
use constant AGENT_BUILD => '230313';
|
||||
use constant AGENT_BUILD => '230314';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_BUILD="230313"
|
||||
PI_BUILD="230314"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230313}
|
||||
{230314}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.769 Build 230313")
|
||||
#define PANDORA_VERSION ("7.0NG.769 Build 230314")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -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 230313))"
|
||||
VALUE "ProductVersion", "(7.0NG.769(Build 230314))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.769-230313
|
||||
Version: 7.0NG.769-230314
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -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-230313"
|
||||
pandora_version="7.0NG.769-230314"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -155,4 +155,6 @@ INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`, `filename`, `path`) VALUES
|
|||
(20, 'zoom_en_graficas.png', 'images/tips/'),
|
||||
(22, 'politica_de_pass.png', 'images/tips/');
|
||||
|
||||
ALTER TABLE `tusuario` ADD COLUMN `show_tips_startup` TINYINT UNSIGNED NOT NULL DEFAULT 1;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -407,7 +407,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
|
||||
|
||||
// User.
|
||||
// $headerUserImage = (is_user_admin($config['id_user']) === true) ? 'images/header_user_admin_green.png' : 'images/header_user_green.png';
|
||||
$headerUser = [];
|
||||
$headerUser[] = html_print_image(
|
||||
'images/edit_user@header.svg',
|
||||
|
|
|
@ -1071,27 +1071,50 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
|
|||
echo '</form>';
|
||||
}
|
||||
|
||||
$modalCreateModule = '<form name="create_module_form" method="post">';
|
||||
$input_type = html_print_input_hidden('edit_module', 1, true);
|
||||
$input_type .= html_print_select(
|
||||
policies_type_modules_availables($sec2),
|
||||
'moduletype',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'max-width:300px;'
|
||||
// Form table for Module creation.
|
||||
$createModuleTable = new stdClass();
|
||||
$createModuleTable->id = 'module_creation_modal';
|
||||
$createModuleTable->class = 'filter-table-adv';
|
||||
$createModuleTable->data = [];
|
||||
|
||||
$createModuleTable->data[0][] = html_print_label_input_block(
|
||||
__('Select module type'),
|
||||
html_print_select(
|
||||
policies_type_modules_availables($sec2),
|
||||
'moduletype',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'max-width:300px;'
|
||||
)
|
||||
);
|
||||
|
||||
$modalCreateModule .= $input_type;
|
||||
$createModuleTable->data[1][] = html_print_label_input_block(
|
||||
'',
|
||||
html_print_anchor(
|
||||
[
|
||||
'href' => 'https://pandorafms.com/Library/Library/',
|
||||
'class' => 'color-black-grey invert_filter',
|
||||
'content' => __('Get more modules on Monitoring Library'),
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$createModuleFormTable = html_print_input_hidden('edit_module', 1, true);
|
||||
$createModuleFormTable .= html_print_table($createModuleTable, true);
|
||||
// Form definition.
|
||||
$modalCreateModule = '<form name="create_module_form" method="post">';
|
||||
$modalCreateModule .= $createModuleFormTable;
|
||||
$modalCreateModule .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => html_print_submit_button(
|
||||
__('Create'),
|
||||
'create_module',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* User creation / update.
|
||||
*
|
||||
|
@ -60,7 +59,7 @@ if ($enterprise_include === true) {
|
|||
$id = get_parameter('id', get_parameter('id_user', ''));
|
||||
// Check if we are the same user for edit or we have a proper profile for edit users.
|
||||
if ($id !== $config['id_user']) {
|
||||
if ((is_centralized() === true) || (bool) check_acl($config['id_user'], 0, 'UM') === false) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access User Management'
|
||||
|
@ -996,28 +995,19 @@ if (!users_is_admin() && $config['id_user'] !== $id && $new_user === false) {
|
|||
}
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'user_form_title',
|
||||
'content' => ((bool) $id === true) ? sprintf('%s [ %s ]', __('Update User'), $id) : __('Create User'),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if (!$new_user) {
|
||||
$user_id = '<div class="label_select_simple"><p class="edit_user_labels">'.__('User ID').': </p>';
|
||||
$user_id .= '<span>'.$id.'</span>';
|
||||
$user_id .= html_print_input_hidden('id_user', $id, true);
|
||||
$user_id .= '</div>';
|
||||
|
||||
$apiTokenContentElements[] = '<span style="height: 15px;font-size: 14px;">'.__('API Token').'</span>';
|
||||
$apiTokenContentElements[] = '<span style="line-height: 15px; height: 15px;font-size: 14px;">'.__('API Token').'</span>';
|
||||
$apiTokenContentElements[] = html_print_button(
|
||||
__('Renew'),
|
||||
'renew_api_token',
|
||||
false,
|
||||
sprintf(
|
||||
'javascript:renewAPIToken(\'%s\', \'%s\', \'%s\')',
|
||||
'javascript:renewAPIToken("%s", "%s", "%s")',
|
||||
__('Warning'),
|
||||
__('The API token will be renewed. After this action, the last token you were using will not work. Are you sure?'),
|
||||
'user_profile_form',
|
||||
|
@ -1033,7 +1023,7 @@ if (!$new_user) {
|
|||
'show_api_token',
|
||||
false,
|
||||
sprintf(
|
||||
'javascript:showAPIToken(\'%s\', \'%s\')',
|
||||
'javascript:showAPIToken("%s", "%s")',
|
||||
__('API Token'),
|
||||
base64_encode(__('Your API Token is:').' <br><span class="font_12pt bolder">'.users_get_API_token($id).'</span><br> '.__('Please, avoid share this string with others.')),
|
||||
),
|
||||
|
@ -1282,8 +1272,9 @@ if (is_metaconsole() === false) {
|
|||
if (is_metaconsole() === true) {
|
||||
$array_filters = get_filters_custom_fields_view(0, true);
|
||||
|
||||
$search_custom_fields_view = '<div class="label_select"><p class="edit_user_labels">'.__('Search custom field view').' '.ui_print_help_tip(__('Load by default the selected view in custom field view'), true).'</p>';
|
||||
$search_custom_fields_view .= html_print_select(
|
||||
$searchCustomFieldView = [];
|
||||
$searchCustomFieldView[] = __('Search custom field view');
|
||||
$searchCustomFieldView[] = html_print_select(
|
||||
$array_filters,
|
||||
'default_custom_view',
|
||||
$user_info['default_custom_view'],
|
||||
|
@ -1295,7 +1286,10 @@ if (is_metaconsole() === true) {
|
|||
true,
|
||||
'',
|
||||
false
|
||||
).'</div>';
|
||||
).ui_print_input_placeholder(
|
||||
__('Load by default the selected view in custom field view'),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$values = [
|
||||
|
@ -1377,6 +1371,8 @@ $home_screen .= html_print_input_text(
|
|||
false
|
||||
);
|
||||
|
||||
$home_screen = '';
|
||||
|
||||
$size_pagination = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Block size for pagination').'</p>';
|
||||
$size_pagination .= html_print_input_text(
|
||||
'block_size',
|
||||
|
@ -1395,19 +1391,20 @@ if ($id === $config['id_user']) {
|
|||
);
|
||||
}
|
||||
|
||||
if (enterprise_installed() && is_metaconsole() === true) {
|
||||
if (enterprise_installed() === true && is_metaconsole() === true) {
|
||||
$user_info_metaconsole_access = 'only_console';
|
||||
if (isset($user_info['metaconsole_access'])) {
|
||||
$user_info_metaconsole_access = $user_info['metaconsole_access'];
|
||||
}
|
||||
|
||||
// TODO review help tips on meta.
|
||||
$meta_access = '<div class="label_select"><p class="edit_user_labels">'.__('Metaconsole access').' './* ui_print_help_icon('meta_access', true). */ '</p>';
|
||||
$metaconsole_accesses = [
|
||||
'basic' => __('Basic'),
|
||||
'advanced' => __('Advanced'),
|
||||
];
|
||||
$meta_access .= html_print_select(
|
||||
|
||||
$outputMetaAccess = [];
|
||||
$outputMetaAccess[] = __('Metaconsole access');
|
||||
$outputMetaAccess[] = html_print_select(
|
||||
$metaconsole_accesses,
|
||||
'metaconsole_access',
|
||||
$user_info_metaconsole_access,
|
||||
|
@ -1417,51 +1414,9 @@ if (enterprise_installed() && is_metaconsole() === true) {
|
|||
true,
|
||||
false,
|
||||
false
|
||||
).'</div>';
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
$not_login = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Not Login').'</p>';
|
||||
$not_login .= ui_print_help_tip(
|
||||
__('The user with not login set only can access to API.'),
|
||||
true
|
||||
);
|
||||
$not_login .= html_print_checkbox_switch(
|
||||
'not_login',
|
||||
1,
|
||||
$user_info['not_login'],
|
||||
true
|
||||
).'</div>';
|
||||
|
||||
$local_user = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Local user').'</p>';
|
||||
$local_user .= ui_print_help_tip(
|
||||
__('The user with local authentication enabled will always use local authentication.'),
|
||||
true
|
||||
);
|
||||
$local_user .= html_print_checkbox_switch(
|
||||
'local_user',
|
||||
1,
|
||||
$user_info['local_user'],
|
||||
true
|
||||
).'</div>';
|
||||
|
||||
$session_time = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Session Time');
|
||||
$session_time .= ui_print_help_tip(
|
||||
__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'),
|
||||
true
|
||||
).'</p>';
|
||||
$session_time .= html_print_input_text(
|
||||
'session_time',
|
||||
$user_info['session_time'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true.false,
|
||||
false,
|
||||
'',
|
||||
'class="input_line_small"'
|
||||
).'</div>';
|
||||
*/
|
||||
$user_groups = implode(',', array_keys((users_get_groups($id, 'AR', $display_all_group))));
|
||||
|
||||
if (empty($user_groups) === false) {
|
||||
|
@ -1582,31 +1537,6 @@ if (empty($doubleAuthElementsContent) === false) {
|
|||
$doubleAuthentication = '';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (isset($double_authentication)) {
|
||||
$double_authentication .= '</div>';
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$autorefresh_list_out = [];
|
||||
if (is_metaconsole() === false || is_centralized() === true) {
|
||||
$autorefresh_list_out['operation/agentes/estado_agente'] = 'Agent detail';
|
||||
|
@ -1665,31 +1595,32 @@ if (isset($autorefresh_list) === false) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
enterprise_include_once('include/functions_metaconsole.php');
|
||||
|
||||
$access_node = db_get_value('metaconsole_access_node', 'tusuario', 'id_user', $id);
|
||||
|
||||
$metaconsole_agents_manager = '<div class="label_select_simple" id="metaconsole_agents_manager_div"><p class="edit_user_labels">'.__('Enable agents managment').'</p>';
|
||||
$metaconsole_agents_manager .= html_print_checkbox_switch(
|
||||
$metaconsoleAgentManager = [];
|
||||
$metaconsoleAgentManager[] = __('Enable agents managment');
|
||||
$metaconsoleAgentManager[] = html_print_checkbox_switch(
|
||||
'metaconsole_agents_manager',
|
||||
1,
|
||||
$user_info['metaconsole_agents_manager'],
|
||||
true
|
||||
).'</div>';
|
||||
);
|
||||
|
||||
$metaconsole_access_node = '<div class="label_select_simple" id="metaconsole_access_node_div"><p class="edit_user_labels">'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'</p>';
|
||||
$metaconsole_access_node .= html_print_checkbox(
|
||||
$metaconsoleAgentManager[] = __('Enable node access').ui_print_help_tip(
|
||||
__('With this option enabled, the user will can access to nodes console'),
|
||||
true
|
||||
);
|
||||
$metaconsoleAgentManager[] = html_print_checkbox_switch(
|
||||
'metaconsole_access_node',
|
||||
1,
|
||||
$access_node,
|
||||
true
|
||||
).'</div>';
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
echo '<div class="max_floating_element_size">';
|
||||
echo '<form id="user_profile_form" name="user_profile_form" method="post" autocomplete="off" action="#">';
|
||||
|
||||
|
@ -1701,141 +1632,8 @@ if (!$id) {
|
|||
$user_id_create = $user_id;
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$access_or_pagination = $meta_access;
|
||||
if ($id != '' && !$is_err) {
|
||||
$div_user_info = '<div class="edit_user_info_left">'.$avatar.$user_id_create.'</div>
|
||||
<div class="edit_user_info_right">'.$user_id_update_view.$full_name.$new_pass.$new_pass_confirm.$own_pass_confirm.$global_profile.'</div>';
|
||||
} else {
|
||||
$div_user_info = '<div class="edit_user_info_left">'.$avatar.'</div>
|
||||
<div class="edit_user_info_right">'.$user_id_create.$user_id_update_view.$full_name.$new_pass.$new_pass_confirm.$global_profile.'</div>';
|
||||
}
|
||||
|
||||
echo '<div id="user_form">
|
||||
<div class="user_edit_first_row">
|
||||
<div class="edit_user_info white_box">'.$div_user_info.'</div>
|
||||
<div class="edit_user_autorefresh white_box"><p class="bolder">Extra info</p>'.$email.$phone.$not_login.$local_user.$session_time.'</div>
|
||||
</div>
|
||||
<div class="user_edit_second_row white_box">
|
||||
<div class="edit_user_options">'.$language.$access_or_pagination.$skin.$default_event_filter.$double_authentication.'</div>
|
||||
|
||||
<div class="edit_user_timezone">'.$timezone;
|
||||
|
||||
echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_access_node;
|
||||
|
||||
$autorefresh_show = '<p class="edit_user_labels">'._('Autorefresh').ui_print_help_tip(
|
||||
__('This will activate autorefresh in selected pages'),
|
||||
true
|
||||
).'</p>';
|
||||
$select_out = html_print_select(
|
||||
$autorefresh_list_out,
|
||||
'autorefresh_list_out[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
);
|
||||
$arrows = ' ';
|
||||
$select_in = html_print_select(
|
||||
$autorefresh_list,
|
||||
'autorefresh_list[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
);
|
||||
|
||||
$table_ichanges = '<div class="autorefresh_select">
|
||||
<div class="autorefresh_select_list_out">
|
||||
<p class="autorefresh_select_text">'.__('Full list of pages').': </p>
|
||||
<div>'.$select_out.'</div>
|
||||
</div>
|
||||
<div class="autorefresh_select_arrows" style="display:grid">
|
||||
<a href="javascript:">'.html_print_image(
|
||||
'images/darrowright_green.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'right_autorefreshlist',
|
||||
'alt' => __('Push selected pages into autorefresh list'),
|
||||
'title' => __('Push selected pages into autorefresh list'),
|
||||
]
|
||||
).'</a>
|
||||
<a href="javascript:">'.html_print_image(
|
||||
'images/darrowleft_green.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'left_autorefreshlist',
|
||||
'alt' => __('Pop selected pages out of autorefresh list'),
|
||||
'title' => __('Pop selected pages out of autorefresh list'),
|
||||
]
|
||||
).'</a>
|
||||
</div>
|
||||
<div class="autorefresh_select_list">
|
||||
<p class="autorefresh_select_text">'.__('List of pages with autorefresh').': </p>
|
||||
<div>'.$select_in.'</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$autorefresh_show .= $table_ichanges;
|
||||
|
||||
// Time autorefresh.
|
||||
$times = get_refresh_time_array();
|
||||
$time_autorefresh = '<div class="label_select"><p class="edit_user_labels">'.__('Time autorefresh');
|
||||
$time_autorefresh .= ui_print_help_tip(
|
||||
__('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'),
|
||||
true
|
||||
).'</p>';
|
||||
$time_autorefresh .= html_print_select(
|
||||
$times,
|
||||
'time_autorefresh',
|
||||
$user_info['time_autorefresh'],
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false
|
||||
).'</div>';
|
||||
|
||||
|
||||
echo '</div>
|
||||
</div>
|
||||
<div class="edit_user_autorefresh white_box">'.$autorefresh_show.$time_autorefresh.'</div>
|
||||
<div class="user_edit_third_row white_box">
|
||||
<div class="edit_user_comments">'.$comments.'</div>
|
||||
</div>';
|
||||
|
||||
if (empty($ehorus) === false) {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'user_edit_third_row white_box',
|
||||
'content' => $ehorus,
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// 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));
|
||||
}
|
||||
} else {
|
||||
$access_or_pagination = $size_pagination;
|
||||
// WIP: Only for node.
|
||||
include_once 'user_management.php';
|
||||
}
|
||||
// User management form.
|
||||
require_once 'user_management.php';
|
||||
|
||||
if ((bool) $config['admin_can_add_user'] === true) {
|
||||
html_print_csrf_hidden();
|
||||
|
@ -1916,7 +1714,7 @@ if (is_metaconsole() === false) {
|
|||
$(document).ready(function() {
|
||||
// Set up the picker to update target timezone and country select lists.
|
||||
$('#timezone-image').timezonePicker({
|
||||
target: '#timezone',
|
||||
target: '#timezone1',
|
||||
});
|
||||
|
||||
// Optionally an auto-detect button to trigger JavaScript geolocation.
|
||||
|
@ -1938,23 +1736,13 @@ if (is_metaconsole() === false) {
|
|||
var json_profile = $('#hidden-json_profile');
|
||||
/* <![CDATA[ */
|
||||
$(document).ready(function() {
|
||||
|
||||
// Set up the picker to update target timezone and country select lists.
|
||||
$('#timezone-image').timezonePicker({
|
||||
target: '#timezone1',
|
||||
});
|
||||
|
||||
// Optionally an auto-detect button to trigger JavaScript geolocation.
|
||||
$('#timezone-detect').click(function() {
|
||||
$('#timezone-image').timezonePicker('detectLocation');
|
||||
});
|
||||
|
||||
$("#right_autorefreshlist").click(function() {
|
||||
jQuery.each($("select[name='autorefresh_list_out[]'] option:selected"), function(key, value) {
|
||||
imodule_name = $(value).html();
|
||||
if (imodule_name != <?php echo "'".__('None')."'"; ?>) {
|
||||
id_imodule = $(value).attr('value');
|
||||
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>'));
|
||||
$("select[name='autorefresh_list[]'] option").each(function() { $(this).attr("selected", true) });
|
||||
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>').attr("selected", true));
|
||||
$("#autorefresh_list_out").find("option[value='" + id_imodule + "']").remove();
|
||||
$("#autorefresh_list").find("option[value='']").remove();
|
||||
$("#autorefresh_list").find("option[value='0']").remove();
|
||||
|
|
|
@ -395,8 +395,6 @@ if ($delete_user === true) {
|
|||
__('There was a problem deleting the user from %s', io_safe_input($server['server_name']))
|
||||
);
|
||||
}
|
||||
|
||||
header('Refresh:1');
|
||||
}
|
||||
} else {
|
||||
ui_print_error_message(__('There was a problem deleting the user'));
|
||||
|
@ -463,43 +461,72 @@ if (($filter_group == 0) && ($filter_search == '')) {
|
|||
|
||||
$filterTable = new stdClass();
|
||||
$filterTable->width = '100%';
|
||||
$filterTable->class = 'fixed_filter_bar';
|
||||
$filterTable->class = 'filter-table-adv';
|
||||
$filterTable->rowclass[0] = '';
|
||||
$filterTable->cellstyle[0][0] = 'width:0';
|
||||
$filterTable->cellstyle[0][1] = 'width:0';
|
||||
$filterTable->data[0][0] = __('Group');
|
||||
$filterTable->data[1][0] = html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
true,
|
||||
'filter_group',
|
||||
$filter_group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
$filterTable->data[0][] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
true,
|
||||
'filter_group',
|
||||
$filter_group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
$filterTable->data[0][1] = __('Search').ui_print_help_tip(__('Search by username, fullname or email'), true);
|
||||
$filterTable->data[1][1] = html_print_input_text(
|
||||
'filter_search',
|
||||
$filter_search,
|
||||
__('Search by username, fullname or email'),
|
||||
30,
|
||||
90,
|
||||
true
|
||||
);
|
||||
$filterTable->cellstyle[1][2] = 'vertical-align: bottom';
|
||||
$filterTable->data[1][2] = html_print_submit_button(
|
||||
|
||||
$filterTable->data[0][] = html_print_label_input_block(
|
||||
__('Search'),
|
||||
'search',
|
||||
false,
|
||||
html_print_input_text(
|
||||
'filter_search',
|
||||
$filter_search,
|
||||
__('Search by username, fullname or email'),
|
||||
30,
|
||||
90,
|
||||
true
|
||||
).ui_print_input_placeholder(
|
||||
__('Search by username, fullname or email'),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$form_filter = "<form method='post'>";
|
||||
$form_filter .= html_print_table($filterTable, true);
|
||||
$form_filter .= html_print_div(
|
||||
[
|
||||
'icon' => 'search',
|
||||
'class' => 'float-right',
|
||||
'mode' => 'secondary mini',
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => html_print_submit_button(
|
||||
__('Search'),
|
||||
'search',
|
||||
false,
|
||||
[
|
||||
'icon' => 'search',
|
||||
'class' => 'float-right',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form_filter .= '</form>';
|
||||
|
||||
ui_toggle(
|
||||
$form_filter,
|
||||
'<span class="subsection_header_title">'.__('Filter').'</span>',
|
||||
__('Filter'),
|
||||
'filter',
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content no_border',
|
||||
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
$is_management_allowed = true;
|
||||
if (is_metaconsole() === false && is_management_allowed() === false) {
|
||||
|
@ -520,20 +547,6 @@ if (is_metaconsole() === false && is_management_allowed() === false) {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$filterTable->width = '96%';
|
||||
$form_filter = "<form class='filters_form' method='post'>";
|
||||
$form_filter .= html_print_table($filterTable, true);
|
||||
$form_filter .= '</form>';
|
||||
ui_toggle($form_filter, __('Show Options'));
|
||||
} else {
|
||||
$form_filter = "<form method='post'>";
|
||||
$form_filter .= html_print_table($filterTable, true);
|
||||
$form_filter .= '</form>';
|
||||
echo $form_filter;
|
||||
}
|
||||
|
||||
// Urls to sort the table.
|
||||
$url_up_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure;
|
||||
$url_down_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure;
|
||||
|
|
|
@ -325,53 +325,55 @@ if ($new_user === false) {
|
|||
|
||||
$userManagementTable->data['passwordManage_table'] = html_print_table($passwordManageTable, true);
|
||||
|
||||
if (users_is_admin() === true) {
|
||||
$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width w50p';
|
||||
$userManagementTable->cellclass['captions_loginErrorUser'][0] = 'wrap';
|
||||
$userManagementTable->cellclass['captions_loginErrorUser'][1] = 'wrap';
|
||||
$notLoginCheckContent = [];
|
||||
$notLoginCheckContent[] = '<span>'.__('Not Login').'</span>';
|
||||
$notLoginCheckContent[] = html_print_checkbox_switch(
|
||||
'not_login',
|
||||
1,
|
||||
$user_info['not_login'],
|
||||
true
|
||||
);
|
||||
|
||||
$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width w50p';
|
||||
$userManagementTable->cellclass['captions_loginErrorUser'][0] = 'wrap';
|
||||
$userManagementTable->cellclass['captions_loginErrorUser'][1] = 'wrap';
|
||||
$notLoginCheckContent = [];
|
||||
$notLoginCheckContent[] = '<span>'.__('Not Login').'</span>';
|
||||
$notLoginCheckContent[] = html_print_checkbox_switch(
|
||||
'not_login',
|
||||
1,
|
||||
$user_info['not_login'],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $notLoginCheckContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_input_placeholder(
|
||||
__('The user with not login set only can access to API.'),
|
||||
true
|
||||
);
|
||||
|
||||
$userManagementTable->data['captions_loginErrorUser'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $notLoginCheckContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_input_placeholder(
|
||||
__('The user with not login set only can access to API.'),
|
||||
true
|
||||
);
|
||||
$localUserCheckContent = [];
|
||||
$localUserCheckContent[] = '<span>'.__('Local User').'</span>';
|
||||
$localUserCheckContent[] = html_print_checkbox_switch(
|
||||
'local_user',
|
||||
1,
|
||||
$user_info['local_user'],
|
||||
true
|
||||
);
|
||||
|
||||
$localUserCheckContent = [];
|
||||
$localUserCheckContent[] = '<span>'.__('Local User').'</span>';
|
||||
$localUserCheckContent[] = html_print_checkbox_switch(
|
||||
'local_user',
|
||||
1,
|
||||
$user_info['local_user'],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $localUserCheckContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_placeholder(
|
||||
__('The user with local authentication enabled will always use local authentication.'),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$userManagementTable->data['captions_loginErrorUser'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $localUserCheckContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_placeholder(
|
||||
__('The user with local authentication enabled will always use local authentication.'),
|
||||
true
|
||||
);
|
||||
$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch('show_tips_startup', 1, ($user_info['show_tips_startup'] === null) ? true : $user_info['show_tips_startup'], true);
|
||||
$userManagementTable->data['show_tips_startup'][1] = '<span>'.__('Show usage tips at startup').'</span>';
|
||||
|
||||
|
@ -551,10 +553,10 @@ $userManagementTable->data['fields_autorefreshTime'][0] .= ui_print_input_placeh
|
|||
// Title for Language and Appearance.
|
||||
$userManagementTable->data['title_lookAndFeel'] = html_print_subtitle_table(__('Language and Appearance'));
|
||||
// Language and color scheme.
|
||||
$userManagementTable->rowclass['captions_lang_colorscheme'] = 'field_half_width';
|
||||
$userManagementTable->rowclass['fields_lang_colorscheme'] = 'field_half_width';
|
||||
$userManagementTable->data['captions_lang_colorscheme'][0] = __('Language');
|
||||
$userManagementTable->data['fields_lang_colorscheme'][0] = html_print_select_from_sql(
|
||||
$userManagementTable->rowclass['line1_looknfeel'] = 'field_half_width';
|
||||
$userManagementTable->rowclass['line2_looknfeel'] = 'field_half_width';
|
||||
$userManagementTable->data['line1_looknfeel'][0] = __('Language');
|
||||
$userManagementTable->data['line2_looknfeel'][0] = html_print_select_from_sql(
|
||||
'SELECT id_language, name FROM tlanguage',
|
||||
'language',
|
||||
$user_info['language'],
|
||||
|
@ -564,8 +566,15 @@ $userManagementTable->data['fields_lang_colorscheme'][0] = html_print_select_fro
|
|||
true
|
||||
);
|
||||
|
||||
$userManagementTable->data['captions_lang_colorscheme'][1] = __('User color scheme');
|
||||
$userManagementTable->data['fields_lang_colorscheme'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
if (is_metaconsole() === true) {
|
||||
if (users_is_admin() === true) {
|
||||
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
|
||||
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
|
||||
}
|
||||
} else {
|
||||
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
|
||||
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
|
||||
}
|
||||
|
||||
$userManagementTable->rowclass['captions_blocksize_eventfilter'] = 'field_half_width';
|
||||
$userManagementTable->rowclass['fields_blocksize_eventfilter'] = 'field_half_width';
|
||||
|
@ -591,41 +600,55 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec
|
|||
false,
|
||||
false
|
||||
);
|
||||
if (is_metaconsole() === false) {
|
||||
// Home screen table.
|
||||
$homeScreenTable = new stdClass();
|
||||
$homeScreenTable->class = 'w100p table_section full_section';
|
||||
$homeScreenTable->id = 'home_screen_table';
|
||||
$homeScreenTable->style = [];
|
||||
$homeScreenTable->rowclass = [];
|
||||
$homeScreenTable->data = [];
|
||||
// Home screen.
|
||||
$homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
|
||||
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
|
||||
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
|
||||
$homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex';
|
||||
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
|
||||
$homeScreenValues,
|
||||
'section',
|
||||
io_safe_output($user_info['section']),
|
||||
'show_data_section();',
|
||||
'',
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'content' => $customHomeScreenDataField,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Home screen table.
|
||||
$homeScreenTable = new stdClass();
|
||||
$homeScreenTable->class = 'w100p table_section full_section';
|
||||
$homeScreenTable->id = 'home_screen_table';
|
||||
$homeScreenTable->style = [];
|
||||
$homeScreenTable->rowclass = [];
|
||||
$homeScreenTable->data = [];
|
||||
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
|
||||
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
|
||||
}
|
||||
|
||||
// Home screen.
|
||||
$homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
|
||||
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
|
||||
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
|
||||
$homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex';
|
||||
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
|
||||
$homeScreenValues,
|
||||
'section',
|
||||
io_safe_output($user_info['section']),
|
||||
'show_data_section();',
|
||||
'',
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'content' => $customHomeScreenDataField,
|
||||
],
|
||||
true
|
||||
);
|
||||
if (is_metaconsole() === true && users_is_admin() === true) {
|
||||
$userManagementTable->rowclass['search_custom1_looknfeel'] = 'field_half_width';
|
||||
$userManagementTable->rowclass['search_custom2_looknfeel'] = 'field_half_width flex-column';
|
||||
$userManagementTable->data['search_custom1_looknfeel'][0] = $searchCustomFieldView[0];
|
||||
$userManagementTable->data['search_custom2_looknfeel'][0] = $searchCustomFieldView[1];
|
||||
|
||||
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
|
||||
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
|
||||
$userManagementTable->rowclass['agent_manager1_looknfeel'] = 'field_half_width';
|
||||
$userManagementTable->rowclass['agent_manager2_looknfeel'] = 'field_half_width flex-column';
|
||||
$userManagementTable->data['agent_manager1_looknfeel'][0] = $metaconsoleAgentManager[0];
|
||||
$userManagementTable->data['agent_manager1_looknfeel'][1] = $metaconsoleAgentManager[2];
|
||||
$userManagementTable->data['agent_manager2_looknfeel'][0] = $metaconsoleAgentManager[1];
|
||||
$userManagementTable->data['agent_manager2_looknfeel'][1] = $metaconsoleAgentManager[3];
|
||||
}
|
||||
|
||||
// Timezone.
|
||||
$userManagementTable->rowclass['captions_timezone'] = 'field_half_width';
|
||||
|
@ -639,14 +662,15 @@ $userManagementTable->data['fields_timezone'][0] .= ui_print_input_placeholder(
|
|||
__('The timezone must be that of the associated server.'),
|
||||
true
|
||||
);
|
||||
|
||||
$userManagementTable->data['fields_timezone'][1] = html_print_div(
|
||||
[
|
||||
'id' => 'timezone-picker',
|
||||
'content' => implode('', $timezoneContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
if (is_metaconsole() === false) {
|
||||
$userManagementTable->data['fields_timezone'][1] = html_print_div(
|
||||
[
|
||||
'id' => 'timezone-picker',
|
||||
'content' => implode('', $timezoneContent),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Title for Language and Appearance.
|
||||
$userManagementTable->data['title_additionalSettings'] = html_print_subtitle_table(__('Additional settings'));
|
||||
|
@ -743,3 +767,19 @@ html_print_table($userManagementTable);
|
|||
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>
|
||||
-->
|
|
@ -731,7 +731,7 @@ class DiscoveryTaskList extends HTML
|
|||
case DISCOVERY_CLOUD_AZURE_COMPUTE:
|
||||
// Discovery Applications MySQL.
|
||||
$data[6] = html_print_image(
|
||||
'images/plugin@svg.svg',
|
||||
'images/plugins@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Discovery Cloud Azure Compute'),
|
||||
|
@ -744,7 +744,7 @@ class DiscoveryTaskList extends HTML
|
|||
case DISCOVERY_CLOUD_AWS_EC2:
|
||||
// Discovery Applications MySQL.
|
||||
$data[6] = html_print_image(
|
||||
'images/plugin@svg.svg',
|
||||
'images/plugins@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Discovery Cloud AWS EC2'),
|
||||
|
@ -856,7 +856,7 @@ class DiscoveryTaskList extends HTML
|
|||
} else {
|
||||
// APP or external script recon task.
|
||||
$data[6] = html_print_image(
|
||||
'images/plugin@svg.svg',
|
||||
'images/plugins@svg.svg',
|
||||
true,
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
).' ';
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
*/
|
||||
|
||||
// Begin.
|
||||
require_once 'config.php';
|
||||
|
||||
require_once __DIR__.'/config.php';
|
||||
require_once __DIR__.'/functions.php';
|
||||
require_once __DIR__.'/functions_db.php';
|
||||
|
@ -87,7 +85,7 @@ if (check_login(false) === false) {
|
|||
</head>
|
||||
<body>
|
||||
<h1>Access is not granted</h1>
|
||||
<div id="container-chart-generator-item" style="display:none; margin:0px;">
|
||||
<div id="container-chart-generator-item" style="display:none; margin:0px;width:100px;height:100px;">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -246,6 +244,9 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
|
|||
break;
|
||||
|
||||
case 'slicebar':
|
||||
// TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET.
|
||||
$params['graph_data'] = json_decode(io_safe_output($config[$params['tokem_config']]), true);
|
||||
delete_config_token($params['tokem_config']);
|
||||
echo flot_slicesbar_graph(
|
||||
$params['graph_data'],
|
||||
$params['period'],
|
||||
|
|
|
@ -1329,7 +1329,7 @@ class AgentWizard extends HTML
|
|||
$table->rowstyle[$i] = 'color:#ccc;';
|
||||
$data[0] .= ' ';
|
||||
$data[0] .= html_print_image(
|
||||
'images/error.png',
|
||||
'images/alert-warning@svg.svg',
|
||||
true,
|
||||
['title' => $msgError]
|
||||
);
|
||||
|
@ -1347,7 +1347,7 @@ class AgentWizard extends HTML
|
|||
// Img Server.
|
||||
if ($this->serverType == SERVER_TYPE_ENTERPRISE_SATELLITE) {
|
||||
$img_server = html_print_image(
|
||||
'images/satellite.png',
|
||||
'images/satellite@os.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Enterprise Satellite server'),
|
||||
|
@ -1357,7 +1357,7 @@ class AgentWizard extends HTML
|
|||
} else {
|
||||
if ($module['execution_type'] == EXECUTION_TYPE_PLUGIN) {
|
||||
$img_server = html_print_image(
|
||||
'images/plugin.png',
|
||||
'images/plugins@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Plugin server'),
|
||||
|
@ -1367,7 +1367,7 @@ class AgentWizard extends HTML
|
|||
} else {
|
||||
if ($this->protocol === 'wmi') {
|
||||
$img_server = html_print_image(
|
||||
'images/wmi.png',
|
||||
'images/WMI@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('WMI server'),
|
||||
|
@ -1376,7 +1376,7 @@ class AgentWizard extends HTML
|
|||
);
|
||||
} else {
|
||||
$img_server = html_print_image(
|
||||
'images/op_network.png',
|
||||
'images/network@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Network server'),
|
||||
|
@ -4090,7 +4090,7 @@ class AgentWizard extends HTML
|
|||
$blockTitle .= '<b>'.$block['name'];
|
||||
$blockTitle .= ' ';
|
||||
$blockTitle .= html_print_image(
|
||||
'images/tip_help.png',
|
||||
'images/info@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Modules selected'),
|
||||
|
@ -4110,7 +4110,7 @@ class AgentWizard extends HTML
|
|||
|
||||
$blockTitle .= ' ';
|
||||
$blockTitle .= html_print_image(
|
||||
'images/tip_help.png',
|
||||
'images/info@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Modules selected'),
|
||||
|
@ -4205,6 +4205,9 @@ class AgentWizard extends HTML
|
|||
$table->size[4] = '140px';
|
||||
$table->size[5] = '3%';
|
||||
|
||||
$table->align = [];
|
||||
$table->align[1] = 'center';
|
||||
|
||||
// If is needed show current value, we must correct the table.
|
||||
if ($showCurrentValue === true) {
|
||||
// Correct headers.
|
||||
|
@ -4273,7 +4276,7 @@ class AgentWizard extends HTML
|
|||
false,
|
||||
false,
|
||||
'',
|
||||
$md5IdBlock,
|
||||
$md5IdBlock.' w100p',
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
|
@ -4293,8 +4296,9 @@ class AgentWizard extends HTML
|
|||
1,
|
||||
20,
|
||||
$module['description'],
|
||||
'form=\'form-create-modules\' class=\'min-height-50px\'',
|
||||
true
|
||||
'form=\'form-create-modules\'',
|
||||
true,
|
||||
'w100p'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4703,8 +4707,6 @@ class AgentWizard extends HTML
|
|||
'toggle_class' => '',
|
||||
'container_class' => 'white-box-content',
|
||||
'main_class' => $class,
|
||||
'img_a' => 'images/arrow_down_green.png',
|
||||
'img_b' => 'images/arrow_right_green.png',
|
||||
'clean' => false,
|
||||
'reverseImg' => $reverseImg,
|
||||
'switch' => $buttonSwitch,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230313';
|
||||
$build_version = 'PC230314';
|
||||
$pandora_version = 'v7.0NG.769';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -3548,6 +3548,18 @@ function update_config_token($cfgtoken, $cfgvalue)
|
|||
}
|
||||
|
||||
|
||||
function delete_config_token($cfgtoken)
|
||||
{
|
||||
$delete = db_process_sql(sprintf('DELETE FROM tconfig WHERE token = "%s"', $cfgtoken));
|
||||
|
||||
if ($delete) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function get_number_of_mr($package, $ent, $offline)
|
||||
{
|
||||
global $config;
|
||||
|
@ -4275,6 +4287,7 @@ function generator_chart_to_pdf(
|
|||
];
|
||||
}
|
||||
|
||||
unset($data['data']['graph_data']);
|
||||
// If not install chromium avoid 500 convert tu images no data to show.
|
||||
$chromium_dir = io_safe_output($config['chromium_path']);
|
||||
$result_ejecution = exec($chromium_dir.' --version');
|
||||
|
|
|
@ -2668,7 +2668,7 @@ function events_print_type_img(
|
|||
|
||||
switch ($type) {
|
||||
case 'alert_recovered':
|
||||
$icon = 'images/alert@svg.svg';
|
||||
$style .= ' alert_module_background_state icon_background_normal ';
|
||||
break;
|
||||
|
||||
case 'alert_manual_validation':
|
||||
|
|
|
@ -191,15 +191,9 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
|
|||
$table->id = 'table_profiles';
|
||||
$table->width = '100%';
|
||||
$table->class = 'info_table';
|
||||
if (is_metaconsole() === true) {
|
||||
$table->head_colspan[0] = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox_tactical data';
|
||||
$table->title = $title;
|
||||
} else {
|
||||
echo '<div id="edit_user_profiles" class="floating_form white_box">';
|
||||
echo '<p class="subsection_header_title padding-lft-10">'.$title.'</p>';
|
||||
}
|
||||
|
||||
echo '<div id="edit_user_profiles" class="floating_form white_box">';
|
||||
echo '<p class="subsection_header_title padding-lft-10">'.$title.'</p>';
|
||||
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
@ -405,9 +399,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
|
|||
array_push($table->data, $data);
|
||||
html_print_table($table, $return);
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
unset($table);
|
||||
}
|
||||
|
|
|
@ -1053,17 +1053,17 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->head = [];
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->head[0] = __('Status');
|
||||
$table1->head[1] = __('Count');
|
||||
$table1->head[2] = __('Name');
|
||||
$table1->head[3] = __('Type');
|
||||
$table1->head[1] = __('Type');
|
||||
$table1->head[2] = __('Count');
|
||||
$table1->head[3] = __('Name');
|
||||
$table1->head[4] = __('Agent');
|
||||
$table1->head[5] = __('Severity');
|
||||
$table1->head[6] = __('Val. by');
|
||||
$table1->head[7] = __('Timestamp');
|
||||
} else {
|
||||
$table1->head[0] = __('Status');
|
||||
$table1->head[1] = __('Name');
|
||||
$table1->head[2] = __('Type');
|
||||
$table1->head[1] = __('Type');
|
||||
$table1->head[2] = __('Name');
|
||||
$table1->head[3] = __('Agent');
|
||||
$table1->head[4] = __('Severity');
|
||||
$table1->head[5] = __('Val. by');
|
||||
|
@ -1077,15 +1077,15 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
foreach ($item['data'] as $k => $event) {
|
||||
// First pass along the class of this row.
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->cellclass[$k][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][7] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][8] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$k][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
|
||||
|
@ -1125,6 +1125,8 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
]
|
||||
);
|
||||
|
||||
$data[] = events_print_type_img($event['event_type'], true);
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
$data[] = $event['event_rep'];
|
||||
}
|
||||
|
@ -1136,8 +1138,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
true
|
||||
);
|
||||
|
||||
$data[] = events_print_type_img($event['event_type'], true);
|
||||
|
||||
if (empty($event['alias']) === false) {
|
||||
$alias = $event['alias'];
|
||||
if (is_metaconsole() === true) {
|
||||
|
@ -1313,20 +1313,20 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$table1->class = 'info_table';
|
||||
$table1->data = [];
|
||||
$table1->head = [];
|
||||
$table1->align = [];
|
||||
$table1->align[2] = 'center';
|
||||
$table1->align = 'left';
|
||||
|
||||
if ($show_summary_group) {
|
||||
$table1->head[0] = __('Status');
|
||||
$table1->head[1] = __('Event name');
|
||||
$table1->head[2] = __('Type');
|
||||
$table1->head[1] = __('Type');
|
||||
$table1->head[2] = __('Event name');
|
||||
$table1->head[3] = __('Severity');
|
||||
$table1->head[4] = __('Count');
|
||||
$table1->head[5] = __('Timestamp');
|
||||
$table1->style[0] = 'text-align: center;';
|
||||
} else {
|
||||
$table1->head[0] = __('Status');
|
||||
$table1->head[1] = __('Event name');
|
||||
$table1->head[2] = __('Type');
|
||||
$table1->head[1] = __('Type');
|
||||
$table1->head[2] = __('Event name');
|
||||
$table1->head[3] = __('Severity');
|
||||
$table1->head[4] = __('Timestamp');
|
||||
$table1->style[0] = 'text-align: center;';
|
||||
|
@ -1344,14 +1344,13 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
foreach ($item_data as $i => $event) {
|
||||
$data = [];
|
||||
if ($show_summary_group) {
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
|
@ -1386,8 +1385,9 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
'id' => 'status_img_'.$event['id_evento'],
|
||||
]
|
||||
);
|
||||
$data[1] = io_safe_output($event['evento']);
|
||||
$data[2] = events_print_type_img($event['event_type'], true);
|
||||
|
||||
$data[1] = events_print_type_img($event['event_type'], true);
|
||||
$data[2] = io_safe_output($event['evento']);
|
||||
$data[3] = get_priority_name($event['criticity']);
|
||||
if ($show_summary_group) {
|
||||
$data[4] = $event['event_rep'];
|
||||
|
@ -2657,12 +2657,12 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
|
||||
$table1->head = [];
|
||||
$table1->head[0] = __('Status');
|
||||
$table1->head[3] = __('Type');
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->head[1] = __('Count');
|
||||
}
|
||||
|
||||
$table1->head[2] = __('Name');
|
||||
$table1->head[3] = __('Type');
|
||||
$table1->head[4] = __('Severity');
|
||||
$table1->head[5] = __('Val. by');
|
||||
$table1->head[6] = __('Timestamp');
|
||||
|
@ -2672,14 +2672,14 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
|
||||
foreach ($item['data'] as $i => $event) {
|
||||
if ($item['show_summary_group']) {
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][7] = get_priority_class($event['criticity']);
|
||||
} else {
|
||||
$table1->cellclass[$i][1] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
|
||||
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
|
||||
|
@ -2716,6 +2716,8 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
]
|
||||
);
|
||||
|
||||
$data[] = events_print_type_img($event['type'], true);
|
||||
|
||||
if ($item['show_summary_group']) {
|
||||
$data[] = $event['count'];
|
||||
}
|
||||
|
@ -2727,8 +2729,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
true
|
||||
);
|
||||
|
||||
$data[] = events_print_type_img($event['type'], true);
|
||||
|
||||
$data[] = get_priority_name($event['criticity']);
|
||||
if (empty($event['validated_by']) && $event['status'] == EVENT_VALIDATE) {
|
||||
$data[] = '<i>'.__('System').'</i>';
|
||||
|
@ -3919,6 +3919,8 @@ function reporting_html_value(
|
|||
if ($item['visual_format'] != 2) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '100%';
|
||||
$table1->headstyle[0] = 'text-align:left';
|
||||
$table1->headstyle[1] = 'text-align:left';
|
||||
switch ($item['type']) {
|
||||
case 'max_value':
|
||||
$table1->head = [
|
||||
|
|
|
@ -730,8 +730,9 @@ function flot_slicesbar_graph(
|
|||
global $config;
|
||||
|
||||
if ($ttl == 2) {
|
||||
$tokem_config = uniqid('slicebar');
|
||||
$params = [
|
||||
'graph_data' => $graph_data,
|
||||
'tokem_config' => $tokem_config,
|
||||
'period' => $period,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
|
@ -752,7 +753,10 @@ function flot_slicesbar_graph(
|
|||
'return_img_base_64' => true,
|
||||
'date_to' => $date_to,
|
||||
'server_id' => $server_id,
|
||||
'backgroundColor' => '#f6f7fb',
|
||||
];
|
||||
// TO-DO Cambiar esto para que se pase por POST, NO SE PUEDE PASAR POR GET.
|
||||
update_config_token($tokem_config, json_encode($graph_data));
|
||||
|
||||
$graph = '<img src="data:image/png;base64,';
|
||||
$graph .= generator_chart_to_pdf('slicebar', $params);
|
||||
|
|
|
@ -482,6 +482,11 @@ div.multi-response-buttons {
|
|||
-webkit-mask: url(../../images/modules@svg.svg) no-repeat center / contain;
|
||||
}
|
||||
|
||||
.alert_module_background_state {
|
||||
mask: url(../../images/alert@svg.svg) no-repeat center / contain;
|
||||
-webkit-mask: url(../../images/alert@svg.svg) no-repeat center / contain;
|
||||
}
|
||||
|
||||
.icon_background_critical {
|
||||
background-color: #e63c52;
|
||||
}
|
||||
|
|
|
@ -9306,7 +9306,7 @@ div.stat-win-spinner img {
|
|||
color: #fff !important;
|
||||
font-size: 1.2em;
|
||||
margin-right: 5px !important;
|
||||
margin-top: -4px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.select2-results
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.769';
|
||||
$build = '230313';
|
||||
$build = '230314';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.769-230313
|
||||
Version: 7.0NG.769-230314
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -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-230313"
|
||||
pandora_version="7.0NG.769-230314"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -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 = "230313";
|
||||
my $pandora_build = "230314";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -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 = "230313";
|
||||
my $pandora_build = "230314";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.769
|
||||
%define release 230313
|
||||
%define release 230314
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_BUILD="230313"
|
||||
PI_BUILD="230314"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.769 Build 230313";
|
||||
my $version = "7.0NG.769 Build 230314";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.769 Build 230313";
|
||||
my $version = "7.0NG.769 Build 230314";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue