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;
}
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>';

View File

@ -343,26 +343,35 @@ function mainModuleGroups()
if ($info && $array_module_group) {
$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%';
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$background_color = '#333';
} else {
$background_color = '#fff';
}
$head[0] = __('Groups');
$headstyle[0] = 'width: 20%; font-weight: bolder;';
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;';
$head[] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, true, true, true, '&hellip;', 'color:#FFF');
$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;'
);
}
$i = 0;
foreach ($array_for_defect as $key => $value) {
$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;
if (isset($array_data[$key])) {
foreach ($value['gm'] as $k => $v) {

View File

@ -1802,56 +1802,54 @@ if (check_login()) {
$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=">';
$table = new StdClass;
$table->id = 'load_filter_form';
$table->width = '100%';
$table->cellspacing = 4;
$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';
}
$table->class = 'filter-table-adv';
$data = [];
$table->rowid[3] = 'update_filter_row1';
$data[0] = __('Load filter').$jump;
$data[0] .= html_print_select(
$filters,
'filter_id',
$current,
'',
__('None'),
0,
true,
false,
true,
'',
false,
'margin-left:5px; width:'.$filter_id_width.';'
);
$data[1] = html_print_submit_button(
$data[0] = html_print_label_input_block(
__('Load filter'),
'load_filter',
false,
'class="sub upd"',
true
html_print_select(
$filters,
'filter_id',
$current,
'',
__('None'),
0,
true,
false,
true,
'',
false
)
);
$data[1] .= html_print_input_hidden('load_filter', 1, true);
$table->data[] = $data;
$table->rowclass[] = '';
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 '</div>';
?>
@ -1877,55 +1875,49 @@ if (check_login()) {
}
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')) {
echo '<div id="#info_box"></div>';
$table = new StdClass;
$table->id = 'save_filter_form';
$table->width = '100%';
$table->cellspacing = 4;
$table->cellpadding = 4;
$table->class = 'databox';
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%;';
}
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->class = 'filter-table-adv';
$data = [];
$table->rowid[0] = 'update_save_selector';
$data[0] = html_print_radio_button(
'filter_mode',
'new',
'',
true,
true
).__('New filter').'';
$data[0][0] = html_print_label_input_block(
__('New filter'),
html_print_radio_button(
'filter_mode',
'new',
'',
true,
true
)
);
$data[1] = html_print_radio_button(
'filter_mode',
'update',
'',
false,
true
).__('Update filter').'';
$data[0][1] = html_print_label_input_block(
__('Update filter'),
html_print_radio_button(
'filter_mode',
'update',
'',
false,
true
)
);
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$table->rowid[1] = 'save_filter_row1';
$data[0] = __('Filter name').$jump;
$data[0] .= html_print_input_text('id_name', '', '', 15, 255, true);
if (is_metaconsole()) {
$data[1] = __('Save in Group').$jump;
} else {
$data[1] = __('Filter group').$jump;
$data[1][0] = html_print_label_input_block(
__('Filter name'),
html_print_input_text('id_name', '', '', 15, 255, true)
);
$labelInput = __('Filter group');
if (is_metaconsole() === true) {
$labelInput = __('Save in Group');
}
$user_groups_array = users_get_groups_for_select(
@ -1935,32 +1927,22 @@ if (check_login()) {
true
);
$data[1] .= html_print_select(
$user_groups_array,
'id_group_filter_dialog',
$id_group_filter,
'',
'',
0,
true,
false,
false,
'w130'
$data[1][1] = html_print_label_input_block(
$labelInput,
html_print_select(
$user_groups_array,
'id_group_filter_dialog',
$id_group_filter,
'',
'',
0,
true,
false,
false
)
);
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$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';
$monitor_filters = db_get_all_rows_sql($sql);
@ -1972,36 +1954,60 @@ if (check_login()) {
}
}
$data[0] .= html_print_select(
$_filters_update,
'overwrite_filter',
'',
'',
'',
0,
true
);
$data[1] = html_print_submit_button(
__('Update filter'),
'update_filter',
false,
'class="sub upd" onclick="save_update_filter();"',
true
$data[2][0] = html_print_label_input_block(
__('Overwrite filter'),
html_print_select(
$_filters_update,
'overwrite_filter',
'',
'',
'',
0,
true
)
);
$table->data[] = $data;
$table->rowclass[] = '';
$table->data = $data;
html_print_table($table);
echo '<div>';
echo html_print_submit_button(
__('Save filter'),
'save_filter',
false,
'class="sub upd float-right" onclick="save_new_filter();"',
true
);
echo '</div>';
html_print_div(
[
'id' => 'submit-save_filter',
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Save filter'),
'srcbutton',
false,
[
'icon' => 'search',
'mode' => 'mini',
'onclick' => 'save_new_filter();',
],
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
);
} else {
include 'general/noaccess.php';
}
@ -2010,21 +2016,18 @@ if (check_login()) {
?>
<script type="text/javascript">
function show_save_filter() {
$('#save_filter_row1').show();
$('#save_filter_row2').show();
$('#update_filter_row1').hide();
$('#save_filter_row2').hide();
$('#update_filter_row').hide();
// Filter save mode selector
$("[name='filter_mode']").click(function() {
if ($(this).val() == 'new') {
$('#save_filter_row1').show();
$('#save_filter_row2').show();
$('#save_filter_row2').hide();
$('#submit-save_filter').show();
$('#update_filter_row1').hide();
$('#update_filter_row').hide();
}
else {
$('#save_filter_row1').hide();
$('#save_filter_row2').hide();
$('#update_filter_row1').show();
$('#save_filter_row2').show();
$('#update_filter_row').show();
$('#submit-save_filter').hide();
}
});
@ -2032,7 +2035,9 @@ if (check_login()) {
resizable: true,
draggable: true,
modal: false,
closeOnEscape: true
closeOnEscape: true,
width: 450,
height: 350
});
}

View File

@ -781,27 +781,28 @@ class AgentsAlerts extends HTML
],
];
if ($this->pure == 0) {
/*
if ($this->pure == 0) {
$screenSwitchTitle = __('Full screen mode');
$screenSwitchClass = 'pure_full';
$screenSwitchPure = 1;
$refreshVisibility = false;
} else {
} else {
$screenSwitchTitle = __('Back to normal mode');
$screenSwitchClass = 'pure_normal';
$screenSwitchPure = 0;
$refreshVisibility = true;
}
}
$refreshComboRates = [
$refreshComboRates = [
'30' => __('30 seconds'),
(string) SECONDS_1MINUTE => __('1 minute'),
(string) SECONDS_2MINUTES => __('2 minutes'),
(string) SECONDS_5MINUTES => __('5 minutes'),
(string) SECONDS_10MINUTES => __('10 minutes'),
];
];
$headerInputs[] = [
$headerInputs[] = [
'id' => 'pure',
'arguments' => [
'name' => 'pure',
@ -809,9 +810,9 @@ class AgentsAlerts extends HTML
'value' => $this->pure,
'return' => true,
],
];
];
$headerInputs[] = [
$headerInputs[] = [
'label' => __('Full screen'),
'id' => 'img-full-screen',
'surround_start' => '<div id="full_screen_refresh_box">',
@ -823,9 +824,9 @@ class AgentsAlerts extends HTML
'name' => 'pure',
'attributes' => 'class="full_screen_button '.$screenSwitchClass.'" title="'.$screenSwitchTitle.'"',
],
];
];
$headerInputs[] = [
$headerInputs[] = [
'label' => __('Refresh'),
'id' => 'slc-refresh-rate',
'class' => ($refreshVisibility === true) ? '' : 'invisible',
@ -840,7 +841,9 @@ class AgentsAlerts extends HTML
'script' => 'this.form.submit()',
'sort' => false,
],
];
];
*/
$filterForm = $this->printForm(
[

View File

@ -162,6 +162,7 @@ class AuditLog extends HTML
'id' => 'load-filter',
'class' => 'float-left margin-right-2 margin-left-2 sub config',
'text' => __('Load filter'),
'icon' => 'load',
'onclick' => '',
];
@ -169,6 +170,7 @@ class AuditLog extends HTML
'id' => 'save-filter',
'class' => 'float-left margin-right-2 sub wand',
'text' => __('Save filter'),
'icon' => 'save',
'onclick' => '',
];
@ -181,7 +183,7 @@ class AuditLog extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'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),
'type' => 'text',
'class' => 'w200px',
'class' => 'w100p',
'id' => 'filter_text',
'name' => 'filter_text',
],
[
'label' => __('Max. hours old'),
'type' => 'text',
'class' => 'w100px',
'class' => 'w100p',
'id' => 'filter_period',
'name' => 'filter_period',
],
[
'label' => __('IP'),
'type' => 'text',
'class' => 'w100px',
'class' => 'w100p',
'id' => '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) {
@ -254,6 +257,8 @@ class AuditLog extends HTML
// Load own javascript file.
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 .= '<li>';
$filter .= '</ul>';
// Extra buttons.
$extra_buttons = '';
if (isset($parameters['form']['extra_buttons']) === true
@ -3616,9 +3615,7 @@ function ui_print_datatable(array $parameters)
true
);
$filter .= '</li>';
$filter .= '</ul><div id="both"></div></form>';
$filter .= '<div id="both"></div></form>';
if (isset($parameters['form']['no_toggle']) === false) {
$filter = ui_toggle(
$filter,

View File

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

View File

@ -1,5 +1,5 @@
.white-box-content {
padding: 0px;
padding: 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);
}
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">';
echo '<table width="100%" class="info_table">';
echo '<tr>';
echo "<th colspan=2 class='center'>".__('Summary of the status groups').'</th>';
echo '</tr>';
@ -223,11 +223,11 @@ if (empty($result_groups) === false) {
[ '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 '<th colspan=2 ></th>';
echo "<th colspan=6 class='difference center'>".__('Agents').'</th>';
echo "<th colspan=6 class='center'>".__('Modules').'</th>';
echo '<th colspan=6>'.__('Agents').'</th>';
echo '<th colspan=6>'.__('Modules').'</th>';
echo '</tr>';
echo '<tr>';

View File

@ -2168,25 +2168,30 @@ if (empty($result) === false) {
}
if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) {
if (defined('METACONSOLE')) {
$url_edit_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&';
$url_edit_module .= 'loginhash=auto&id_agente='.$row['id_agent'];
$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']);
$url_edit_module = $row['server_url'];
$url_edit_module .= 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&';
$url_edit_module .= '&id_agente='.$row['id_agent'];
$url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1';
if (is_metaconsole() === true) {
$url_edit_module .= '&loginhash=auto';
$url_edit_module .= '&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']);
}
$table->cellclass[][2] = 'action_buttons';
$data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image(
'images/config.png',
true,
[
'alt' => '0',
'border' => '',
'title' => __('Edit'),
]
).'</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'];
$table->cellclass[][2] = 'action_buttons';
$data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image(
'images/config.png',
true,
[
'alt' => '0',
'border' => '',
'title' => __('Edit'),
]
).'</a>';
$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(
'images/delete.png',