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'), __('Add'),
'addbutton', 'addbutton',
false, false,
['class' => 'sub next right'], ['icon' => 'next'],
true true
); );
$data[3] .= '</form>'; $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) { 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.'">'; 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 '</form>';
echo '</div>';
} }
ui_require_css_file('cluetip', 'include/styles/js/'); ui_require_css_file('cluetip', 'include/styles/js/');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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