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:
Jonathan 2023-02-27 16:34:02 +01:00
commit 1d930dccc7
10 changed files with 214 additions and 189 deletions

View File

@ -834,7 +834,7 @@ function mainAgentsModules()
return; return;
} }
echo '<table cellpadding="4" cellspacing="4" border="0" class="agents_modules_table w100p mrgn_btn_20px">'; echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px">';
echo '<tr>'; echo '<tr>';

View File

@ -343,26 +343,35 @@ function mainModuleGroups()
if ($info && $array_module_group) { if ($info && $array_module_group) {
$table = new StdClass(); $table = new StdClass();
$table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;'; $table->class = 'info_table';
$table->style[0] = 'font-weight: bolder; min-width: 230px;';
$table->width = '100%'; $table->width = '100%';
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$background_color = '#333';
} else {
$background_color = '#fff';
}
$head[0] = __('Groups'); $head[0] = __('Groups');
$headstyle[0] = 'width: 20%; font-weight: bolder;'; $headstyle[0] = 'width: 20%; font-weight: bolder;';
foreach ($array_module_group as $key => $value) { foreach ($array_module_group as $key => $value) {
$headstyle[] = 'min-width: 60px;max-width: 5%;text-align:center; color: #ffffff; background-color: #373737; font-weight: bolder;'; $headstyle[] = 'min-width: 60px;max-width: 5%;text-align:center; font-weight: bolder;';
$head[] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF'); $head[] = ui_print_truncate_text(
$value,
GENERIC_SIZE_TEXT,
true,
true,
true,
'&hellip;'
);
} }
$i = 0; $i = 0;
foreach ($array_for_defect as $key => $value) { foreach ($array_for_defect as $key => $value) {
$deep = groups_get_group_deep($key); $deep = groups_get_group_deep($key);
$data[$i][0] = $deep.ui_print_truncate_text($value['data']['name'], GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF'); $data[$i][0] = $deep.ui_print_truncate_text(
$value['data']['name'],
GENERIC_SIZE_TEXT,
true,
true,
true,
'&hellip;'
);
$j = 1; $j = 1;
if (isset($array_data[$key])) { if (isset($array_data[$key])) {
foreach ($value['gm'] as $k => $v) { foreach ($value['gm'] as $k => $v) {

View File

@ -1802,31 +1802,19 @@ if (check_login()) {
$filters[$event_filter['id_filter']] = $event_filter['id_name']; $filters[$event_filter['id_filter']] = $event_filter['id_name'];
} }
echo '<div id="load-filter-select" class="load-filter-modal">'; echo '<div id="load-filter-select" class="load-filter-modal" title="'.__('Load').'">';
echo '<form method="post" id="form_load_filter" action="index.php?sec=view&sec2=operation/agentes/status_monitor&pure=">'; echo '<form method="post" id="form_load_filter" action="index.php?sec=view&sec2=operation/agentes/status_monitor&pure=">';
$table = new StdClass; $table = new StdClass;
$table->id = 'load_filter_form'; $table->id = 'load_filter_form';
$table->width = '100%'; $table->width = '100%';
$table->cellspacing = 4; $table->class = 'filter-table-adv';
$table->cellpadding = 4;
$table->class = 'databox';
if (is_metaconsole()) {
$table->cellspacing = 0;
$table->cellpadding = 0;
$table->class = 'databox filters';
}
$table->styleTable = 'font-weight: bold; color: #555; text-align:left;';
$filter_id_width = '200px';
if (is_metaconsole()) {
$filter_id_width = '150px';
}
$data = []; $data = [];
$table->rowid[3] = 'update_filter_row1'; $table->rowid[3] = 'update_filter_row1';
$data[0] = __('Load filter').$jump; $data[0] = html_print_label_input_block(
$data[0] .= html_print_select( __('Load filter'),
html_print_select(
$filters, $filters,
'filter_id', 'filter_id',
$current, $current,
@ -1837,21 +1825,31 @@ if (check_login()) {
false, false,
true, true,
'', '',
false, false
'margin-left:5px; width:'.$filter_id_width.';' )
); );
$data[1] = html_print_submit_button(
__('Load filter'),
'load_filter',
false,
'class="sub upd"',
true
);
$data[1] .= html_print_input_hidden('load_filter', 1, true);
$table->data[] = $data; $table->data[] = $data;
$table->rowclass[] = ''; $table->rowclass[] = '';
html_print_table($table); html_print_table($table);
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Load filter'),
'srcbutton',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
),
],
false
);
echo html_print_input_hidden('load_filter', 1, true);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
?> ?>
@ -1877,55 +1875,49 @@ if (check_login()) {
} }
if ($save_filter_modal) { if ($save_filter_modal) {
echo '<div id="save-filter-select">'; echo '<div id="save-filter-select" title="'.__('Save').'">';
if (check_acl($config['id_user'], 0, 'AW')) { if (check_acl($config['id_user'], 0, 'AW')) {
echo '<div id="#info_box"></div>'; echo '<div id="#info_box"></div>';
$table = new StdClass; $table = new StdClass;
$table->id = 'save_filter_form'; $table->id = 'save_filter_form';
$table->width = '100%'; $table->size = [];
$table->cellspacing = 4; $table->size[0] = '50%';
$table->cellpadding = 4; $table->size[1] = '50%';
$table->class = 'databox'; $table->class = 'filter-table-adv';
if (is_metaconsole()) {
$table->class = 'databox filters';
$table->cellspacing = 0;
$table->cellpadding = 0;
}
$table->styleTable = 'font-weight: bold; text-align:left;';
if (!is_metaconsole()) {
$table->style[0] = 'width: 50%; width:50%;';
}
$data = []; $data = [];
$table->rowid[0] = 'update_save_selector'; $table->rowid[0] = 'update_save_selector';
$data[0] = html_print_radio_button( $data[0][0] = html_print_label_input_block(
__('New filter'),
html_print_radio_button(
'filter_mode', 'filter_mode',
'new', 'new',
'', '',
true, true,
true true
).__('New filter').''; )
);
$data[1] = html_print_radio_button( $data[0][1] = html_print_label_input_block(
__('Update filter'),
html_print_radio_button(
'filter_mode', 'filter_mode',
'update', 'update',
'', '',
false, false,
true true
).__('Update filter').''; )
);
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$table->rowid[1] = 'save_filter_row1'; $table->rowid[1] = 'save_filter_row1';
$data[0] = __('Filter name').$jump; $data[1][0] = html_print_label_input_block(
$data[0] .= html_print_input_text('id_name', '', '', 15, 255, true); __('Filter name'),
if (is_metaconsole()) { html_print_input_text('id_name', '', '', 15, 255, true)
$data[1] = __('Save in Group').$jump; );
} else {
$data[1] = __('Filter group').$jump; $labelInput = __('Filter group');
if (is_metaconsole() === true) {
$labelInput = __('Save in Group');
} }
$user_groups_array = users_get_groups_for_select( $user_groups_array = users_get_groups_for_select(
@ -1935,7 +1927,9 @@ if (check_login()) {
true true
); );
$data[1] .= html_print_select( $data[1][1] = html_print_label_input_block(
$labelInput,
html_print_select(
$user_groups_array, $user_groups_array,
'id_group_filter_dialog', 'id_group_filter_dialog',
$id_group_filter, $id_group_filter,
@ -1944,23 +1938,11 @@ if (check_login()) {
0, 0,
true, true,
false, false,
false, false
'w130' )
); );
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$table->rowid[2] = 'save_filter_row2'; $table->rowid[2] = 'save_filter_row2';
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$table->rowid[3] = 'update_filter_row1';
$data[0] = __('Overwrite filter').$jump;
$sql = 'SELECT id_filter, id_name FROM tmonitor_filter'; $sql = 'SELECT id_filter, id_name FROM tmonitor_filter';
$monitor_filters = db_get_all_rows_sql($sql); $monitor_filters = db_get_all_rows_sql($sql);
@ -1972,7 +1954,9 @@ if (check_login()) {
} }
} }
$data[0] .= html_print_select( $data[2][0] = html_print_label_input_block(
__('Overwrite filter'),
html_print_select(
$_filters_update, $_filters_update,
'overwrite_filter', 'overwrite_filter',
'', '',
@ -1980,28 +1964,50 @@ if (check_login()) {
'', '',
0, 0,
true true
); )
$data[1] = html_print_submit_button(
__('Update filter'),
'update_filter',
false,
'class="sub upd" onclick="save_update_filter();"',
true
); );
$table->data[] = $data; $table->data = $data;
$table->rowclass[] = '';
html_print_table($table); html_print_table($table);
echo '<div>';
echo html_print_submit_button( html_print_div(
[
'id' => 'submit-save_filter',
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Save filter'), __('Save filter'),
'save_filter', 'srcbutton',
false, false,
'class="sub upd float-right" onclick="save_new_filter();"', [
'icon' => 'search',
'mode' => 'mini',
'onclick' => 'save_new_filter();',
],
true true
),
],
false
);
html_print_div(
[
'id' => 'update_filter_row',
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Update filter'),
'srcbutton',
false,
[
'icon' => 'search',
'mode' => 'mini',
'onclick' => 'save_update_filter();',
],
true
),
],
false
); );
echo '</div>';
} else { } else {
include 'general/noaccess.php'; include 'general/noaccess.php';
} }
@ -2010,21 +2016,18 @@ if (check_login()) {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
function show_save_filter() { function show_save_filter() {
$('#save_filter_row1').show(); $('#save_filter_row2').hide();
$('#save_filter_row2').show(); $('#update_filter_row').hide();
$('#update_filter_row1').hide();
// Filter save mode selector // Filter save mode selector
$("[name='filter_mode']").click(function() { $("[name='filter_mode']").click(function() {
if ($(this).val() == 'new') { if ($(this).val() == 'new') {
$('#save_filter_row1').show(); $('#save_filter_row2').hide();
$('#save_filter_row2').show();
$('#submit-save_filter').show(); $('#submit-save_filter').show();
$('#update_filter_row1').hide(); $('#update_filter_row').hide();
} }
else { else {
$('#save_filter_row1').hide(); $('#save_filter_row2').show();
$('#save_filter_row2').hide(); $('#update_filter_row').show();
$('#update_filter_row1').show();
$('#submit-save_filter').hide(); $('#submit-save_filter').hide();
} }
}); });
@ -2032,7 +2035,9 @@ if (check_login()) {
resizable: true, resizable: true,
draggable: true, draggable: true,
modal: false, modal: false,
closeOnEscape: true closeOnEscape: true,
width: 450,
height: 350
}); });
} }

