Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round
This commit is contained in:
commit
583ec8209c
|
@ -679,7 +679,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'id' => 'template-details-'.$alert['id_alert_template'],
|
||||
'class' => 'img_help action_button_img invert_filter',
|
||||
'class' => 'img_help main_menu_icon invert_filter',
|
||||
]
|
||||
);
|
||||
$data[2] .= '</a> ';
|
||||
|
@ -757,7 +757,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'title' => __('Delete action'),
|
||||
'class' => 'action_button_img invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
);
|
||||
$data[3] .= html_print_input_hidden('delete_action', 1, true);
|
||||
|
@ -772,7 +772,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'title' => __('Update action'),
|
||||
'class' => 'action_button_img invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')',
|
||||
]
|
||||
);
|
||||
|
|
|
@ -122,24 +122,24 @@ $sec = (is_metaconsole() === true) ? 'advanced' : 'galertas';
|
|||
// case delete_templete action is performed.
|
||||
if (!$delete_template) {
|
||||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
alerts_meta_print_header();
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alert templates'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
'link' => '',
|
||||
'label' => __('Alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alert templates'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if ($update_template) {
|
||||
|
|
|
@ -306,21 +306,37 @@ $onheader['snmp'] = $snmptab;
|
|||
$onheader['satellite'] = $satellitetab;
|
||||
$onheader['services'] = $servicestab;
|
||||
|
||||
|
||||
// Header.
|
||||
if (is_metaconsole() === false) {
|
||||
ui_print_page_header(
|
||||
__('Bulk operations').' » '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
true,
|
||||
$onheader,
|
||||
false,
|
||||
'massivemodal'
|
||||
);
|
||||
} else {
|
||||
massive_meta_print_header();
|
||||
}
|
||||
ui_print_standard_header(
|
||||
__('Bulk operations').' - '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
false,
|
||||
[
|
||||
$agentstab,
|
||||
$modulestab,
|
||||
$pluginstab,
|
||||
$userstab,
|
||||
$alertstab,
|
||||
$policiestab,
|
||||
$snmptab,
|
||||
$satellitetab,
|
||||
$servicestab,
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Configuration'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Bulk operations'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
// Checks if the PHP configuration is correctly.
|
||||
if ((get_cfg_var('max_execution_time') != 0)
|
||||
|
|
|
@ -56,9 +56,13 @@ ui_print_standard_header(
|
|||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Netflow'),
|
||||
'label' => __('Resources'),
|
||||
],
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Netflow filters'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
|
||||
|
|
|
@ -845,9 +845,9 @@ foreach ($defaultAgentWizardOptions as $key => $value) {
|
|||
$i++;
|
||||
}
|
||||
|
||||
echo '<form id="form_setup" method="post">';
|
||||
echo '<form id="form_setup" method="post" class="max_floating_element_size">';
|
||||
|
||||
echo '<fieldset class="full-column">';
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Database maintenance status').' '.ui_print_help_icon('database_maintenance_status_tab', true).'</legend>';
|
||||
html_print_table($table_status);
|
||||
echo '</fieldset>';
|
||||
|
|
|
@ -393,7 +393,7 @@ class SatelliteAgent extends HTML
|
|||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'class' => 'action_button_img mrgn_lft_05em invert_filter',
|
||||
'class' => 'main_menu_icon mrgn_lft_05em invert_filter',
|
||||
'onclick' => 'disable_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $disable.'\',\''.$id_agente.'\')',
|
||||
]
|
||||
);
|
||||
|
@ -405,7 +405,7 @@ class SatelliteAgent extends HTML
|
|||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'class' => 'action_button_img mrgn_lft_05em invert_filter',
|
||||
'class' => 'main_menu_icon mrgn_lft_05em invert_filter',
|
||||
'onclick' => 'delete_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $delete.'\',\''.$id_agente.'\')',
|
||||
]
|
||||
);
|
||||
|
|
|
@ -58,6 +58,16 @@ function menu_print_menu(&$menu)
|
|||
$sec2 = (string) get_parameter('sec2');
|
||||
if ($sec2 === 'operation/agentes/ver_agente') {
|
||||
$sec2 = 'godmode/agentes/configurar_agente';
|
||||
} else if ($sec2 === 'godmode/alerts/configure_alert_template') {
|
||||
$sec2 = 'godmode/alerts/alert_templates';
|
||||
} else if ($sec2 === 'godmode/events/events') {
|
||||
$sec2 = 'godmode/events/events§ion=filter';
|
||||
} else if ($sec2 === 'godmode/alerts/configure_alert_action') {
|
||||
$sec2 = 'godmode/alerts/alert_actions';
|
||||
} else if ($sec2 === 'godmode/alerts/configure_alert_command') {
|
||||
$sec2 = 'godmode/alerts/alert_commands';
|
||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||
} else if ($sec2 === 'godmode/servers/discovery') {
|
||||
$wiz = (string) get_parameter('wiz');
|
||||
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
||||
|
|
|
@ -6002,6 +6002,7 @@ function reporting_get_last_activity()
|
|||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->class = 'info_table';
|
||||
$table->size = [];
|
||||
$table->size[2] = '150px';
|
||||
$table->size[3] = '130px';
|
||||
|
@ -6015,37 +6016,13 @@ function reporting_get_last_activity()
|
|||
$table->head[5] = __('Comments');
|
||||
$table->title = '<span>'.__('Last activity in %s console', get_product_name()).'</span>';
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$sql = sprintf(
|
||||
'SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
||||
FROM tsesion
|
||||
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
|
||||
AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 5",
|
||||
$config['id_user']
|
||||
);
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql = sprintf(
|
||||
"SELECT \"id_usuario\", accion, fecha, \"ip_origen\", descripcion, utimestamp
|
||||
FROM tsesion
|
||||
WHERE (\"utimestamp\" > ceil(date_part('epoch', CURRENT_TIMESTAMP)) - ".SECONDS_1WEEK.")
|
||||
AND \"id_usuario\" = '%s' ORDER BY \"utimestamp\" DESC LIMIT 5",
|
||||
$config['id_user']
|
||||
);
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$sql = sprintf(
|
||||
"SELECT id_usuario, accion, fecha, ip_origen, descripcion, utimestamp
|
||||
FROM tsesion
|
||||
WHERE ((utimestamp > ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (".SECONDS_1DAY.')) - '.SECONDS_1WEEK.")
|
||||
AND id_usuario = '%s') AND rownum <= 10 ORDER BY utimestamp DESC",
|
||||
$config['id_user']
|
||||
);
|
||||
break;
|
||||
}
|
||||
$sql = sprintf(
|
||||
'SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
||||
FROM tsesion
|
||||
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
|
||||
AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 5",
|
||||
$config['id_user']
|
||||
);
|
||||
|
||||
$sessions = db_get_all_rows_sql($sql);
|
||||
|
||||
|
@ -6056,18 +6033,8 @@ function reporting_get_last_activity()
|
|||
foreach ($sessions as $session) {
|
||||
$data = [];
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
case 'oracle':
|
||||
$session_id_usuario = $session['id_usuario'];
|
||||
$session_ip_origen = $session['ip_origen'];
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$session_id_usuario = $session['id_usuario'];
|
||||
$session_ip_origen = $session['ip_origen'];
|
||||
break;
|
||||
}
|
||||
$session_id_usuario = $session['id_usuario'];
|
||||
$session_ip_origen = $session['ip_origen'];
|
||||
|
||||
$data[0] = '<strong>'.$session_id_usuario.'</strong>';
|
||||
$data[1] = ui_print_session_action_icon($session['accion'], true);
|
||||
|
@ -6079,10 +6046,6 @@ function reporting_get_last_activity()
|
|||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
$table->class = 'databox_tactical';
|
||||
}
|
||||
|
||||
return html_print_table($table, true);
|
||||
|
||||
}
|
||||
|
|
|
@ -5020,30 +5020,22 @@ function ui_print_standard_header(
|
|||
$applyBreadcrumbs,
|
||||
true
|
||||
);
|
||||
// Create the header.
|
||||
// if (is_metaconsole() === true) {
|
||||
// $output = ui_meta_print_header(
|
||||
// $title,
|
||||
// false,
|
||||
// $options
|
||||
// );
|
||||
// } else {
|
||||
$output = ui_print_page_header(
|
||||
$title,
|
||||
$icon,
|
||||
true,
|
||||
$help,
|
||||
$godmode,
|
||||
$options,
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$headerInformation->printHeader(true),
|
||||
false,
|
||||
$fav_menu_config
|
||||
);
|
||||
// }
|
||||
|
||||
$output = ui_print_page_header(
|
||||
$title,
|
||||
$icon,
|
||||
true,
|
||||
$help,
|
||||
$godmode,
|
||||
$options,
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$headerInformation->printHeader(true),
|
||||
false,
|
||||
$fav_menu_config
|
||||
);
|
||||
if ($return !== true) {
|
||||
echo $output;
|
||||
} else {
|
||||
|
@ -7327,9 +7319,6 @@ function ui_get_inventory_module_add_form(
|
|||
$table->rowstyle = [];
|
||||
$table->rowstyle['hidden-custom-field-row'] = 'display: none;';
|
||||
$table->rowstyle['custom-fields-button'] = 'display: none;';
|
||||
// $table->colspan = [];
|
||||
// $table->colspan['custom-fields-row'] = [];
|
||||
// $table->colspan['custom-fields-row']['custom-fields-column'] = 2;
|
||||
$table->data = [];
|
||||
|
||||
$row = [];
|
||||
|
@ -7593,13 +7582,10 @@ function ui_get_inventory_module_add_form(
|
|||
|
||||
ob_start();
|
||||
|
||||
echo '<form name="modulo" method="post" action="'.$form_action.'" class="max_floating_element_size">';
|
||||
echo '<form id="policy_inventory_module_edit_form" name="modulo" method="post" action="'.$form_action.'" class="max_floating_element_size">';
|
||||
echo html_print_table($table);
|
||||
echo '<div class="action-buttons w100p">';
|
||||
echo $form_buttons;
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -555,3 +555,7 @@ ul.datatable_filter > li > div.action-buttons > button {
|
|||
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content {
|
||||
z-index: 10000 !important;
|
||||
}
|
||||
|
||||
.action_buttons_right_content {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
|
|
@ -707,6 +707,10 @@ select:-internal-list-box {
|
|||
width: 60%;
|
||||
}
|
||||
|
||||
.w67p {
|
||||
width: 67%;
|
||||
}
|
||||
|
||||
.w70p {
|
||||
width: 70%;
|
||||
}
|
||||
|
@ -970,6 +974,10 @@ select:-internal-list-box {
|
|||
padding-left: 2em !important;
|
||||
}
|
||||
|
||||
.padding10 {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.margin-soft {
|
||||
margin: 0.3em 1em;
|
||||
}
|
||||
|
@ -11720,3 +11728,8 @@ div.relative > div > div#ui-datepicker-div {
|
|||
top: 55px !important;
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
.ui-widget-overlay {
|
||||
background: #aaa;
|
||||
opacity: 0.3 !important;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ $product_name = get_product_name(); ?>
|
|||
__('Cancel'),
|
||||
'cancel_registration',
|
||||
false,
|
||||
'class="lato ui-widget
|
||||
'id="submit-cancel_registration" class="lato ui-widget
|
||||
ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel"',
|
||||
true
|
||||
);
|
||||
|
@ -97,7 +97,7 @@ $product_name = get_product_name(); ?>
|
|||
__('OK!'),
|
||||
'register',
|
||||
false,
|
||||
'class="lato ui-widget
|
||||
'id="submit-register" class="lato ui-widget
|
||||
ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"',
|
||||
true
|
||||
);
|
||||
|
|
|
@ -34,7 +34,7 @@ if (\is_metaconsole() === true) {
|
|||
\alerts_meta_print_header($tabs);
|
||||
} else {
|
||||
// Header.
|
||||
\ui_print_standard_header(
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
|
@ -44,7 +44,11 @@ if (\is_metaconsole() === true) {
|
|||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Calendars Edit'),
|
||||
'label' => __('Alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Special days'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
|
|
@ -33,19 +33,23 @@ if (\is_metaconsole() === true) {
|
|||
\alerts_meta_print_header($tabs);
|
||||
} else {
|
||||
// Header.
|
||||
\ui_print_page_header(
|
||||
// Title.
|
||||
__('Calendars'),
|
||||
// Icon.
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
// Return.
|
||||
false,
|
||||
// Help.
|
||||
'alert_special_days',
|
||||
// Godmode.
|
||||
true,
|
||||
// Options.
|
||||
$tabs
|
||||
$tabs,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Special days'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@ if (\is_metaconsole() === true) {
|
|||
true,
|
||||
$tabs,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Special days'),
|
||||
|
|
Loading…
Reference in New Issue