Fixes and improvements

This commit is contained in:
Jose Gonzalez 2023-02-07 15:33:29 +01:00
parent 0eaa52a042
commit e99ad97e17
11 changed files with 63 additions and 104 deletions

View File

@ -719,17 +719,7 @@ $table_advanced->cellclass = [];
$table_advanced->colspan = [];
$table_advanced->rowspan = [];
$table_advanced->rowclass['title_1'] = 'w100p';
$table_advanced->cellstyle['title_1'][0] = 'width: 40px;';
$table_advanced->cellstyle['title_1'][1] = 'width: 100%;';
$table_advanced->data['title_1'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$table_advanced->data['title_1'][1] = html_print_subtitle_table(__('Identification and Categorization'), [], true);
$table_advanced->data['title_1'] = html_print_full_subtitle_table(__('Identification and Categorization'));
$table_advanced->rowclass['captions_custom_category'] = 'field_half_width pdd_t_10px';
$table_advanced->rowclass['custom_id_category'] = 'field_half_width';
$table_advanced->data['captions_custom_category'][0] = __('Custom ID');
@ -1054,17 +1044,7 @@ $table_advanced->data['textarea_crit_warn_instructions'][1] = html_print_textare
$largeClassDisabledBecauseInPolicy
);
$table_advanced->rowclass['title_2'] = 'w100p mrgn_top_20px';
$table_advanced->cellstyle['title_2'][0] = 'width: 40px;';
$table_advanced->cellstyle['title_2'][1] = 'width: 100%;';
$table_advanced->data['title_2'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$table_advanced->data['title_2'][1] = html_print_subtitle_table(__('Execution interval'), [], true);
$table_advanced->data['title_2'] = html_print_full_subtitle_table(__('Execution interval'));
$table_advanced->data['caption_execution_interval'][0] = __('Interval');
$table_advanced->data['execution_interval'][0] = '<span class="result_info_text">'.$outputExecutionInterval.'</span>';
@ -1100,17 +1080,7 @@ if (isset($id_agente) === true && (int) $moduletype === MODULE_DATA) {
$table_advanced->rowclass['cron_section'] = 'table_section full_section';
$table_advanced->data['cron_section'] = html_print_table($tableCron, true);
$table_advanced->rowclass['title_3'] = 'w100p mrgn_top_20px';
$table_advanced->cellstyle['title_3'][0] = 'width: 40px;';
$table_advanced->cellstyle['title_3'][1] = 'width: 100%;';
$table_advanced->data['title_3'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$table_advanced->data['title_3'][1] = html_print_subtitle_table(__('Thresholds and state changes'), [], true);
$table_advanced->data['title_3'] = html_print_full_subtitle_table(__('Thresholds and state changes'));
$table_advanced->rowclass['caption_min_max_values'] = 'w50p pdd_t_10px';
$table_advanced->rowclass['min_max_values'] = 'w50p';
@ -1332,17 +1302,7 @@ $table_advanced->data['ff_keep_counters'][0] = html_print_checkbox_switch(
$disabledBecauseInPolicy
);
$table_advanced->rowclass['title_4'] = 'w100p mrgn_top_20px';
$table_advanced->cellstyle['title_4'][0] = 'width: 40px;';
$table_advanced->cellstyle['title_4'][1] = 'width: 100%;';
$table_advanced->data['title_4'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$table_advanced->data['title_4'][1] = html_print_subtitle_table(__('Data and their processing'), [], true);
$table_advanced->data['title_4'] = html_print_full_subtitle_table(__('Data and their processing'));
$table_advanced->rowclass['caption_process_unit'] = 'w50p';
$table_advanced->rowclass['process_unit'] = 'w50p';
@ -1372,22 +1332,7 @@ $table_advanced->data['process_unit'][1] = html_print_extended_select_for_post_p
$disabledBecauseInPolicy
);
$table_advanced->rowclass['title_5'] = 'w100p mrgn_top_20px';
$table_advanced->cellstyle['title_5'][0] = 'width: 40px;';
$table_advanced->cellstyle['title_5'][1] = 'width: 100%;';
$table_advanced->data['title_5'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$table_advanced->data['title_5'][1] = html_print_subtitle_table(
__('Notifications and alerts'),
[],
true
);
$table_advanced->data['title_5'] = html_print_full_subtitle_table(__('Notifications and alerts'));
$table_advanced->data['caption_export_target'][0] = __('Export target');
if ($__code_from === 'policies') {

View File

@ -61,11 +61,11 @@ if (is_metaconsole() === false) {
'profile' => [
'active' => false,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image(
'images/profiles.png',
'images/suitcase@svg.svg',
true,
[
'title' => __('Profile management'),
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
],

View File

@ -249,11 +249,11 @@ if (is_metaconsole() === true) {
'profile' => [
'active' => false,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image(
'images/profiles.png',
'images/suitcase@svg.svg',
true,
[
'title' => __('Profile management'),
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
],

View File

@ -68,7 +68,7 @@ if (is_metaconsole() === false) {
'profile' => [
'active' => false,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image(
'images/profiles.png',
'images/suitcase@svg.svg',
true,
[
'title' => __('Profile management'),

View File

@ -251,18 +251,18 @@ if (is_metaconsole() === true) {
true,
[
'title' => __('User management'),
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
],
'profile' => [
'active' => false,
'text' => '<a href="index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure='.$pure.'">'.html_print_image(
'images/profiles.png',
'images/suitcase@svg.svg',
true,
[
'title' => __('Profile management'),
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
],
@ -276,7 +276,7 @@ if (is_metaconsole() === true) {
true,
[
'title' => __('User management'),
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
],

View File

@ -138,14 +138,7 @@ $userManagementTable->colspan = [];
$userManagementTable->rowspan = [];
// Title for Profile information.
$userManagementTable->data['title_profile_information'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$userManagementTable->data['title_profile_information'][1] = html_print_subtitle_table(__('Profile information'), [], true);
$userManagementTable->data['title_profile_information'] = html_print_full_subtitle_table(__('Profile information'));
// Id user.
if ($new_user === true) {
@ -395,14 +388,7 @@ $userManagementTable->data['fields_userSessionTime'][0] .= ui_print_input_placeh
);
// Title for Autorefresh.
$userManagementTable->data['title_autorefresh'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$userManagementTable->data['title_autorefresh'][1] = html_print_subtitle_table(__('Autorefresh'), [], true);
$userManagementTable->data['title_autorefresh'] = html_print_full_subtitle_table(__('Autorefresh'));
// Autorefresh selects.
$select_out = html_print_select(
@ -557,15 +543,8 @@ $userManagementTable->data['fields_autorefreshTime'][0] .= ui_print_input_placeh
);
// Title for Language and Appearance.
$userManagementTable->data['title_lookAndFeel'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$userManagementTable->data['title_lookAndFeel'][1] = html_print_subtitle_table(__('Language and Appearance'), [], true);
$userManagementTable->data['title_lookAndFeel'] = html_print_full_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');
@ -664,14 +643,7 @@ $userManagementTable->data['fields_timezone'][1] = html_print_div(
);
// Title for Language and Appearance.
$userManagementTable->data['title_additionalSettings'][0] = html_print_div(
[
'class' => 'section_table_title_line',
'content' => '',
],
true
);
$userManagementTable->data['title_additionalSettings'][1] = html_print_subtitle_table(__('Additional settings'), [], true);
$userManagementTable->data['title_additionalSettings'] = html_print_full_subtitle_table(__('Additional settings'));
$userManagementTable->rowclass['captions_addSettings'] = 'field_half_width';
$userManagementTable->rowclass['fields_addSettings'] = 'field_half_width';

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / suitcase@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-suitcase" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M20.0019141,11.5325325 L20,19 C20,19.5522847 19.5522847,20 19,20 L1,20 C0.44771525,20 -4.11269976e-13,19.5522847 -4.11337631e-13,19 L-0.00103436985,11.5327058 C2.59639689,12.5166169 5.92845316,13.0002111 10.0002111,13.0002111 C14.0722082,13.0002111 17.4044167,12.5165601 20.0019141,11.5325325 Z M19,4 C19.5522847,4 20,4.44771525 20,5 L20.0006295,9.37075094 C17.5926765,10.449402 14.2568796,11.0002111 10.0002111,11.0002111 C5.74354268,11.0002111 2.40774577,10.449402 -0.000207276534,9.37075094 L-4.11337631e-13,5 C-4.11405285e-13,4.44771525 0.44771525,4 1,4 L19,4 Z" id="Rectangle-2" fill="#3F3F3F"></path>
<polyline id="Path-50" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="6 5 6 1 14 1 14 5"></polyline>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / tag@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-tag" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M0,11.2513983 L0,18.0013983 C1.3527075e-16,19.1059678 0.8954305,20.0013983 2,20.0013983 L8.75,20.0013983 L8.75,20.0013983 L19.3732567,9.40991673 C20.15487,8.63064135 20.1574561,7.36550545 19.3790352,6.58304118 L13.4164206,0.589454657 C12.6373978,-0.193614564 11.3710721,-0.196894913 10.5880029,0.582127793 C10.5849705,0.585144579 10.5819477,0.588171087 10.5789347,0.591207268 L0,11.2513983 L0,11.2513983 Z M3.5,18.0013983 C2.672,18.0013983 2,17.3293983 2,16.5013983 C2,15.6733983 2.672,15.0013983 3.5,15.0013983 C4.328,15.0013983 5,15.6733983 5,16.5013983 C5,17.3293983 4.328,18.0013983 3.5,18.0013983 Z" id="Shape" fill="#3F3F3F" transform="translate(9.980581, 10.000699) scale(1, -1) translate(-9.980581, -10.000699) "></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -6597,6 +6597,29 @@ function html_print_subtitle_table(string $caption, array $options=[], bool $ret
}
/**
* Same behaviour like html_print_subtitle_table, in this case, return all formed subtitle with the new Pandora's style.
*
* @param string $caption Caption of title.
* @param array $options Available options.
* - `id`: string
* - `style`: string
* - `class`: string. `section_table_title` by default.
* - `wrapper`: string. Must be a valid tag.
* - `wrapper_attributes`: string. Valid attributes for a wrapper.
*
* @return array.
*/
function html_print_full_subtitle_table(string $caption, array $options=[])
{
$output = [];
$output[0] = html_print_div([ 'class' => 'section_table_title_line' ], true);
$output[1] = html_print_subtitle_table($caption, $options, true);
return $output;
}
/**
* Prints a menu button.
*

View File

@ -1723,7 +1723,7 @@ div.title_line {
#menu_tab_frame_view_bc {
position: sticky;
top: 59px;
z-index: 10000;
z-index: 1000;
display: flex;
align-items: flex-end;
justify-content: space-between;

View File

@ -71,7 +71,7 @@
position: absolute;
left: -100000px;
width: 100%;
z-index: 1051;
z-index: 999;
}
.select2-results {
display: block;