10488-Fix views reports

This commit is contained in:
Pablo Aragon 2023-02-22 10:33:45 +01:00
parent 7a2cb912b2
commit 95fb797a7e
9 changed files with 76 additions and 44 deletions

View File

@ -1100,7 +1100,7 @@ $class = 'databox filters';
false,
false,
'',
'fullwidth'
''
);
} else {
html_print_input_text(
@ -1113,7 +1113,7 @@ $class = 'databox filters';
false,
false,
'',
'fullwidth'
''
);
}
?>
@ -1160,7 +1160,7 @@ $class = 'databox filters';
<td class="bolder"><?php echo __('Description'); ?></td>
<td >
<?php
echo html_print_textarea('description', 3, 25, $description);
echo html_print_textarea('description', 2, 80, $description, 'style="padding-right: 0px !important;"');
?>
</td>
</tr>
@ -1276,13 +1276,13 @@ $class = 'databox filters';
'label',
$label,
'',
50,
80,
255,
true,
false,
false,
'',
'fullwidth'
''
);
?>
</td>
@ -3920,21 +3920,25 @@ print_SLA_list('100%', $action, $idItem);
print_General_list('100%', $action, $idItem, $type);
echo '<div class="action-buttons w100p" >';
if ($action == 'new') {
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Create item'),
'create_item',
false,
'class="sub wand"'
['icon' => 'next'],
true
);
} else {
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Update item'),
'edit_item',
false,
'class="sub upd"'
['icon' => 'next'],
true
);
}
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
echo '</div>';
echo '</form>';
@ -3980,7 +3984,7 @@ function print_SLA_list($width, $action, $idItem=null)
$idItem
);
?>
<table class="databox data" id="sla_list" border="0" cellpadding="4" cellspacing="4" width="100%">
<table class="info_table" id="sla_list" border="0" cellpadding="4" cellspacing="4" width="100%">
<thead>
<tr>
<th class="header sla_list_agent_col" scope="col">
@ -4496,7 +4500,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
include_once $config['homedir'].'/include/functions_html.php';
?>
<table class="databox data" id="general_list" border="0" cellpadding="4" cellspacing="4" width="100%">
<table class="info_table" id="general_list" border="0" cellpadding="4" cellspacing="4" width="100%">
<thead>
<tr>
<?php
@ -7398,4 +7402,8 @@ function dialog_message(message_id) {
});
}
$(document).ready(function () {
$('[id^=period], #combo_graph_options, #combo_sla_sort_options').next().css('z-index', 0);
});
</script>

View File

