From 66a9c59ddb29f1d5e6898289b3dba6e92acf6bed Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 26 Aug 2014 11:22:06 +0000 Subject: [PATCH] 2014-08-26 Miguel de Dios * godmode/alerts/configure_alert_action.php, include/help/clippy/godmode_agentes_modificar_agente.php, include/help/clippy/homepage.php, include/help/clippy/module_unknow.php, include/help/clippy/godmode_agentes_configurar_agente.php, include/help/clippy/godmode_alerts_alert_actions.php, include/help/clippy/operation_agentes_ver_agente.php, include/help/clippy/godmode_alerts_configure_alert_action.php, include/help/clippy/operation_agentes_status_monitor.php, include/help/en/help_context_pandora_server_email.php, include/functions_clippy.php, operation/menu.php, operation/agentes/status_monitor.php: some changes suggested by Carla. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 16 ++++ .../godmode/alerts/configure_alert_action.php | 39 ++++++--- pandora_console/include/functions_clippy.php | 7 +- .../godmode_agentes_configurar_agente.php | 65 ++++++++++++++- .../godmode_agentes_modificar_agente.php | 2 +- .../clippy/godmode_alerts_alert_actions.php | 66 ++++++++++++++++ .../godmode_alerts_configure_alert_action.php | 79 +++++++++++++++++++ .../include/help/clippy/homepage.php | 45 ++++++++++- .../include/help/clippy/module_unknow.php | 2 +- .../operation_agentes_status_monitor.php | 71 +++++++++++++++++ .../clippy/operation_agentes_ver_agente.php | 45 +++++++++++ .../en/help_context_pandora_server_email.php | 38 +++++++++ .../operation/agentes/status_monitor.php | 22 ++++-- pandora_console/operation/menu.php | 2 +- 14 files changed, 472 insertions(+), 27 deletions(-) create mode 100644 pandora_console/include/help/clippy/godmode_alerts_alert_actions.php create mode 100644 pandora_console/include/help/clippy/godmode_alerts_configure_alert_action.php create mode 100644 pandora_console/include/help/clippy/operation_agentes_status_monitor.php create mode 100644 pandora_console/include/help/clippy/operation_agentes_ver_agente.php create mode 100755 pandora_console/include/help/en/help_context_pandora_server_email.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7d6c1b2aa4..5fc7ab1930 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,19 @@ +2014-08-26 Miguel de Dios + + * godmode/alerts/configure_alert_action.php, + include/help/clippy/godmode_agentes_modificar_agente.php, + include/help/clippy/homepage.php, + include/help/clippy/module_unknow.php, + include/help/clippy/godmode_agentes_configurar_agente.php, + include/help/clippy/godmode_alerts_alert_actions.php, + include/help/clippy/operation_agentes_ver_agente.php, + include/help/clippy/godmode_alerts_configure_alert_action.php, + include/help/clippy/operation_agentes_status_monitor.php, + include/help/en/help_context_pandora_server_email.php, + include/functions_clippy.php, operation/menu.php, + operation/agentes/status_monitor.php: some changes suggested by + Carla. + 2014-08-25 Vanessa Gil * godmode/setup/setup_general.php: Improved timezone diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 3049d9395b..c42af92ef2 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -136,16 +136,35 @@ $table->data[5][2] = html_print_textarea ('command_recovery_preview', 5, 30, '', $row = 6; for ($i = 1; $i <= 10; $i++) { - $table->data['field'.$i][0] = html_print_image('images/spinner.gif',true); - $table->data['field'.$i][1] = html_print_image('images/spinner.gif',true); - $table->data['field'.$i][2] = html_print_image('images/spinner.gif',true); + $table->data['field' . $i][0] = html_print_image('images/spinner.gif', true); + $table->data['field' . $i][1] = html_print_image('images/spinner.gif', true); + $table->data['field' . $i][2] = html_print_image('images/spinner.gif', true); // Store the value in a hidden to keep it on first execution - $table->data['field'.$i][1] .= html_print_input_hidden('field'.$i.'_value', !empty($action['field'.$i]) ? $action['field'.$i] : '', true); - $table->data['field'.$i][2] .= html_print_input_hidden('field'.$i.'_recovery_value', !empty($action['field'.$i.'_recovery']) ? $action['field'.$i.'_recovery'] : '', true); + $table->data['field' . $i][1] .= html_print_input_hidden('field' . $i . '_value', + !empty($action['field' . $i]) ? + $action['field' . $i] : '', true); + $table->data['field' . $i][2] .= html_print_input_hidden('field' . $i . '_recovery_value', + !empty($action['field' . $i . '_recovery']) ? + $action['field' . $i . '_recovery'] : '', true); } echo '
'; -html_print_table ($table); +$table_html = html_print_table ($table, true); + +//////////////////////////////////////////////////////////////////////// +//Hack to hook the bubble dialog of clippy in any place, the intro.js +//fails with new elements in the dom from javascript code +//---------------------------------------------------------------------- +$table_html = str_replace( + '', + " + + ", + $table_html); + +//////////////////////////////////////////////////////////////////////// + +echo $table_html; echo '
'; if ($id) { @@ -158,9 +177,9 @@ if ($id) { } } else { - - html_print_input_hidden ('update_action', 1); - html_print_submit_button (__('Update'), 'create', false, 'class="sub upd"'); + + html_print_input_hidden ('update_action', 1); + html_print_submit_button (__('Update'), 'create', false, 'class="sub upd"'); } } else { @@ -256,7 +275,7 @@ $(document).ready (function () { render_command_preview(original_command); render_command_recovery_preview(original_command); - + $(".fields").keyup (function() { render_command_preview(original_command); }); diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 721d8b268c..af305776fb 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -28,6 +28,12 @@ function clippy_start($sec2) { $sec2 = str_replace('/', '_', $sec2); + //Avoid some case the other parameters in the url + if (strstr($sec2, "&") !== false) { + $chunks = explode("&", $sec2); + $sec2 = $chunks[0]; + } + if ($sec2 != 'homepage') { if (is_file("include/help/clippy/" . $sec2 . ".php")) { require("include/help/clippy/" . $sec2 . ".php"); @@ -77,7 +83,6 @@ function clippy_write_javascript_helps_steps($tours) { $clippy = get_cookie('clippy', false); set_cookie('clippy', null); - //Get the help steps from a task $steps = $tours['tours'][$clippy]['steps']; if ($first_step_by_default) { diff --git a/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php b/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php index 75745d9846..bf7407d11c 100644 --- a/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php +++ b/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php @@ -31,11 +31,12 @@ function clippy_start_page() { $return_tours['tours']['monitoring_server_step_3'] = array(); $return_tours['tours']['monitoring_server_step_3']['steps'] = array(); $return_tours['tours']['monitoring_server_step_3']['steps'][] = array( - 'element'=> '#clippy', + 'element' => '#clippy', 'intro' => __('Now you must go to Modules. Don\'t worry I\'ll lead you.') ); $return_tours['tours']['monitoring_server_step_3']['steps'][] = array( - 'element'=> "img[alt='Modules']", + 'element' => "img[alt='Modules']", + 'position' => 'left', 'intro' => __('Click in this tab..') ); $return_tours['tours']['monitoring_server_step_3']['conf'] = array(); @@ -123,6 +124,66 @@ function clippy_start_page() { $return_tours['tours']['monitoring_server_step_6']['conf']['show_step_numbers'] = 0; //================================================================== + //================================================================== + //Help tour about the email alert module (step 7) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_7'] = array(); + $return_tours['tours']['email_alert_module_step_7']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_7']['steps'][] = array( + 'element' => "img[alt='Alerts']", + 'position' => 'left', + 'intro' => __('Click on alerts tab and then fill the form to add an alert.') + ); + $return_tours['tours']['email_alert_module_step_7']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_7']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_7']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_7']['conf']['next_help'] = 'email_alert_module_step_8'; + //================================================================== + + //================================================================== + //Help tour about the email alert module (step 8) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_8'] = array(); + $return_tours['tours']['email_alert_module_step_8']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_8']['steps'][] = array( + 'element' => "select[name='id_agent_module']", + 'intro' => __('Select the critical module.') + ); + $return_tours['tours']['email_alert_module_step_8']['steps'][] = array( + 'element' => "select[name='template']", + 'intro' => __('In template select "Critical Condition".') + ); + $return_tours['tours']['email_alert_module_step_8']['steps'][] = array( + 'element' => "select[name='action_select']", + 'intro' => __('Now, select the action created before.') + ); + $return_tours['tours']['email_alert_module_step_8']['steps'][] = array( + 'element' => "input[name='add']", + 'position' => 'left', + 'intro' => __('Click on Add Alert button to create the alert.') + ); + $return_tours['tours']['email_alert_module_step_8']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_8']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_8']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_8']['conf']['next_help'] = 'email_alert_module_step_9'; + //================================================================== + + //================================================================== + //Help tour about the email alert module (step 9) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_9'] = array(); + $return_tours['tours']['email_alert_module_step_9']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_9']['steps'][] = array( + 'element' => "img[alt='View']", + 'position' => 'left', + 'intro' => __('To test the alert you\'ve just created go to the main view by clicking on the eye tab.') + ); + $return_tours['tours']['email_alert_module_step_9']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_9']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_9']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_9']['conf']['next_help'] = 'email_alert_module_step_10'; + //================================================================== + return $return_tours; } ?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php b/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php index 3cd22cd2f1..b88031044d 100644 --- a/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php +++ b/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php @@ -44,7 +44,7 @@ function clippy_start_page() { ); $return_tours['tours']['monitoring_server_step_1']['conf'] = array(); $return_tours['tours']['monitoring_server_step_1']['conf']['show_bullets'] = 0; - $return_tours['tours']['monitoring_server_step_1']['conf']['show_step_numbers'] = 1; + $return_tours['tours']['monitoring_server_step_1']['conf']['show_step_numbers'] = 0; $return_tours['tours']['monitoring_server_step_1']['conf']['next_help'] = 'monitoring_server_step_2'; //================================================================== diff --git a/pandora_console/include/help/clippy/godmode_alerts_alert_actions.php b/pandora_console/include/help/clippy/godmode_alerts_alert_actions.php new file mode 100644 index 0000000000..564a702040 --- /dev/null +++ b/pandora_console/include/help/clippy/godmode_alerts_alert_actions.php @@ -0,0 +1,66 @@ + 'input[name="create"]', + 'position' => 'left', + 'intro' => __('Let me show you how to create an email action: Click on Create button and fill the form showed in the following screen.') + ); + $return_tours['tours']['email_alert_module_step_2']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_2']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_2']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_2']['conf']['next_help'] = 'email_alert_module_step_3'; + //================================================================== + + //================================================================== + //Help tour about the email alert module (step 4) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_4'] = array(); + $return_tours['tours']['email_alert_module_step_4']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_4']['steps'][] = array( + 'element'=> '#clippy', + 'intro' => __('Now, you have to go to the monitors list and look for a critical module to apply the alert.') + ); + $return_tours['tours']['email_alert_module_step_4']['steps'][] = array( + 'element'=> '#icon_oper-agents', + 'position' => 'right', + 'intro' => __('Click on the arrow to drop down the Monitoring submenu and select Monitor Detail.') + ); + $return_tours['tours']['email_alert_module_step_4']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_4']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_4']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_4']['conf']['next_help'] = 'email_alert_module_step_5'; + //================================================================== + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/godmode_alerts_configure_alert_action.php b/pandora_console/include/help/clippy/godmode_alerts_configure_alert_action.php new file mode 100644 index 0000000000..86082d6285 --- /dev/null +++ b/pandora_console/include/help/clippy/godmode_alerts_configure_alert_action.php @@ -0,0 +1,79 @@ + 'input[name="name"]', + 'intro' => __('Fill the name of your action.') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> 'select[name="group"]', + 'intro' => __('Select the group in the drop-down list and filter for ACL (the user in this group can use your action to create an alert).') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> 'select[name="id_command"]', + 'intro' => __('In the command field select "email".') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> 'input[name="action_threshold"]', + 'intro' => __('In the threshold field enter the seconds. The help icon show more information.') . '
' . + ui_print_help_icon ('action_threshold', true, '', 'images/help.png') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> '#clippy_fields', + 'position' => 'top', + 'intro' => __('In the first field enter the email address/addresses where you want to receive the email alerts separated with comas ( , ) or white spaces.') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> '#clippy_fields', + 'position' => 'top', + 'intro' => __('In the "Subject" field you can use the macros _agent_ or _module_ for each name.') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> '#clippy_fields', + 'position' => 'top', + 'intro' => __('In the text field, you can also use macros. Get more information about the macros by clicking on the help icon.') . '
' . + ui_print_help_icon ('alert_config', true, '', 'images/help.png') + ); + $return_tours['tours']['email_alert_module_step_3']['steps'][] = array( + 'element'=> 'input[name="create"]', + 'position' => 'left', + 'intro' => __('Click on Create button to create the action.') + ); + $return_tours['tours']['email_alert_module_step_3']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_3']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_3']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_3']['conf']['next_help'] = 'email_alert_module_step_4'; + //================================================================== + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/homepage.php b/pandora_console/include/help/clippy/homepage.php index e5bebdb591..c0aa6d7e1a 100644 --- a/pandora_console/include/help/clippy/homepage.php +++ b/pandora_console/include/help/clippy/homepage.php @@ -55,15 +55,19 @@ function clippy_start_page_homepage() { $return_tours['tours']['homepage']['steps'][] = array( 'element'=> '#clippy', 'intro' => __('Which task would you like to do first?') . '

' . - '
    ' . + '' ); $return_tours['tours']['homepage']['conf'] = array(); @@ -114,6 +118,39 @@ function clippy_start_page_homepage() { //================================================================== + + //================================================================== + //Help tour about the email alert module (step 1) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_1'] = array(); + $return_tours['tours']['email_alert_module_step_1']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_1']['steps'][] = array( + 'element'=> '#clippy', + 'intro' => __('The first thing you have to do is to setup the config email in the Pandora FMS Server.') . + '
    ' . + ui_print_help_icon ('context_pandora_server_email', true, '', 'images/help.png') . + '
    ' . + __('If you have it already configured you can go to the next step.') + ); + $return_tours['tours']['email_alert_module_step_1']['steps'][] = array( + 'element'=> '#icon_god-alerts', + 'position' => 'top', + 'intro' => __('Now, pull down the Manage alerts menu and click on Actions. ') + ); + $return_tours['tours']['email_alert_module_step_1']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_1']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_1']['conf']['show_step_numbers'] = 0; + + $return_tours['tours']['email_alert_module_step_1']['conf']['complete_js'] = " + ; + "; + $return_tours['tours']['email_alert_module_step_1']['conf']['exit_js'] = " + location.reload(); + "; + $return_tours['tours']['email_alert_module_step_1']['conf']['next_help'] = 'email_alert_module_step_2'; + //================================================================== + + return $return_tours; } ?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/module_unknow.php b/pandora_console/include/help/clippy/module_unknow.php index 677d4bb552..24e6f5a718 100644 --- a/pandora_console/include/help/clippy/module_unknow.php +++ b/pandora_console/include/help/clippy/module_unknow.php @@ -42,7 +42,7 @@ function clippy_module_unknow() { '' . '' . __('Unknown modules are modules which receive data normally at least in one occassion, but at this time are not receving data. Please check our troubleshoot help page to help you determine why you have unknown modules.') . - ui_print_help_icon ('context_module_unknow', true, '', 'images/help_w.png') . + ui_print_help_icon ('context_module_unknow', true, '', 'images/help.png') . '' . '' . '' diff --git a/pandora_console/include/help/clippy/operation_agentes_status_monitor.php b/pandora_console/include/help/clippy/operation_agentes_status_monitor.php new file mode 100644 index 0000000000..d9d47441f1 --- /dev/null +++ b/pandora_console/include/help/clippy/operation_agentes_status_monitor.php @@ -0,0 +1,71 @@ + 'select[name="status"]', + 'intro' => __('Now, you have to go to the monitors list and look for a "critical" module to apply the alert.') + ); + $return_tours['tours']['email_alert_module_step_5']['steps'][] = array( + 'element'=> 'input[name="ag_freestring"]', + 'intro' => __('If you know the name of the agent or the name of the module in critical status, type it in this field to make the module list shorter. You can write the entire name or just a part of it.') + ); + $return_tours['tours']['email_alert_module_step_5']['steps'][] = array( + 'element'=> 'input[name="uptbutton"]', + 'position' => 'left', + 'intro' => __('Click on Show button to get the modules list filtered.') + ); + $return_tours['tours']['email_alert_module_step_5']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_5']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_5']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_5']['conf']['next_help'] = 'email_alert_module_step_6'; + //================================================================== + + //================================================================== + //Help tour about the email alert module (step 6) + //------------------------------------------------------------------ + $return_tours['tours']['email_alert_module_step_6'] = array(); + $return_tours['tours']['email_alert_module_step_6']['steps'] = array(); + $return_tours['tours']['email_alert_module_step_6']['steps'][] = array( + 'element'=> '#table3', + 'position' => 'top', + 'intro' => __('Now, to edit the module, click on the wrench that appears in the type column.') + ); + $return_tours['tours']['email_alert_module_step_6']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_6']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_6']['conf']['show_step_numbers'] = 0; + $return_tours['tours']['email_alert_module_step_6']['conf']['next_help'] = 'email_alert_module_step_7'; + //================================================================== + + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/operation_agentes_ver_agente.php b/pandora_console/include/help/clippy/operation_agentes_ver_agente.php new file mode 100644 index 0000000000..b3df29487d --- /dev/null +++ b/pandora_console/include/help/clippy/operation_agentes_ver_agente.php @@ -0,0 +1,45 @@ + '#table8', + 'position' => 'top', + 'intro' => __('The last step is to check the alert created. Click on the round icon to force the action execution and after a few minutes you will receive the alert in your email.') + ); + $return_tours['tours']['email_alert_module_step_10']['conf'] = array(); + $return_tours['tours']['email_alert_module_step_10']['conf']['show_bullets'] = 0; + $return_tours['tours']['email_alert_module_step_10']['conf']['show_step_numbers'] = 0; + //================================================================== + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/include/help/en/help_context_pandora_server_email.php b/pandora_console/include/help/en/help_context_pandora_server_email.php new file mode 100755 index 0000000000..f210cc07d9 --- /dev/null +++ b/pandora_console/include/help/en/help_context_pandora_server_email.php @@ -0,0 +1,38 @@ + +

    Config the Pandora Server for email alerts

    +

    You must to edit the "Pandora Server conf file", normaly it is in: +

    +	/etc/pandora_server/pandora_server.conf
    +
    +And you must set these values: +
    +# mta_address: External Mailer (MTA) IP Address to be used by Pandora FMS internal email capabilities
    +
    +mta_address localhost
    +
    +# mta_port, this is the mail server port (default 25)
    +
    +mta_port 25
    +
    +# mta_user MTA User (if needed for auth, FQD or simple user, depending on your server)
    +
    +mta_user myuser@mydomain.com
    +
    +# mta_pass MTA Pass (if needed for auth)
    +
    +mta_pass mypassword
    +
    +# mta_auth MTA Auth system (if needed, it supports LOGIN, PLAIN, CRAM-MD5, DIGEST-MD)
    +
    +mta_auth LOGIN
    +
    +# mta_from Email address that sends the mail, by default is pandora@localhost 
    +#           probably you need to change it to avoid problems with your antispam
    +
    +mta_from Pandora FMS 
    +
    +

    \ No newline at end of file diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 9c9ec60c12..4ac53e2901 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -520,7 +520,7 @@ if ($custom_fields === false) $custom_fields = array(); foreach ($custom_fields as $custom_field) { $row = array(); $row[0] = $custom_field['name']; - + $custom_field_value = ""; if (!empty($ag_custom_fields)) { $custom_field_value = $ag_custom_fields[$custom_field['id_field']]; @@ -529,7 +529,7 @@ foreach ($custom_fields as $custom_field) { } } $row[1] = html_print_input_text ("ag_custom_fields[".$custom_field['id_field']."]", $custom_field_value, '', 100, 300, true); - + $table_custom_fields->data[] = $row; } @@ -1067,7 +1067,19 @@ foreach ($result as $row) { $data[1] .= ''; } - $data[2] = html_print_image("images/" . modules_show_icon_type ($row["module_type"]), true); + $data[2] = html_print_image("images/" . modules_show_icon_type ($row["module_type"]), true); + if (check_acl ($config['id_user'], $row['id_group'], "AW")) + $data[2] .= '' . + html_print_image("images/config.png", true, + array("alt" => '0', "border" => "", "title" => __('Edit'))) . + ''; $data[3] = ui_print_truncate_text($row["module_name"], 'agent_small', false, true, true); if ($row["extended_info"] != "") { @@ -1080,10 +1092,6 @@ foreach ($result as $row) { 'style' => 'width: 20px; margin-left: 3px;')); } -/* - $data[4] = ui_print_truncate_text($row['tags'], 'agent_small', false, true, true, '[…]', 'font-size:7pt;'); -*/ - $data[5] = ($row['module_interval'] == 0) ? human_time_description_raw($row['agent_interval']) : diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 6a6ddacc76..0ec256800c 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -303,7 +303,7 @@ if (check_acl ($config['id_user'], 0, "IR") == 1) { $sub[$sec2]["subsecs"] = array( "operation/incidents/incident_detail", "operation/integria_incidents"); - + $sub2 = array (); $sub2[$sec2sub]["text"] = __('Statistics');