From 6dc40b09a5554bbc7b4c570a0267eae14bf631f7 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 14 Feb 2011 16:56:17 +0000 Subject: [PATCH] 2011-02-14 Miguel de Dios * include/functions_config.php, include/api.php, godmode/setup/setup.php: added the check by password the actions on API. Pending tasks: #3180793 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3831 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 ++++ pandora_console/godmode/setup/setup.php | 38 +++++++++++--------- pandora_console/include/api.php | 17 ++++++++- pandora_console/include/functions_config.php | 11 ++++-- 4 files changed, 53 insertions(+), 20 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b444c2cf8b..13e63c71df 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-02-14 Miguel de Dios + + * include/functions_config.php, include/api.php, godmode/setup/setup.php: + added the check by password the actions on API. + + Pending tasks: #3180793 + 2011-02-14 Miguel de Dios * include/functions_db.php: fixed the include of extensions, mysql or diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 73d2c4f4db..f254c22c00 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -101,28 +101,32 @@ $table->data[15][0] = __('IP list with API access') . $list_ACL_IPs_for_API = get_parameter('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API'])); $table->data[15][1] = print_textarea('list_ACL_IPs_for_API', 2, 25, $list_ACL_IPs_for_API, 'style="height: 50px; width: 300px"', true); -$table->data[16][0] = __('Enable GIS features in Pandora Console'); -$table->data[16][1] = __('Yes').' '.print_radio_button ('activate_gis', 1, '', $config["activate_gis"], true).'  '; -$table->data[16][1] .= __('No').' '.print_radio_button ('activate_gis', 0, '', $config["activate_gis"], true); +$table->data[16][0] = __('API password') . + print_help_tip (__("Please be careful if you put a password put https access."), true); +$table->data[16][1] = print_input_text('api_password', $config['api_password'], '', 25, 255, true); -$table->data[19][0] = __('Timezone setup'); -$table->data[19][1] = print_input_text ('timezone', $config["timezone"], '', 25, 25, true); +$table->data[17][0] = __('Enable GIS features in Pandora Console'); +$table->data[17][1] = __('Yes').' '.print_radio_button ('activate_gis', 1, '', $config["activate_gis"], true).'  '; +$table->data[17][1] .= __('No').' '.print_radio_button ('activate_gis', 0, '', $config["activate_gis"], true); + +$table->data[20][0] = __('Timezone setup'); +$table->data[20][1] = print_input_text ('timezone', $config["timezone"], '', 25, 25, true); $sounds = get_sounds(); -$table->data[20][0] = __('Sound for Alert fired'); -$table->data[20][1] = print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true); -$table->data[20][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_alert", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[20][1] .= '
'; +$table->data[21][0] = __('Sound for Alert fired'); +$table->data[21][1] = print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true); +$table->data[21][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_alert", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[21][1] .= '
'; -$table->data[21][0] = __('Sound for Monitor critical'); -$table->data[21][1] = print_select($sounds, 'sound_critical', $config['sound_critical'], 'replaySound(\'critical\');', '', '', true); -$table->data[21][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_critical", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[21][1] .= '
'; +$table->data[22][0] = __('Sound for Monitor critical'); +$table->data[22][1] = print_select($sounds, 'sound_critical', $config['sound_critical'], 'replaySound(\'critical\');', '', '', true); +$table->data[22][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_critical", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[22][1] .= '
'; -$table->data[22][0] = __('Sound for Monitor warning'); -$table->data[22][1] = print_select($sounds, 'sound_warning', $config['sound_warning'], 'replaySound(\'warning\');', '', '', true); -$table->data[22][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_warning", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[22][1] .= '
'; +$table->data[23][0] = __('Sound for Monitor warning'); +$table->data[23][1] = print_select($sounds, 'sound_warning', $config['sound_warning'], 'replaySound(\'warning\');', '', '', true); +$table->data[23][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_warning", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[23][1] .= '
'; ?>