mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 19:09:08 +02:00
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,
|
true,
|
||||||
[
|
[
|
||||||
'id' => 'template-details-'.$alert['id_alert_template'],
|
'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> ';
|
$data[2] .= '</a> ';
|
||||||
@ -757,7 +757,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Delete action'),
|
'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);
|
$data[3] .= html_print_input_hidden('delete_action', 1, true);
|
||||||
@ -772,7 +772,7 @@ foreach ($simple_alerts as $alert) {
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Update action'),
|
'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'].'\')',
|
'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.
|
// case delete_templete action is performed.
|
||||||
if (!$delete_template) {
|
if (!$delete_template) {
|
||||||
// Header.
|
// Header.
|
||||||
if (is_metaconsole() === true) {
|
ui_print_standard_header(
|
||||||
alerts_meta_print_header();
|
__('Alerts'),
|
||||||
} else {
|
'images/gm_alerts.png',
|
||||||
ui_print_standard_header(
|
false,
|
||||||
__('Alerts'),
|
'',
|
||||||
'images/gm_alerts.png',
|
true,
|
||||||
false,
|
[],
|
||||||
'',
|
[
|
||||||
true,
|
|
||||||
[],
|
|
||||||
[
|
[
|
||||||
[
|
'link' => '',
|
||||||
'link' => '',
|
'label' => __('Alerts'),
|
||||||
'label' => __('Alert templates'),
|
],
|
||||||
],
|
[
|
||||||
]
|
'link' => '',
|
||||||
);
|
'label' => __('Alert templates'),
|
||||||
}
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($update_template) {
|
if ($update_template) {
|
||||||
|
@ -306,21 +306,37 @@ $onheader['snmp'] = $snmptab;
|
|||||||
$onheader['satellite'] = $satellitetab;
|
$onheader['satellite'] = $satellitetab;
|
||||||
$onheader['services'] = $servicestab;
|
$onheader['services'] = $servicestab;
|
||||||
|
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
if (is_metaconsole() === false) {
|
ui_print_standard_header(
|
||||||
ui_print_page_header(
|
__('Bulk operations').' - '.$options[$option],
|
||||||
__('Bulk operations').' » '.$options[$option],
|
'images/gm_massive_operations.png',
|
||||||
'images/gm_massive_operations.png',
|
false,
|
||||||
false,
|
$help_header,
|
||||||
$help_header,
|
false,
|
||||||
true,
|
[
|
||||||
$onheader,
|
$agentstab,
|
||||||
false,
|
$modulestab,
|
||||||
'massivemodal'
|
$pluginstab,
|
||||||
);
|
$userstab,
|
||||||
} else {
|
$alertstab,
|
||||||
massive_meta_print_header();
|
$policiestab,
|
||||||
}
|
$snmptab,
|
||||||
|
$satellitetab,
|
||||||
|
$servicestab,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Configuration'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Bulk operations'),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Checks if the PHP configuration is correctly.
|
// Checks if the PHP configuration is correctly.
|
||||||
if ((get_cfg_var('max_execution_time') != 0)
|
if ((get_cfg_var('max_execution_time') != 0)
|
||||||
|
@ -56,9 +56,13 @@ ui_print_standard_header(
|
|||||||
[
|
[
|
||||||
[
|
[
|
||||||
'link' => '',
|
'link' => '',
|
||||||
'label' => __('Netflow'),
|
'label' => __('Resources'),
|
||||||
],
|
],
|
||||||
],
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Netflow filters'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
|
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
|
||||||
|
@ -845,9 +845,9 @@ foreach ($defaultAgentWizardOptions as $key => $value) {
|
|||||||
$i++;
|
$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>';
|
echo '<legend>'.__('Database maintenance status').' '.ui_print_help_icon('database_maintenance_status_tab', true).'</legend>';
|
||||||
html_print_table($table_status);
|
html_print_table($table_status);
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
|
@ -393,7 +393,7 @@ class SatelliteAgent extends HTML
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'border' => '0',
|
'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.'\')',
|
'onclick' => 'disable_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $disable.'\',\''.$id_agente.'\')',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -405,7 +405,7 @@ class SatelliteAgent extends HTML
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'border' => '0',
|
'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.'\')',
|
'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');
|
$sec2 = (string) get_parameter('sec2');
|
||||||
if ($sec2 === 'operation/agentes/ver_agente') {
|
if ($sec2 === 'operation/agentes/ver_agente') {
|
||||||
$sec2 = 'godmode/agentes/configurar_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') {
|
} else if ($sec2 === 'godmode/servers/discovery') {
|
||||||
$wiz = (string) get_parameter('wiz');
|
$wiz = (string) get_parameter('wiz');
|
||||||
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
||||||
|
@ -6002,6 +6002,7 @@ function reporting_get_last_activity()
|
|||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->data = [];
|
$table->data = [];
|
||||||
|
$table->class = 'info_table';
|
||||||
$table->size = [];
|
$table->size = [];
|
||||||
$table->size[2] = '150px';
|
$table->size[2] = '150px';
|
||||||
$table->size[3] = '130px';
|
$table->size[3] = '130px';
|
||||||
@ -6015,37 +6016,13 @@ function reporting_get_last_activity()
|
|||||||
$table->head[5] = __('Comments');
|
$table->head[5] = __('Comments');
|
||||||
$table->title = '<span>'.__('Last activity in %s console', get_product_name()).'</span>';
|
$table->title = '<span>'.__('Last activity in %s console', get_product_name()).'</span>';
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
$sql = sprintf(
|
||||||
case 'mysql':
|
'SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
||||||
$sql = sprintf(
|
FROM tsesion
|
||||||
'SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
|
||||||
FROM tsesion
|
AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 5",
|
||||||
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
|
$config['id_user']
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sessions = db_get_all_rows_sql($sql);
|
$sessions = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
@ -6056,18 +6033,8 @@ function reporting_get_last_activity()
|
|||||||
foreach ($sessions as $session) {
|
foreach ($sessions as $session) {
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
$session_id_usuario = $session['id_usuario'];
|
||||||
case 'mysql':
|
$session_ip_origen = $session['ip_origen'];
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data[0] = '<strong>'.$session_id_usuario.'</strong>';
|
$data[0] = '<strong>'.$session_id_usuario.'</strong>';
|
||||||
$data[1] = ui_print_session_action_icon($session['accion'], true);
|
$data[1] = ui_print_session_action_icon($session['accion'], true);
|
||||||
@ -6079,10 +6046,6 @@ function reporting_get_last_activity()
|
|||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('METACONSOLE')) {
|
|
||||||
$table->class = 'databox_tactical';
|
|
||||||
}
|
|
||||||
|
|
||||||
return html_print_table($table, true);
|
return html_print_table($table, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5020,30 +5020,22 @@ function ui_print_standard_header(
|
|||||||
$applyBreadcrumbs,
|
$applyBreadcrumbs,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
// Create the header.
|
|
||||||
// if (is_metaconsole() === true) {
|
$output = ui_print_page_header(
|
||||||
// $output = ui_meta_print_header(
|
$title,
|
||||||
// $title,
|
$icon,
|
||||||
// false,
|
true,
|
||||||
// $options
|
$help,
|
||||||
// );
|
$godmode,
|
||||||
// } else {
|
$options,
|
||||||
$output = ui_print_page_header(
|
false,
|
||||||
$title,
|
'',
|
||||||
$icon,
|
GENERIC_SIZE_TEXT,
|
||||||
true,
|
'',
|
||||||
$help,
|
$headerInformation->printHeader(true),
|
||||||
$godmode,
|
false,
|
||||||
$options,
|
$fav_menu_config
|
||||||
false,
|
);
|
||||||
'',
|
|
||||||
GENERIC_SIZE_TEXT,
|
|
||||||
'',
|
|
||||||
$headerInformation->printHeader(true),
|
|
||||||
false,
|
|
||||||
$fav_menu_config
|
|
||||||
);
|
|
||||||
// }
|
|
||||||
if ($return !== true) {
|
if ($return !== true) {
|
||||||
echo $output;
|
echo $output;
|
||||||
} else {
|
} else {
|
||||||
@ -7327,9 +7319,6 @@ function ui_get_inventory_module_add_form(
|
|||||||
$table->rowstyle = [];
|
$table->rowstyle = [];
|
||||||
$table->rowstyle['hidden-custom-field-row'] = 'display: none;';
|
$table->rowstyle['hidden-custom-field-row'] = 'display: none;';
|
||||||
$table->rowstyle['custom-fields-button'] = '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 = [];
|
$table->data = [];
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
@ -7593,13 +7582,10 @@ function ui_get_inventory_module_add_form(
|
|||||||
|
|
||||||
ob_start();
|
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 html_print_table($table);
|
||||||
echo '<div class="action-buttons w100p">';
|
|
||||||
echo $form_buttons;
|
echo $form_buttons;
|
||||||
echo '</div>';
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<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 {
|
.ui-dialog.ui-corner-all.ui-widget.ui-widget-content {
|
||||||
z-index: 10000 !important;
|
z-index: 10000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action_buttons_right_content {
|
||||||
|
z-index: 1 !important;
|
||||||
|
}
|
||||||
|
@ -707,6 +707,10 @@ select:-internal-list-box {
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w67p {
|
||||||
|
width: 67%;
|
||||||
|
}
|
||||||
|
|
||||||
.w70p {
|
.w70p {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
@ -970,6 +974,10 @@ select:-internal-list-box {
|
|||||||
padding-left: 2em !important;
|
padding-left: 2em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.padding10 {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.margin-soft {
|
.margin-soft {
|
||||||
margin: 0.3em 1em;
|
margin: 0.3em 1em;
|
||||||
}
|
}
|
||||||
@ -11720,3 +11728,8 @@ div.relative > div > div#ui-datepicker-div {
|
|||||||
top: 55px !important;
|
top: 55px !important;
|
||||||
left: 5px !important;
|
left: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-widget-overlay {
|
||||||
|
background: #aaa;
|
||||||
|
opacity: 0.3 !important;
|
||||||
|
}
|
||||||
|
@ -85,7 +85,7 @@ $product_name = get_product_name(); ?>
|
|||||||
__('Cancel'),
|
__('Cancel'),
|
||||||
'cancel_registration',
|
'cancel_registration',
|
||||||
false,
|
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"',
|
ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel"',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -97,7 +97,7 @@ $product_name = get_product_name(); ?>
|
|||||||
__('OK!'),
|
__('OK!'),
|
||||||
'register',
|
'register',
|
||||||
false,
|
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"',
|
ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
@ -34,7 +34,7 @@ if (\is_metaconsole() === true) {
|
|||||||
\alerts_meta_print_header($tabs);
|
\alerts_meta_print_header($tabs);
|
||||||
} else {
|
} else {
|
||||||
// Header.
|
// Header.
|
||||||
\ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
__('Alerts'),
|
__('Alerts'),
|
||||||
'images/gm_alerts.png',
|
'images/gm_alerts.png',
|
||||||
false,
|
false,
|
||||||
@ -44,7 +44,11 @@ if (\is_metaconsole() === true) {
|
|||||||
[
|
[
|
||||||
[
|
[
|
||||||
'link' => '',
|
'link' => '',
|
||||||
'label' => __('Calendars Edit'),
|
'label' => __('Alerts'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Special days'),
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -33,19 +33,23 @@ if (\is_metaconsole() === true) {
|
|||||||
\alerts_meta_print_header($tabs);
|
\alerts_meta_print_header($tabs);
|
||||||
} else {
|
} else {
|
||||||
// Header.
|
// Header.
|
||||||
\ui_print_page_header(
|
ui_print_standard_header(
|
||||||
// Title.
|
__('Alerts'),
|
||||||
__('Calendars'),
|
|
||||||
// Icon.
|
|
||||||
'images/gm_alerts.png',
|
'images/gm_alerts.png',
|
||||||
// Return.
|
|
||||||
false,
|
false,
|
||||||
// Help.
|
|
||||||
'alert_special_days',
|
'alert_special_days',
|
||||||
// Godmode.
|
|
||||||
true,
|
true,
|
||||||
// Options.
|
$tabs,
|
||||||
$tabs
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Alerts'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Special days'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,10 @@ if (\is_metaconsole() === true) {
|
|||||||
true,
|
true,
|
||||||
$tabs,
|
$tabs,
|
||||||
[
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Alerts'),
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'link' => '',
|
'link' => '',
|
||||||
'label' => __('Special days'),
|
'label' => __('Special days'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user