mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/reporting/reporting_xml.php, operation/netflow/nf_live_view.php, operation/netflow/nf_view.php, operation/tree.php, operation/agentes/gis_view.php, operation/agentes/estado_monitores.php, operation/agentes/networkmap.php, operation/agentes/datos_agente.php, operation/agentes/alerts_status.php, operation/menu.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php, godmode/agentes/module_manager_editor_prediction.php, godmode/servers/manage_recontask.php, godmode/alerts/alert_compounds.php, godmode/alerts/configure_alert_template.php, godmode/alerts/alert_special_days.php, godmode/setup/links.php, godmode/setup/os.php, godmode/users/configure_profile.php, godmode/events/events.php, godmode/massive/massive_delete_modules.php, godmode/massive/massive_edit_modules.php, godmode/massive/massive_standby_alerts.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_operations.php, godmode/massive/massive_delete_profiles.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/graph_builder.php, godmode/reporting/reporting_builder.item_editor.php, include/functions_menu.php, include/functions_visual_map.php, include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ae4a12872c
commit
f2c0c0762f
@ -1,3 +1,36 @@
|
|||||||
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* install.php, operation/reporting/reporting_xml.php,
|
||||||
|
operation/netflow/nf_live_view.php, operation/netflow/nf_view.php,
|
||||||
|
operation/tree.php, operation/agentes/gis_view.php,
|
||||||
|
operation/agentes/estado_monitores.php,
|
||||||
|
operation/agentes/networkmap.php,
|
||||||
|
operation/agentes/datos_agente.php,
|
||||||
|
operation/agentes/alerts_status.php, operation/menu.php,
|
||||||
|
operation/snmpconsole/snmp_view.php, operation/users/user_edit.php,
|
||||||
|
godmode/groups/configure_group.php,
|
||||||
|
godmode/groups/configure_modu_group.php,
|
||||||
|
godmode/agentes/module_manager_editor_prediction.php,
|
||||||
|
godmode/servers/manage_recontask.php,
|
||||||
|
godmode/alerts/alert_compounds.php,
|
||||||
|
godmode/alerts/configure_alert_template.php,
|
||||||
|
godmode/alerts/alert_special_days.php, godmode/setup/links.php,
|
||||||
|
godmode/setup/os.php, godmode/users/configure_profile.php,
|
||||||
|
godmode/events/events.php,
|
||||||
|
godmode/massive/massive_delete_modules.php,
|
||||||
|
godmode/massive/massive_edit_modules.php,
|
||||||
|
godmode/massive/massive_standby_alerts.php,
|
||||||
|
godmode/massive/massive_add_action_alerts.php,
|
||||||
|
godmode/massive/massive_enable_disable_alerts.php,
|
||||||
|
godmode/massive/massive_operations.php,
|
||||||
|
godmode/massive/massive_delete_profiles.php,
|
||||||
|
godmode/modules/manage_network_components.php,
|
||||||
|
godmode/modules/manage_nc_groups.php,
|
||||||
|
godmode/reporting/graph_builder.php,
|
||||||
|
godmode/reporting/reporting_builder.item_editor.php,
|
||||||
|
include/functions_menu.php, include/functions_visual_map.php,
|
||||||
|
include/functions_db.php: cleaned source code style.
|
||||||
|
|
||||||
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
|
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* extensions/agents_alerts.php, extensions/net_tools.php,
|
* extensions/agents_alerts.php, extensions/net_tools.php,
|
||||||
|
@ -47,7 +47,7 @@ if ($row !== false && is_array($row)) {
|
|||||||
|
|
||||||
$first_op = explode('_', reset(array_keys($ops)));
|
$first_op = explode('_', reset(array_keys($ops)));
|
||||||
|
|
||||||
if(isset($first_op[1]) && $first_op[1] == 'avg') {
|
if (isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||||
$is_synthetic_avg = true;
|
$is_synthetic_avg = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -63,6 +63,7 @@ if ($row !== false && is_array($row)) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$prediction_module = $custom_integer_1;
|
$prediction_module = $custom_integer_1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -173,5 +174,4 @@ $(document).ready(function() {
|
|||||||
enterprise_hook('setup_services_synth', array($is_service, $is_synthetic, $is_synthetic_avg, $is_netflow, $ops));
|
enterprise_hook('setup_services_synth', array($is_service, $is_synthetic, $is_synthetic_avg, $is_netflow, $ops));
|
||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
@ -223,7 +223,8 @@ foreach ($id_alerts as $alert) {
|
|||||||
if ($alert['disabled']) {
|
if ($alert['disabled']) {
|
||||||
$data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true);
|
$data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true);
|
||||||
$data[0] .= html_print_input_hidden ('enable_alert', 1, true);
|
$data[0] .= html_print_input_hidden ('enable_alert', 1, true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true);
|
$data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true);
|
||||||
$data[0] .= html_print_input_hidden ('disable_alert', 1, true);
|
$data[0] .= html_print_input_hidden ('disable_alert', 1, true);
|
||||||
}
|
}
|
||||||
@ -244,7 +245,8 @@ foreach ($id_alerts as $alert) {
|
|||||||
|
|
||||||
if (isset($data)){
|
if (isset($data)){
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo "<div class='nf'>".__('No alerts found')."</div>";
|
echo "<div class='nf'>".__('No alerts found')."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ if ($create_special_day) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$date_check = db_get_value ('date', 'talert_special_days', 'date
|
$date_check = db_get_value ('date', 'talert_special_days', 'date
|
||||||
', $date);
|
', $date);
|
||||||
if ($date_check == $date) {
|
if ($date_check == $date) {
|
||||||
$result = '';
|
$result = '';
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ if ($create_template) {
|
|||||||
$id_group = get_parameter ("id_group");
|
$id_group = get_parameter ("id_group");
|
||||||
$name_check = db_get_value ('name', 'talert_templates', 'name', $name);
|
$name_check = db_get_value ('name', 'talert_templates', 'name', $name);
|
||||||
|
|
||||||
switch ($config['dbtype']){
|
switch ($config['dbtype']) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$values = array ('description' => $description,
|
$values = array ('description' => $description,
|
||||||
@ -511,7 +511,8 @@ if ($step == 2) {
|
|||||||
$table->data[4][1] = html_print_select_from_sql ($sql_query,
|
$table->data[4][1] = html_print_select_from_sql ($sql_query,
|
||||||
'default_action', $default_action, '', __('None'), 0,
|
'default_action', $default_action, '', __('None'), 0,
|
||||||
true, false, false).ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
|
true, false, false).ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
|
||||||
} else if ($step == 3) {
|
}
|
||||||
|
else if ($step == 3) {
|
||||||
/* Alert recover */
|
/* Alert recover */
|
||||||
if (! $recovery_notify) {
|
if (! $recovery_notify) {
|
||||||
$table->rowstyle = array ();
|
$table->rowstyle = array ();
|
||||||
@ -531,7 +532,8 @@ if ($step == 2) {
|
|||||||
$table->data['field3'][0] = __('Field 3');
|
$table->data['field3'][0] = __('Field 3');
|
||||||
$table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
|
$table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
|
||||||
$field3_recovery, '', true);
|
$field3_recovery, '', true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
/* Step 1 by default */
|
/* Step 1 by default */
|
||||||
$table->size = array ();
|
$table->size = array ();
|
||||||
$table->size[0] = '20%';
|
$table->size[0] = '20%';
|
||||||
@ -621,7 +623,8 @@ if ($step == 2) {
|
|||||||
/* If it's the last step it will redirect to template lists */
|
/* If it's the last step it will redirect to template lists */
|
||||||
if ($step >= LAST_STEP) {
|
if ($step >= LAST_STEP) {
|
||||||
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_templates">';
|
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_templates">';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<form method="post">';
|
echo '<form method="post">';
|
||||||
}
|
}
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
@ -630,13 +633,15 @@ echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|||||||
if ($id) {
|
if ($id) {
|
||||||
html_print_input_hidden ('id', $id);
|
html_print_input_hidden ('id', $id);
|
||||||
html_print_input_hidden ('update_template', 1);
|
html_print_input_hidden ('update_template', 1);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('create_template', 1);
|
html_print_input_hidden ('create_template', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($step >= LAST_STEP) {
|
if ($step >= LAST_STEP) {
|
||||||
html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
|
html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('step', $step + 1);
|
html_print_input_hidden ('step', $step + 1);
|
||||||
html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
|
html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
|
||||||
}
|
}
|
||||||
@ -685,7 +690,8 @@ function render_example () {
|
|||||||
vmax = parseInt ($("input#text-max").attr ("value"));
|
vmax = parseInt ($("input#text-max").attr ("value"));
|
||||||
if (isNaN (vmax) || vmax == "") {
|
if (isNaN (vmax) || vmax == "") {
|
||||||
$("span#max").empty ().append ("0");
|
$("span#max").empty ().append ("0");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("span#max").empty ().append (vmax);
|
$("span#max").empty ().append (vmax);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,7 +699,8 @@ function render_example () {
|
|||||||
vmin = parseInt ($("input#text-min").attr ("value"));
|
vmin = parseInt ($("input#text-min").attr ("value"));
|
||||||
if (isNaN (vmin) || vmin == "") {
|
if (isNaN (vmin) || vmin == "") {
|
||||||
$("span#min").empty ().append ("0");
|
$("span#min").empty ().append ("0");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("span#min").empty ().append (vmin);
|
$("span#min").empty ().append (vmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -701,7 +708,8 @@ function render_example () {
|
|||||||
vvalue = $("input#text-value").attr ("value");
|
vvalue = $("input#text-value").attr ("value");
|
||||||
if (vvalue == "") {
|
if (vvalue == "") {
|
||||||
$("span#value").empty ().append ("<em><?php echo __('Empty');?></em>");
|
$("span#value").empty ().append ("<em><?php echo __('Empty');?></em>");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("span#value").empty ().append (vvalue);
|
$("span#value").empty ().append (vvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,16 +42,20 @@ $buttons = array(
|
|||||||
html_print_image("images/god6.png", true, array ("title" => __('Custom fields'))) . '</a>'),
|
html_print_image("images/god6.png", true, array ("title" => __('Custom fields'))) . '</a>'),
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ($section){
|
switch ($section) {
|
||||||
case 'filter': $buttons['filter']['active'] = true;
|
case 'filter':
|
||||||
|
$buttons['filter']['active'] = true;
|
||||||
$subpage = ' - ' . __('Filters');
|
$subpage = ' - ' . __('Filters');
|
||||||
break;
|
break;
|
||||||
case 'fields': $buttons['fields']['active'] = true;
|
case 'fields':
|
||||||
|
$buttons['fields']['active'] = true;
|
||||||
$subpage = ' - ' . __('Custom fields');
|
$subpage = ' - ' . __('Custom fields');
|
||||||
break;
|
break;
|
||||||
case 'view': $buttons['view']['active'] = true;
|
case 'view':
|
||||||
|
$buttons['view']['active'] = true;
|
||||||
break;
|
break;
|
||||||
default: $buttons['filter']['active'] = true;
|
default:
|
||||||
|
$buttons['filter']['active'] = true;
|
||||||
$subpage = ' - ' . __('Filters');
|
$subpage = ' - ' . __('Filters');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,8 @@ if ($id_group) {
|
|||||||
$group = db_get_row ('tmodule_group', 'id_mg', $id_group);
|
$group = db_get_row ('tmodule_group', 'id_mg', $id_group);
|
||||||
if ($group) {
|
if ($group) {
|
||||||
$name = $group["name"];
|
$name = $group["name"];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@ -71,11 +72,11 @@ if ($id_group) {
|
|||||||
html_print_input_hidden ('update_group', 1);
|
html_print_input_hidden ('update_group', 1);
|
||||||
html_print_input_hidden ('id_group', $id_group);
|
html_print_input_hidden ('id_group', $id_group);
|
||||||
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('create_group', 1);
|
html_print_input_hidden ('create_group', 1);
|
||||||
html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
|
html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -220,7 +220,8 @@ $(document).ready (function () {
|
|||||||
$("option", $select_template).remove ();
|
$("option", $select_template).remove ();
|
||||||
|
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
{"page" : "godmode/massive/massive_add_action_alerts",
|
{
|
||||||
|
"page" : "godmode/massive/massive_add_action_alerts",
|
||||||
"get_alerts" : 1,
|
"get_alerts" : 1,
|
||||||
"id_agents[]" : idAgents
|
"id_agents[]" : idAgents
|
||||||
},
|
},
|
||||||
@ -230,7 +231,7 @@ $(document).ready (function () {
|
|||||||
options += "<option value=\""+id+"\">"+value+"</option>";
|
options += "<option value=\""+id+"\">"+value+"</option>";
|
||||||
});
|
});
|
||||||
|
|
||||||
if(options == "") {
|
if (options == "") {
|
||||||
options += "<option><?php echo __('None'); ?></option>";
|
options += "<option><?php echo __('None'); ?></option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +250,7 @@ $(document).ready (function () {
|
|||||||
actions = $(this).parents ("div").children ("span.advanced_actions")
|
actions = $(this).parents ("div").children ("span.advanced_actions")
|
||||||
$("#advanced_actions").removeClass("advanced_actions invisible");
|
$("#advanced_actions").removeClass("advanced_actions invisible");
|
||||||
$(this).remove ();
|
$(this).remove ();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ $groups[0] = __('All');
|
|||||||
$table->colspan[2][1] = 2;
|
$table->colspan[2][1] = 2;
|
||||||
$table->data[2][1] = html_print_select ($groups, 'groups_select',
|
$table->data[2][1] = html_print_select ($groups, 'groups_select',
|
||||||
'', true, __('Select'), -1, true, false, true, '', false, 'width:100%').
|
'', true, __('Select'), -1, true, false, true, '', false, 'width:100%').
|
||||||
' '.__('Group recursion').' '.html_print_checkbox ("recursion", 1, false, true, false);
|
' ' . __('Group recursion') . ' ' . html_print_checkbox ("recursion", 1, false, true, false);
|
||||||
$table->data[2][3] = __('Select all modules of this group').' '.html_print_checkbox_extended ("force_group", 'group', '', '', false, '', 'style="margin-right: 40px;"', true);
|
$table->data[2][3] = __('Select all modules of this group').' '.html_print_checkbox_extended ("force_group", 'group', '', '', false, '', 'style="margin-right: 40px;"', true);
|
||||||
|
|
||||||
$table->rowstyle[3] = 'vertical-align: top;';
|
$table->rowstyle[3] = 'vertical-align: top;';
|
||||||
|
@ -57,11 +57,11 @@ if ($delete_profiles) {
|
|||||||
foreach($profiles_id as $profile) {
|
foreach($profiles_id as $profile) {
|
||||||
foreach($groups_id as $group) {
|
foreach($groups_id as $group) {
|
||||||
foreach($users_id as $id_up) {
|
foreach($users_id as $id_up) {
|
||||||
if ($id_up == 0){
|
if ($id_up == 0) {
|
||||||
echo '<h3 class="error">'.__('Not deleted. You must select an existing user').'</h3>';
|
echo '<h3 class="error">'.__('Not deleted. You must select an existing user').'</h3>';
|
||||||
$result="";
|
$result="";
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up));
|
$user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up));
|
||||||
|
|
||||||
db_pandora_audit("User management",
|
db_pandora_audit("User management",
|
||||||
@ -69,7 +69,6 @@ if ($delete_profiles) {
|
|||||||
|
|
||||||
$result = profile_delete_user_profile ($user, $id_up);
|
$result = profile_delete_user_profile ($user, $id_up);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,8 @@ $(document).ready (function () {
|
|||||||
if (this.value != 0) {
|
if (this.value != 0) {
|
||||||
$("#id_enabled_alerts").enable ();
|
$("#id_enabled_alerts").enable ();
|
||||||
$("#id_disabled_alerts").enable ();
|
$("#id_disabled_alerts").enable ();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$("#id_enabled_alerts").disable ();
|
$("#id_enabled_alerts").disable ();
|
||||||
$("#id_disabled_alerts").disable ();
|
$("#id_disabled_alerts").disable ();
|
||||||
}
|
}
|
||||||
@ -307,7 +308,6 @@ $(document).ready (function () {
|
|||||||
$("option", $select_enabled).remove ();
|
$("option", $select_enabled).remove ();
|
||||||
$("option", $select_disabled).remove ();
|
$("option", $select_disabled).remove ();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
@ -45,7 +45,8 @@ else {
|
|||||||
$options_users = array();
|
$options_users = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$options_modules = array('delete_modules' => __('Massive modules deletion'), 'edit_modules' => __('Massive modules edition'),
|
$options_modules = array('delete_modules' => __('Massive modules deletion'),
|
||||||
|
'edit_modules' => __('Massive modules edition'),
|
||||||
'copy_modules' => __('Massive modules copy'));
|
'copy_modules' => __('Massive modules copy'));
|
||||||
|
|
||||||
$options_policies = array();
|
$options_policies = array();
|
||||||
@ -159,9 +160,8 @@ echo '</div>';
|
|||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
$(document).ready (function (){
|
$(document).ready (function () {
|
||||||
|
$('#manage_config_form').submit( function() {
|
||||||
$('#manage_config_form').submit( function(){
|
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
if (confirm)
|
if (confirm)
|
||||||
$("#loading").css("display", "");
|
$("#loading").css("display", "");
|
||||||
@ -169,7 +169,7 @@ $(document).ready (function (){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#form_edit').submit( function(){
|
$('#form_edit').submit( function() {
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
if (confirm)
|
if (confirm)
|
||||||
$("#loading").css("display", "");
|
$("#loading").css("display", "");
|
||||||
@ -177,7 +177,7 @@ $(document).ready (function (){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=form]').submit( function(){
|
$('[id^=form]').submit( function() {
|
||||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||||
if (confirm)
|
if (confirm)
|
||||||
$("#loading").css("display", "");
|
$("#loading").css("display", "");
|
||||||
|
@ -309,7 +309,6 @@ $(document).ready (function () {
|
|||||||
$("option", $select_not_standby).remove ();
|
$("option", $select_not_standby).remove ();
|
||||||
$("option", $select_standby).remove ();
|
$("option", $select_standby).remove ();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
@ -67,7 +67,8 @@ if ($update) {
|
|||||||
|
|
||||||
if ($name == '') {
|
if ($name == '') {
|
||||||
ui_print_error_message (__('Not updated. Blank name'));
|
ui_print_error_message (__('Not updated. Blank name'));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$result = db_process_sql_update ('tnetwork_component_group',
|
$result = db_process_sql_update ('tnetwork_component_group',
|
||||||
array ('name' => $name,
|
array ('name' => $name,
|
||||||
'parent' => $parent),
|
'parent' => $parent),
|
||||||
@ -96,7 +97,8 @@ if ($delete) {
|
|||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Delete component group #$id");
|
db_pandora_audit( "Module management", "Delete component group #$id");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to delete component group #$id");
|
db_pandora_audit( "Module management", "Fail try to delete component group #$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +134,8 @@ if ($multiple_delete) {
|
|||||||
$str_ids = implode (',', $ids);
|
$str_ids = implode (',', $ids);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Multiple delete component group: $str_ids");
|
db_pandora_audit( "Module management", "Multiple delete component group: $str_ids");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to delete component group: $str_ids");
|
db_pandora_audit( "Module management", "Fail try to delete component group: $str_ids");
|
||||||
}
|
}
|
||||||
ui_print_result_message ($result,
|
ui_print_result_message ($result,
|
||||||
|
@ -166,6 +166,7 @@ if ($update_component) {
|
|||||||
$custom_string_1 = '';
|
$custom_string_1 = '';
|
||||||
$custom_string_2 = '';
|
$custom_string_2 = '';
|
||||||
$custom_string_3 = '';
|
$custom_string_3 = '';
|
||||||
|
|
||||||
//$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
|
//$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
|
||||||
if ($type >= 15 && $type <= 18) {
|
if ($type >= 15 && $type <= 18) {
|
||||||
// New support for snmp v3
|
// New support for snmp v3
|
||||||
@ -238,7 +239,8 @@ if ($delete_component) {
|
|||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Delete network component #$id");
|
db_pandora_audit( "Module management", "Delete network component #$id");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to delete network component #$id");
|
db_pandora_audit( "Module management", "Fail try to delete network component #$id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +267,8 @@ if ($multiple_delete) {
|
|||||||
$str_ids = implode (',', $ids);
|
$str_ids = implode (',', $ids);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit( "Module management", "Multiple delete network component: $str_ids");
|
db_pandora_audit( "Module management", "Multiple delete network component: $str_ids");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
db_pandora_audit( "Module management", "Fail try to delete network component: $str_ids");
|
db_pandora_audit( "Module management", "Fail try to delete network component: $str_ids");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +410,7 @@ foreach ($components as $component) {
|
|||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($data)) {
|
if (isset($data)) {
|
||||||
echo "<form method='post' action='index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&search_id_group=0search_string='>";
|
echo "<form method='post' action='index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&search_id_group=0search_string='>";
|
||||||
html_print_input_hidden('multiple_delete', 1);
|
html_print_input_hidden('multiple_delete', 1);
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
@ -187,7 +187,7 @@ if (isset($name))
|
|||||||
|
|
||||||
// Header
|
// Header
|
||||||
$tab = get_parameter("tab", "");
|
$tab = get_parameter("tab", "");
|
||||||
switch ($tab){
|
switch ($tab) {
|
||||||
case "main":
|
case "main":
|
||||||
ui_print_page_header ($head, "", false, "graph_builder", true, $buttons);
|
ui_print_page_header ($head, "", false, "graph_builder", true, $buttons);
|
||||||
break;
|
break;
|
||||||
|
@ -205,12 +205,15 @@ if (isset($_GET["create"])) {
|
|||||||
// --------------------------------
|
// --------------------------------
|
||||||
//Pandora Admin must see all columns
|
//Pandora Admin must see all columns
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||||
$sql = sprintf('SELECT * FROM trecon_task RT, tusuario_perfil UP WHERE
|
$sql = sprintf('SELECT *
|
||||||
|
FROM trecon_task RT, tusuario_perfil UP
|
||||||
|
WHERE
|
||||||
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
||||||
$config['id_user']);
|
$config['id_user']);
|
||||||
|
|
||||||
$result = db_get_all_rows_sql ($sql);
|
$result = db_get_all_rows_sql ($sql);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$result = db_get_all_rows_in_table('trecon_task');
|
$result = db_get_all_rows_in_table('trecon_task');
|
||||||
}
|
}
|
||||||
$color=1;
|
$color=1;
|
||||||
@ -226,7 +229,6 @@ if ($result !== false) {
|
|||||||
$table->style[8] = 'text-align: center;';
|
$table->style[8] = 'text-align: center;';
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&crt=update&update='.$row["id_rt"].'&upd='.$row["id_rt"].'"><b>'.$row["name"].'</b></a>';
|
$data[0] = '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&crt=update&update='.$row["id_rt"].'&upd='.$row["id_rt"].'"><b>'.$row["name"].'</b></a>';
|
||||||
|
|
||||||
@ -236,11 +238,12 @@ if ($result !== false) {
|
|||||||
$data[1] =__("N/A");
|
$data[1] =__("N/A");
|
||||||
|
|
||||||
|
|
||||||
if ($row["id_recon_script"] == 0){
|
if ($row["id_recon_script"] == 0) {
|
||||||
// Network recon task
|
// Network recon task
|
||||||
$data[2] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))." ";
|
$data[2] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))." ";
|
||||||
$data[2] .= network_profiles_get_name ($row["id_network_profile"]);
|
$data[2] .= network_profiles_get_name ($row["id_network_profile"]);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// APP recon task
|
// APP recon task
|
||||||
$data[2] = html_print_image ("images/plugin.png", true). " ";
|
$data[2] = html_print_image ("images/plugin.png", true). " ";
|
||||||
$data[2] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $row["id_recon_script"]));
|
$data[2] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $row["id_recon_script"]));
|
||||||
@ -248,9 +251,10 @@ if ($result !== false) {
|
|||||||
|
|
||||||
|
|
||||||
// GROUP
|
// GROUP
|
||||||
if ($row["id_recon_script"] == 0){
|
if ($row["id_recon_script"] == 0) {
|
||||||
$data[3] = ui_print_group_icon ($row["id_group"], true);
|
$data[3] = ui_print_group_icon ($row["id_group"], true);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[3] = "-";
|
$data[3] = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,9 +262,10 @@ if ($result !== false) {
|
|||||||
$data[4] = (($row["create_incident"] == 1) ? __('Yes') : __('No'));
|
$data[4] = (($row["create_incident"] == 1) ? __('Yes') : __('No'));
|
||||||
|
|
||||||
// OS
|
// OS
|
||||||
if ($row["id_recon_script"] == 0){
|
if ($row["id_recon_script"] == 0) {
|
||||||
$data[5] =(($row["id_os"] > 0) ? ui_print_os_icon ($row["id_os"], false, true) : __('Any'));
|
$data[5] =(($row["id_os"] > 0) ? ui_print_os_icon ($row["id_os"], false, true) : __('Any'));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[5] = "-";
|
$data[5] = "-";
|
||||||
}
|
}
|
||||||
// INTERVAL
|
// INTERVAL
|
||||||
@ -270,9 +275,10 @@ if ($result !== false) {
|
|||||||
$data[6] =human_time_description_raw($row["interval_sweep"]);
|
$data[6] =human_time_description_raw($row["interval_sweep"]);
|
||||||
|
|
||||||
// PORTS
|
// PORTS
|
||||||
if ($row["id_recon_script"] == 0){
|
if ($row["id_recon_script"] == 0) {
|
||||||
$data[7] = substr($row["recon_ports"],0,15);
|
$data[7] = substr($row["recon_ports"],0,15);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[7] = "-";
|
$data[7] = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +298,8 @@ if ($result !== false) {
|
|||||||
|
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
unset ($table);
|
unset ($table);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<div class="nf">'.__('There are no recon task configured').'</div>';
|
echo '<div class="nf">'.__('There are no recon task configured').'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,5 +308,4 @@ echo '<form method="post" action="index.php?sec=gservers&sec2=godmode/servers/ma
|
|||||||
echo html_print_submit_button (__('Create'),"crt",false,'class="sub next"',true);
|
echo html_print_submit_button (__('Create'),"crt",false,'class="sub next"',true);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
?>
|
?>
|
@ -27,7 +27,7 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us
|
|||||||
ui_print_page_header (__('Link management'), "images/extensions.png", false, "", false, "" );
|
ui_print_page_header (__('Link management'), "images/extensions.png", false, "", false, "" );
|
||||||
|
|
||||||
|
|
||||||
if (isset($_POST["create"])){ // If create
|
if (isset($_POST["create"])) { // If create
|
||||||
$name = get_parameter_post ("name");
|
$name = get_parameter_post ("name");
|
||||||
$link = get_parameter_post ("link");
|
$link = get_parameter_post ("link");
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ if (isset($_POST["create"])){ // If create
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST["update"])){ // if update
|
if (isset($_POST["update"])) { // if update
|
||||||
$id_link = io_safe_input($_POST["id_link"]);
|
$id_link = io_safe_input($_POST["id_link"]);
|
||||||
$name = io_safe_input($_POST["name"]);
|
$name = io_safe_input($_POST["name"]);
|
||||||
$link = io_safe_input($_POST["link"]);
|
$link = io_safe_input($_POST["link"]);
|
||||||
@ -58,7 +58,7 @@ if (isset($_POST["update"])){ // if update
|
|||||||
echo "<h3 class='suc'>".__('Successfully updated')."</h3>";
|
echo "<h3 class='suc'>".__('Successfully updated')."</h3>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["borrar"])){ // if delete
|
if (isset($_GET["borrar"])) { // if delete
|
||||||
$id_link = io_safe_input($_GET["borrar"]);
|
$id_link = io_safe_input($_GET["borrar"]);
|
||||||
|
|
||||||
$result = db_process_sql_delete("tlink", array("id_link" => $id_link));
|
$result = db_process_sql_delete("tlink", array("id_link" => $id_link));
|
||||||
@ -71,8 +71,8 @@ if (isset($_GET["borrar"])){ // if delete
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Main form view for Links edit
|
// Main form view for Links edit
|
||||||
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
|
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))) {
|
||||||
if (isset($_GET["form_edit"])){
|
if (isset($_GET["form_edit"])) {
|
||||||
$creation_mode = 0;
|
$creation_mode = 0;
|
||||||
$id_link = io_safe_input($_GET["id_link"]);
|
$id_link = io_safe_input($_GET["id_link"]);
|
||||||
|
|
||||||
@ -128,8 +128,8 @@ else { // Main list view for Links editor
|
|||||||
|
|
||||||
if (empty($rows)) {
|
if (empty($rows)) {
|
||||||
echo '<div class="nf">'.__("There isn't links").'</div>';
|
echo '<div class="nf">'.__("There isn't links").'</div>';
|
||||||
|
}
|
||||||
} else {
|
else {
|
||||||
echo "<table cellpadding='4' cellspacing='4' class='databox' style='width:98%'>";
|
echo "<table cellpadding='4' cellspacing='4' class='databox' style='width:98%'>";
|
||||||
echo "<th width='180px'>".__('Link name')."</th>";
|
echo "<th width='180px'>".__('Link name')."</th>";
|
||||||
echo "<th width='80px'>".__('Delete')."</th>";
|
echo "<th width='80px'>".__('Delete')."</th>";
|
||||||
|
@ -133,7 +133,6 @@ $buttons = array(
|
|||||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=builder">' .
|
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&tab=builder">' .
|
||||||
html_print_image ("images/config.png", true, array ("title" => __('Builder OS'))) .'</a>'));
|
html_print_image ("images/config.png", true, array ("title" => __('Builder OS'))) .'</a>'));
|
||||||
|
|
||||||
|
|
||||||
$buttons[$tab]['active'] = true;
|
$buttons[$tab]['active'] = true;
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
|
@ -75,6 +75,7 @@ if ($id_profile || $new_profile) {
|
|||||||
require ("general/footer.php");
|
require ("general/footer.php");
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,12 +144,12 @@ if ($id_profile || $new_profile) {
|
|||||||
if ($new_profile) {
|
if ($new_profile) {
|
||||||
html_print_submit_button (__('Add'), "crt", false, 'class="sub wand"');
|
html_print_submit_button (__('Add'), "crt", false, 'class="sub wand"');
|
||||||
html_print_input_hidden ('create_profile', 1);
|
html_print_input_hidden ('create_profile', 1);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_input_hidden ('id', $id_profile);
|
html_print_input_hidden ('id', $id_profile);
|
||||||
html_print_input_hidden ('update_profile', 1);
|
html_print_input_hidden ('update_profile', 1);
|
||||||
html_print_submit_button (__('Update'), "upd", false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), "upd", false, 'class="sub upd"');
|
||||||
}
|
}
|
||||||
echo "</div></form>";
|
echo "</div></form>";
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@ -398,7 +398,7 @@ function db_get_row_filter($table, $filter, $fields = false, $where_join = 'AND'
|
|||||||
function db_get_sql ($sql, $field = 0, $search_history_db = false) {
|
function db_get_sql ($sql, $field = 0, $search_history_db = false) {
|
||||||
$result = db_get_all_rows_sql ($sql, $search_history_db);
|
$result = db_get_all_rows_sql ($sql, $search_history_db);
|
||||||
|
|
||||||
if($result === false)
|
if ($result === false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$ax = 0;
|
$ax = 0;
|
||||||
|
@ -393,6 +393,7 @@ function menu_get_sec_pages($sec,$menu_hash = false) {
|
|||||||
else {
|
else {
|
||||||
$menu = json_decode(base64_decode($menu_hash),true);
|
$menu = json_decode(base64_decode($menu_hash),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the sec2 of the main section
|
// Get the sec2 of the main section
|
||||||
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
||||||
|
|
||||||
|
@ -943,7 +943,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
}
|
}
|
||||||
|
|
||||||
$borderStyle = '';
|
$borderStyle = '';
|
||||||
if(substr($img,0,1) == '4') {
|
if (substr($img,0,1) == '4') {
|
||||||
$img_style['border'] ='2px solid #ffa300;';
|
$img_style['border'] ='2px solid #ffa300;';
|
||||||
$img = substr_replace($img, '', 0,1);
|
$img = substr_replace($img, '', 0,1);
|
||||||
}
|
}
|
||||||
@ -1314,7 +1314,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
enterprise_hook("enterprise_visual_map_print_item",
|
enterprise_hook("enterprise_visual_map_print_item",
|
||||||
array($layout_data, $status, $colorStatus));
|
array($layout_data, $status, $colorStatus, 'operation'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1385,14 +1385,14 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
|||||||
else
|
else
|
||||||
$groups = users_get_groups ($id_user, 'IR', false);
|
$groups = users_get_groups ($id_user, 'IR', false);
|
||||||
|
|
||||||
if(!empty($groups)) {
|
if (!empty($groups)) {
|
||||||
if ($where != '') {
|
if ($where != '') {
|
||||||
$where .= ' AND ';
|
$where .= ' AND ';
|
||||||
}
|
}
|
||||||
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($where == '') {
|
if ($where == '') {
|
||||||
$where = array();
|
$where = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,6 @@ function parse_oracle_dump($connection, $url, $debug = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function oracle_drop_all_objects ($connection) {
|
function oracle_drop_all_objects ($connection) {
|
||||||
|
|
||||||
//Drop all objects of the current installation
|
//Drop all objects of the current installation
|
||||||
$stmt = oci_parse($connection,
|
$stmt = oci_parse($connection,
|
||||||
"BEGIN " .
|
"BEGIN " .
|
||||||
@ -623,12 +622,11 @@ function install_step3() {
|
|||||||
";
|
";
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
echo " <div align='right'><br>
|
echo "<div align='right'><br>
|
||||||
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
||||||
</div>
|
</div>";
|
||||||
";
|
|
||||||
}
|
}
|
||||||
echo " </form>
|
echo "</form>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
print_logo_status (4,6);
|
print_logo_status (4,6);
|
||||||
@ -704,7 +702,7 @@ function install_step4() {
|
|||||||
$step1 = mysql_query ("CREATE DATABASE $dbname");
|
$step1 = mysql_query ("CREATE DATABASE $dbname");
|
||||||
check_generic ($step1, "Creating database '$dbname'");
|
check_generic ($step1, "Creating database '$dbname'");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$step = 1;
|
$step = 1;
|
||||||
}
|
}
|
||||||
if ($step1 == 1) {
|
if ($step1 == 1) {
|
||||||
@ -847,7 +845,7 @@ function install_step4() {
|
|||||||
|
|
||||||
check_generic ($step1, "Creating database '$dbname'");
|
check_generic ($step1, "Creating database '$dbname'");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$step1 = 1;
|
$step1 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@ global $config;
|
|||||||
// Login check
|
// Login check
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (is_ajax()){
|
if (is_ajax()) {
|
||||||
require_once("include/functions_reporting.php");
|
require_once("include/functions_reporting.php");
|
||||||
|
|
||||||
$get_alert_fired = get_parameter("get_alert_fired", 0);
|
$get_alert_fired = get_parameter("get_alert_fired", 0);
|
||||||
|
|
||||||
if ($get_alert_fired){
|
if ($get_alert_fired) {
|
||||||
// Calculate alerts fired
|
// Calculate alerts fired
|
||||||
$data_reporting = reporting_get_group_stats();
|
$data_reporting = reporting_get_group_stats();
|
||||||
echo $data_reporting['monitor_alerts_fired'];
|
echo $data_reporting['monitor_alerts_fired'];
|
||||||
@ -85,7 +85,6 @@ if ($idAgent != 0) {
|
|||||||
$idGroup = false;
|
$idGroup = false;
|
||||||
|
|
||||||
$print_agent = false;
|
$print_agent = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!check_acl ($config["id_user"], 0, "AR")) {
|
if (!check_acl ($config["id_user"], 0, "AR")) {
|
||||||
|
@ -77,23 +77,24 @@ if ($moduletype_name == "log4x") {
|
|||||||
|
|
||||||
if ($selection_mode == "fromnow") {
|
if ($selection_mode == "fromnow") {
|
||||||
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
$sql_body = sprintf ("FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND message like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
||||||
}
|
}
|
||||||
|
|
||||||
$columns = array(
|
$columns = array(
|
||||||
|
|
||||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
||||||
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
||||||
"Message" => array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
"Message"=> array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||||
"StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%")
|
"StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%")
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} else if (preg_match ("/string/", $moduletype_name)) {
|
else if (preg_match ("/string/", $moduletype_name)) {
|
||||||
$sql_freestring = '%' . $freestring . '%';
|
$sql_freestring = '%' . $freestring . '%';
|
||||||
if ($selection_mode == "fromnow") {
|
if ($selection_mode == "fromnow") {
|
||||||
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, get_system_time () - $period);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND datos like '%s' AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $sql_freestring, $datetime_from, $datetime_to);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,10 +103,12 @@ if ($moduletype_name == "log4x") {
|
|||||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if ($selection_mode == "fromnow") {
|
if ($selection_mode == "fromnow") {
|
||||||
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp >= %d AND utimestamp <= %d ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ $update_networkmap = get_parameter ('update_networkmap', 0);
|
|||||||
$recenter_networkmap = get_parameter ('recenter_networkmap', 0);
|
$recenter_networkmap = get_parameter ('recenter_networkmap', 0);
|
||||||
$hidden_options = get_parameter ('hidden_options', 1);
|
$hidden_options = get_parameter ('hidden_options', 1);
|
||||||
|
|
||||||
if($delete_networkmap) {
|
if ($delete_networkmap) {
|
||||||
$result = networkmap_delete_networkmap($id_networkmap);
|
$result = networkmap_delete_networkmap($id_networkmap);
|
||||||
$message = ui_print_result_message ($result,
|
$message = ui_print_result_message ($result,
|
||||||
__('Network map deleted successfully'),
|
__('Network map deleted successfully'),
|
||||||
@ -50,7 +50,7 @@ if($delete_networkmap) {
|
|||||||
$id_networkmap = 0;
|
$id_networkmap = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($add_networkmap) {
|
if ($add_networkmap) {
|
||||||
// Load variables
|
// Load variables
|
||||||
$layout = 'radial';
|
$layout = 'radial';
|
||||||
$depth = 'all';
|
$depth = 'all';
|
||||||
@ -103,7 +103,7 @@ if($save_networkmap || $update_networkmap) {
|
|||||||
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
|
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
|
||||||
$subcheck = db_get_value('name', 'tnetwork_map', 'id_networkmap', $id_networkmap);
|
$subcheck = db_get_value('name', 'tnetwork_map', 'id_networkmap', $id_networkmap);
|
||||||
|
|
||||||
if($save_networkmap){
|
if($save_networkmap) {
|
||||||
if (!$check || $subcheck == $name) {
|
if (!$check || $subcheck == $name) {
|
||||||
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
||||||
'nooverlap' => $nooverlap, 'simple' => $simple, 'regenerate' => $regen, 'font_size' => $font_size,
|
'nooverlap' => $nooverlap, 'simple' => $simple, 'regenerate' => $regen, 'font_size' => $font_size,
|
||||||
@ -206,7 +206,7 @@ $buttons['addmap'] = array('active' => $activeTab == false,
|
|||||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&add_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&add_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||||
html_print_image("images/add.png", true, array ("title" => __('Add map'))) .'</a>');
|
html_print_image("images/add.png", true, array ("title" => __('Add map'))) .'</a>');
|
||||||
|
|
||||||
if(!$nomaps && $id_networkmap != 0) {
|
if (!$nomaps && $id_networkmap != 0) {
|
||||||
$buttons['deletemap'] = array('active' => $activeTab == false,
|
$buttons['deletemap'] = array('active' => $activeTab == false,
|
||||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&delete_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&delete_networkmap=1&tab='.$activeTab.'&pure='.$pure.'">' .
|
||||||
html_print_image("images/cross.png", true, array ("title" => __('Delete map'))) .'</a>');
|
html_print_image("images/cross.png", true, array ("title" => __('Delete map'))) .'</a>');
|
||||||
|
@ -127,13 +127,13 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||||||
"godmode/reporting/map_builder",
|
"godmode/reporting/map_builder",
|
||||||
"godmode/reporting/visual_console_builder");
|
"godmode/reporting/visual_console_builder");
|
||||||
|
|
||||||
if (!empty($config['vc_refr'])){
|
if (!empty($config['vc_refr'])) {
|
||||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['vc_refr'];
|
$sub["godmode/reporting/map_builder"]["refr"] = $config['vc_refr'];
|
||||||
}
|
}
|
||||||
else if (!empty($config['refr'])){
|
else if (!empty($config['refr'])) {
|
||||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['refr'];
|
$sub["godmode/reporting/map_builder"]["refr"] = $config['refr'];
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$sub["godmode/reporting/map_builder"]["refr"] = 60;
|
$sub["godmode/reporting/map_builder"]["refr"] = 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,8 @@ if ($save != '' && check_acl ($config["id_user"], 0, "AW")) {
|
|||||||
if ($filter_id === false) {
|
if ($filter_id === false) {
|
||||||
$filter_id = 0;
|
$filter_id = 0;
|
||||||
echo '<h3 class="error">'.__ ('Error creating filter').'</h3>';
|
echo '<h3 class="error">'.__ ('Error creating filter').'</h3>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<h3 class="suc">'.__ ('Filter created successfully').'</h3>';
|
echo '<h3 class="suc">'.__ ('Filter created successfully').'</h3>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,8 @@ if($update_date){
|
|||||||
$date = get_parameter_post ('date');
|
$date = get_parameter_post ('date');
|
||||||
$time = get_parameter_post ('time');
|
$time = get_parameter_post ('time');
|
||||||
$interval = get_parameter('period','86400');
|
$interval = get_parameter('period','86400');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$date = date ("Y/m/d", get_system_time ());
|
$date = date ("Y/m/d", get_system_time ());
|
||||||
$time = date ("H:i:s", get_system_time ());
|
$time = date ("H:i:s", get_system_time ());
|
||||||
$interval ='86400';
|
$interval ='86400';
|
||||||
|
@ -109,10 +109,11 @@ check_login ();
|
|||||||
|
|
||||||
$id_report = (int) get_parameter ('id');
|
$id_report = (int) get_parameter ('id');
|
||||||
|
|
||||||
if (! $id_report) {
|
if (!$id_report) {
|
||||||
db_pandora_audit("HACK Attempt",
|
db_pandora_audit("HACK Attempt",
|
||||||
"Trying to access graph viewer without valid ID");
|
"Trying to access graph viewer without valid ID");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +274,8 @@ foreach ($contents as $content) {
|
|||||||
$sla_value = reporting_get_agentmodule_sla ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $datetime, $content, $content['time_from'], $content['time_to']);
|
$sla_value = reporting_get_agentmodule_sla ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $datetime, $content, $content['time_from'], $content['time_to']);
|
||||||
if ($sla_value === false) {
|
if ($sla_value === false) {
|
||||||
$sla_data["error"] = __('Unknown');
|
$sla_data["error"] = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if ($sla_value < $sla['sla_limit']) {
|
if ($sla_value < $sla['sla_limit']) {
|
||||||
$sla_data["failed"] = true;
|
$sla_data["failed"] = true;
|
||||||
}
|
}
|
||||||
@ -288,7 +290,8 @@ foreach ($contents as $content) {
|
|||||||
$monitor_value = reporting_get_agentmodule_sla ($content['id_agent_module'], $content['period'], 1, false, $datetime);
|
$monitor_value = reporting_get_agentmodule_sla ($content['id_agent_module'], $content['period'], 1, false, $datetime);
|
||||||
if ($monitor_value === false) {
|
if ($monitor_value === false) {
|
||||||
$monitor_value = __('Unknown');
|
$monitor_value = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$monitor_value = format_numeric ($monitor_value);
|
$monitor_value = format_numeric ($monitor_value);
|
||||||
}
|
}
|
||||||
$data["objdata"]["good"] = $monitor_value;
|
$data["objdata"]["good"] = $monitor_value;
|
||||||
@ -303,7 +306,8 @@ foreach ($contents as $content) {
|
|||||||
$data["objdata"] = reporting_get_agentmodule_data_average ($content['id_agent_module'], $content['period'], $datetime);
|
$data["objdata"] = reporting_get_agentmodule_data_average ($content['id_agent_module'], $content['period'], $datetime);
|
||||||
if ($data["objdata"] === false) {
|
if ($data["objdata"] === false) {
|
||||||
$data["objdata"] = __('Unknown');
|
$data["objdata"] = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -313,7 +317,8 @@ foreach ($contents as $content) {
|
|||||||
$data["objdata"] = reporting_get_agentmodule_data_max ($content['id_agent_module'], $content['period'], $datetime);
|
$data["objdata"] = reporting_get_agentmodule_data_max ($content['id_agent_module'], $content['period'], $datetime);
|
||||||
if ($data["objdata"] === false) {
|
if ($data["objdata"] === false) {
|
||||||
$data["objdata"] = __('Unknown');
|
$data["objdata"] = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -323,7 +328,8 @@ foreach ($contents as $content) {
|
|||||||
$data["objdata"] = reporting_get_agentmodule_data_min ($content['id_agent_module'], $content['period'], $datetime);
|
$data["objdata"] = reporting_get_agentmodule_data_min ($content['id_agent_module'], $content['period'], $datetime);
|
||||||
if ($data["objdata"] === false) {
|
if ($data["objdata"] === false) {
|
||||||
$data["objdata"] = __('Unknown');
|
$data["objdata"] = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -333,7 +339,8 @@ foreach ($contents as $content) {
|
|||||||
$data["objdata"] = reporting_get_agentmodule_data_sum ($content['id_agent_module'], $content['period'], $datetime);
|
$data["objdata"] = reporting_get_agentmodule_data_sum ($content['id_agent_module'], $content['period'], $datetime);
|
||||||
if ($data["objdata"] === false) {
|
if ($data["objdata"] === false) {
|
||||||
$data["objdata"] = __('Unknown');
|
$data["objdata"] = __('Unknown');
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -580,7 +587,8 @@ foreach ($contents as $content) {
|
|||||||
$ttr = reporting_get_agentmodule_ttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
$ttr = reporting_get_agentmodule_ttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||||
if ($ttr === false) {
|
if ($ttr === false) {
|
||||||
$ttr = __('Unknown');
|
$ttr = __('Unknown');
|
||||||
} else if ($ttr != 0) {
|
}
|
||||||
|
else if ($ttr != 0) {
|
||||||
$ttr = human_time_description_raw ($ttr);
|
$ttr = human_time_description_raw ($ttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -591,7 +599,8 @@ foreach ($contents as $content) {
|
|||||||
$tto = reporting_get_agentmodule_tto ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
$tto = reporting_get_agentmodule_tto ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||||
if ($tto === false) {
|
if ($tto === false) {
|
||||||
$tto = __('Unknown');
|
$tto = __('Unknown');
|
||||||
} else if ($tto != 0) {
|
}
|
||||||
|
else if ($tto != 0) {
|
||||||
$tto = human_time_description_raw ($tto);
|
$tto = human_time_description_raw ($tto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,7 +611,8 @@ foreach ($contents as $content) {
|
|||||||
$mtbf = reporting_get_agentmodule_mtbf ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
$mtbf = reporting_get_agentmodule_mtbf ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||||
if ($mtbf === false) {
|
if ($mtbf === false) {
|
||||||
$mtbf = __('Unknown');
|
$mtbf = __('Unknown');
|
||||||
} else if ($mtbf != 0) {
|
}
|
||||||
|
else if ($mtbf != 0) {
|
||||||
$mtbf = human_time_description_raw ($mtbf);
|
$mtbf = human_time_description_raw ($mtbf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,7 +623,8 @@ foreach ($contents as $content) {
|
|||||||
$mttr = reporting_get_agentmodule_mttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
$mttr = reporting_get_agentmodule_mttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||||
if ($mttr === false) {
|
if ($mttr === false) {
|
||||||
$mttr = __('Unknown');
|
$mttr = __('Unknown');
|
||||||
} else if ($mttr != 0) {
|
}
|
||||||
|
else if ($mttr != 0) {
|
||||||
$mttr = human_time_description_raw ($mttr);
|
$mttr = human_time_description_raw ($mttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +441,8 @@ if ($traps !== false) {
|
|||||||
//Status
|
//Status
|
||||||
if ($trap["status"] == 0) {
|
if ($trap["status"] == 0) {
|
||||||
$data[0] = html_print_image("images/pixel_red.png", true, array("title" => __('Not validated'), "width" => "20", "height" => "20"));
|
$data[0] = html_print_image("images/pixel_red.png", true, array("title" => __('Not validated'), "width" => "20", "height" => "20"));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$data[0] = html_print_image("images/pixel_green.png", true, array("title" => __('Validated'), "width" => "20", "height" => "20"));
|
$data[0] = html_print_image("images/pixel_green.png", true, array("title" => __('Validated'), "width" => "20", "height" => "20"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +453,8 @@ if ($traps !== false) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$data[1] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap["source"].'" title="'.__('Create agent').'">'.$trap["source"].'</a>';
|
$data[1] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap["source"].'" title="'.__('Create agent').'">'.$trap["source"].'</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
|
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -533,27 +535,34 @@ if ($traps !== false) {
|
|||||||
<tr><td align="left" valign="top" width="15%" ><b>' . __('Custom data:') . '</b></td><td align="left" >' . $trap['oid_custom'] . '</td></tr>'
|
<tr><td align="left" valign="top" width="15%" ><b>' . __('Custom data:') . '</b></td><td align="left" >' . $trap['oid_custom'] . '</td></tr>'
|
||||||
. '<tr><td align="left" valign="top">' . '<b>' . __('OID:') . '</td><td align="left"> ' . $trap['oid'] . '</td></tr>';
|
. '<tr><td align="left" valign="top">' . '<b>' . __('OID:') . '</td><td align="left"> ' . $trap['oid'] . '</td></tr>';
|
||||||
|
|
||||||
if ($trap["description"] != ""){
|
if ($trap["description"] != "") {
|
||||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Description:') . '</td><td align="left">' . $trap['description'] . '</td></tr>';
|
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Description:') . '</td><td align="left">' . $trap['description'] . '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($trap["type"] != ""){
|
if ($trap["type"] != "") {
|
||||||
$trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm start (1)'), 2 => __('Link down (2)'), 3 => __('Link up (3)'), 4 => __('Authentication failure (4)'), 5 => __('Other'));
|
$trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm start (1)'), 2 => __('Link down (2)'), 3 => __('Link up (3)'), 4 => __('Authentication failure (4)'), 5 => __('Other'));
|
||||||
|
|
||||||
switch ($trap["type"]){
|
switch ($trap["type"]) {
|
||||||
case -1: $desc_trap_type = __('None');
|
case -1:
|
||||||
|
$desc_trap_type = __('None');
|
||||||
break;
|
break;
|
||||||
case 0: $desc_trap_type = __('Cold start (0)');
|
case 0:
|
||||||
|
$desc_trap_type = __('Cold start (0)');
|
||||||
break;
|
break;
|
||||||
case 1: $desc_trap_type = __('Warm start (1)');
|
case 1:
|
||||||
|
$desc_trap_type = __('Warm start (1)');
|
||||||
break;
|
break;
|
||||||
case 2: $desc_trap_type = __('Link down (2)');
|
case 2:
|
||||||
|
$desc_trap_type = __('Link down (2)');
|
||||||
break;
|
break;
|
||||||
case 3: $desc_trap_type = __('Link up (3)');
|
case 3:
|
||||||
|
$desc_trap_type = __('Link up (3)');
|
||||||
break;
|
break;
|
||||||
case 4: $desc_trap_type = __('Authentication failure (4)');
|
case 4:
|
||||||
|
$desc_trap_type = __('Authentication failure (4)');
|
||||||
break;
|
break;
|
||||||
default: $desc_trap_type = __('Other');
|
default:
|
||||||
|
$desc_trap_type = __('Other');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Type:') . '</td><td align="left">' . $desc_trap_type . '</td></tr>';
|
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Type:') . '</td><td align="left">' . $desc_trap_type . '</td></tr>';
|
||||||
@ -575,7 +584,8 @@ $trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm s
|
|||||||
// No matching traps
|
// No matching traps
|
||||||
if ($idx == 0) {
|
if ($idx == 0) {
|
||||||
echo '<div class="nf">'.__('No matching traps found').'</div>';
|
echo '<div class="nf">'.__('No matching traps found').'</div>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +646,6 @@ if (is_ajax ())
|
|||||||
if ($row["estado"] == 0 AND $row["utimestamp"] == 0 AND ($row["id_tipo_modulo"] >= 21 AND $row["id_tipo_modulo"] <= 23)){
|
if ($row["estado"] == 0 AND $row["utimestamp"] == 0 AND ($row["id_tipo_modulo"] >= 21 AND $row["id_tipo_modulo"] <= 23)){
|
||||||
$status = STATUS_MODULE_NO_DATA;
|
$status = STATUS_MODULE_NO_DATA;
|
||||||
$title = __('UNKNOWN');
|
$title = __('UNKNOWN');
|
||||||
|
|
||||||
} // Else checks module status
|
} // Else checks module status
|
||||||
elseif ($row["estado"] == 1) {
|
elseif ($row["estado"] == 1) {
|
||||||
$status = STATUS_MODULE_CRITICAL;
|
$status = STATUS_MODULE_CRITICAL;
|
||||||
|
@ -113,7 +113,8 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||||||
$pass_ok = login_validate_pass($password_new, $id, true);
|
$pass_ok = login_validate_pass($password_new, $id, true);
|
||||||
if ($pass_ok != 1) {
|
if ($pass_ok != 1) {
|
||||||
ui_print_error_message($pass_ok);
|
ui_print_error_message($pass_ok);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$return = update_user_password ($id, $password_new);
|
$return = update_user_password ($id, $password_new);
|
||||||
if ($return) {
|
if ($return) {
|
||||||
$return2 = save_pass_history($id, $password_new);
|
$return2 = save_pass_history($id, $password_new);
|
||||||
@ -122,14 +123,16 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||||||
__('Password successfully updated'),
|
__('Password successfully updated'),
|
||||||
__('Error updating passwords: %s', $config['auth_error']));
|
__('Error updating passwords: %s', $config['auth_error']));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$return = update_user_password ($id, $password_new);
|
$return = update_user_password ($id, $password_new);
|
||||||
ui_print_result_message ($return,
|
ui_print_result_message ($return,
|
||||||
__('Password successfully updated'),
|
__('Password successfully updated'),
|
||||||
__('Error updating passwords: %s', $config['auth_error']));
|
__('Error updating passwords: %s', $config['auth_error']));
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($password_new !== "NON-INIT") {
|
}
|
||||||
|
elseif ($password_new !== "NON-INIT") {
|
||||||
ui_print_error_message (__('Passwords didn\'t match or other problem encountered while updating passwords'));
|
ui_print_error_message (__('Passwords didn\'t match or other problem encountered while updating passwords'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,19 +148,11 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||||||
__('Error updating user info'));
|
__('Error updating user info'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload page to update skin
|
|
||||||
/* if ($return){
|
|
||||||
header ('location:' . $config['homeurl'] . '/index.php?sec=workspace&sec2=operation/users/user_edit&status=1');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
header ('location:' . $config['homeurl'] . '/index.php?sec=workspace&sec2=operation/users/user_edit&status=0');
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$user_info = $upd_info;
|
$user_info = $upd_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prints action status for current message
|
// Prints action status for current message
|
||||||
if ($status != -1){
|
if ($status != -1) {
|
||||||
ui_print_result_message ($status,
|
ui_print_result_message ($status,
|
||||||
__('User info successfully updated'),
|
__('User info successfully updated'),
|
||||||
__('Error updating user info'));
|
__('Error updating user info'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user