View File

@ -781,6 +781,7 @@ class AgentsAlerts extends HTML
], ],
]; ];
/*
if ($this->pure == 0) { if ($this->pure == 0) {
$screenSwitchTitle = __('Full screen mode'); $screenSwitchTitle = __('Full screen mode');
$screenSwitchClass = 'pure_full'; $screenSwitchClass = 'pure_full';
@ -842,6 +843,8 @@ class AgentsAlerts extends HTML
], ],
]; ];
*/
$filterForm = $this->printForm( $filterForm = $this->printForm(
[ [
'form' => $headerForm, 'form' => $headerForm,

View File

@ -162,6 +162,7 @@ class AuditLog extends HTML
'id' => 'load-filter', 'id' => 'load-filter',
'class' => 'float-left margin-right-2 margin-left-2 sub config', 'class' => 'float-left margin-right-2 margin-left-2 sub config',
'text' => __('Load filter'), 'text' => __('Load filter'),
'icon' => 'load',
'onclick' => '', 'onclick' => '',
]; ];
@ -169,6 +170,7 @@ class AuditLog extends HTML
'id' => 'save-filter', 'id' => 'save-filter',
'class' => 'float-left margin-right-2 sub wand', 'class' => 'float-left margin-right-2 sub wand',
'text' => __('Save filter'), 'text' => __('Save filter'),
'icon' => 'save',
'onclick' => '', 'onclick' => '',
]; ];
@ -181,7 +183,7 @@ class AuditLog extends HTML
[ [
'id' => $this->tableId, 'id' => $this->tableId,
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => $this->ajaxController, 'ajax_url' => $this->ajaxController,
@ -199,21 +201,21 @@ class AuditLog extends HTML
[ [
'label' => __('Free search').ui_print_help_tip(__('Search filter by User, Action, Date, Source IP or Comments fields content'), true), 'label' => __('Free search').ui_print_help_tip(__('Search filter by User, Action, Date, Source IP or Comments fields content'), true),
'type' => 'text', 'type' => 'text',
'class' => 'w200px', 'class' => 'w100p',
'id' => 'filter_text', 'id' => 'filter_text',
'name' => 'filter_text', 'name' => 'filter_text',
], ],
[ [
'label' => __('Max. hours old'), 'label' => __('Max. hours old'),
'type' => 'text', 'type' => 'text',
'class' => 'w100px', 'class' => 'w100p',
'id' => 'filter_period', 'id' => 'filter_period',
'name' => 'filter_period', 'name' => 'filter_period',
], ],
[ [
'label' => __('IP'), 'label' => __('IP'),
'type' => 'text', 'type' => 'text',
'class' => 'w100px', 'class' => 'w100p',
'id' => 'filter_ip', 'id' => 'filter_ip',
'name' => 'filter_ip', 'name' => 'filter_ip',
], ],
@ -241,6 +243,7 @@ class AuditLog extends HTML
], ],
], ],
], ],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
] ]
); );
} catch (Exception $e) { } catch (Exception $e) {
@ -254,6 +257,8 @@ class AuditLog extends HTML
// Load own javascript file. // Load own javascript file.
echo $this->loadJS(); echo $this->loadJS();
html_print_action_buttons([], ['type' => 'form_action']);
} }

