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>
|
||||
|
||||
* 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)));
|
||||
|
||||
if(isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||
if (isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||
$is_synthetic_avg = true;
|
||||
}
|
||||
else {
|
||||
|
@ -63,6 +63,7 @@ if ($row !== false && is_array($row)) {
|
|||
break;
|
||||
default:
|
||||
$prediction_module = $custom_integer_1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -102,7 +103,7 @@ $sql = "SELECT id_agente, nombre FROM tagente";
|
|||
//Image src with skins
|
||||
$src_code = html_print_image('images/lightning.png', true, false, true);
|
||||
$data[1] .= html_print_input_text_extended ('agent_name',$agent_name, 'text_agent_name', '', 30, 100, $is_service, '',
|
||||
array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true, false);
|
||||
array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true, false);
|
||||
$data[1] .= '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a> <br/>';
|
||||
$data[1] .= html_print_label(__("Module"),'prediction_module',true);
|
||||
if($id_agente) {
|
||||
|
@ -132,8 +133,8 @@ push_table_simple ($data, 'prediction_module');
|
|||
$selector_form = enterprise_hook('get_selector_form', array($custom_integer_1));
|
||||
if ($selector_form !== ENTERPRISE_NOT_HOOK) {
|
||||
$data = array();
|
||||
$data[0] = '';
|
||||
$data[1] = $selector_form;
|
||||
$data[0] = '';
|
||||
$data[1] = $selector_form;
|
||||
|
||||
$table_simple->colspan['service_module'][1] = 3;
|
||||
push_table_simple ($data, 'service_module');
|
||||
|
@ -173,5 +174,4 @@ $(document).ready(function() {
|
|||
enterprise_hook('setup_services_synth', array($is_service, $is_synthetic, $is_synthetic_avg, $is_netflow, $ops));
|
||||
?>
|
||||
});
|
||||
|
||||
</script>
|
|
@ -223,7 +223,8 @@ foreach ($id_alerts as $alert) {
|
|||
if ($alert['disabled']) {
|
||||
$data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 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_hidden ('disable_alert', 1, true);
|
||||
}
|
||||
|
@ -244,7 +245,8 @@ foreach ($id_alerts as $alert) {
|
|||
|
||||
if (isset($data)){
|
||||
html_print_table ($table);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<div class='nf'>".__('No alerts found')."</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -52,21 +52,21 @@ if ($create_special_day) {
|
|||
$description = (string) get_parameter ('description');
|
||||
|
||||
list($year, $month, $day) = explode("-", $date);
|
||||
if ($year == '*') {
|
||||
if ($year == '*') {
|
||||
# '0001' means every year.
|
||||
$year = '0001';
|
||||
$date = $year . '-' . $month . '-' . $day;
|
||||
}
|
||||
$year = '0001';
|
||||
$date = $year . '-' . $month . '-' . $day;
|
||||
}
|
||||
|
||||
if (!checkdate ($month, $day, $year)) {
|
||||
if (!checkdate ($month, $day, $year)) {
|
||||
$result = '';
|
||||
}
|
||||
else {
|
||||
$date_check = db_get_value ('date', 'talert_special_days', 'date
|
||||
', $date);
|
||||
if ($date_check == $date) {
|
||||
$result = '';
|
||||
}
|
||||
', $date);
|
||||
if ($date_check == $date) {
|
||||
$result = '';
|
||||
}
|
||||
else {
|
||||
$result = alerts_create_alert_special_day ($date, $same_day, array ('description' => $description));
|
||||
$info = 'Date: ' . $date . ' Same day of the week: ' . $same_day . ' Description: ' . $description;
|
||||
|
@ -168,7 +168,7 @@ foreach ($special_days as $special_day) {
|
|||
$data[0] = '<span style="font-size: 7.5pt">';
|
||||
# '0001' means every year.
|
||||
$data[0] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_special_days&id='.$special_day['id'].'">'.
|
||||
str_replace('0001', '*', $special_day['date']) . '</a>';
|
||||
str_replace('0001', '*', $special_day['date']) . '</a>';
|
||||
$data[0] .= '</span>';
|
||||
switch ($special_day['same_day']) {
|
||||
case 'monday':
|
||||
|
|
|
@ -336,9 +336,9 @@ if ($create_template) {
|
|||
$matches = (bool) get_parameter ('matches_value');
|
||||
$priority = (int) get_parameter ('priority');
|
||||
$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 "postgresql":
|
||||
$values = array ('description' => $description,
|
||||
|
@ -511,7 +511,8 @@ if ($step == 2) {
|
|||
$table->data[4][1] = html_print_select_from_sql ($sql_query,
|
||||
'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);
|
||||
} else if ($step == 3) {
|
||||
}
|
||||
else if ($step == 3) {
|
||||
/* Alert recover */
|
||||
if (! $recovery_notify) {
|
||||
$table->rowstyle = array ();
|
||||
|
@ -531,7 +532,8 @@ if ($step == 2) {
|
|||
$table->data['field3'][0] = __('Field 3');
|
||||
$table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
|
||||
$field3_recovery, '', true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* Step 1 by default */
|
||||
$table->size = array ();
|
||||
$table->size[0] = '20%';
|
||||
|
@ -543,24 +545,24 @@ if ($step == 2) {
|
|||
|
||||
$show_matches = false;
|
||||
switch ($type) {
|
||||
case "equal":
|
||||
case "not_equal":
|
||||
case "regex":
|
||||
$show_matches = true;
|
||||
$table->rowstyle['value'] = '';
|
||||
break;
|
||||
case "max_min":
|
||||
$show_matches = true;
|
||||
case "max":
|
||||
$table->rowstyle['max'] = '';
|
||||
if ($type == 'max')
|
||||
case "equal":
|
||||
case "not_equal":
|
||||
case "regex":
|
||||
$show_matches = true;
|
||||
$table->rowstyle['value'] = '';
|
||||
break;
|
||||
case "max_min":
|
||||
$show_matches = true;
|
||||
case "max":
|
||||
$table->rowstyle['max'] = '';
|
||||
if ($type == 'max')
|
||||
break;
|
||||
case "min":
|
||||
$table->rowstyle['min'] = '';
|
||||
break;
|
||||
case "onchange":
|
||||
$show_matches = true;
|
||||
break;
|
||||
case "min":
|
||||
$table->rowstyle['min'] = '';
|
||||
break;
|
||||
case "onchange":
|
||||
$show_matches = true;
|
||||
break;
|
||||
}
|
||||
|
||||
$table->data[0][0] = __('Name');
|
||||
|
@ -621,7 +623,8 @@ if ($step == 2) {
|
|||
/* If it's the last step it will redirect to template lists */
|
||||
if ($step >= LAST_STEP) {
|
||||
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_templates">';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<form method="post">';
|
||||
}
|
||||
html_print_table ($table);
|
||||
|
@ -630,13 +633,15 @@ echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|||
if ($id) {
|
||||
html_print_input_hidden ('id', $id);
|
||||
html_print_input_hidden ('update_template', 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_template', 1);
|
||||
}
|
||||
|
||||
if ($step >= LAST_STEP) {
|
||||
html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('step', $step + 1);
|
||||
html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
|
||||
}
|
||||
|
@ -685,7 +690,8 @@ function render_example () {
|
|||
vmax = parseInt ($("input#text-max").attr ("value"));
|
||||
if (isNaN (vmax) || vmax == "") {
|
||||
$("span#max").empty ().append ("0");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#max").empty ().append (vmax);
|
||||
}
|
||||
|
||||
|
@ -693,7 +699,8 @@ function render_example () {
|
|||
vmin = parseInt ($("input#text-min").attr ("value"));
|
||||
if (isNaN (vmin) || vmin == "") {
|
||||
$("span#min").empty ().append ("0");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#min").empty ().append (vmin);
|
||||
}
|
||||
|
||||
|
@ -701,7 +708,8 @@ function render_example () {
|
|||
vvalue = $("input#text-value").attr ("value");
|
||||
if (vvalue == "") {
|
||||
$("span#value").empty ().append ("<em><?php echo __('Empty');?></em>");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("span#value").empty ().append (vvalue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,18 +42,22 @@ $buttons = array(
|
|||
html_print_image("images/god6.png", true, array ("title" => __('Custom fields'))) . '</a>'),
|
||||
);
|
||||
|
||||
switch ($section){
|
||||
case 'filter': $buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
case 'fields': $buttons['fields']['active'] = true;
|
||||
$subpage = ' - ' . __('Custom fields');
|
||||
break;
|
||||
case 'view': $buttons['view']['active'] = true;
|
||||
break;
|
||||
default: $buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
switch ($section) {
|
||||
case 'filter':
|
||||
$buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
case 'fields':
|
||||
$buttons['fields']['active'] = true;
|
||||
$subpage = ' - ' . __('Custom fields');
|
||||
break;
|
||||
case 'view':
|
||||
$buttons['view']['active'] = true;
|
||||
break;
|
||||
default:
|
||||
$buttons['filter']['active'] = true;
|
||||
$subpage = ' - ' . __('Filters');
|
||||
break;
|
||||
}
|
||||
|
||||
ui_print_page_header (__("Manage events") . $subpage, "images/lightning_go.png", false, "", true, $buttons);
|
||||
|
|
|
@ -54,12 +54,12 @@ if ($id_group) {
|
|||
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
||||
echo "</table>";
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,16 +42,17 @@ if ($id_group) {
|
|||
$group = db_get_row ('tmodule_group', 'id_mg', $id_group);
|
||||
if ($group) {
|
||||
$name = $group["name"];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
||||
echo "</table>";
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -71,11 +72,11 @@ if ($id_group) {
|
|||
html_print_input_hidden ('update_group', 1);
|
||||
html_print_input_hidden ('id_group', $id_group);
|
||||
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_group', 1);
|
||||
html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
?>
|
||||
|
||||
|
|
|
@ -213,33 +213,34 @@ $(document).ready (function () {
|
|||
var idAgents = Array();
|
||||
jQuery.each ($("#id_agents option:selected"), function (i, val) {
|
||||
idAgents.push($(val).val());
|
||||
});
|
||||
});
|
||||
$("#template_loading").show();
|
||||
|
||||
var $select_template = $("#id_alert_templates").disable ();
|
||||
$("option", $select_template).remove ();
|
||||
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "godmode/massive/massive_add_action_alerts",
|
||||
{
|
||||
"page" : "godmode/massive/massive_add_action_alerts",
|
||||
"get_alerts" : 1,
|
||||
"id_agents[]" : idAgents
|
||||
},
|
||||
function (data, status) {
|
||||
options = "";
|
||||
jQuery.each (data, function (id, value) {
|
||||
options += "<option value=\""+id+"\">"+value+"</option>";
|
||||
});
|
||||
},
|
||||
function (data, status) {
|
||||
options = "";
|
||||
jQuery.each (data, function (id, value) {
|
||||
options += "<option value=\""+id+"\">"+value+"</option>";
|
||||
});
|
||||
|
||||
if(options == "") {
|
||||
options += "<option><?php echo __('None'); ?></option>";
|
||||
}
|
||||
if (options == "") {
|
||||
options += "<option><?php echo __('None'); ?></option>";
|
||||
}
|
||||
|
||||
$("#id_alert_templates").append (options);
|
||||
$("#template_loading").hide ();
|
||||
$select_template.enable ();
|
||||
},
|
||||
"json"
|
||||
);
|
||||
$("#id_alert_templates").append (options);
|
||||
$("#template_loading").hide ();
|
||||
$select_template.enable ();
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
|
||||
$("a.show_advanced_actions").click (function () {
|
||||
|
@ -249,6 +250,7 @@ $(document).ready (function () {
|
|||
actions = $(this).parents ("div").children ("span.advanced_actions")
|
||||
$("#advanced_actions").removeClass("advanced_actions invisible");
|
||||
$(this).remove ();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ $groups[0] = __('All');
|
|||
$table->colspan[2][1] = 2;
|
||||
$table->data[2][1] = html_print_select ($groups, 'groups_select',
|
||||
'', 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->rowstyle[3] = 'vertical-align: top;';
|
||||
|
|
|
@ -57,11 +57,11 @@ if ($delete_profiles) {
|
|||
foreach($profiles_id as $profile) {
|
||||
foreach($groups_id as $group) {
|
||||
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>';
|
||||
$result="";
|
||||
}
|
||||
else{
|
||||
}
|
||||
else {
|
||||
$user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up));
|
||||
|
||||
db_pandora_audit("User management",
|
||||
|
@ -69,7 +69,6 @@ if ($delete_profiles) {
|
|||
|
||||
$result = profile_delete_user_profile ($user, $id_up);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +119,7 @@ $data[2] .= '</span>';
|
|||
$users_profiles = "";
|
||||
|
||||
$data[2] .= html_print_select (array(), 'users_id[]', '', '', '',
|
||||
'', true, true, true, '', false, 'width: 100%');
|
||||
'', true, true, true, '', false, 'width: 100%');
|
||||
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
|
|
@ -310,7 +310,7 @@ $groups[0] = __('All');
|
|||
$table->colspan[2][1] = 2;
|
||||
$table->data[2][1] = html_print_select ($groups, 'groups_select',
|
||||
'', true, __('Select'), -1, true, false, true).
|
||||
' '.__('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->rowstyle[3] = 'vertical-align: top;';
|
||||
|
|
|
@ -136,7 +136,7 @@ $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
|||
$table->data[1][0] .= html_print_image("images/spinner.png", true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
$table->data[2][0] = __('Alert template');
|
||||
$table->data[2][0] .= '<span id="template_loading" class="invisible">';
|
||||
|
@ -189,11 +189,11 @@ $(document).ready (function () {
|
|||
});
|
||||
|
||||
$("#id_group").pandoraSelectGroupAgent ({
|
||||
agentSelect: "select#id_agents",
|
||||
agentSelect: "select#id_agents",
|
||||
recursion: function() {return recursion},
|
||||
callbackPost: function () {
|
||||
clear_alert_fields();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#id_agents").change (function () {
|
||||
|
@ -205,7 +205,8 @@ $(document).ready (function () {
|
|||
if (this.value != 0) {
|
||||
$("#id_enabled_alerts").enable ();
|
||||
$("#id_disabled_alerts").enable ();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$("#id_enabled_alerts").disable ();
|
||||
$("#id_disabled_alerts").disable ();
|
||||
}
|
||||
|
@ -217,7 +218,7 @@ $(document).ready (function () {
|
|||
jQuery.each ($("#id_agents option:selected"), function (i, val) {
|
||||
idAgents.push($(val).val());
|
||||
});
|
||||
$("#template_loading").show();
|
||||
$("#template_loading").show();
|
||||
|
||||
var $select_template = $("#id_alert_templates").disable ();
|
||||
$("option", $select_template).remove ();
|
||||
|
@ -249,7 +250,7 @@ $(document).ready (function () {
|
|||
var idAlertTemplates = Array();
|
||||
jQuery.each ($("#id_alert_templates option:selected"), function (i, val) {
|
||||
idAlertTemplates.push($(val).val());
|
||||
});
|
||||
});
|
||||
|
||||
var $select = $("#id_enabled_alerts").disable ();
|
||||
var $select2 = $("#id_disabled_alerts").disable ();
|
||||
|
@ -300,14 +301,13 @@ $(document).ready (function () {
|
|||
}
|
||||
|
||||
function clear_alert_fields() {
|
||||
var $select_template = $("#id_alert_templates").disable ();
|
||||
var $select_enabled = $("#id_enabled_alerts").disable ();
|
||||
var $select_disabled = $("#id_disabled_alerts").disable ();
|
||||
$("option", $select_template).remove ();
|
||||
$("option", $select_enabled).remove ();
|
||||
$("option", $select_disabled).remove ();
|
||||
}
|
||||
|
||||
var $select_template = $("#id_alert_templates").disable ();
|
||||
var $select_enabled = $("#id_enabled_alerts").disable ();
|
||||
var $select_disabled = $("#id_disabled_alerts").disable ();
|
||||
$("option", $select_template).remove ();
|
||||
$("option", $select_enabled).remove ();
|
||||
$("option", $select_disabled).remove ();
|
||||
}
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
|
@ -33,8 +33,8 @@ $tab = (string) get_parameter ('tab', 'massive_agents');
|
|||
$option = (string) get_parameter ('option', '');
|
||||
|
||||
$options_alerts = array('add_alerts' => __('Massive alerts addition'), 'delete_alerts' => __('Massive alerts deletion'),
|
||||
'add_action_alerts' => __('Massive alert actions addition'), 'delete_action_alerts' => __('Massive alert actions deletion'),
|
||||
'enable_disable_alerts' => __('Massive alert enable/disable'), 'standby_alerts' => __('Massive alert setting standby'));
|
||||
'add_action_alerts' => __('Massive alert actions addition'), 'delete_action_alerts' => __('Massive alert actions deletion'),
|
||||
'enable_disable_alerts' => __('Massive alert enable/disable'), 'standby_alerts' => __('Massive alert setting standby'));
|
||||
|
||||
$options_agents = array('edit_agents' => __('Massive agents edition'), 'delete_agents' => __('Massive agents deletion'));
|
||||
|
||||
|
@ -45,8 +45,9 @@ else {
|
|||
$options_users = array();
|
||||
}
|
||||
|
||||
$options_modules = array('delete_modules' => __('Massive modules deletion'), 'edit_modules' => __('Massive modules edition'),
|
||||
'copy_modules' => __('Massive modules copy'));
|
||||
$options_modules = array('delete_modules' => __('Massive modules deletion'),
|
||||
'edit_modules' => __('Massive modules edition'),
|
||||
'copy_modules' => __('Massive modules copy'));
|
||||
|
||||
$options_policies = array();
|
||||
|
||||
|
@ -99,20 +100,20 @@ if ($option == '') {
|
|||
}
|
||||
|
||||
$alertstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts">'
|
||||
. html_print_image ('images/bell.png', true, array ('title' => __('Alerts operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_alerts');
|
||||
. html_print_image ('images/bell.png', true, array ('title' => __('Alerts operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_alerts');
|
||||
|
||||
$userstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users">'
|
||||
. html_print_image ('images/group.png', true, array ('title' => __('Users operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_users');
|
||||
. html_print_image ('images/group.png', true, array ('title' => __('Users operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_users');
|
||||
|
||||
$agentstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_agents">'
|
||||
. html_print_image ('images/bricks.png', true, array ('title' => __('Agents operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_agents');
|
||||
. html_print_image ('images/bricks.png', true, array ('title' => __('Agents operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_agents');
|
||||
|
||||
$modulestab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">'
|
||||
. html_print_image ('images/brick.png', true, array ('title' => __('Modules operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_modules');
|
||||
. html_print_image ('images/brick.png', true, array ('title' => __('Modules operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_modules');
|
||||
|
||||
/* Collection */
|
||||
$policiestab = enterprise_hook('massive_policies_tab');
|
||||
|
@ -133,9 +134,9 @@ ui_print_page_header (__('Massive operations'). ' » '. $options[$option],
|
|||
|
||||
// Checks if the PHP configuration is correctly
|
||||
if ((get_cfg_var("max_execution_time") != 0) or (get_cfg_var("max_input_time") != -1)){
|
||||
echo '<div id="notify_conf" class="notify">';
|
||||
echo __("In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>");
|
||||
echo '</div>';
|
||||
echo '<div id="notify_conf" class="notify">';
|
||||
echo __("In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>");
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Catch all submit operations in this view to display Wait banner
|
||||
|
@ -159,9 +160,8 @@ echo '</div>';
|
|||
<script language="javascript" type="text/javascript">
|
||||
|
||||
|
||||
$(document).ready (function (){
|
||||
|
||||
$('#manage_config_form').submit( function(){
|
||||
$(document).ready (function () {
|
||||
$('#manage_config_form').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
|
@ -169,7 +169,7 @@ $(document).ready (function (){
|
|||
return false;
|
||||
});
|
||||
|
||||
$('#form_edit').submit( function(){
|
||||
$('#form_edit').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
|
@ -177,7 +177,7 @@ $(document).ready (function (){
|
|||
return false;
|
||||
});
|
||||
|
||||
$('[id^=form]').submit( function(){
|
||||
$('[id^=form]').submit( function() {
|
||||
confirm = confirm(" <?php echo __('Are you sure?'); ?> ");
|
||||
if (confirm)
|
||||
$("#loading").css("display", "");
|
||||
|
|
|
@ -129,7 +129,7 @@ $table->data[0][0] = '<form method="post" id="form_alerts" action="index.php?sec
|
|||
$table->data[0][0] .= html_print_input_hidden('id_alert_template_not_standby', $id_alert_templates, true);
|
||||
$table->data[0][0] .= __('Group');
|
||||
$table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
|
||||
'', '', '', true, false, true, '');
|
||||
'', '', '', true, false, true, '');
|
||||
$table->data[0][2] = __('Group recursion');
|
||||
$table->data[0][3] = html_print_checkbox ("recursion", 1, $recursion, true, false);
|
||||
|
||||
|
@ -138,7 +138,7 @@ $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
|
|||
$table->data[1][0] .= html_print_image('images/spinner.png', true);
|
||||
$table->data[1][0] .= '</span>';
|
||||
$table->data[1][1] = html_print_select (agents_get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
$table->data[2][0] = __('Alert template');
|
||||
$table->data[2][0] .= '<span id="template_loading" class="invisible">';
|
||||
|
@ -309,7 +309,6 @@ $(document).ready (function () {
|
|||
$("option", $select_not_standby).remove ();
|
||||
$("option", $select_standby).remove ();
|
||||
}
|
||||
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
|
@ -66,8 +66,9 @@ if ($update) {
|
|||
$parent = (int) get_parameter ('parent');
|
||||
|
||||
if ($name == '') {
|
||||
ui_print_error_message (__('Not updated. Blank name'));
|
||||
} else {
|
||||
ui_print_error_message (__('Not updated. Blank name'));
|
||||
}
|
||||
else {
|
||||
$result = db_process_sql_update ('tnetwork_component_group',
|
||||
array ('name' => $name,
|
||||
'parent' => $parent),
|
||||
|
@ -95,10 +96,11 @@ if ($delete) {
|
|||
else $result = false;
|
||||
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Delete component group #$id");
|
||||
} else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete component group #$id");
|
||||
}
|
||||
db_pandora_audit( "Module management", "Delete component group #$id");
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete component group #$id");
|
||||
}
|
||||
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully deleted'),
|
||||
|
@ -132,7 +134,8 @@ if ($multiple_delete) {
|
|||
$str_ids = implode (',', $ids);
|
||||
if ($result) {
|
||||
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");
|
||||
}
|
||||
ui_print_result_message ($result,
|
||||
|
|
|
@ -99,7 +99,7 @@ if ($create_component) {
|
|||
$custom_string_1 = '';
|
||||
$custom_string_2 = '';
|
||||
$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) {
|
||||
// New support for snmp v3
|
||||
$tcp_send = $snmp_version;
|
||||
|
@ -109,7 +109,7 @@ if ($create_component) {
|
|||
$custom_string_1 = $snmp3_privacy_method;
|
||||
$custom_string_2 = $snmp3_privacy_pass;
|
||||
$custom_string_3 = $snmp3_security_level;
|
||||
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
|
||||
$name_check = db_get_value ('name', 'tnetwork_component', 'name', $name);
|
||||
}
|
||||
if ($name && !$name_check) {
|
||||
|
||||
|
@ -147,7 +147,7 @@ if ($create_component) {
|
|||
'only_metaconsole' => $only_metaconsole));
|
||||
}
|
||||
else {
|
||||
$id = '';
|
||||
$id = '';
|
||||
}
|
||||
if ($id === false || !$id) {
|
||||
db_pandora_audit("Module management", "Fail try to create network component");
|
||||
|
@ -166,7 +166,8 @@ if ($update_component) {
|
|||
$custom_string_1 = '';
|
||||
$custom_string_2 = '';
|
||||
$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) {
|
||||
// New support for snmp v3
|
||||
$tcp_send = $snmp_version;
|
||||
|
@ -238,7 +239,8 @@ if ($delete_component) {
|
|||
|
||||
if ($result) {
|
||||
db_pandora_audit( "Module management", "Delete network component #$id");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit( "Module management", "Fail try to delete network component #$id");
|
||||
}
|
||||
|
||||
|
@ -265,7 +267,8 @@ if ($multiple_delete) {
|
|||
$str_ids = implode (',', $ids);
|
||||
if ($result) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -407,7 +410,7 @@ foreach ($components as $component) {
|
|||
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='>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table ($table);
|
||||
|
|
|
@ -187,13 +187,13 @@ if (isset($name))
|
|||
|
||||
// Header
|
||||
$tab = get_parameter("tab", "");
|
||||
switch ($tab){
|
||||
switch ($tab) {
|
||||
case "main":
|
||||
ui_print_page_header ($head, "", false, "graph_builder", true, $buttons);
|
||||
break;
|
||||
case "graph_editor":
|
||||
ui_print_page_header ($head, "", false, "graph_editor", true, $buttons);
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
ui_print_page_header ($head, "", false, "graph_builder", true, $buttons);
|
||||
break;
|
||||
|
@ -209,7 +209,7 @@ if ($update_graph)
|
|||
ui_print_result_message($success, __("Update the graph"), __("Bad update the graph"));
|
||||
|
||||
if ($delete_module) {
|
||||
ui_print_result_message($result, __('Graph deleted successfully'), __('There was a problem deleting Graph'));
|
||||
ui_print_result_message($result, __('Graph deleted successfully'), __('There was a problem deleting Graph'));
|
||||
}
|
||||
|
||||
// Parse CHUNK information into showable information
|
||||
|
|
|
@ -1565,7 +1565,7 @@ function chooseType() {
|
|||
$("#row_show_in_landscape").show();
|
||||
$("#row_servers").show();
|
||||
break;
|
||||
case 'sql_graph_vbar':
|
||||
case 'sql_graph_vbar':
|
||||
$("#row_description").show();
|
||||
$("#row_query").show();
|
||||
$("#row_custom").show();
|
||||
|
|
|
@ -134,7 +134,7 @@ if (isset($_GET["update"])) {
|
|||
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$result = false;
|
||||
|
@ -174,19 +174,19 @@ if (isset($_GET["create"])) {
|
|||
'parent_recursion' => $parent_recursion
|
||||
);
|
||||
|
||||
$reason = "";
|
||||
$reason = "";
|
||||
if ($name != "") {
|
||||
if (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
{
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
$reason = __("Network provided is not correct");
|
||||
$reason = __("Network provided is not correct");
|
||||
}
|
||||
elseif ($id_recon_script != 'NULL') {
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
}
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$result = false;
|
||||
|
@ -196,7 +196,7 @@ if (isset($_GET["create"])) {
|
|||
}
|
||||
else {
|
||||
echo '<h3 class="error">'.__('Error creating recon task').'</h3>';
|
||||
echo $reason;
|
||||
echo $reason;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,12 +205,15 @@ if (isset($_GET["create"])) {
|
|||
// --------------------------------
|
||||
//Pandora Admin must see all columns
|
||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
||||
$sql = sprintf('SELECT * FROM trecon_task RT, tusuario_perfil UP WHERE
|
||||
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
||||
$config['id_user']);
|
||||
$sql = sprintf('SELECT *
|
||||
FROM trecon_task RT, tusuario_perfil UP
|
||||
WHERE
|
||||
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
||||
$config['id_user']);
|
||||
|
||||
$result = db_get_all_rows_sql ($sql);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$result = db_get_all_rows_in_table('trecon_task');
|
||||
}
|
||||
$color=1;
|
||||
|
@ -226,7 +229,6 @@ if ($result !== false) {
|
|||
$table->style[8] = 'text-align: center;';
|
||||
|
||||
foreach ($result as $row) {
|
||||
|
||||
$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>';
|
||||
|
||||
|
@ -236,11 +238,12 @@ if ($result !== false) {
|
|||
$data[1] =__("N/A");
|
||||
|
||||
|
||||
if ($row["id_recon_script"] == 0){
|
||||
// Network recon task
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
// 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"]);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// APP recon task
|
||||
$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"]));
|
||||
|
@ -248,9 +251,10 @@ if ($result !== false) {
|
|||
|
||||
|
||||
// GROUP
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
$data[3] = ui_print_group_icon ($row["id_group"], true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[3] = "-";
|
||||
}
|
||||
|
||||
|
@ -258,9 +262,10 @@ if ($result !== false) {
|
|||
$data[4] = (($row["create_incident"] == 1) ? __('Yes') : __('No'));
|
||||
|
||||
// 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'));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[5] = "-";
|
||||
}
|
||||
// INTERVAL
|
||||
|
@ -270,9 +275,10 @@ if ($result !== false) {
|
|||
$data[6] =human_time_description_raw($row["interval_sweep"]);
|
||||
|
||||
// PORTS
|
||||
if ($row["id_recon_script"] == 0){
|
||||
if ($row["id_recon_script"] == 0) {
|
||||
$data[7] = substr($row["recon_ports"],0,15);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[7] = "-";
|
||||
}
|
||||
|
||||
|
@ -292,7 +298,8 @@ if ($result !== false) {
|
|||
|
||||
html_print_table ($table);
|
||||
unset ($table);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
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 '</form>';
|
||||
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, "" );
|
||||
|
||||
|
||||
if (isset($_POST["create"])){ // If create
|
||||
if (isset($_POST["create"])) { // If create
|
||||
$name = get_parameter_post ("name");
|
||||
$link = get_parameter_post ("link");
|
||||
|
||||
|
@ -43,13 +43,13 @@ 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"]);
|
||||
$name = io_safe_input($_POST["name"]);
|
||||
$link = io_safe_input($_POST["link"]);
|
||||
|
||||
$result = false;
|
||||
if ($name != '')
|
||||
if ($name != '')
|
||||
$result = db_process_sql_update("tlink", array('name' => $name, 'link' => $link), array('id_link' => $id_link));
|
||||
|
||||
if (! $result)
|
||||
|
@ -58,7 +58,7 @@ if (isset($_POST["update"])){ // if update
|
|||
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"]);
|
||||
|
||||
$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
|
||||
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
|
||||
if (isset($_GET["form_edit"])){
|
||||
if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))) {
|
||||
if (isset($_GET["form_edit"])) {
|
||||
$creation_mode = 0;
|
||||
$id_link = io_safe_input($_GET["id_link"]);
|
||||
|
||||
|
@ -81,7 +81,7 @@ if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){
|
|||
if ($row !== false) {
|
||||
$nombre = $row["name"];
|
||||
$link = $row["link"];
|
||||
}
|
||||
}
|
||||
else echo "<h3 class='error'>".__('Name error')."</h3>";
|
||||
}
|
||||
else { // form_add
|
||||
|
@ -128,8 +128,8 @@ else { // Main list view for Links editor
|
|||
|
||||
if (empty($rows)) {
|
||||
echo '<div class="nf">'.__("There isn't links").'</div>';
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox' style='width:98%'>";
|
||||
echo "<th width='180px'>".__('Link name')."</th>";
|
||||
echo "<th width='80px'>".__('Delete')."</th>";
|
||||
|
|
|
@ -91,7 +91,7 @@ switch ($action) {
|
|||
$values['icon_name'] = $icon;
|
||||
}
|
||||
$result = false;
|
||||
if ($name != '')
|
||||
if ($name != '')
|
||||
$result = db_process_sql_update('tconfig_os', $values, array('id_os' => $idOS));
|
||||
|
||||
$message = ui_print_result_message($result, __('Success updatng OS'), __('Error updating OS'), '', true);
|
||||
|
@ -101,7 +101,7 @@ switch ($action) {
|
|||
else {
|
||||
$tab = 'builder';
|
||||
$os = db_get_row_filter('tconfig_os', array('id_os' => $idOS));
|
||||
$name = $os['name'];
|
||||
$name = $os['name'];
|
||||
}
|
||||
$actionHidden = 'update';
|
||||
$textButton = __('Update');
|
||||
|
@ -133,7 +133,6 @@ $buttons = array(
|
|||
'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>'));
|
||||
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
// Header
|
||||
|
|
|
@ -69,12 +69,13 @@ if ($id_profile || $new_profile) {
|
|||
if ($profile === false) {
|
||||
echo '<h3 class="error">'.__('There was a problem loading profile').'</h3></table>';
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<div style="clear:both"> </div>';
|
||||
echo '</div>';
|
||||
echo '<div id="foot">';
|
||||
require ("general/footer.php");
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -143,12 +144,12 @@ if ($id_profile || $new_profile) {
|
|||
if ($new_profile) {
|
||||
html_print_submit_button (__('Add'), "crt", false, 'class="sub wand"');
|
||||
html_print_input_hidden ('create_profile', 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('id', $id_profile);
|
||||
html_print_input_hidden ('update_profile', 1);
|
||||
html_print_submit_button (__('Update'), "upd", false, 'class="sub upd"');
|
||||
}
|
||||
echo "</div></form>";
|
||||
|
||||
}
|
||||
?>
|
|
@ -398,8 +398,8 @@ function db_get_row_filter($table, $filter, $fields = false, $where_join = 'AND'
|
|||
function db_get_sql ($sql, $field = 0, $search_history_db = false) {
|
||||
$result = db_get_all_rows_sql ($sql, $search_history_db);
|
||||
|
||||
if($result === false)
|
||||
return false;
|
||||
if ($result === false)
|
||||
return false;
|
||||
|
||||
$ax = 0;
|
||||
foreach ($result[0] as $f){
|
||||
|
|
|
@ -393,6 +393,7 @@ function menu_get_sec_pages($sec,$menu_hash = false) {
|
|||
else {
|
||||
$menu = json_decode(base64_decode($menu_hash),true);
|
||||
}
|
||||
|
||||
// Get the sec2 of the main section
|
||||
$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 = '';
|
||||
if(substr($img,0,1) == '4') {
|
||||
if (substr($img,0,1) == '4') {
|
||||
$img_style['border'] ='2px solid #ffa300;';
|
||||
$img = substr_replace($img, '', 0,1);
|
||||
}
|
||||
|
@ -1314,7 +1314,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
break;
|
||||
default:
|
||||
enterprise_hook("enterprise_visual_map_print_item",
|
||||
array($layout_data, $status, $colorStatus));
|
||||
array($layout_data, $status, $colorStatus, 'operation'));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1385,14 +1385,14 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
|
|||
else
|
||||
$groups = users_get_groups ($id_user, 'IR', false);
|
||||
|
||||
if(!empty($groups)) {
|
||||
if (!empty($groups)) {
|
||||
if ($where != '') {
|
||||
$where .= ' AND ';
|
||||
}
|
||||
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
|
||||
}
|
||||
|
||||
if($where == '') {
|
||||
if ($where == '') {
|
||||
$where = array();
|
||||
}
|
||||
|
||||
|
|
|
@ -317,25 +317,24 @@ function parse_oracle_dump($connection, $url, $debug = false) {
|
|||
}
|
||||
|
||||
function oracle_drop_all_objects ($connection) {
|
||||
|
||||
//Drop all objects of the current installation
|
||||
$stmt = oci_parse($connection,
|
||||
"BEGIN " .
|
||||
"FOR cur_rec IN (SELECT object_name, object_type " .
|
||||
"FROM user_objects " .
|
||||
"WHERE object_type IN ('TABLE', 'VIEW', 'PACKAGE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE', 'SNAPSHOT', 'MATERIALIZED VIEW')) LOOP " .
|
||||
"BEGIN " .
|
||||
"IF cur_rec.object_type = 'TABLE' THEN " .
|
||||
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\" CASCADE CONSTRAINTS'; " .
|
||||
"ELSE " .
|
||||
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'; " .
|
||||
"END IF; " .
|
||||
"EXCEPTION " .
|
||||
"WHEN OTHERS THEN " .
|
||||
"DBMS_OUTPUT.put_line('FAILED: DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'); " .
|
||||
"END; " .
|
||||
"END LOOP; " .
|
||||
"END; ");
|
||||
"BEGIN " .
|
||||
"FOR cur_rec IN (SELECT object_name, object_type " .
|
||||
"FROM user_objects " .
|
||||
"WHERE object_type IN ('TABLE', 'VIEW', 'PACKAGE', 'PROCEDURE', 'FUNCTION', 'SEQUENCE', 'SNAPSHOT', 'MATERIALIZED VIEW')) LOOP " .
|
||||
"BEGIN " .
|
||||
"IF cur_rec.object_type = 'TABLE' THEN " .
|
||||
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\" CASCADE CONSTRAINTS'; " .
|
||||
"ELSE " .
|
||||
"EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'; " .
|
||||
"END IF; " .
|
||||
"EXCEPTION " .
|
||||
"WHEN OTHERS THEN " .
|
||||
"DBMS_OUTPUT.put_line('FAILED: DROP ' || cur_rec.object_type || ' \"' || cur_rec.object_name || '\"'); " .
|
||||
"END; " .
|
||||
"END LOOP; " .
|
||||
"END; ");
|
||||
|
||||
$result = oci_execute($stmt);
|
||||
oci_free_statement($stmt);
|
||||
|
@ -568,8 +567,8 @@ function install_step3() {
|
|||
echo "<form method='post' name='step2_form' action='install.php?step=4'>";
|
||||
}
|
||||
|
||||
echo "<table cellpadding=6 celwidth=100% border=0>";
|
||||
echo "<tr><td>";
|
||||
echo "<table cellpadding=6 celwidth=100% border=0>";
|
||||
echo "<tr><td>";
|
||||
echo "DB Engine<br>";
|
||||
|
||||
|
||||
|
@ -584,11 +583,11 @@ function install_step3() {
|
|||
echo $options;
|
||||
echo "</select>";
|
||||
|
||||
echo "<td>";
|
||||
echo "<td>";
|
||||
echo " Installation in <br>";
|
||||
echo "<select name='db_action' onChange=\"ChangeDBDrop(this)\">";
|
||||
echo "<option value='db_new'>A new Database</option>";
|
||||
echo "<option value='db_exist'>An existing Database</option>";
|
||||
echo "<option value='db_new'>A new Database</option>";
|
||||
echo "<option value='db_exist'>An existing Database</option>";
|
||||
echo "</select>";
|
||||
}
|
||||
echo " <tr><td>DB User with privileges<br>
|
||||
|
@ -603,7 +602,7 @@ function install_step3() {
|
|||
<td>DB Name (pandora by default)<br>
|
||||
<input class='login' type='text' name='dbname' value='pandora' size=8>
|
||||
|
||||
<tr><td valign=top>
|
||||
<tr><td valign=top>
|
||||
Drop Database if exists<br>
|
||||
<input class='login' type='checkbox' name='drop' value=1 disabled>
|
||||
|
||||
|
@ -619,17 +618,16 @@ function install_step3() {
|
|||
</br>
|
||||
<input class='login' type='text' name='url' style='width: 250px;'
|
||||
value='".dirname ($_SERVER["SCRIPT_NAME"])."'>
|
||||
</table>
|
||||
";
|
||||
</table>
|
||||
";
|
||||
|
||||
if (!$error) {
|
||||
echo " <div align='right'><br>
|
||||
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
echo " </form>
|
||||
echo "<div align='right'><br>
|
||||
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
||||
</div>";
|
||||
}
|
||||
echo "</form>
|
||||
</div>";
|
||||
|
||||
print_logo_status (4,6);
|
||||
|
||||
|
@ -704,7 +702,7 @@ function install_step4() {
|
|||
$step1 = mysql_query ("CREATE DATABASE $dbname");
|
||||
check_generic ($step1, "Creating database '$dbname'");
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$step = 1;
|
||||
}
|
||||
if ($step1 == 1) {
|
||||
|
@ -847,7 +845,7 @@ function install_step4() {
|
|||
|
||||
check_generic ($step1, "Creating database '$dbname'");
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$step1 = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,12 +18,12 @@ global $config;
|
|||
// Login check
|
||||
check_login ();
|
||||
|
||||
if (is_ajax()){
|
||||
if (is_ajax()) {
|
||||
require_once("include/functions_reporting.php");
|
||||
|
||||
$get_alert_fired = get_parameter("get_alert_fired", 0);
|
||||
|
||||
if ($get_alert_fired){
|
||||
if ($get_alert_fired) {
|
||||
// Calculate alerts fired
|
||||
$data_reporting = reporting_get_group_stats();
|
||||
echo $data_reporting['monitor_alerts_fired'];
|
||||
|
@ -85,7 +85,6 @@ if ($idAgent != 0) {
|
|||
$idGroup = false;
|
||||
|
||||
$print_agent = false;
|
||||
|
||||
}
|
||||
else {
|
||||
if (!check_acl ($config["id_user"], 0, "AR")) {
|
||||
|
@ -105,10 +104,10 @@ else {
|
|||
|
||||
if ($alert_validate) {
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 0) {
|
||||
echo '<h3 class="error">'.__('Insufficient permissions to validate alerts').'</h3>';
|
||||
echo '<h3 class="error">'.__('Insufficient permissions to validate alerts').'</h3>';
|
||||
}
|
||||
else {
|
||||
validateAlert();
|
||||
validateAlert();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +298,7 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
|||
$table->head[6] = __('Action');
|
||||
$table->head[7] = __('Last fired');
|
||||
$table->head[8] = __('Status');
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
$table->head[9] = __('Validate');
|
||||
}
|
||||
$table->align[8] = 'center';
|
||||
|
@ -319,7 +318,7 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
|||
$table->head[5] = __('Action');
|
||||
$table->head[6] = __('Last fired');
|
||||
$table->head[7] = __('Status');
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
$table->head[8] = __('Validate');
|
||||
}
|
||||
$table->align[7] = 'center';
|
||||
|
@ -344,7 +343,7 @@ else
|
|||
$table->head[5] = __('Action');
|
||||
$table->head[6] = __('Last fired');
|
||||
$table->head[7] = __('Status');
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
if (check_acl ($config["id_user"], $id_group, "AW") == 1) {
|
||||
$table->head[8] = __('Validate');
|
||||
}
|
||||
$table->align[7] = 'center';
|
||||
|
|
|
@ -77,42 +77,45 @@ if ($moduletype_name == "log4x") {
|
|||
|
||||
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);
|
||||
} 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);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
||||
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
||||
"Message" => array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||
"StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%")
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
||||
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
||||
"Message"=> array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||
"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 . '%';
|
||||
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);
|
||||
} 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);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
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);
|
||||
} 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);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "left"),
|
||||
"Data" => array("datos", "modules_format_data", "align" => "left"),
|
||||
"Time" => array("utimestamp", "modules_format_time", "align" => "center")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -181,8 +184,8 @@ $formtable->data[1][2] .= html_print_input_text ('date_to', $date_to, '', 10, 10
|
|||
$formtable->data[1][2] .= html_print_input_text ('time_to', $time_to, '', 7, 7, true);
|
||||
|
||||
if (preg_match ("/string/", $moduletype_name) || $moduletype_name == "log4x") {
|
||||
$formtable->data[2][0] = __('Free text for search');
|
||||
$formtable->data[2][1] = html_print_input_text ("freestring", $freestring, '', 20,30, true);
|
||||
$formtable->data[2][0] = __('Free text for search');
|
||||
$formtable->data[2][1] = html_print_input_text ("freestring", $freestring, '', 20,30, true);
|
||||
}
|
||||
|
||||
html_print_table ($formtable);
|
||||
|
@ -235,12 +238,12 @@ ui_require_jquery_file ('timeentry');
|
|||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready (function () {
|
||||
$("#text-time_from, #text-time_to").timeEntry ({
|
||||
spinnerImage: 'images/time-entry.png',
|
||||
spinnerSize: [20, 20, 0]
|
||||
});
|
||||
$("#text-date_from, #text-date_to").datepicker ();
|
||||
$.datepicker.regional["<?php echo $config['language']; ?>"];
|
||||
$("#text-time_from, #text-time_to").timeEntry ({
|
||||
spinnerImage: 'images/time-entry.png',
|
||||
spinnerSize: [20, 20, 0]
|
||||
});
|
||||
$("#text-date_from, #text-date_to").datepicker ();
|
||||
$.datepicker.regional["<?php echo $config['language']; ?>"];
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -261,10 +261,10 @@ foreach ($modules as $module) {
|
|||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
$id_policy = db_get_value_sql('SELECT id_policy FROM tpolicy_modules WHERE id = '.$module["id_policy_module"]);
|
||||
|
||||
if ($id_policy != "")
|
||||
$name_policy = db_get_value_sql('SELECT name FROM tpolicies WHERE id = '.$id_policy);
|
||||
else
|
||||
$name_policy = __("Unknown");
|
||||
if ($id_policy != "")
|
||||
$name_policy = db_get_value_sql('SELECT name FROM tpolicies WHERE id = '.$id_policy);
|
||||
else
|
||||
$name_policy = __("Unknown");
|
||||
|
||||
$policyInfo = policies_info_module_policy($module["id_policy_module"]);
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ global $config;
|
|||
check_login ();
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "AR") && ! is_user_admin ($config['id_user'])) {
|
||||
db_pandora_audit("ACL Violation", "Trying to access GIS Agent view");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
db_pandora_audit("ACL Violation", "Trying to access GIS Agent view");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
require_once ('include/functions_gis.php');
|
||||
|
|
|
@ -39,7 +39,7 @@ $update_networkmap = get_parameter ('update_networkmap', 0);
|
|||
$recenter_networkmap = get_parameter ('recenter_networkmap', 0);
|
||||
$hidden_options = get_parameter ('hidden_options', 1);
|
||||
|
||||
if($delete_networkmap) {
|
||||
if ($delete_networkmap) {
|
||||
$result = networkmap_delete_networkmap($id_networkmap);
|
||||
$message = ui_print_result_message ($result,
|
||||
__('Network map deleted successfully'),
|
||||
|
@ -50,7 +50,7 @@ if($delete_networkmap) {
|
|||
$id_networkmap = 0;
|
||||
}
|
||||
|
||||
if($add_networkmap) {
|
||||
if ($add_networkmap) {
|
||||
// Load variables
|
||||
$layout = 'radial';
|
||||
$depth = 'all';
|
||||
|
@ -77,9 +77,9 @@ if($add_networkmap) {
|
|||
}
|
||||
else {
|
||||
$id_networkmap = networkmap_create_networkmap($name, $activeTab, $layout, $nooverlap, $simple, $regen, $font_size, $group, $module_group, $depth, $modwithalerts, $hidepolicymodules, $zoom, $ranksep, $center);
|
||||
$message = ui_print_result_message ($id_networkmap,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
$message = ui_print_result_message ($id_networkmap,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ if($save_networkmap || $update_networkmap) {
|
|||
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
|
||||
$subcheck = db_get_value('name', 'tnetwork_map', 'id_networkmap', $id_networkmap);
|
||||
|
||||
if($save_networkmap){
|
||||
if($save_networkmap) {
|
||||
if (!$check || $subcheck == $name) {
|
||||
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
||||
'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.'">' .
|
||||
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,
|
||||
'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>');
|
||||
|
|
|
@ -44,8 +44,8 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub["operation/agentes/group_view"]["text"] = __('Group view');
|
||||
$sub["operation/agentes/group_view"]["refr"] = 0;
|
||||
|
||||
$sub['operation/tree']['text'] = __('Tree view');
|
||||
$sub["operation/tree"]["refr"] = 0;
|
||||
$sub['operation/tree']['text'] = __('Tree view');
|
||||
$sub["operation/tree"]["refr"] = 0;
|
||||
|
||||
$sub["operation/agentes/estado_agente"]["text"] = __('Agent detail');
|
||||
$sub["operation/agentes/estado_agente"]["refr"] = 0;
|
||||
|
@ -119,7 +119,7 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub["godmode/reporting/reporting_builder"]["text"] = __('Custom reporting');
|
||||
//Set godomode path
|
||||
$sub["godmode/reporting/reporting_builder"]["subsecs"] = array("godmode/reporting/reporting_builder",
|
||||
"operation/reporting/reporting_viewer");
|
||||
"operation/reporting/reporting_viewer");
|
||||
//Visual console
|
||||
$sub["godmode/reporting/map_builder"]["text"] = __('Visual console');
|
||||
//Set godomode path
|
||||
|
@ -127,13 +127,13 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
"godmode/reporting/map_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'];
|
||||
}
|
||||
else if (!empty($config['refr'])){
|
||||
else if (!empty($config['refr'])) {
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = $config['refr'];
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$sub["godmode/reporting/map_builder"]["refr"] = 60;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,8 +105,9 @@ if ($save != '' && check_acl ($config["id_user"], 0, "AW")) {
|
|||
$filter_id = db_process_sql_insert ('tnetflow_filter', $filter);
|
||||
if ($filter_id === false) {
|
||||
$filter_id = 0;
|
||||
echo '<h3 class="error">'.__ ('Error creating filter').'</h3>';
|
||||
} else {
|
||||
echo '<h3 class="error">'.__ ('Error creating filter').'</h3>';
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="suc">'.__ ('Filter created successfully').'</h3>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ if($update_date){
|
|||
$date = get_parameter_post ('date');
|
||||
$time = get_parameter_post ('time');
|
||||
$interval = get_parameter('period','86400');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$date = date ("Y/m/d", get_system_time ());
|
||||
$time = date ("H:i:s", get_system_time ());
|
||||
$interval ='86400';
|
||||
|
@ -55,8 +56,8 @@ $end_date = strtotime ($date . " " . $time);
|
|||
$start_date = $end_date - $interval;
|
||||
|
||||
$buttons['report_list'] = '<a href="index.php?sec=netf&sec2=operation/netflow/nf_reporting">'
|
||||
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
|
||||
. '</a>';
|
||||
. html_print_image ("images/edit.png", true, array ("title" => __('Report list')))
|
||||
. '</a>';
|
||||
|
||||
//Header
|
||||
ui_print_page_header (__('Netflow'), "images/networkmap/so_cisco_new.png", false, "", false, $buttons);
|
||||
|
|
|
@ -109,10 +109,11 @@ check_login ();
|
|||
|
||||
$id_report = (int) get_parameter ('id');
|
||||
|
||||
if (! $id_report) {
|
||||
if (!$id_report) {
|
||||
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");
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -185,7 +186,7 @@ foreach ($contents as $content) {
|
|||
$data["uperiod"] = $content['period'];
|
||||
$data["type"] = $content["type"];
|
||||
|
||||
$session_id = session_id();
|
||||
$session_id = session_id();
|
||||
|
||||
switch ($content["type"]) {
|
||||
case 1:
|
||||
|
@ -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']);
|
||||
if ($sla_value === false) {
|
||||
$sla_data["error"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if ($sla_value < $sla['sla_limit']) {
|
||||
$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);
|
||||
if ($monitor_value === false) {
|
||||
$monitor_value = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$monitor_value = format_numeric ($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);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
|
@ -313,7 +317,8 @@ foreach ($contents as $content) {
|
|||
$data["objdata"] = reporting_get_agentmodule_data_max ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
|
@ -323,7 +328,8 @@ foreach ($contents as $content) {
|
|||
$data["objdata"] = reporting_get_agentmodule_data_min ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
|
@ -333,7 +339,8 @@ foreach ($contents as $content) {
|
|||
$data["objdata"] = reporting_get_agentmodule_data_sum ($content['id_agent_module'], $content['period'], $datetime);
|
||||
if ($data["objdata"] === false) {
|
||||
$data["objdata"] = __('Unknown');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["objdata"] = format_numeric ($data["objdata"]);
|
||||
}
|
||||
break;
|
||||
|
@ -532,7 +539,7 @@ foreach ($contents as $content) {
|
|||
|
||||
curl_setopt($curlObj, CURLOPT_URL, $content['external_source']);
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output = curl_exec($curlObj);
|
||||
$output = curl_exec($curlObj);
|
||||
curl_close($curlObj);
|
||||
|
||||
$data["objdata"] = $output;
|
||||
|
@ -580,7 +587,8 @@ foreach ($contents as $content) {
|
|||
$ttr = reporting_get_agentmodule_ttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($ttr === false) {
|
||||
$ttr = __('Unknown');
|
||||
} else if ($ttr != 0) {
|
||||
}
|
||||
else if ($ttr != 0) {
|
||||
$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"]);
|
||||
if ($tto === false) {
|
||||
$tto = __('Unknown');
|
||||
} else if ($tto != 0) {
|
||||
}
|
||||
else if ($tto != 0) {
|
||||
$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"]);
|
||||
if ($mtbf === false) {
|
||||
$mtbf = __('Unknown');
|
||||
} else if ($mtbf != 0) {
|
||||
}
|
||||
else if ($mtbf != 0) {
|
||||
$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"]);
|
||||
if ($mttr === false) {
|
||||
$mttr = __('Unknown');
|
||||
} else if ($mttr != 0) {
|
||||
}
|
||||
else if ($mttr != 0) {
|
||||
$mttr = human_time_description_raw ($mttr);
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,8 @@ if ($traps !== false) {
|
|||
//Status
|
||||
if ($trap["status"] == 0) {
|
||||
$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"));
|
||||
}
|
||||
|
||||
|
@ -452,7 +453,8 @@ if ($traps !== false) {
|
|||
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>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
|
@ -533,33 +535,40 @@ 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">' . '<b>' . __('OID:') . '</td><td align="left"> ' . $trap['oid'] . '</td></tr>';
|
||||
|
||||
if ($trap["description"] != ""){
|
||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Description:') . '</td><td align="left">' . $trap['description'] . '</td></tr>';
|
||||
}
|
||||
if ($trap["description"] != "") {
|
||||
$string .= '<tr><td align="left" valign="top">' . '<b>' . __('Description:') . '</td><td align="left">' . $trap['description'] . '</td></tr>';
|
||||
}
|
||||
|
||||
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'));
|
||||
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'));
|
||||
|
||||
switch ($trap["type"]){
|
||||
case -1: $desc_trap_type = __('None');
|
||||
break;
|
||||
case 0: $desc_trap_type = __('Cold start (0)');
|
||||
break;
|
||||
case 1: $desc_trap_type = __('Warm start (1)');
|
||||
break;
|
||||
case 2: $desc_trap_type = __('Link down (2)');
|
||||
break;
|
||||
case 3: $desc_trap_type = __('Link up (3)');
|
||||
break;
|
||||
case 4: $desc_trap_type = __('Authentication failure (4)');
|
||||
break;
|
||||
default: $desc_trap_type = __('Other');
|
||||
break;
|
||||
switch ($trap["type"]) {
|
||||
case -1:
|
||||
$desc_trap_type = __('None');
|
||||
break;
|
||||
case 0:
|
||||
$desc_trap_type = __('Cold start (0)');
|
||||
break;
|
||||
case 1:
|
||||
$desc_trap_type = __('Warm start (1)');
|
||||
break;
|
||||
case 2:
|
||||
$desc_trap_type = __('Link down (2)');
|
||||
break;
|
||||
case 3:
|
||||
$desc_trap_type = __('Link up (3)');
|
||||
break;
|
||||
case 4:
|
||||
$desc_trap_type = __('Authentication failure (4)');
|
||||
break;
|
||||
default:
|
||||
$desc_trap_type = __('Other');
|
||||
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>';
|
||||
}
|
||||
|
||||
$string .= '</table>';
|
||||
$string .= '</table>';
|
||||
|
||||
$data = array($string); //$data = array($trap['description']);
|
||||
$idx++;
|
||||
|
@ -575,7 +584,8 @@ $trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm s
|
|||
// No matching traps
|
||||
if ($idx == 0) {
|
||||
echo '<div class="nf">'.__('No matching traps found').'</div>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_table ($table);
|
||||
}
|
||||
|
||||
|
|
|
@ -645,8 +645,7 @@ if (is_ajax ())
|
|||
// This line checks for (non-initialized) asyncronous modules
|
||||
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;
|
||||
$title = __('UNKNOWN');
|
||||
|
||||
$title = __('UNKNOWN');
|
||||
} // Else checks module status
|
||||
elseif ($row["estado"] == 1) {
|
||||
$status = STATUS_MODULE_CRITICAL;
|
||||
|
|
|
@ -113,7 +113,8 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
$pass_ok = login_validate_pass($password_new, $id, true);
|
||||
if ($pass_ok != 1) {
|
||||
ui_print_error_message($pass_ok);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$return = update_user_password ($id, $password_new);
|
||||
if ($return) {
|
||||
$return2 = save_pass_history($id, $password_new);
|
||||
|
@ -122,14 +123,16 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
__('Password successfully updated'),
|
||||
__('Error updating passwords: %s', $config['auth_error']));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$return = update_user_password ($id, $password_new);
|
||||
ui_print_result_message ($return,
|
||||
__('Password successfully updated'),
|
||||
__('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'));
|
||||
}
|
||||
}
|
||||
|
@ -145,22 +148,14 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
__('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;
|
||||
}
|
||||
|
||||
// Prints action status for current message
|
||||
if ($status != -1){
|
||||
if ($status != -1) {
|
||||
ui_print_result_message ($status,
|
||||
__('User info successfully updated'),
|
||||
__('Error updating user info'));
|
||||
__('User info successfully updated'),
|
||||
__('Error updating user info'));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue