Fix visual issues

This commit is contained in:
Jose Gonzalez 2020-11-25 11:36:14 +01:00
parent 0cc1da21b0
commit 912b2179bd
2 changed files with 25 additions and 28 deletions

View File

@ -464,7 +464,7 @@ class AgentsAlerts extends HTML
{
global $config;
$block = 20;
$block = 10;
$filter = [
'offset' => (int) $this->offset,
@ -595,6 +595,16 @@ class AgentsAlerts extends HTML
echo '</th>';
}
// Dynamic Size.
if ($this->pure == 1) {
// Count of templates.
$templateCount = count($templates_raw);
// Define a dynamic size.
$thSize = floor(80 / $templateCount).'%';
} else {
$thSize = '8%';
}
foreach ($templates_raw as $temp) {
if (isset($templates[$temp['id']]) && $templates[$temp['id']] == '') {
$ntemplates++;
@ -609,14 +619,14 @@ class AgentsAlerts extends HTML
$outputLine = html_print_div(
[
'id' => 'line_header_'.$temp['id'],
'class' => 'rotate_text_module position_text_module center',
'class' => 'rotate_text_module position_text_module',
'style' => '',
'content' => '<span title="'.io_safe_output($temp['name']).'">'.ui_print_truncate_text(io_safe_output($temp['name']), 20).'</span>',
'content' => '<div title="'.io_safe_output($temp['name']).'">'.ui_print_truncate_text(io_safe_output($temp['name']), 20).'</div>',
],
true
);
echo sprintf('<th class="header_table_caption_cell">%s</th>', $outputLine);
echo sprintf('<th class="th_class_module_r header_table_caption_cell" style="width:%s">%s</th>', $thSize, $outputLine);
}
}
}
@ -1030,24 +1040,6 @@ class AgentsAlerts extends HTML
mainForm.submit();
});
//Get max width of name of modules
max_width = 0;
$.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', '');
width = $("#div_module_r_" + id).width();
if (max_width < width) {
max_width = width;
}
});
$.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', '');
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
$("#div_module_r_" + id).show();
});
});
function show_alerts_details(id) {

View File

@ -6,26 +6,31 @@
}
.agents_modules_table .next_previous_step {
width: 25px;
width: 0.1%;
}
.agents_modules_table .header_table_principal_cell {
text-align: right !important;
padding-right: 13px;
min-width: 130px;
width: 100%;
width: 20%;
}
.agents_modules_table .header_table_caption_cell {
min-width: 70px;
max-width: 105px;
height: 200px;
}
.agents_modules_table .position_text_module {
margin: 0 -10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
/* .agents_modules_table .position_text_module div {
padding-left: 10px;
margin-top: 90px;
} */
#full_screen_refresh_box,
#slc-refresh-rate,
#img-full-screen {