ui_toggle revierw

This commit is contained in:
fbsanchez 2019-05-29 18:13:21 +02:00
parent f16f35ad10
commit c2346842c9
5 changed files with 30 additions and 6 deletions

View File

@ -2934,7 +2934,8 @@ function ui_toggle(
$title='', $title='',
$hidden_default=true, $hidden_default=true,
$return=false, $return=false,
$toggle_class='' $toggle_class='',
$container_class='white-box-content'
) { ) {
// Generate unique Id. // Generate unique Id.
$uniqid = uniqid(''); $uniqid = uniqid('');
@ -2965,7 +2966,7 @@ function ui_toggle(
// $output .= '<br />'; // $output .= '<br />';
// Code into a div // Code into a div
$output .= "<div id='tgl_div_".$uniqid."' style='".$style.";margin-top: -1px;' class='".$toggle_class."'>\n"; $output .= "<div id='tgl_div_".$uniqid."' style='".$style.";margin-top: -1px;' class='".$toggle_class."'>\n";
$output .= '<div class="box-shadow white_table_graph_content no-padding-imp">'; $output .= '<div class="'.$container_class.'">';
$output .= $code; $output .= $code;
$output .= '</div>'; $output .= '</div>';
$output .= '</div>'; $output .= '</div>';

View File

@ -5999,6 +5999,15 @@ div#status_pie {
padding-left: 10px; padding-left: 10px;
} }
.white-box-content {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.white_table_graph_content { .white_table_graph_content {
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
border-top: none; border-top: none;
@ -6006,11 +6015,14 @@ div#status_pie {
padding: 20px; padding: 20px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
} }
.white_table_graph_content.no-padding-imp .info_box {
margin: 0 !important;
}
.white_table_graph_content.min-height-100 { .white_table_graph_content.min-height-100 {
min-height: 100px; min-height: 100px;
} }

View File

@ -650,8 +650,10 @@ if (!empty($table->data)) {
} }
echo '</form>'; echo '</form>';
$alerts_defined = true;
} else { } else {
ui_print_info_message(['no_close' => true, 'message' => __('No alerts found') ]); ui_print_info_message(['no_close' => true, 'message' => __('No alerts found') ]);
$alerts_defined = false;
} }
$html_content = ob_get_clean(); $html_content = ob_get_clean();
@ -662,7 +664,10 @@ if ($agent_view_page === true) {
$html_content, $html_content,
__('Full list of alerts'), __('Full list of alerts'),
'status_monitor_agent', 'status_monitor_agent',
false !$alerts_defined,
false,
'',
'white_table_graph_content no-padding-imp'
); );
} else { } else {
// Dump entire content. // Dump entire content.

View File

@ -180,7 +180,10 @@ ui_toggle(
true true
), ),
'status_monitor_agent', 'status_monitor_agent',
false false,
false,
'',
'white_table_graph_content no-padding-imp'
); );

View File

@ -25,7 +25,10 @@ ui_toggle(
"<div style='width: 100%;' id='event_list'>".html_print_image('images/spinner.gif', true).'</div>', "<div style='width: 100%;' id='event_list'>".html_print_image('images/spinner.gif', true).'</div>',
__('Latest events for this agent'), __('Latest events for this agent'),
__('Latest events for this agent'), __('Latest events for this agent'),
false false,
false,
'',
'white_table_graph_content no-padding-imp'
); );
?> ?>