Adaptations

This commit is contained in:
jose.gonzalez@pandorafms.com 2022-11-07 14:04:07 +01:00
parent f543f73c2c
commit f99a7dc511
9 changed files with 48 additions and 42 deletions

View File

@ -826,7 +826,7 @@ foreach ($simple_alerts as $alert) {
__('Add'),
'addbutton',
false,
['class' => 'sub next right'],
['icon' => 'next'],
true
);
$data[3] .= '</form>';
@ -981,11 +981,20 @@ if (isset($dont_display_alert_create_bttn)) {
}
if ($display_create && (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) && !$id_cluster) {
echo '<div class="action-buttons" style="width: '.$table_alert_list->width.'">';
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
html_print_submit_button(__('Create'), 'crtbtn', false, 'class="sub next"');
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Create'),
'crtbtn',
false,
['icon' => 'next'],
true
),
]
);
echo '</form>';
echo '</div>';
}
ui_require_css_file('cluetip', 'include/styles/js/');

View File

@ -1419,7 +1419,7 @@ $table_other->data[$row][3] = html_print_button(
'',
[
'icon' => 'next',
'mode' => 'secondary mini',
'mode' => 'link',
],
true
);
@ -1444,8 +1444,8 @@ $table_other->data[$row][3] = html_print_button(
empty($count_custom_postprocess),
'',
[
'icon' => 'cancel',
'mode' => 'secondary mini',
'icon' => 'delete',
'mode' => 'link',
],
true
);
@ -1481,7 +1481,7 @@ $table_other->data[$row][3] = html_print_button(
'',
[
'icon' => 'next',
'mode' => 'secondary mini',
'mode' => 'link',
],
true
);
@ -1497,8 +1497,8 @@ $table_other->data[$row][3] = html_print_button(
empty($config['interval_values']),
'',
[
'icon' => 'cancel',
'mode' => 'secondary mini',
'icon' => 'delete',
'mode' => 'link',
],
true
);
@ -1521,7 +1521,7 @@ $table_other->data[$row][3] = html_print_button(
'',
[
'icon' => 'next',
'mode' => 'secondary mini',
'mode' => 'link',
],
true
);
@ -1536,8 +1536,8 @@ $table_other->data[$row][3] = html_print_button(
empty($count_custom_postprocess),
'',
[
'icon' => 'cancel',
'mode' => 'secondary mini',
'icon' => 'delete',
'mode' => 'link',
],
true
);

View File

@ -586,7 +586,7 @@ if ($load_filter_modal) {
false,
[
'icon' => 'update',
'mode' => 'secondary',
'mode' => 'secondary mini',
],
true
);
@ -834,7 +834,7 @@ if ($save_filter_modal) {
false,
[
'icon' => 'update',
'mode' => 'secondary',
'mode' => 'secondary mini',
'onClick' => 'save_new_filter();',
],
true

View File

@ -3327,7 +3327,7 @@ function events_page_responses($event)
'event_change_owner('.$event['id_evento'].', '.$event['server_id'].');',
[
'icon' => 'next',
'mode' => 'mini secondary',
'mode' => 'link',
],
true
);
@ -3409,7 +3409,7 @@ function events_page_responses($event)
'event_change_status(\''.$event['similar_ids'].'\','.$event['server_id'].');',
[
'icon' => 'next',
'mode' => 'mini secondary',
'mode' => 'link',
],
true
);
@ -3440,7 +3440,7 @@ function events_page_responses($event)
'$(\'#link_comments\').trigger(\'click\');',
[
'icon' => 'next',
'mode' => 'mini secondary',
'mode' => 'link',
],
true
);
@ -3467,7 +3467,7 @@ function events_page_responses($event)
'if(!confirm(\''.__('Are you sure?').'\')) { return false; } this.form.submit();',
[
'icon' => 'cancel',
'mode' => 'mini secondary',
'mode' => 'link',
],
true
);
@ -3523,10 +3523,7 @@ function events_page_responses($event)
'custom_response_button',
false,
'execute_response('.$event['id_evento'].','.$server_id.',0)',
[
'icon' => 'next',
'mode' => 'mini secondary',
],
['mode' => 'link'],
true
);
}

