2012-02-28 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php, godmode/alerts/configure_alert_template.php, godmode/modules/manage_network_components_form.php, godmode/users/configure_user.php, include/functions_forecast.php, mobile/operation/agents/monitor_status.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5661 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
435503360f
commit
18e859b96a
|
@ -1,4 +1,12 @@
|
|||
2012-02-27 Miguel de Dios <miguel.dedios@artica.es>
|
||||
2012-02-28 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_action.php,
|
||||
godmode/alerts/configure_alert_template.php,
|
||||
godmode/modules/manage_network_components_form.php,
|
||||
godmode/users/configure_user.php, include/functions_forecast.php,
|
||||
mobile/operation/agents/monitor_status.php: cleaned source code style.
|
||||
|
||||
2012-02-28 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/integria_incidents/incident.php: added error message when
|
||||
Pandora have a bad conf for the Integria API. And cleaned source code style.
|
||||
|
|
|
@ -41,11 +41,12 @@ if ($al_action !== false){
|
|||
"Trying to access Alert Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}else
|
||||
}
|
||||
else
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert action'), "images/god2.png", false, "", true);
|
||||
// If user tries to edit an action of others groups
|
||||
}else{
|
||||
} // If user tries to edit an action of others groups
|
||||
else {
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
|
@ -56,14 +57,15 @@ if ($al_action !== false){
|
|||
if ($is_in_group)
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert action'), "images/god2.png", false, "", true);
|
||||
else{
|
||||
else {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Alert Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}else
|
||||
}
|
||||
else
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert action'), "images/god2.png", false, "", true);
|
||||
|
||||
|
|
|
@ -35,11 +35,12 @@ $id = (int) get_parameter ('id');
|
|||
if ($duplicate_template) {
|
||||
$source_id = (int) get_parameter ('source_id');
|
||||
$a_template = alerts_get_alert_template($source_id);
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
$a_template = alerts_get_alert_template($id);
|
||||
}
|
||||
|
||||
if ($a_template !== false){
|
||||
if ($a_template !== false) {
|
||||
// If user tries to duplicate/edit a template with group=ALL
|
||||
if ($a_template['id_group'] == 0){
|
||||
// then must have "PM" access privileges
|
||||
|
@ -48,11 +49,13 @@ if ($a_template !== false){
|
|||
"Trying to access Alert Management");
|
||||
require ("general/noaccess.php");
|
||||
exit;
|
||||
}else
|
||||
}
|
||||
else
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert template'), "", false, "", true);
|
||||
// If user tries to duplicate/edit a template of others groups
|
||||
}else{
|
||||
|
||||
} // If user tries to duplicate/edit a template of others groups
|
||||
else {
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
|
||||
|
@ -63,7 +66,7 @@ if ($a_template !== false){
|
|||
if ($is_in_group)
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert template'), "", false, "", true);
|
||||
else{
|
||||
else {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Alert Management");
|
||||
require ("general/noaccess.php");
|
||||
|
@ -71,7 +74,7 @@ if ($a_template !== false){
|
|||
}
|
||||
}
|
||||
// This prevents to duplicate the header in case duplicate/edit_template action is performed
|
||||
}else
|
||||
} else
|
||||
// Header
|
||||
ui_print_page_header (__('Alerts').' » '.__('Configure alert template'), "", false, "", true);
|
||||
|
||||
|
|
|
@ -154,7 +154,8 @@ if ($id) {
|
|||
html_print_input_hidden ('update_component', 1);
|
||||
html_print_input_hidden ('id', $id);
|
||||
html_print_submit_button (__('Update'), 'upd', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_component', 1);
|
||||
html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
|
||||
}
|
||||
|
@ -436,7 +437,8 @@ $(document).ready (function () {
|
|||
$("input[name=active_snmp_v3]").val(1);
|
||||
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
|
||||
$("input[name=snmp_community]").attr("disabled",true);
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
$("input[name=snmp3_auth_user]").val("");
|
||||
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
|
||||
$("input[name=snmp3_auth_user]").attr("disabled", true);
|
||||
|
|
|
@ -354,7 +354,7 @@ $own_info = get_user_info ($config['id_user']);
|
|||
if ($config['admin_can_make_admin']) {
|
||||
$table->data[6][0] = __('Global Profile');
|
||||
$table->data[6][1] = '';
|
||||
if ($own_info['is_admin'] || $user_info['is_admin']){
|
||||
if ($own_info['is_admin'] || $user_info['is_admin']) {
|
||||
$table->data[6][1] = html_print_radio_button ('is_admin', 1, '', $user_info['is_admin'], true);
|
||||
$table->data[6][1] .= __('Administrator');
|
||||
$table->data[6][1] .= ui_print_help_tip (__("This user has permissions to manage all. This is admin user and overwrites all permissions given in profiles/groups"), true);
|
||||
|
@ -384,10 +384,11 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
|||
else
|
||||
$display_all_group = false;
|
||||
|
||||
if ($new_user){
|
||||
if ($new_user) {
|
||||
$usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
|
||||
$id_usr = $config['id_user'];
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
$usr_groups = (users_get_groups($id, 'AR', $display_all_group));
|
||||
$id_usr = $id;
|
||||
}
|
||||
|
@ -420,7 +421,8 @@ if ($new_user) {
|
|||
html_print_input_hidden ('create_user', 1);
|
||||
html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if ($config['user_can_update_info']) {
|
||||
html_print_input_hidden ('update_user', 1);
|
||||
html_print_submit_button (__('Update'), 'uptbutton', false, 'class="sub upd"');
|
||||
|
|
|
@ -44,7 +44,7 @@ function forecast_projection_graph($module_id, $period = 5184000, $prediction_pe
|
|||
return array();
|
||||
}
|
||||
// Prevents bad behaviour over image error
|
||||
else if (!is_array($module_data) and preg_match('/^<img(.)*$/', $module_data)){
|
||||
else if (!is_array($module_data) and preg_match('/^<img(.)*$/', $module_data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,10 @@ function forecast_projection_graph($module_id, $period = 5184000, $prediction_pe
|
|||
|
||||
// Creates data for calculation
|
||||
foreach ($module_data as $utimestamp => $row) {
|
||||
if ($utimestamp == '') { continue; }
|
||||
if ($utimestamp == '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data[0] = '';
|
||||
$data[1] = $cont;
|
||||
$data[2] = date('d M Y H:i:s', $utimestamp);
|
||||
|
@ -75,7 +78,8 @@ function forecast_projection_graph($module_id, $period = 5184000, $prediction_pe
|
|||
$data[7] = $row['sum'] * $row['sum'];
|
||||
if ($cont == 1){
|
||||
$data[8] = 0;
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
$data[8] = $utimestamp - $last_timestamp;
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ class MonitorStatus {
|
|||
|
||||
$data = array();
|
||||
|
||||
if($row['utimestamp'] == 0 && (($row['module_type'] < 21 || $row['module_type'] > 23) && $row['module_type'] != 100)){
|
||||
if($row['utimestamp'] == 0 && (($row['module_type'] < 21 || $row['module_type'] > 23) && $row['module_type'] != 100)) {
|
||||
$statusImg = ui_print_status_image(STATUS_MODULE_NO_DATA, __('NOT INIT'), true);
|
||||
}
|
||||
elseif ($row["estado"] == 0) {
|
||||
|
|
Loading…
Reference in New Issue