View File

@ -3573,8 +3573,7 @@ function ui_print_datatable(array $parameters)
$filter .= html_print_input(($input + ['return' => true]), 'li'); $filter .= html_print_input(($input + ['return' => true]), 'li');
} }
$filter .= '<li>'; $filter .= '</ul>';
// Extra buttons. // Extra buttons.
$extra_buttons = ''; $extra_buttons = '';
if (isset($parameters['form']['extra_buttons']) === true if (isset($parameters['form']['extra_buttons']) === true
@ -3616,9 +3615,7 @@ function ui_print_datatable(array $parameters)
true true
); );
$filter .= '</li>'; $filter .= '<div id="both"></div></form>';
$filter .= '</ul><div id="both"></div></form>';
if (isset($parameters['form']['no_toggle']) === false) { if (isset($parameters['form']['no_toggle']) === false) {
$filter = ui_toggle( $filter = ui_toggle(
$filter, $filter,

View File

@ -561,12 +561,13 @@ table.filter-table-adv td > div .label-thin {
font-weight: 400; font-weight: 400;
} }
table.filter-table-adv td input[type="radio"] {
height: 20px;
}
table.databox.filter-table-adv { table.databox.filter-table-adv {
padding: 10px; padding: 10px;
} }
/*
padding-right: calc(100% - 1024px);
*/
div.filter-datatable-submain { div.filter-datatable-submain {
padding: 10px 25px; padding: 10px 25px;

View File

@ -1,5 +1,5 @@
.white-box-content { .white-box-content {
padding: 0px; padding: 5px;
border-radius: 5px; border-radius: 5px;
} }

View File

@ -175,7 +175,7 @@ if ($total_agentes > 0) {
$total_not_init = format_numeric((($agents_notinit * 100) / $total_agentes), 2); $total_not_init = format_numeric((($agents_notinit * 100) / $total_agentes), 2);
} }
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">'; echo '<table width="100%" class="info_table">';
echo '<tr>'; echo '<tr>';
echo "<th colspan=2 class='center'>".__('Summary of the status groups').'</th>'; echo "<th colspan=2 class='center'>".__('Summary of the status groups').'</th>';
echo '</tr>'; echo '</tr>';
@ -223,11 +223,11 @@ if (empty($result_groups) === false) {
[ 'right_content' => $pagination ] [ 'right_content' => $pagination ]
); );
echo '<table cellpadding="0" cellspacing="0" class="databox data mrgn_top_10px" border="0" width="100%">'; echo '<table class="info_table mrgn_top_10px" border="0" width="100%">';
echo '<tr>'; echo '<tr>';
echo '<th colspan=2 ></th>'; echo '<th colspan=2 ></th>';
echo "<th colspan=6 class='difference center'>".__('Agents').'</th>'; echo '<th colspan=6>'.__('Agents').'</th>';
echo "<th colspan=6 class='center'>".__('Modules').'</th>'; echo '<th colspan=6>'.__('Modules').'</th>';
echo '</tr>'; echo '</tr>';
echo '<tr>'; echo '<tr>';

View File

@ -2168,14 +2168,14 @@ if (empty($result) === false) {
} }
if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) { if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) {
if (defined('METACONSOLE')) { $url_edit_module = $row['server_url'];
$url_edit_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&'; $url_edit_module .= 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&';
$url_edit_module .= 'loginhash=auto&id_agente='.$row['id_agent']; $url_edit_module .= '&id_agente='.$row['id_agent'];
$url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1&'; $url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1';
$url_edit_module .= 'loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']); if (is_metaconsole() === true) {
$url_edit_module .= '&loginhash=auto';
$url_delete_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente'; $url_edit_module .= '&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']);
$url_delete_module .= '&id_agente='.$row['id_agent'].'&delete_module='.$row['id_agente_modulo']; }
$table->cellclass[][2] = 'action_buttons'; $table->cellclass[][2] = 'action_buttons';
$data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image( $data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image(
@ -2187,6 +2187,11 @@ if (empty($result) === false) {
'title' => __('Edit'), 'title' => __('Edit'),
] ]
).'</a>'; ).'</a>';
if (is_metaconsole() === false) {
$url_delete_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente';
$url_delete_module .= '&id_agente='.$row['id_agent'].'&delete_module='.$row['id_agente_modulo'];
$onclick = 'onclick="javascript: if (!confirm(\''.__('Are you sure to delete?').'\')) return false;'; $onclick = 'onclick="javascript: if (!confirm(\''.__('Are you sure to delete?').'\')) return false;';
$data[12] .= '<a href="'.$url_delete_module.'" '.$onclick.'" target="_blank">'.html_print_image( $data[12] .= '<a href="'.$url_delete_module.'" '.$onclick.'" target="_blank">'.html_print_image(
'images/delete.png', 'images/delete.png',