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:
Jose Gonzalez 2023-02-23 14:31:59 +01:00
commit f08fc6a8b7
13 changed files with 233 additions and 37 deletions

View File

@ -383,12 +383,11 @@ class SnmpConsole extends HTML
5 => __('Other'),
];
$this->tableId = 'snmp_console';
$tableId = 'snmp_console';
// Load datatables user interface.
ui_print_datatable(
[
'id' => $this->tableId,
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'columns' => $columns,
@ -490,16 +489,25 @@ class SnmpConsole extends HTML
echo $e->getMessage();
}
echo '<div class="w98p right">';
html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"');
echo '&nbsp;';
html_print_submit_button(
$buttons[] = html_print_submit_button(
__('Validate'),
'updatebt',
false,
'class="sub ok"',
true
);
$buttons[] = html_print_submit_button(
__('Delete'),
'deletebt',
false,
'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"'
'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"',
true
);
html_print_action_buttons(
implode('', $buttons),
['type' => 'form_action']
);
echo '</div>';
echo '<div class="snmp_view_div">';
echo '<h3>'.__('Status').'</h3>';

View File

@ -1124,6 +1124,10 @@ function config_update_config()
$error_update[] = __('Background opacity % (login)');
}
if (config_update_value('meta_background_opacity', (string) get_parameter('meta_background_opacity'), true) === false) {
$error_update[] = __('Background opacity % (login)');
}
if (config_update_value('meta_custom_logo_white_bg', (string) get_parameter('meta_custom_logo_white_bg'), true) === false) {
$error_update[] = __('Custom logo metaconsole (white background)');
}
@ -1236,6 +1240,10 @@ function config_update_config()
$error_update[] = __('Random background');
}
if (config_update_value('meta_random_background', get_parameter('meta_random_background'), true) === false) {
$error_update[] = __('Random background');
}
if (config_update_value('disable_help', get_parameter('disable_help'), true) === false) {
$error_update[] = __('Disable help');
}
@ -2518,6 +2526,10 @@ function config_process_config()
config_update_value('background_opacity', 30);
}
if (!isset($config['meta_background_opacity'])) {
config_update_value('meta_background_opacity', 30);
}
if (!isset($config['meta_custom_docs_url'])) {
config_update_value('meta_custom_docs_url', 'https://pandorafms.com/manual/');
}
@ -2535,7 +2547,7 @@ function config_process_config()
}
if (!isset($config['meta_custom_splash_login'])) {
config_update_value('meta_custom_splash_login', 'splash_image_metaconsola.png');
config_update_value('meta_custom_splash_login', 'default');
}
if (!isset($config['meta_custom_title1_login'])) {
@ -3375,6 +3387,10 @@ function config_process_config()
config_update_value('random_background', '');
}
if (!isset($config['meta_random_background'])) {
config_update_value('meta_random_background', '');
}
if (!isset($config['networkmap_max_width'])) {
config_update_value('networkmap_max_width', 900);
}

View File

@ -6735,4 +6735,35 @@ function html_print_menu_button(array $options, bool $return=false)
],
$return
);
}
function html_print_label_input_block(
?string $label,
$calbackFn,
?array $options=[]
):string {
$div_class = '';
$label_class = '';
if (empty($options) === false) {
if (isset($options['div_class']) === true) {
$div_class = $options['div_class'];
}
if (isset($options['label_class']) === true) {
$label_class = $options['label_class'];
}
}
$output = '<div class="'.$div_class.'">';
if ($label !== null) {
$output .= '<label class="'.$label_class.'">'.$label.'</label>';
}
$output .= $calbackFn;
$output .= '</div>';
return $output;
}

View File

@ -6612,6 +6612,10 @@ function ui_get_docs_logo()
// Default logo to open version (enterprise_installed function only works in login status).
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_docs_logo'])) {
if (is_metaconsole() === true) {
return '../../images/icono_docs.png';
}
return 'images/icono_docs.png';
}
@ -6634,6 +6638,10 @@ function ui_get_support_logo()
// Default logo to open version (enterprise_installed function only works in login status).
if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_support_logo'])) {
if (is_metaconsole() === true) {
return '../../images/icono_support.png';
}
return 'images/icono_support.png';
}

View File

