Fixed views and styles

This commit is contained in:
jose.gonzalez@pandorafms.com 2022-11-21 14:49:07 +01:00
parent 88766eb7cc
commit 8e0e249b81
10 changed files with 211 additions and 87 deletions

View File

@ -142,6 +142,8 @@ $('#button_collapse').on('click', function() {
$('div#page').toggleClass('page_classic page_collapsed'); $('div#page').toggleClass('page_classic page_collapsed');
$('#header_table').toggleClass('header_table_classic header_table_collapsed'); $('#header_table').toggleClass('header_table_classic header_table_collapsed');
$('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed"); $('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed");
// Special feature for action buttons.
$('.action_buttons_right_content').attr('style', 'left: '+($('#menu_full').width() + 36)+'px;');
}); });

View File

@ -299,7 +299,7 @@ if (enterprise_installed() === true) {
// Parent agents. // Parent agents.
$paramsParentAgent = []; $paramsParentAgent = [];
$paramsParentAgent['return'] = true; $paramsParentAgent['return'] = true;
$paramsParentAgent['show_helptip'] = true; $paramsParentAgent['show_helptip'] = false;
$paramsParentAgent['input_name'] = 'id_parent'; $paramsParentAgent['input_name'] = 'id_parent';
$paramsParentAgent['print_hidden_input_idagent'] = true; $paramsParentAgent['print_hidden_input_idagent'] = true;
$paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent'; $paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent';
@ -308,7 +308,7 @@ if (enterprise_installed() === true) {
$paramsParentAgent['selectbox_id'] = 'cascade_protection_module'; $paramsParentAgent['selectbox_id'] = 'cascade_protection_module';
$paramsParentAgent['javascript_is_function_select'] = true; $paramsParentAgent['javascript_is_function_select'] = true;
$paramsParentAgent['cascade_protection'] = true; $paramsParentAgent['cascade_protection'] = true;
$paramsParentAgent['class'] = 'w540px'; $paramsParentAgent['input_style'] = 'width: 540px;';
if ($id_agente !== 0) { if ($id_agente !== 0) {
// Deletes the agent's offspring. // Deletes the agent's offspring.
@ -355,6 +355,7 @@ $tableAgent->rowspan = [];
// Agent name. // Agent name.
if ($new_agent === false) { if ($new_agent === false) {
$tableAgent->data['caption_name'][0] = __('Agent name'); $tableAgent->data['caption_name'][0] = __('Agent name');
$tableAgent->rowclass['name'] = 'w540px';
$tableAgent->data['name'][0] = html_print_input_text('agente', $nombre_agente, '', 76, 100, true, false, false, '', 'w540px'); $tableAgent->data['name'][0] = html_print_input_text('agente', $nombre_agente, '', 76, 100, true, false, false, '', 'w540px');
$tableAgent->data['name'][0] .= html_print_div( $tableAgent->data['name'][0] .= html_print_div(
[ [
@ -369,15 +370,17 @@ if ($new_agent === false) {
// Alias. // Alias.
$tableAgent->data['caption_alias'][0] = __('Alias'); $tableAgent->data['caption_alias'][0] = __('Alias');
$tableAgent->rowclass['alias'] = 'w540px';
$tableAgent->data['alias'][0] = html_print_input_text('alias', $alias, '', 50, 100, true, false, true, '', 'w540px'); $tableAgent->data['alias'][0] = html_print_input_text('alias', $alias, '', 50, 100, true, false, true, '', 'w540px');
if ($new_agent === true) { if ($new_agent === true) {
$tableAgent->rowclass['additional_alias'] = 'subinput'; $tableAgent->rowclass['additional_alias'] = 'subinput';
$tableAgent->data['additional_alias'][0] = html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true); $tableAgent->data['additional_alias'][0] = html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true);
$tableAgent->data['additional_alias'][1] = __('Use alias as name'); $tableAgent->data['additional_alias'][1] = __('Use alias as name');
} else { } else {
$tableAgent->data['alias'][1] = html_print_anchor( $tableAgent->data['alias'][0] .= html_print_anchor(
[ [
'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$id_agente.'&disk_conf='.$agent_md5, 'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$id_agente.'&disk_conf='.$agent_md5,
'class' => 'mrgn_lft_5px',
'content' => html_print_image( 'content' => html_print_image(
'images/application_edit.png', 'images/application_edit.png',
true, true,
@ -394,6 +397,7 @@ if ($new_agent === true) {
// Ip adress. // Ip adress.
$tableAgent->data['caption_ip_address'] = __('IP Address'); $tableAgent->data['caption_ip_address'] = __('IP Address');
$tableAgent->rowclass['ip_address'] = 'w540px';
$tableAgent->data['ip_address'][0] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true, false, false, '', 'w540px'); $tableAgent->data['ip_address'][0] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true, false, false, '', 'w540px');
$tableAgent->rowclass['additional_ip_address'] = 'subinput'; $tableAgent->rowclass['additional_ip_address'] = 'subinput';
@ -423,26 +427,37 @@ if ($new_agent === false) {
// Select primary group. // Select primary group.
$tableAgent->data['caption_primary_group'][0] = __('Primary group'); $tableAgent->data['caption_primary_group'][0] = __('Primary group');
if (isset($groups[$grupo]) === true || $new_agent === true) { if (isset($groups[$grupo]) === true || $new_agent === true) {
$tableAgent->rowclass['primary_group'] = 'w540px';
// Cannot change primary group if user have not permission for that group. // Cannot change primary group if user have not permission for that group.
$tableAgent->data['primary_group'][0] = html_print_input( $tableAgent->data['primary_group'][0] = html_print_select_groups(
[ false,
'type' => 'select_groups', 'AW',
'class' => 'w540px', false,
'returnAllGroup' => false, 'grupo',
'name' => 'grupo', $grupo,
'selected' => $grupo, '',
'return' => true, '',
'required' => true, 0,
'privilege' => 'AW', true,
'option_style' => 'width: 540px;', false,
] true,
'',
false,
'',
'',
false,
'id_grupo',
false,
false,
false,
'540px',
); );
} else { } else {
$tableAgent->data['primary_group'][1] .= groups_get_name($grupo); $tableAgent->data['primary_group'][0] .= groups_get_name($grupo);
$tableAgent->data['primary_group'][1] .= html_print_input_hidden('grupo', $grupo, true); $tableAgent->data['primary_group'][0] .= html_print_input_hidden('grupo', $grupo, true);
} }
$tableAgent->data['primary_group'][1] .= html_print_div( $tableAgent->data['primary_group'][0] .= html_print_div(
[ [
'content' => ui_print_group_icon( 'content' => ui_print_group_icon(
$grupo, $grupo,
@ -455,7 +470,8 @@ $tableAgent->data['primary_group'][1] .= html_print_div(
); );
$tableAgent->data['caption_interval'][0] = __('Interval'); $tableAgent->data['caption_interval'][0] = __('Interval');
$tableAgent->rowstyle['interval'] = 'width: 260px'; // $tableAgent->rowstyle['interval'] = 'width: 260px';
$tableAgent->rowclass['interval'] = 'w540px';
$tableAgent->data['interval'][0] = html_print_extended_select_for_time( $tableAgent->data['interval'][0] = html_print_extended_select_for_time(
'intervalo', 'intervalo',
$intervalo, $intervalo,
@ -474,6 +490,7 @@ if ($intervalo < SECONDS_5MINUTES) {
} }
$tableAgent->data['caption_os'][0] = __('OS'); $tableAgent->data['caption_os'][0] = __('OS');
$tableAgent->rowclass['os'] = 'w540px';
$tableAgent->data['os'][0] = html_print_select_from_sql( $tableAgent->data['os'][0] = html_print_select_from_sql(
'SELECT id_os, name FROM tconfig_os', 'SELECT id_os, name FROM tconfig_os',
'id_os', 'id_os',
@ -501,6 +518,7 @@ $tableAgent->data['os'][0] .= html_print_div(
); );
$tableAgent->data['caption_server'][0] = __('Server'); $tableAgent->data['caption_server'][0] = __('Server');
$tableAgent->rowclass['server'] = 'w540px';
$tableAgent->data['server'][0] = html_print_select( $tableAgent->data['server'][0] = html_print_select(
$servers, $servers,
'server_name', 'server_name',
@ -511,11 +529,14 @@ $tableAgent->data['server'][0] = html_print_select(
true, true,
false, false,
true, true,
'w540px' 'w540px',
false,
'width: 540px;'
); );
// Description. // Description.
$tableAgent->data['caption_description'][0] = __('Description'); $tableAgent->data['caption_description'][0] = __('Description');
$tableAgent->rowclass['description'] = 'w540px';
$tableAgent->data['description'][0] = html_print_textarea( $tableAgent->data['description'][0] = html_print_textarea(
'comentarios', 'comentarios',
3, 3,
@ -586,6 +607,7 @@ $tableAdvancedAgent->data['secondary_groups'][0] = html_print_select_agent_secon
); );
// Parent agent. // Parent agent.
$tableAdvancedAgent->data['caption_parent_agent'][0] = __('Parent'); $tableAdvancedAgent->data['caption_parent_agent'][0] = __('Parent');
$tableAdvancedAgent->rowclass['parent_agent'] = 'w540px';
$tableAdvancedAgent->data['parent_agent'][0] = ui_print_agent_autocomplete_input($paramsParentAgent); $tableAdvancedAgent->data['parent_agent'][0] = ui_print_agent_autocomplete_input($paramsParentAgent);
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
$tableAdvancedAgent->data['caption_cascade_protection'][0] = __('Cascade protection modules'); $tableAdvancedAgent->data['caption_cascade_protection'][0] = __('Cascade protection modules');
@ -710,8 +732,8 @@ if (enterprise_installed() === true) {
true, true,
false, false,
false, false,
'w540px',
'', '',
'w540px',
'', '',
// Autocomplete. // Autocomplete.
'new-password' 'new-password'
@ -743,18 +765,23 @@ $tableAdvancedAgent->data['agent_quiet'][0] = html_print_checkbox_switch('quiet'
// Remote configuration. // Remote configuration.
if ($new_agent === false && isset($filename) === true && file_exists($filename['md5']) === true) { if ($new_agent === false && isset($filename) === true && file_exists($filename['md5']) === true) {
$tableAdvancedAgent->data['caption_remote_configuration'][0] = __('Remote configuration'); $tableAdvancedAgent->data['caption_remote_configuration'][0] = __('Remote configuration');
$tableAdvancedAgent->rowclass['remote_configuration'] = 'w540px';
$tableAdvancedAgent->data['remote_configuration'][0] = html_print_input_text( $tableAdvancedAgent->data['remote_configuration'][0] = html_print_input_text(
'remote_file_timestamp', 'remote_file_timestamp',
date('F d Y H:i:s', fileatime($filename['md5'])), date('F d Y H:i:s', fileatime($filename['md5'])),
'', '',
45, 68,
255, 255,
true, true,
true true,
false,
'',
''
); );
$tableAdvancedAgent->data['remote_configuration'][0] .= html_print_anchor( $tableAdvancedAgent->data['remote_configuration'][0] .= html_print_anchor(
[ [
'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&disk_conf_delete=1&id_agente='.$id_agente, 'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&disk_conf_delete=1&id_agente='.$id_agente,
'class' => 'mrgn_lft_5px',
'content' => html_print_image( 'content' => html_print_image(
'images/cross.png', 'images/cross.png',
true, true,
@ -896,34 +923,33 @@ if ($modo == 0) {
echo clippy_context_help('modules_not_learning_mode'); echo clippy_context_help('modules_not_learning_mode');
echo '</span>'; echo '</span>';
if ($new_agent === false) { if ($new_agent === false) {
$submitButton = html_print_submit_button( $actionButtons = html_print_submit_button(
__('Update'), __('Update'),
'updbutton', 'updbutton',
false, false,
[ 'icon' => 'update'], [ 'icon' => 'update'],
true true
); );
$submitButton .= html_print_input_hidden('update_agent', 1); $actionButtons .= html_print_input_hidden('update_agent', 1);
$submitButton .= html_print_input_hidden('id_agente', $id_agente); $actionButtons .= html_print_input_hidden('id_agente', $id_agente);
if (is_management_allowed() === true) { if (is_management_allowed() === true) {
$submitButton .= html_print_button( $actionButtons .= html_print_button(
__('Delete agent'), __('Delete agent'),
'deleteAgent', 'deleteAgent',
false, false,
'deleteAgentDialog('.$id_agente.')', 'deleteAgentDialog('.$id_agente.')',
[ [
'icon' => 'delete', 'icon' => 'delete',
'mode' => 'secondary', 'mode' => 'secondary dialog_opener',
], ],
true true
); );
} }
} else { } else {
$submitButton = html_print_input_hidden('create_agent', 1); $actionButtons = html_print_input_hidden('create_agent', 1);
$submitButton .= html_print_submit_button( $actionButtons .= html_print_submit_button(
__('Create'), __('Create'),
'crtbutton', 'crtbutton',
false, false,
@ -932,13 +958,13 @@ if ($new_agent === false) {
); );
} }
$submitButton .= html_print_go_back_button( $actionButtons .= html_print_go_back_button(
'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente',
['button_class' => ''], ['button_class' => ''],
true true
); );
html_print_action_buttons($submitButton); html_print_action_buttons($actionButtons, ['type' => 'form_action']);
echo '</div></div>'; echo '</div></div>';
echo '</form>'; echo '</form>';

View File

@ -956,6 +956,7 @@ if ($agents !== false) {
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) { if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
// Create agent button. // Create agent button.
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
html_print_action_buttons( html_print_action_buttons(
html_print_submit_button( html_print_submit_button(
__('Create agent'), __('Create agent'),
@ -964,8 +965,10 @@ if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
[ 'icon' => 'next' ], [ 'icon' => 'next' ],
true true
), ),
false, [
'fixed_action_buttons' 'type' => 'data_table',
'class' => 'fixed_action_buttons',
]
); );
echo '</form>'; echo '</form>';
} }

View File

@ -64,8 +64,8 @@ class ExternalTools extends HTML
} }
// Capture needed parameter for agent form. // Capture needed parameter for agent form.
$this->id_agente = (int) get_parameter('id_agente', 0); $this->id_agente = (int) get_parameter('id_agente');
$this->operation = get_parameter('operation', 0); $this->operation = (int) get_parameter('operation');
$this->community = (string) get_parameter('community', 'public'); $this->community = (string) get_parameter('community', 'public');
$this->ip = (string) get_parameter('select_ips'); $this->ip = (string) get_parameter('select_ips');
$this->snmp_version = (string) get_parameter('select_version'); $this->snmp_version = (string) get_parameter('select_version');
@ -722,7 +722,7 @@ class ExternalTools extends HTML
$output .= sprintf('<h3>%s</h3>', $caption); $output .= sprintf('<h3>%s</h3>', $caption);
} }
$output .= '<pre>'; $output .= '<pre class="external_tools_output">';
// Only perform an execution if command is passed. Avoid errors. // Only perform an execution if command is passed. Avoid errors.
if (empty($command) === false) { if (empty($command) === false) {

View File

@ -2178,7 +2178,7 @@ function html_print_extended_select_for_time(
false, false,
$class, $class,
$readonly, $readonly,
'padding: 7px 3px;height: 32px;margin-top: -2px;width: 100px;'.$select_style, 'padding: 0px 5px; height: 42px; margin-top: -6px; width: 140px;'.$select_style,
false, false,
false, false,
false, false,
@ -3324,20 +3324,63 @@ function html_print_input_color($name, $value, $id='', $class=false, $return=fal
/** /**
* Action buttons. * Action buttons.
* *
* @param string $buttons Buttons for add. * @param string $content HTML content. Usually must be buttons.
* @param boolean $return Return. * @param array $parameters Parameters for create the action buttons.
* @param boolean $principal Principal Action buttons. * $var['type'] => Type of action-buttons:
* @param string $class Special classes. * 'form_action' => Fits into form size (fixed size).
* 'data_table' => Fits into browser window.
* $var['class'] => Added class for action-buttons container.
* $var['id'] => Customize Id. By default `principal_action_buttons` (Handled by JS).
* $var['background_mask'] => Boolean. True by default. Set a background for action buttons.
* $var['background_mask_style'] => String. Empty by default. Set a manual style.
* @param boolean $return Return formed string if is true.
* *
* @return mixed. * @return mixed.
*/ */
function html_print_action_buttons(string $buttons, bool $return=false, bool $principal=true, string $class='fixed_action_buttons fixed_action_buttons_size') function html_print_action_buttons(string $content, array $parameters=[], bool $return=false)
{ {
$typeClass = 'fixed_action_buttons ';
switch (($parameters['type'] ?? '')) {
case 'form_action':
case 'fixed_size':
$typeClass .= 'fixed_action_buttons_size';
break;
default:
case 'data_table':
// For fill.
break;
}
if (isset($parameters['background_mask']) === false || $parameters['background_mask'] !== false) {
$backgroundId = 'backgroundMaskId';
$content .= html_print_div(
[
'id' => $backgroundId,
'class' => 'action_buttons_background_mask',
'content' => '',
'style' => ($parameters['background_mask_style'] ?? ''),
],
true
);
}
// Optional content.
$content .= html_print_div(
[
'class' => 'action_buttons_right_content',
'content' => ($parameters['right_content'] ?? ''),
],
true
);
return html_print_div( return html_print_div(
[ [
'id' => ($principal === true) ? 'principal_action_buttons' : 'action_buttons_'.rand(), 'id' => ($parameters['id'] ?? 'principal_action_buttons'),
'class' => 'action-buttons '.$class, 'class' => 'action-buttons '.$typeClass.' '.($parameters['class'] ?? ''),
'content' => $buttons, 'content' => $content,
'style' => 'z-index: 100',
], ],
$return $return
); );
@ -6353,6 +6396,7 @@ function html_print_go_back_button(string $url, array $options=[], bool $return=
], ],
true true
), ),
'style' => ($options['style'] ?? 'z-index: 100'),
], ],
$return $return
); );

View File

@ -3549,7 +3549,7 @@ function ui_print_datatable(array $parameters)
pageLength: '.$parameters['default_pagination'].', pageLength: '.$parameters['default_pagination'].',
searching: false, searching: false,
responsive: true, responsive: true,
dom: "plfrtiBp", dom: "lfrtiBp",
language: { language: {
processing:"'.$processing.'", processing:"'.$processing.'",
zeroRecords:"'.$zeroRecords.'", zeroRecords:"'.$zeroRecords.'",
@ -3577,10 +3577,11 @@ function ui_print_datatable(array $parameters)
url: "'.ui_get_full_url('ajax.php', false, false, false).'", url: "'.ui_get_full_url('ajax.php', false, false, false).'",
type: "POST", type: "POST",
dataSrc: function (json) { dataSrc: function (json) {
if($("#'.$form_id.'_search_bt") != undefined) { if($("#button-'.$form_id.'_search_bt") != undefined) {
$("#'.$form_id.'_loading").remove(); $("#'.$form_id.'_loading").remove();
} }
$(".action_buttons_right_content").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers"));
if (json.error) { if (json.error) {
console.error(json.error); console.error(json.error);
$("#error-'.$table_id.'").html(json.error); $("#error-'.$table_id.'").html(json.error);
@ -3627,7 +3628,7 @@ function ui_print_datatable(array $parameters)
} }
}, },
data: function (data) { data: function (data) {
if($("#'.$form_id.'_search_bt") != undefined) { if($("#button-'.$form_id.'_search_bt") != undefined) {
var loading = \''.html_print_image( var loading = \''.html_print_image(
'images/spinner.gif', 'images/spinner.gif',
true, true,
@ -3636,7 +3637,7 @@ function ui_print_datatable(array $parameters)
'class' => 'loading-search-datatables-button', 'class' => 'loading-search-datatables-button',
] ]
).'\'; ).'\';
$("#'.$form_id.'_search_bt").parent().append(loading); $("#button-'.$form_id.'_search_bt").parent().append(loading);
} }
inputs = $("#'.$form_id.' :input"); inputs = $("#'.$form_id.' :input");
@ -3682,9 +3683,12 @@ function ui_print_datatable(array $parameters)
dt_'.$table_id.' = $("#'.$table_id.'").DataTable(settings_datatable); dt_'.$table_id.' = $("#'.$table_id.'").DataTable(settings_datatable);
$("#'.$form_id.'_search_bt").click(function (){ $("#button-'.$form_id.'_search_bt").click(function (){
dt_'.$table_id.'.draw().page(0) dt_'.$table_id.'.draw().page(0)
});'; });
//$(".action_buttons_right_content").html($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers"));
';
if (isset($parameters['caption']) === true if (isset($parameters['caption']) === true
&& empty($parameters['caption']) === false && empty($parameters['caption']) === false
@ -4046,7 +4050,7 @@ function ui_toggle(
} }
// Link to toggle. // Link to toggle.
$output = '<div class="max_floating_element_size '.$main_class.'" id="'.$id.'" '.$toggl_attr.'>'; $output = '<div class="'.$main_class.'" id="'.$id.'" '.$toggl_attr.'>';
$output .= '<div class="'.$header_class.'" style="cursor: pointer;" id="tgl_ctrl_'.$uniqid.'">'; $output .= '<div class="'.$header_class.'" style="cursor: pointer;" id="tgl_ctrl_'.$uniqid.'">';
if ($reverseImg === false) { if ($reverseImg === false) {
if ($switch === true) { if ($switch === true) {
@ -5074,6 +5078,8 @@ function ui_print_page_header(
* true - Print the javascript tags. * true - Print the javascript tags.
* false - Doesn't print the tags. * false - Doesn't print the tags.
* *
* - $parameters['input_style'] String, Set additional styles to input.
*
* @return string HTML code if return parameter is true. * @return string HTML code if return parameter is true.
*/ */
function ui_print_agent_autocomplete_input($parameters) function ui_print_agent_autocomplete_input($parameters)
@ -5108,7 +5114,7 @@ function ui_print_agent_autocomplete_input($parameters)
} }
// Default value. // Default value.
$icon_agent = 'images/search_agent.png'; $icon_agent = 'images/svg/agents.svg';
if ($config['style'] === 'pandora_black' && !is_metaconsole()) { if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'style="color: white"'; $text_color = 'style="color: white"';
@ -5369,6 +5375,8 @@ function ui_print_agent_autocomplete_input($parameters)
$javascript_name_function_select = $parameters['javascript_name_function_select']; $javascript_name_function_select = $parameters['javascript_name_function_select'];
} }
$inputStyles = ($parameters['input_style'] ?? '');
if ($from_ux_transaction != '') { if ($from_ux_transaction != '') {
$javascript_code_function_select = ' $javascript_code_function_select = '
function function_select_'.$input_name.'(agent_name) { function function_select_'.$input_name.'(agent_name) {
@ -5592,7 +5600,7 @@ function ui_print_agent_autocomplete_input($parameters)
$javascript_function_change .= ' $javascript_function_change .= '
function setInputBackground(inputId, image) { function setInputBackground(inputId, image) {
$("#"+inputId) $("#"+inputId)
.css({"background-image":"url(\'"+image+"\')", "background-repeat":"no-repeat", "backgound-position": "95% center"}); .attr("style", "background-image: url(\'"+image+"\'); background-repeat: no-repeat; background-position: 97% center; '.$inputStyles.'");
} }
function set_functions_change_autocomplete_'.$input_name.'() { function set_functions_change_autocomplete_'.$input_name.'() {
@ -5864,7 +5872,7 @@ function ui_print_agent_autocomplete_input($parameters)
if (select_item_click) { if (select_item_click) {
select_item_click = 0; select_item_click = 0;
$("#'.$input_id.'") $("#'.$input_id.'")
.css({"background-image":"url(\"'.$icon_image.'\")", "background-repeat":"no-repeat", "backgound-position": "95% center"}); .attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; '.$inputStyles.'");
return; return;
} else { } else {
// Clear selectbox if item is not selected. // Clear selectbox if item is not selected.
@ -5879,7 +5887,7 @@ function ui_print_agent_autocomplete_input($parameters)
//Set loading //Set loading
$("#'.$input_id.'") $("#'.$input_id.'")
.css({"background-image":"url(\"'.$spinner_image.'\")", "background-repeat":"no-repeat", "backgound-position": "95% center"}); .attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; '.$inputStyles.'");
var term = input_value; //Word to search var term = input_value; //Word to search
'.$javascript_change_ajax_params_text.' '.$javascript_change_ajax_params_text.'
@ -5896,7 +5904,7 @@ function ui_print_agent_autocomplete_input($parameters)
success: function (data) { success: function (data) {
if (data.length < 2) { if (data.length < 2) {
//Set icon //Set icon
$("#'.$input_id.'").css({"background-image":"url(\"'.$icon_image.'\")", "background-repeat":"no-repeat", "backgound-position": "95% center"}); $("#'.$input_id.'").attr("style", "background-image: url(\"'.$spinner_image.'\"); background-repeat: no-repeat; background-position: 97% center; '.$inputStyles.'");
return; return;
} }
@ -5946,9 +5954,7 @@ function ui_print_agent_autocomplete_input($parameters)
//Set icon //Set icon
$("#'.$input_id.'") $("#'.$input_id.'")
.css("background", .attr("style", "background: url(\"'.$icon_image.'\") 97% center no-repeat; '.$inputStyles.'")
"url(\"'.$icon_image.'\") 95% center no-repeat");
return; return;
} }
}); });
@ -5967,7 +5973,7 @@ function ui_print_agent_autocomplete_input($parameters)
} }
$attrs = []; $attrs = [];
$attrs['style'] = 'background-image: url('.$icon_image.'); background-repeat: no-repeat; background-position: 95% center; '.$text_color.''; $attrs['style'] = 'background-image: url('.$icon_image.'); background-repeat: no-repeat; background-position: 97% center; '.$text_color.' '.$inputStyles.'';
if (!$disabled_javascript_on_blur_function) { if (!$disabled_javascript_on_blur_function) {
$attrs['onblur'] = $javascript_on_blur_function_name.'()'; $attrs['onblur'] = $javascript_on_blur_function_name.'()';

View File

@ -40,8 +40,7 @@ function configure_modules_form() {
reset_data_module_form(); reset_data_module_form();
return; return;
} }
$("#component_loading").show(); $(".error, #no_component").css("visibility", "hidden");
$(".error, #no_component").hide();
$("option[value!=0]", $select).remove(); $("option[value!=0]", $select).remove();
jQuery.post( jQuery.post(
"ajax.php", "ajax.php",
@ -55,8 +54,7 @@ function configure_modules_form() {
}, },
function(data, status) { function(data, status) {
if (data == false) { if (data == false) {
$("#component_loading").hide(); $(".error, #no_component").css("visibility", "visible");
$("#no_component").show();
return; return;
} }
jQuery.each(data, function(i, val) { jQuery.each(data, function(i, val) {
@ -1063,8 +1061,7 @@ function network_component_group_change_event() {
var $select = $("#network_component").hide(); var $select = $("#network_component").hide();
$("#component").hide(); $("#component").hide();
if (this.value == 0) return; if (this.value == 0) return;
$("#component_loading").show(); $(".error, #no_component").css("visibility", "hidden");
$(".error, #no_component").hide();
$("option[value!=0]", $select).remove(); $("option[value!=0]", $select).remove();
jQuery.post( jQuery.post(
"ajax.php", "ajax.php",
@ -1078,8 +1075,7 @@ function network_component_group_change_event() {
}, },
function(data, status) { function(data, status) {
if (data == false) { if (data == false) {
$("#component_loading").hide(); $(".error, #no_component").css("visibility", "visible");
$("#no_component").show();
return; return;
} }
jQuery.each(data, function(i, val) { jQuery.each(data, function(i, val) {

View File

@ -1751,7 +1751,6 @@ table.databox {
border-radius: 4px; border-radius: 4px;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
padding: 20px; padding: 20px;
max-width: 1064px;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -1841,6 +1840,9 @@ table.rounded_cells td {
flex-direction: row-reverse; flex-direction: row-reverse;
align-items: center; align-items: center;
} }
.action-buttons > * {
z-index: 5;
}
.action-buttons > button { .action-buttons > button {
margin-left: 16px; margin-left: 16px;
} }
@ -5378,7 +5380,7 @@ div.label_select_child_left > span {
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
line-height: 1; line-height: 1;
text-align: center; text-align: center;
padding: 7px 14px; padding: 14px 10px;
margin-right: -1px; margin-right: -1px;
border: 1px solid #cbcbcb; border: 1px solid #cbcbcb;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
@ -9095,6 +9097,7 @@ button.submitButton {
border-radius: 8px; border-radius: 8px;
padding: 0 10px; padding: 0 10px;
cursor: pointer; cursor: pointer;
z-index: 1;
} }
button.buttonButton.mini, button.buttonButton.mini,
@ -9627,7 +9630,7 @@ tr.bring_next_field {
} }
.sg_source > .select2-container .select2-selection--multiple { .sg_source > .select2-container .select2-selection--multiple {
width: 480px !important; width: 540px !important;
height: 90px !important; height: 90px !important;
overflow: overlay; overflow: overlay;
} }
@ -9660,7 +9663,7 @@ tr.bring_next_field {
.select2-selection--single .select2-selection--single
.select2-selection__placeholder { .select2-selection__placeholder {
color: #999; color: #999;
line-height: 30px; line-height: 42px;
} }
.select2-container .select2-selection--single .select2-selection__rendered { .select2-container .select2-selection--single .select2-selection__rendered {
display: block; display: block;
@ -9764,8 +9767,47 @@ tr.bring_next_field {
.fixed_action_buttons { .fixed_action_buttons {
position: fixed; position: fixed;
padding: 0px; padding: 0px;
z-index: 1;
} }
.action_buttons_right_content {
position: fixed;
z-index: 1;
left: 250px;
}
.fixed_action_buttons_size { .fixed_action_buttons_size {
width: 1064px; width: 1064px;
} }
.action_buttons_background_mask {
width: 3000px;
position: absolute;
right: -45px;
height: 58px;
top: -8px;
border: 1px solid #e5e9ed;
background-color: #fff;
z-index: 0;
}
.fixed_action_buttons_size > .action_buttons_background_mask {
left: -95px !important;
}
pre.external_tools_output {
border: 1px solid #e5e9ed;
-moz-box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
-webkit-box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
border-radius: 8px;
color: #cacaca;
padding: 10px;
background-color: #000;
background-image: radial-gradient(rgba(0, 150, 0, 0.75), #000 120%);
font-size: 11pt;
text-shadow: 0 0 5px #000;
}
.dialog_table_form td:first-child {
font-size: 11pt;
}

View File

@ -259,17 +259,27 @@ table.dataTable.info_table.no-footer {
} }
a.pandora_pagination { a.pandora_pagination {
padding: 5px; background-color: #f6f7fb;
border: 1px solid #c0ccdc;
padding: 11px;
color: #000; color: #000;
border: 1px solid #cacaca; border: 1px solid #cacaca;
border-left: none; border-left: none;
min-width: 12px; min-width: 12px;
text-decoration: none; text-decoration: none;
font-size: 11pt;
line-height: 35px;
cursor: pointer; cursor: pointer;
} }
a.pandora_pagination.next {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.dataTables_paginate > span > span.ellipsis + a.pandora_pagination:last-child, .dataTables_paginate > span > span.ellipsis + a.pandora_pagination:last-child,
.dataTables_paginate a.pandora_pagination.previous { .dataTables_paginate a.pandora_pagination.previous {
border-left: 1px solid #cacaca; border-left: 1px solid #c0ccdc;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
} }
a.pandora_pagination.disabled { a.pandora_pagination.disabled {
@ -283,7 +293,7 @@ a.pandora_pagination:hover {
a.pandora_pagination.current, a.pandora_pagination.current,
a.pandora_pagination.current:hover { a.pandora_pagination.current:hover {
color: #fff; color: #fff;
background-color: #82b92e; background-color: #14524f;
} }
/* CSV button datatables */ /* CSV button datatables */

View File

@ -2380,10 +2380,7 @@ if (check_acl(
'submit_event_response', 'submit_event_response',
false, false,
'execute_event_response(true);', 'execute_event_response(true);',
[ [ 'icon' => 'cog' ],
'icon' => 'cog',
'mode' => 'mini',
],
true true
); );
@ -2399,11 +2396,9 @@ if (check_acl(
false false
); );
html_print_div( html_print_action_buttons(
[ $elements,
'class' => 'action-buttons', [ 'type' => 'data_table' ]
'content' => $elements,
]
); );
echo "<span id='response_loading_dialog' class='invisible'>".html_print_image( echo "<span id='response_loading_dialog' class='invisible'>".html_print_image(