Style fix

This commit is contained in:
Pablo Aragon 2023-03-30 12:25:45 +02:00
parent e067a176a4
commit 5e24706f71
9 changed files with 159 additions and 90 deletions

View File

@ -776,7 +776,7 @@ if ($agents !== false) {
}
if ((bool) $agent['disabled'] === true) {
$additionalDataAgentName[] = ui_print_help_tip(__('Disabled'));
$additionalDataAgentName[] = ui_print_help_tip(__('Disabled'), true);
}
if ((bool) $agent['quiet'] === true) {
@ -903,12 +903,12 @@ if ($agents !== false) {
if ((bool) $agent['disabled'] === true) {
$agentDisableEnableTitle = __('Enable agent');
$agentDisableEnableAction = 'enable_agent';
$agentDisableEnableAction = 'enable';
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-active.svg';
} else {
$agentDisableEnableTitle = __('Disable agent');
$agentDisableEnableAction = 'disable_agent';
$agentDisableEnableAction = 'disable';
$agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-pause.svg';
}

View File

@ -30,6 +30,26 @@ if (! check_acl($config['id_user'], 0, 'AR')
$update = get_parameter('upd_button', '');
$default = (int) get_parameter('default', 0);
// Header.
ui_print_standard_header(
__('Monitor detail').$subpage,
'images/agent.png',
false,
'',
true,
$buttons,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
],
(empty($fav_menu) === true) ? [] : $fav_menu
);
if ($default != 0) {
$fields_selected = explode(',', $config['status_monitor_fields']);
@ -161,11 +181,11 @@ foreach ($fields_available as $key => $available) {
// General title.
$generalTitleContent = [];
$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
// $generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
$generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Show monitor detail fields')], true);
$titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
$table->data['general_title'] = $titledata;
$table->data[0][0] = '<b>'.__('Fields available').'</b>';
$table->data[0][0] = '<span class="font-title-font">'.__('Fields available').'</span>';
$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
$table->data[1][1] = '<a href="javascript:">'.html_print_image(
'images/darrowright.png',
@ -187,7 +207,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
).'</a>';
$table->data[0][1] = '';
$table->data[0][2] = '<b>'.__('Fields selected').'</b>';
$table->data[0][2] = '<span class="font-title-font">'.__('Fields selected').'</span>';
$table->data[1][2] = html_print_select(
$result_selected,
'fields_selected[]',
@ -203,7 +223,7 @@ $table->data[1][2] = html_print_select(
'width: 300px'
);
echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields&amp;pure='.$config['pure'].'">';
echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields&amp;pure='.$config['pure'].'" class="max_floating_element_size">';
html_print_table($table);
html_print_action_buttons(

View File

@ -54,12 +54,6 @@ $results = db_get_all_rows_in_table('tconsole');
$message = '';
if ($results === false) {
$message = ui_print_info_message(
__('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.')
);
}
View::render(
'consoles/list',
[
@ -67,3 +61,9 @@ View::render(
'message' => $message,
]
);
if ($results === false) {
$message = ui_print_info_message(
__('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.')
);
}

View File

@ -45,73 +45,101 @@ if (is_ajax() === true) {
$group = get_parameter('group', true);
echo '<form id="form_dialog" method="post">';
echo '<div class="div-dialog">';
echo '<p class="label-dialog">'.__('Refresh').'</p>';
echo html_print_select(
echo html_print_label_input_block(
__('Refresh'),
html_print_select(
[
'30' => __('30 seconds'),
(string) SECONDS_1MINUTE => __('1 minute'),
'180' => __('3 minutes'),
(string) SECONDS_5MINUTES => __('5 minutes'),
],
'refresh',
$refresh,
'',
'',
0,
true,
false,
false,
'',
false,
'width: 100%; margin-top: 10px;'
),
[
'30' => __('30 seconds'),
(string) SECONDS_1MINUTE => __('1 minute'),
'180' => __('3 minutes'),
(string) SECONDS_5MINUTES => __('5 minutes'),
],
'refresh',
$refresh,
'',
'',
0,
true,
false,
false,
'',
false,
'margin-top: 3px;'
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
]
);
echo '</div>';
echo '<div class="div-dialog">';
echo '<p class="label-dialog">'.__('Search').'</p>';
echo html_print_input_text('search', $search, '', 30, 255, true);
echo '</div>';
echo '<div class="div-dialog">';
echo '<p class="label-dialog">'.__('Type').'</p>';
echo html_print_select(
echo html_print_label_input_block(
__('Search'),
html_print_input_text(
'search',
$search,
'',
30,
255,
true,
false,
false,
'',
'w100p'
),
[
0 => __('Group agents'),
1 => __('Group modules by tag'),
2 => __('Group modules by module group'),
3 => __('Group modules by agents'),
],
'type',
$type,
'',
'',
0,
true,
false,
false,
'',
false,
'margin-top: 3px;width:70%'
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
]
);
echo '</div>';
echo '<div class="div-dialog">';
echo '<p class="label-dialog">'.__('Show groups').'</p>';
echo html_print_checkbox('group', 1, $group, true);
echo '</div>';
echo html_print_label_input_block(
__('Type'),
html_print_select(
[
0 => __('Group agents'),
1 => __('Group modules by tag'),
2 => __('Group modules by module group'),
3 => __('Group modules by agents'),
],
'type',
$type,
'',
'',
0,
true,
false,
false,
'',
false,
'width: 100%; margin-top: 10px;'
),
[
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
]
);
echo html_print_label_input_block(
__('Show groups'),
'<div class="w100p">'.html_print_checkbox('group', 1, $group, true).'</div>',
[
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
]
);
echo '</form>';
}
if ($getFilterType === true) {
$filter = get_parameter('filter', 0);
echo '<div id="filter_type" class="div-dialog">';
$label = ' ';
switch ($type) {
case 0:
default:
echo '<p style="width:42%;font-weight: bold;">'.__('Group').'</p>';
echo html_print_input(
$label = __('Group');
$input = html_print_input(
[
'type' => 'select_groups',
'returnAllGroup' => true,
@ -126,9 +154,9 @@ if (is_ajax() === true) {
break;
case 1:
echo '<p class="label-dialog">'.__('Tag').'</p>';
$label = __('Tag');
if (tags_has_user_acl_tags($config['id_user']) === false) {
echo html_print_select_from_sql(
$input = html_print_select_from_sql(
'SELECT id_tag, name
FROM ttag
WHERE id_tag
@ -142,7 +170,7 @@ if (is_ajax() === true) {
true,
false,
false,
'width: 200px',
'width: 100%',
'5'
);
} else {
@ -150,7 +178,7 @@ if (is_ajax() === true) {
if (!empty($user_tags)) {
$id_user_tags = array_keys($user_tags);
echo html_print_select_from_sql(
$input = html_print_select_from_sql(
'SELECT id_tag, name
FROM ttag
WHERE id_tag IN ('.implode(',', $id_user_tags).')
@ -164,11 +192,11 @@ if (is_ajax() === true) {
true,
false,
false,
'width: 200px',
'width: 100%',
'5'
);
} else {
echo html_print_select_from_sql(
$input = html_print_select_from_sql(
'SELECT id_tag, name
FROM ttag
WHERE id_tag
@ -182,7 +210,7 @@ if (is_ajax() === true) {
true,
false,
false,
'width: 200px',
'width: 100%',
'5'
);
}
@ -190,8 +218,8 @@ if (is_ajax() === true) {
break;
case 2:
echo '<p class="label-dialog">'.__('Module group').'</p>';
echo html_print_select_from_sql(
$label = __('Module group');
$input = html_print_select_from_sql(
'SELECT id_mg, name FROM tmodule_group ORDER BY name',
'filter[]',
$filter,
@ -202,7 +230,7 @@ if (is_ajax() === true) {
true,
true,
false,
'width: 200px',
'width: 100%',
'5'
);
break;
@ -212,7 +240,14 @@ if (is_ajax() === true) {
break;
}
echo '</div>';
echo html_print_label_input_block(
$label,
$input,
[
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
]
);
}
if ($getInfo === true) {

View File

@ -771,7 +771,7 @@ class AgentsAlerts extends HTML
$headerInputs = [];
$headerInputs[] = [
'label' => __('Group'),
'label' => '<span class="font-title-font">'.__('Group').'</span>',
'id' => 'select-group-id',
'arguments' => [
'name' => 'group-id',
@ -788,8 +788,9 @@ class AgentsAlerts extends HTML
];
$headerInputs[] = [
'label' => __('Show modules without alerts'),
'label' => '<span class="font-title-font label-alert-agent">'.__('Show modules without alerts').'</span>',
'id' => 'txt-use-agent-ip',
'class' => 'display-grid mrgn_lft_15px mrgn_btn_5px',
'arguments' => [
'name' => 'show-modules-without-alerts',
'checked' => $this->showWithoutAlertModules,

View File

@ -805,6 +805,11 @@ select:-internal-list-box {
max-height: 400px;
}
.mx_height85 {
height: 85px !important;
max-height: 85px !important;
}
.no-text-imp {
font-size: 0 !important;
}
@ -11853,3 +11858,7 @@ li.input-interval .extra-container-input .select2 {
.scale-0-8 {
transform: scale(0.8);
}
label:has(span.label-alert-agent) {
margin-bottom: 10px;
}

View File

@ -907,6 +907,9 @@ $tableFilter->data['second_line'][1] = html_print_label_input_block(
true,
'',
[],
true,
0,
'30',
true
)
);

View File

@ -149,13 +149,13 @@ if ($is_ajax === false && $pure === false) {
if ($is_ajax === false && $pure === true) {
// Floating menu - Start.
echo '<div id="heatmap-controls" class="zindex999">';
echo '<div id="heatmap-controls" class="zindex999" style="max-height: 85px">';
echo '<div id="menu_tab" method="post">';
echo '<ul class="mn white-box-content box-shadow flex-row">';
// Name.
echo '<li class="nomn">';
echo '<li class="nomn mx_height85">';
html_print_div(
[
@ -167,7 +167,7 @@ if ($is_ajax === false && $pure === true) {
echo '</li>';
// Countdown.
echo '<li class="nomn">';
echo '<li class="nomn mx_height85">';
echo '<div class="heatmap-refr">';
echo '<div id="heatmap-refr-form">';
@ -282,7 +282,7 @@ if ($is_ajax === true) {
draggable: false,
modal: true,
closeOnEscape: true,
height: 410,
height: 500,
width: 330,
title: '<?php echo __('Config'); ?>',
position: {

View File

@ -27,21 +27,22 @@
*/
// Header.
\ui_print_page_header(
// Title.
ui_print_standard_header(
__('%s registered consoles', $config['rb_product_name']),
// Icon.
'',
// Return.
false,
// Help.
'',
// Godmode.
true,
// Options.
''
[],
[
[
'link' => '',
'label' => __('Servers'),
],
]
);
if (empty($message) === false) {
echo $message;
}