@ -257,6 +257,7 @@ function initialiceLayout(data) {
"<h3 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h3>",
cancel: "Cancel",
ok: "Ok",
size: 400,
onAccept: function() {
// Continue execution.
var nodo = event.target.offsetParent;

View File

@ -620,6 +620,7 @@ form.modal-dashboard
.select2-selection--multiple
.select2-selection__choice {
margin: 0px;
height: 100% !important;
}
.container-tabs {

View File

@ -2,6 +2,12 @@
* Discovery css global
*/
*,
::after,
::before {
box-sizing: unset !important;
}
ul.bigbuttonlist {
min-height: 200px;
}

View File

@ -10622,7 +10622,7 @@ tr.bring_next_field {
}
.select2-container .select2-selection--multiple {
height: 38px !important;
height: 100% !important;
padding-left: 0px !important;
}
@ -10918,6 +10918,11 @@ pre.external_tools_output {
margin: -25px -25px 25px -25px;
}
.white_table_graph.fixed_filter_bar {
border-radius: 0;
top: 110px;
}
/*
.fixed_filter_bar tr {
display: flex;
@ -10938,10 +10943,7 @@ pre.external_tools_output {
font-size: 10pt;
}
.fixed_filter_bar input,
.filter_table input,
.fixed_filter_bar .select2-container .select2-selection--single,
.filter_table .select2-container .select2-selection--single,
.table_modal_alternate input,
table.table_modal_alternate
span.select2

View File

@ -520,3 +520,44 @@ a.pandora_pagination.current:hover {
.datatable_form {
margin: 0 1em;
}
/*
table.filter-table-adv {
max-width: 1024px;
}
*/
table.filter-table-adv td {
vertical-align: top;
}
table.filter-table-adv td > div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: normal;
}
table.filter-table-adv td > div label {
color: #161628;
font-size: 13px;
line-height: 16px;
text-align: left;
margin-bottom: 10px;
}
table.filter-table-adv td > div.add-input-reverse {
flex-direction: row-reverse;
justify-content: flex-end;
align-items: center;
margin-top: 5px;
}
table.filter-table-adv td > div .label-thin {
color: #3f3f3f;
font-weight: 400;
}
/*
padding-right: calc(100% - 1024px);
*/

View File

@ -231,49 +231,117 @@ $searchForm = '';
$searchForm .= '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente&group_id='.$group_id.'">';
$table = new stdClass();
$table->style[0] = 'width: 15%';
$table->style[2] = 'width: 15%';
$table->class[0] = 'databox filters bolder';
$table->width = '100%';
$table->size = [];
$table->size[0] = '33%';
$table->size[1] = '33%';
$table->size[2] = '33%';
$table->class = 'filter-table-adv';
$table->data['group'][0] = __('Group');
$table->data['group'][1] = html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', true, false, true, '', false);
$table->data['group'][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
$access,
true,
'group_id',
$group_id,
'this.form.submit()',
'',
'',
true,
false,
true,
'',
false
)
);
$table->data['group'][2] = __('Recursion');
$table->data['group'][3] = html_print_checkbox_switch('recursion', 1, $recursion, true);
$table->data['group'][0] .= html_print_label_input_block(
__('Recursion'),
html_print_checkbox_switch(
'recursion',
1,
$recursion,
true
),
[
'div_class' => 'add-input-reverse',
'label_class' => 'label-thin',
]
);
$table->data['status'][0] = __('Status');
$table->data['status'][1] = html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, true, false, true, '', false, 'width: 90px;');
$table->data['group'][1] = html_print_label_input_block(
__('Status'),
html_print_select(
$fields,
'status',
$status,
'this.form.submit()',
__('All'),
AGENT_STATUS_ALL,
true,
false,
true,
'',
false,
'width: 100%'
)
);
$table->data['search_fields'][0] = __('Search');
$table->data['search_fields'][1] = html_print_input_text('search', $search, '', 35, 255, true);
$table->data['search_fields'][0] = html_print_label_input_block(
__('Search'),
html_print_input_text(
'search',
$search,
'',
35,
255,
true
)
);
$table->data['search_fields'][1] = html_print_label_input_block(
__('Search in custom fields'),
html_print_input_text(
'search_custom',
$search_custom,
'',
35,
255,
true
)
);
$table->data['search_fields'][2] = __('Search in custom fields');
$table->data['search_fields'][3] = html_print_input_text('search_custom', $search_custom, '', 35, 255, true);
// $table->colspan['search_fields'][3] = '2';
$searchForm .= html_print_table($table, true);
$searchForm .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Search'),
__('Filter'),
'srcbutton',
false,
[
'icon' => 'search',
'mode' => 'secondary mini',
'mode' => 'mini',
],
true
),
],
true
);
$searchForm .= '</form>';
ui_toggle(
$searchForm,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form'
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
if (empty($search) === false) {
@ -708,7 +776,6 @@ $tableAgents = new stdClass();
$tableAgents->cellpadding = 0;
$tableAgents->cellspacing = 0;
$tableAgents->id = 'agent_list';
$tableAgents->styleTable = 'margin: 0 10px';
$tableAgents->class = 'info_table tactical_table';
$tableAgents->head = [];

View File

@ -172,7 +172,12 @@ function print_filters($sec)
$filters,
__('Interface filter'),
__('Interface filter'),
'ui_toggle_if_filter'
'ui_toggle_if_filter',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
unset($table);

View File

@ -983,7 +983,17 @@ $tableFilter->data[4][2] = html_print_submit_button(
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
$filters .= html_print_table($tableFilter, true);
$filters .= '</form>';
ui_toggle($filters, '<span class="subsection_header_title">'.__('Filters').'</span>');
ui_toggle(
$filters,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
unset($table);
// End Build Search Form.

View File

@ -301,9 +301,9 @@ if (is_metaconsole() === true) {
false,
true,
false,
'box-flat agent_details_col',
'',
'white-box-content',
'mrgn_lft_20px mrgn_right_20px width_available'
'box-flat white_table_graph fixed_filter_bar'
);
}