@ -204,7 +204,7 @@ $urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&typ
if (!defined('METACONSOLE')) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters mrgn_btn_0';
$table->data[0][0] = __('Agents');
$table->data[0][0] .= html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
$table->data[0][1] = __('Modules');
@ -349,7 +349,7 @@ $table->style[0] = 'text-align: right;';
if ($items) {
$table->width = '98%';
$table->width = '100%';
if (defined('METACONSOLE')) {
$table->width = '100%';
$table->class = 'databox data';
@ -687,7 +687,7 @@ if (defined('METACONSOLE')) {
echo "<div class='pdd_b_20px right; w100p'>";
html_print_input_hidden('ids_items_to_delete', '');
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete right mrgn_btn_15px"');
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete right mrgn_btn_15px mrgn_right_20px"');
echo '</div>';
echo '</form>';
}

View File

@ -41,22 +41,22 @@ $groups = users_get_groups();
switch ($action) {
default:
case 'new':
$actionButtonHtml = html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Save'),
'add',
false,
'class="sub wand"',
[ 'icon' => 'next' ],
true
);
$hiddenFieldAction = 'save';
break;
case 'update':
case 'edit':
$actionButtonHtml = html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Update'),
'edit',
false,
'class="sub upd"',
[ 'icon' => 'next' ],
true
);
$hiddenFieldAction = 'update';
@ -191,22 +191,9 @@ if ($enterpriseEnable) {
}
$table->data['interactive_report'][0] = __('Non interactive report');
$table->data['interactive_report'][1] = __('Yes');
$table->data['interactive_report'][1] .= '&nbsp;&nbsp;&nbsp;';
$table->data['interactive_report'][1] .= html_print_radio_button(
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
'non_interactive',
1,
'',
$non_interactive_check,
true
);
$table->data['interactive_report'][1] .= '&nbsp;&nbsp;';
$table->data['interactive_report'][1] .= __('No');
$table->data['interactive_report'][1] .= '&nbsp;&nbsp;&nbsp;';
$table->data['interactive_report'][1] .= html_print_radio_button(
'non_interactive',
0,
'',
$non_interactive_check,
true
);
@ -215,8 +202,8 @@ if ($enterpriseEnable) {
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
5,
15,
2,
80,
$description,
'',
true
@ -244,7 +231,7 @@ echo '<form class="" method="post">';
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo $actionButtonHtml;
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
html_print_input_hidden('action', $hiddenFieldAction);
html_print_input_hidden('id_report', $idReport);
echo '</div></form>';

View File

@ -2150,7 +2150,7 @@ function html_print_extended_select_for_time(
'class' => $uniq_name.'_toggler '.$class.' invert_filter',
'alt' => __('Custom'),
'title' => __('Custom'),
'style' => 'width: 18px; margin-bottom: -5px; margin-left: 10px'.$style_icon,
'style' => 'width: 18px; margin-bottom: -5px; margin-left: 10px; padding-top: 10px;'.$style_icon,
],
false,
false,
@ -2162,7 +2162,7 @@ function html_print_extended_select_for_time(
echo '</div>';
echo '<div id="'.$uniq_name.'_manual" class="w100p inline_line">';
echo '<div id="'.$uniq_name.'_manual" class="w100p inline_flex">';
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class);
html_print_input_hidden($name, $selected, false, $uniq_name);
@ -2178,7 +2178,7 @@ function html_print_extended_select_for_time(
false,
$class,
$readonly,
'padding: 0px 5px; height: 42px; margin: -6px 0 0 6px; width: 140px;'.$select_style,
' margin-left: 5px; width: 140px;'.$select_style,
false,
false,
false,
@ -2196,7 +2196,7 @@ function html_print_extended_select_for_time(
'class' => $uniq_name.'_toggler invert_filter',
'alt' => __('List'),
'title' => __('List'),
'style' => 'width: 18px;margin-bottom: -5px;'.$style_icon,
'style' => 'width: 18px;margin-bottom: -5px; padding-top: 10px;'.$style_icon,
]
).'</a>';
echo '</div>';

View File

@ -1059,7 +1059,7 @@ function get_table_custom_macros_report($data)
$table = new StdClass();
$table->data = [];
$table->width = '100%';
$table->class = 'databox data fullwidth';
$table->class = 'info_table';
$table->id = 'table-macros-definition';
$table->rowclass = [];

View File

@ -5841,6 +5841,15 @@ function ui_print_agent_autocomplete_input($parameters)
.attr("style", "background-image: url(\'"+image+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; '.$inputStyles.'");
}
$(document).ready(function () {
$("#'.$input_id.'").focusout(function (e) {
setTimeout(() => {
let iconImage = "'.$icon_image.'";
$("#'.$input_id.'").attr("style", "background-image: url(\'"+iconImage+"\'); background-repeat: no-repeat; background-position: 97% center; background-size: 20px; '.$inputStyles.'");
}, 100);
});
});
function set_functions_change_autocomplete_'.$input_name.'() {
var cache_'.$input_name.' = {};

View File

@ -894,7 +894,7 @@ function post_process_select_events(name) {
function period_select_init(name, allow_zero) {
// Manual mode is hidden by default
$("#" + name + "_manual").css("display", "none");
$("#" + name + "_default").css("display", "inline");
$("#" + name + "_default").css("display", "flex");
// If the text input is empty, we put on it 5 minutes by default
if ($("#text-" + name + "_text").val() == "") {
$("#text-" + name + "_text").val(300);
@ -907,7 +907,7 @@ function period_select_init(name, allow_zero) {
}
} else if ($("#text-" + name + "_text").val() == 0 && allow_zero == 1) {
$("#" + name + "_units option:last").prop("selected", false);
$("#" + name + "_manual").css("display", "inline");
$("#" + name + "_manual").css("display", "flex");
$("#" + name + "_default").css("display", "none");
}
}
@ -996,13 +996,13 @@ function selectFirst(name) {
*/
function toggleBoth(name) {
if ($("#" + name + "_default").css("display") == "none") {
$("#" + name + "_default").css("display", "inline");
$("#" + name + "_default").css("display", "flex");
} else {
$("#" + name + "_default").css("display", "none");
}
if ($("#" + name + "_manual").css("display") == "none") {
$("#" + name + "_manual").css("display", "inline");
$("#" + name + "_manual").css("display", "flex");
} else {
$("#" + name + "_manual").css("display", "none");
}

View File

@ -144,6 +144,7 @@
.ui_tpicker_second,
.ui-slider-handle {
border: 1px solid #aaaaaa;
background-color: #dadada !important;
}
.ui-timepicker-div dd {
margin: 0px 15px 0px 15px;
@ -219,6 +220,23 @@ a.ui-button:active,
border-bottom: 4px solid #82b92e;
}
.ui-priority-secondary:hover {
content: "";
position: absolute;
bottom: -5px;
width: 100%;
border-bottom: 5px solid #82b92e;
}
.ui-priority-primary:hover {
content: "";
position: absolute;
right: 5px;
bottom: -5px;
width: 100%;
border-bottom: 5px solid #82b92e;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {

View File

@ -11268,3 +11268,13 @@ form#satellite_conf_edit > fieldset.full-column {
background-size: 24px;
background-image: url("../../images/enable.svg");
}
.orientation-report {
margin-right: 10px;
}
#textarea_header_tbl,
#textarea_firstpage_tbl,
#textarea_footer_tbl {
width: 80% !important;
}