Merge branch 'ent-9662-Restyling-fuentes-colores-botones' of brutus.artica.es:artica/pandorafms into ent-9662-Restyling-fuentes-colores-botones

This commit is contained in:
daniel 2023-02-24 13:45:14 +01:00
commit 5477fdbb6c
14 changed files with 201 additions and 117 deletions

View File

@ -187,7 +187,7 @@ if ($disk_conf_delete === true) {
@unlink($filename['conf']);
}
echo '<div class="max_floating_element_size mrgn_20px">';
echo '<div class="max_floating_element_size">';
echo '<form autocomplete="new-password" name="conf_agent" id="form_agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
// Custom ID.
@ -628,32 +628,38 @@ html_print_div(
// Advanced options.
$tableAdvancedAgent = new stdClass();
$tableAdvancedAgent->class = 'floating_form primary_form';
$tableAdvancedAgent->class = 'filter-table-adv floating_form primary_form';
$tableAdvancedAgent->data = [];
$tableAdvancedAgent->style = [];
$tableAdvancedAgent->cellclass = [];
$tableAdvancedAgent->colspan = [];
$tableAdvancedAgent->rowspan = [];
// Secondary groups.
$tableAdvancedAgent->data['caption_secondary_groups'][0] = __('Secondary groups');
$tableAdvancedAgent->data['secondary_groups'][0] = html_print_select_agent_secondary(
$agent,
$id_agente
$tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
__('Secondary groups'),
html_print_select_agent_secondary(
$agent,
$id_agente
)
);
// Parent agent.
$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'][] = html_print_label_input_block(
__('Parent'),
ui_print_agent_autocomplete_input($paramsParentAgent)
);
if (enterprise_installed() === true) {
$tableAdvancedAgent->data['caption_cascade_protection'][0] = __('Cascade protection modules');
$tableAdvancedAgent->data['cascade_protection'][0] = html_print_checkbox_switch(
$cascadeProtectionContents = [];
$cascadeProtectionContents[] = html_print_checkbox_switch(
'cascade_protection',
1,
$cascade_protection,
true
);
$tableAdvancedAgent->data['cascade_protection'][1] = html_print_select(
$cascadeProtectionContents[] = html_print_select(
$modules_values,
'cascade_protection_module',
$cascade_protection_module,
@ -665,11 +671,22 @@ if (enterprise_installed() === true) {
true,
'w220p'
);
$tableAdvancedAgent->data['caption_cascade_protection'][] = html_print_label_input_block(
__('Cascade protection modules'),
html_print_div(
[
'class' => 'flex-row-center',
'content' => implode('', $cascadeProtectionContents),
],
true
)
);
}
// Module Definition (Learn mode).
$tableAdvancedAgent->data['caption_module_definition'][0] = __('Module definition');
$switchButtons = html_print_radio_button_extended(
$switchButtons = [];
$switchButtons[] = html_print_radio_button_extended(
'modo',
1,
__('Learning mode'),
@ -679,7 +696,7 @@ $switchButtons = html_print_radio_button_extended(
'',
true
);
$switchButtons .= html_print_radio_button_extended(
$switchButtons[] = html_print_radio_button_extended(
'modo',
0,
__('Normal mode'),
@ -689,7 +706,7 @@ $switchButtons .= html_print_radio_button_extended(
'',
true
);
$switchButtons .= html_print_radio_button_extended(
$switchButtons[] = html_print_radio_button_extended(
'modo',
2,
__('Autodisable mode'),
@ -700,65 +717,72 @@ $switchButtons .= html_print_radio_button_extended(
true
);
$tableAdvancedAgent->data['module_definition'][0] = html_print_div(
[
'class' => 'switch_radio_button',
'content' => $switchButtons,
],
true
$tableAdvancedAgent->data['module_definition'][] = html_print_label_input_block(
__('Module definition'),
html_print_div(
[
'class' => 'switch_radio_button',
'content' => implode('', $switchButtons),
],
true
)
);
// CPS - Cascade Protection Services.
$tableAdvancedAgent->data['caption_cps_value'][0] = __('Cascade protection services');
$tableAdvancedAgent->data['cps_value'][0] = html_print_checkbox_switch('cps', $cps_val, ($cps >= 0), true);
$tableAdvancedAgent->data['cps_value'][] = html_print_label_input_block(
__('Cascade protection services'),
html_print_checkbox_switch('cps', $cps_val, ($cps >= 0), true)
);
// Update GIS data.
if ((bool) $config['activate_gis'] === true) {
$tableAdvancedAgent->data['caption_gis'][0] = __('Update new GIS data');
$tableAdvancedAgent->data['gis'][0] = html_print_checkbox_switch('update_gis_data', 1, ($new_agent === true), true);
$tableAdvancedAgent->data['gis'][] = html_print_label_input_block(
__('Update new GIS data'),
html_print_checkbox_switch('update_gis_data', 1, ($new_agent === true), true)
);
}
// Agent Icons.
$tableAdvancedAgent->data['caption_agent_icon'][0] = __('Agent icon');
$tableAdvancedAgent->data['agent_icon'][0] = html_print_select(
$arraySelectIcon,
'icon_path',
$icon_path,
'changeIcons();',
__('None'),
'',
true,
false,
true,
'w540px'
);
$tableAdvancedAgent->data['agent_icon'][1] = html_print_image(
$path_ok,
true,
[
'id' => 'icon_ok',
'style' => 'display:'.$display_icons.';',
]
).html_print_image(
$path_bad,
true,
[
'id' => 'icon_bad',
'style' => 'display:'.$display_icons.';',
]
).html_print_image(
$path_warning,
true,
[
'id' => 'icon_warning',
'style' => 'display:'.$display_icons.';',
]
$tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
__('Agent icon'),
html_print_select(
$arraySelectIcon,
'icon_path',
$icon_path,
'changeIcons();',
__('None'),
'',
true,
false,
true,
'w540px'
).html_print_image(
$path_ok,
true,
[
'id' => 'icon_ok',
'style' => 'display:'.$display_icons.';',
]
).html_print_image(
$path_bad,
true,
[
'id' => 'icon_bad',
'style' => 'display:'.$display_icons.';',
]
).html_print_image(
$path_warning,
true,
[
'id' => 'icon_warning',
'style' => 'display:'.$display_icons.';',
]
)
);
// Url address.
$tableAdvancedAgent->data['caption_url_description'][0] = __('Url address');
if (enterprise_installed() === true) {
$tableAdvancedAgent->data['url_description'][0] = html_print_input_text(
$urlAddressInput = html_print_input_text(
'url_description',
$url_description,
'',
@ -774,7 +798,7 @@ if (enterprise_installed() === true) {
'new-password'
);
} else {
$tableAdvancedAgent->data['url_description'][0] = html_print_input_text(
$urlAddressInput = html_print_input_text(
'url_description',
$url_description,
'',
@ -784,25 +808,32 @@ if (enterprise_installed() === true) {
);
}
$tableAdvancedAgent->data['url_description'][] = html_print_label_input_block(
__('URL Address'),
$urlAddressInput
);
// Agent status.
$tableAdvancedAgent->data['caption_agent_status'][0] = __('Disabled mode');
$tableAdvancedAgent->data['agent_status'][0] = html_print_checkbox_switch(
'disabled',
1,
$disabled,
true
$tableAdvancedAgent->data['agent_status'][] = html_print_label_input_block(
__('Disabled mode'),
html_print_checkbox_switch(
'disabled',
1,
$disabled,
true
)
);
// Quiet mode.
$tableAdvancedAgent->data['caption_agent_quiet'][0] = __('Quiet');
$tableAdvancedAgent->data['agent_quiet'][0] = html_print_checkbox_switch('quiet', 1, $quiet, true);
$tableAdvancedAgent->data['agent_quiet'][] = html_print_label_input_block(
__('Quiet'),
html_print_checkbox_switch('quiet', 1, $quiet, true)
);
// Remote configuration.
if ($new_agent === false && isset($filename) === true && file_exists($filename['md5']) === true) {
$tableAdvancedAgent->data['caption_remote_configuration'][0] = __('Remote configuration');
$tableAdvancedAgent->cellstyle['remote_configuration'][0] = 'display: flex; align-items: center;';
$tableAdvancedAgent->cellclass['remote_configuration'][0] = 'w540px';
$tableAdvancedAgent->data['remote_configuration'][0] = html_print_input_text(
$remoteConfigurationElements = [];
$remoteConfigurationElements[] = html_print_input_text(
'remote_file_timestamp',
date('F d Y H:i:s', fileatime($filename['md5'])),
'',
@ -814,7 +845,7 @@ if ($new_agent === false && isset($filename) === true && file_exists($filename['
'',
'w540px'
);
$tableAdvancedAgent->data['remote_configuration'][0] .= html_print_anchor(
$remoteConfigurationElements[] = html_print_anchor(
[
'href' => 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&disk_conf_delete=1&id_agente='.$id_agente,
'content' => html_print_image(
@ -829,12 +860,47 @@ if ($new_agent === false && isset($filename) === true && file_exists($filename['
],
true
);
$tableAdvancedAgent->data['remote_configuration'][] = html_print_label_input_block(
__('Remote configuration'),
html_print_div(
[
'class' => 'flex-row-center',
'content' => implode('', $remoteConfigurationElements),
],
true
)
);
}
// Safe operation mode.
$tableAdvancedAgent->data['caption_safe_operation'][0] = __('Safe operation mode');
$tableAdvancedAgent->data['safe_operation'][0] = html_print_checkbox_switch('safe_mode', 1, $safe_mode, true);
$tableAdvancedAgent->data['safe_operation'][1] = html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true);
$safeOperationElements = [];
$safeOperationElements[] = html_print_checkbox_switch(
'safe_mode',
1,
$safe_mode,
true
);
$safeOperationElements[] = html_print_select(
$safe_mode_modules,
'safe_mode_module',
$safe_mode_module,
'',
'',
0,
true
);
$tableAdvancedAgent->data['safe_operation'][] = html_print_label_input_block(
__('Safe operation mode'),
html_print_div(
[
'class' => 'flex-row-center',
'content' => implode('', $safeOperationElements),
],
true
)
);
if (enterprise_installed() === true) {
ui_toggle(
@ -844,8 +910,8 @@ if (enterprise_installed() === true) {
'',
true,
false,
'white_box white_box_opened white_table_graph_fixed',
'no-border flex'
'white_box_content',
'no-border white_table_graph'
);
}

View File

@ -1197,7 +1197,7 @@ if ($modules !== false) {
}
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
echo '<form class="datatable_form" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">';
}

View File

@ -742,7 +742,7 @@ $outputForm .= ui_toggle(
true,
'',
'',
'box-flat white_table_flex white_table_graph_fixed mrgn_top_20px'
'box-flat white_table_flex white_table_graph_fixed'
);
$outputForm .= ui_toggle(

View File

@ -865,8 +865,7 @@ $tagsAvailableData .= html_print_image(
[
'id' => 'right',
'title' => __('Add tags to module'),
'class' => 'invert_filter clickable',
'style' => 'width: 32px;',
'class' => 'main_menu_icon invert_filter clickable mrgn_lft_5px',
]
);

View File

@ -1691,7 +1691,7 @@ if (is_metaconsole() === true) {
}
echo '<div class="max_floating_element_size mrgn_20px">';
echo '<div class="max_floating_element_size">';
echo '<form id="user_profile_form" name="user_profile_form" method="post" autocomplete="off" action="#">';
if (!$id) {

View File

@ -2031,17 +2031,20 @@ if ($table_events) {
$tableEvents24h = new stdClass();
$tableEvents24h->class = 'filter_table';
$tableEvents24h->styleTable = 'border-radius: 0;padding: 0;margin: 0 0 10px;';
$tableEvents24h->styleTable = 'border: 0;padding: 0;margin: 0 0 10px;';
$tableEvents24h->width = '100%';
$tableEvents24h->data = [];
$tableEvents24h->data[0] = __('Show all Events 24h');
$tableEvents24h->rowstyle[1] = 'height: 42px';
$tableEvents24h->data[1] = html_print_switch(
$tableEvents24h->data[0] = html_print_div(
[
'name' => 'all_events_24h',
'value' => $all_events_24h,
'id' => 'checkbox-all_events_24h',
'class' => 'flex-row-center',
'content' => '<span class="font_14px mrgn_right_10px">'.__('Show all Events 24h').'</span>'.html_print_switch(
[
'name' => 'all_events_24h',
'value' => $all_events_24h,
'id' => 'checkbox-all_events_24h',
]
),
]
);

View File

@ -2726,7 +2726,7 @@ function events_print_type_img(
[
'title' => events_print_type_description($type, true),
'class' => $style,
'style' => 'margin-left: 30px;'.((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
'style' => 'margin: 0 auto;'.((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
],
true
);

View File

@ -461,13 +461,17 @@ function treeview_printAlertsTable($id_module, $server_data=[], $no_head=false)
if ($user_access_node && check_acl($config['id_user'], $id_group, 'LW')) {
// Actions table
echo '<div class="w100p right_align">';
echo '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&search=1&module_name='.$module_name.'&id_agente='.$agent_id.$url_hash.'" target="_blank">';
html_print_submit_button(__('Go to alerts edition'), 'upd_button', false, ['icon' => 'alert']);
echo '</a>';
html_print_button(
__('Go to alerts edition'),
'upd_button',
false,
'window.location.assign("'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&search=1&module_name='.$module_name.'&id_agente='.$agent_id.$url_hash.'")',
['icon' => 'alert']
);
echo '</div>';
}
if (!empty($server_data) && is_metaconsole()) {
if (empty($server_data) === false && is_metaconsole() === true) {
metaconsole_restore_db();
}
@ -585,7 +589,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$urlAgent = '';
}
} else {
$urlAgent = 'window.location.assign(\'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$agent['id_agente'].'\')';
$urlAgent = 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$agent['id_agente'];
}
$cellName = $agent['alias'];
@ -713,7 +717,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
ui_toggle(
$eventsGraph,
'<span class="subsection_header_title">'.__('Events (24h)').'</span>',
'<span class="subsection_header_title secondary">'.__('Events (24h)').'</span>',
'',
'',
false,
@ -733,7 +737,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$access_graph .= '</div>';
ui_toggle(
$access_graph,
'<span class="subsection_header_title">'.__('Agent access rate (24h)').'</span>',
'<span class="subsection_header_title secondary">'.__('Agent access rate (24h)').'</span>',
'',
'',
true,
@ -812,7 +816,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$table_interfaces = html_print_table($table, true);
$table_interfaces .= '<br>';
ui_toggle($table_interfaces, __('Interface information').' (SNMP)');
ui_toggle($table_interfaces, '<span class="subsection_header_title secondary">'.__('Interface information').' (SNMP)</span>');
}
// Advanced data.
@ -906,7 +910,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
// End of table advanced.
ui_toggle(
html_print_table($table_advanced, true),
'<span class="subsection_header_title">'.__('Advanced information').'</span>',
'<span class="subsection_header_title secondary">'.__('Advanced information').'</span>',
'',
'',
true,

View File

@ -48,7 +48,7 @@ a#qr_code_agent_view {
.sg_source,
.sg_target {
width: 100%;
height: 110px;
/*height: 110px;*/
}
.sg_source select,

View File

@ -5939,6 +5939,9 @@ div#bullets_modules div {
}
/* First row in agent view */
.agent_details_first_row.agent_details_line {
margin: 0;
}
.agent_details_line {
display: flex;
margin: 20px 0 0;
@ -6140,7 +6143,7 @@ div#status_pie {
}
.white_table_graph_fixed {
margin: 0 20px 20px;
margin: 0 0 20px;
}
.white_table_graph_fixed table {
@ -11029,6 +11032,7 @@ table.table_modal_alternate
.tags_available_container {
display: flex;
align-items: center;
}
.tags_selected_container .select2-selection--multiple {
@ -11041,7 +11045,8 @@ table.table_modal_alternate
.selection
span.select2-selection--multiple
ul.select2-selection__rendered {
padding: 5px 0 !important;
padding: 5px 0 0 0 !important;
float: left;
}
.result_info_text {
@ -11098,6 +11103,13 @@ table.table_modal_alternate
span.subsection_header_title {
height: 18px;
}
.subsection_header_title.secondary {
font-size: 14px;
}
span.subsection_header_title.secondary {
height: 14px;
}
.regular_font {
font-family: "lato" !important;
}

View File

@ -522,7 +522,7 @@ if ($agent_view_page === true) {
true,
'box-flat agent_details_col',
'white-box-content',
'mrgn_lft_20px mrgn_right_20px width_available'
'width_available'
),
],
);

View File

@ -160,7 +160,7 @@ $table_status->cellspacing = 0;
$table_status->cellpadding = 0;
$table_status->class = 'floating_form';
$table_status->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end;';
$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px;';
$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter';
$agentStatusGraph = html_print_div(
[
@ -382,7 +382,7 @@ $table_contact->cellspacing = 0;
$table_contact->cellpadding = 0;
$table_contact->class = 'floating_form';
$table_contact->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end;';
$table_contact->style[1] = 'height: 32px; width: 70%; padding-left: 5px;';
$table_contact->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter';
$agentContactCaption = html_print_div(
[
@ -705,7 +705,7 @@ if ((bool) $config['agentaccess'] === true && $access_agent > 0) {
$agentAccessRate = html_print_div(
[
'class' => 'box-flat agent_details_col mrgn_right_20px',
'class' => 'box-flat agent_details_col mrgn_lft_20px',
'id' => 'table_access_rate',
'content' => $agentAccessRateHeader.$agentAccessRateContent,
],
@ -991,7 +991,7 @@ $agent_contact .= html_print_table($table_contact, true);
$agentDetails = html_print_div(
[
'class' => 'box-flat agent_details_col mrgn_lft_20px mrgn_right_20px',
'class' => 'box-flat agent_details_col',
'content' => $table_agent,
],
true
@ -999,7 +999,7 @@ $agentDetails = html_print_div(
$agentContact = html_print_div(
[
'class' => 'box-flat agent_details_col mrgn_right_20px',
'class' => 'box-flat agent_details_col mrgn_lft_20px',
'content' => $agent_contact,
],
true
@ -1032,7 +1032,7 @@ $agentEventsGraph = html_print_div(
$agentEvents = html_print_div(
[
'class' => 'box-flat agent_details_col mrgn_lft_20px mrgn_right_20px',
'class' => 'box-flat agent_details_col',
'content' => $agentEventsHeader.$agentEventsGraph,
],
true
@ -1052,8 +1052,8 @@ if (isset($data_opcional) === false || isset($data_opcional->data) === false ||
false,
true,
'box-flat agent_details_col agent_details_toggle agent_details_first_row w100p',
'mrgn_lft_20px mrgn_right_20px',
'mrgn_lft_20px mrgn_right_20px w100p'
'mrgn_right_20px',
'w100p'
);
}

View File

@ -203,7 +203,7 @@ html_print_div(
true,
'box-flat agent_details_col',
'white-box-content',
'mrgn_lft_20px mrgn_right_20px width_available'
'width_available'
),
],
);

View File

@ -34,7 +34,7 @@ html_print_div(
true,
'box-flat agent_details_col',
'white-box-content',
'mrgn_lft_20px mrgn_right_20px width_available'
'width_available'
),
],
);