View File

@ -3388,7 +3388,12 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $
if ($attribute === 'icon') {
$iconToUse = $value;
} else if ($attribute === 'mode') {
$buttonMode = $value;
if ($value !== 'link') {
$buttonMode = $value;
} else {
$iconToUse = '';
}
$classes .= ' '.$value;
} else if ($attribute === 'type') {
$buttonType = $value;

View File

@ -3394,7 +3394,7 @@ function ui_print_datatable(array $parameters)
$button['onclick'],
[
'style' => ($button['style'] ?? ''),
'mode' => 'mini secondary',
'mode' => 'link',
'class' => $button['class'],
],
true

View File

@ -665,13 +665,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
'bars_graph',
'clock',
];
$form_items['percentile_bar_row_1']['html'] = '<td align="left">'.__('Width').'</td>
<td align="left">'.html_print_input_text('width_percentile', 0, '', 3, 5, true).'</td>';
$form_items['percentile_bar_row_1']['html'] = '<td align="left">'.__('Widtzzzzh').html_print_input_text('width_percentile', 0, '', 3, 5, true).'</td>';
$form_items['height_bars_graph_row'] = [];
$form_items['height_bars_graph_row']['items'] = ['bars_graph'];
$form_items['height_bars_graph_row']['html'] = '<td align="left">'.__('Height').'</td>
<td align="left">'.html_print_input_text('bars_graph_height', 0, '', 3, 5, true).'</td>';
$form_items['height_bars_graph_row']['html'] = '<td align="left">'.__('Height').html_print_input_text('bars_graph_height', 0, '', 3, 5, true).'</td>';
$form_items['percentile_bar_row_2'] = [];
$form_items['percentile_bar_row_2']['items'] = [
@ -1435,18 +1433,15 @@ function visual_map_print_button_editor(
$class='',
$imageButton=false
) {
if ($float == 'left') {
$margin = 'margin-right';
} else {
$margin = 'margin-left';
}
html_print_button(
$label,
'button_toolbox2',
$disabled,
"click_button_toolbox('".$idDiv."');",
'class="sub visual_editor_button_toolbox '.$idDiv.' '.$class.'" style="float: '.$float.';"',
[
'icon' => $class,
'mode' => 'onlyIcon',
],
false,
$imageButton
);

View File

@ -555,7 +555,7 @@ final class ModuleGraph extends Item
'label' => __('Module Graph'),
'arguments' => [
'type' => 'radio_button',
'attributes' => 'class="btn"',
'attributes' => 'class="btn" style="flex: 1;"',
'name' => 'choosetype',
'value' => 'module',
'checkedvalue' => $checkedModule,
@ -567,7 +567,7 @@ final class ModuleGraph extends Item
'label' => __('Custom Graph'),
'arguments' => [
'type' => 'radio_button',
'attributes' => 'class="btn"',
'attributes' => 'class="btn" style="flex: 1;"',
'name' => 'choosetype',
'value' => 'custom',
'checkedvalue' => $checkedCustom,

View File

@ -1732,7 +1732,7 @@ $buttons = [];
$buttons[] = [
'id' => 'load-filter',
'class' => 'float-left margin-right-2 sub config',
'class' => 'float-left margin-right-2',
'text' => __('Load filter'),
'onclick' => '',
];
@ -1740,7 +1740,7 @@ $buttons[] = [
if ($event_w || $event_m) {
$buttons[] = [
'id' => 'save-filter',
'class' => 'float-left margin-right-2 sub wand',
'class' => 'float-left margin-right-2',
'text' => __('Save filter'),
'onclick' => '',
];
@ -2857,7 +2857,7 @@ $(document).ready( function() {
/* Summary updates end. */
/* Filter management */
$('#load-filter').click(function (){
$('#button-load-filter').click(function (){
if($('#load-filter-select').length) {
$('#load-filter-select').dialog();
} else {
@ -2881,7 +2881,7 @@ $(document).ready( function() {
}
});
$('#save-filter').click(function (){
$('#button-save-filter').click(function (){
if($('#save-filter-select').length) {
$('#save-filter-select').dialog();
} else {