From c66b9c6a54e2ae101d4dbeec28c6085d9e3efbe8 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 14 Aug 2014 11:25:46 +0000 Subject: [PATCH] 2014-08-14 Miguel de Dios * include/help/clippy/agent_out_of_limits.php, include/help/clippy/modules_not_init.php, include/functions_clippy.php, operation/agentes/estado_monitores.php, operation/agentes/estado_generalagente.php: wip in the clippy project. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10424 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++ pandora_console/include/functions_clippy.php | 6 ++ .../help/clippy/agent_out_of_limits.php | 57 +++++++++++++++++++ .../include/help/clippy/modules_not_init.php | 57 +++++++++++++++++++ .../agentes/estado_generalagente.php | 7 +++ .../operation/agentes/estado_monitores.php | 11 +++- 6 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 pandora_console/include/help/clippy/agent_out_of_limits.php create mode 100644 pandora_console/include/help/clippy/modules_not_init.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e8c5b3287d..5328c6a927 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2014-08-14 Miguel de Dios + + * include/help/clippy/agent_out_of_limits.php, + include/help/clippy/modules_not_init.php, + include/functions_clippy.php, + operation/agentes/estado_monitores.php, + operation/agentes/estado_generalagente.php: wip in the clippy + project. + 2014-08-14 Miguel de Dios * include/help/clippy/godmode_agentes_modificar_agente.php, diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index a86abfe697..721d8b268c 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -197,6 +197,12 @@ function clippy_write_javascript_helps_steps($tours) { } function clippy_context_help($help = null) { + global $config; + + if ($config['tutorial_mode'] == 'expert') { + return; + } + $id = uniqid("id_"); $return = ''; diff --git a/pandora_console/include/help/clippy/agent_out_of_limits.php b/pandora_console/include/help/clippy/agent_out_of_limits.php new file mode 100644 index 0000000000..74553430d5 --- /dev/null +++ b/pandora_console/include/help/clippy/agent_out_of_limits.php @@ -0,0 +1,57 @@ + true, + 'intro' => '' . + '' . + '' . + '' . + '' . + '' . + '' . + '
' . + __('Agent contact date passed it\'s ETA!.') . + '
' . + __('This happen when your agent stopped reporting or the server have any problem (too load or just down). Check also connectivity between the agent and the server.') . + '
' + ); + $return_tours['tours']['agent_out_of_limits']['conf'] = array(); + $return_tours['tours']['agent_out_of_limits']['conf']['autostart'] = false; + $return_tours['tours']['agent_out_of_limits']['conf']['show_bullets'] = 0; + $return_tours['tours']['agent_out_of_limits']['conf']['show_step_numbers'] = 0; + //================================================================== + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/modules_not_init.php b/pandora_console/include/help/clippy/modules_not_init.php new file mode 100644 index 0000000000..0549f671bc --- /dev/null +++ b/pandora_console/include/help/clippy/modules_not_init.php @@ -0,0 +1,57 @@ + true, + 'intro' => '' . + '' . + '' . + '' . + '' . + '' . + '' . + '
' . + __('You have non initialized modules') . + '
' . + __('This happen when you have just created a module and it\'s not executed at first time. Usually in a few seconds should be initialized and you will be able to see in main view. If you keep non-init modules for more than 24hr (due a problem in it\'s execution or configuration) they will be automatically deleted by the system. Non-init are not visible in the “main view”, you can see/edit them in the module administration section, in the agent administrator.') . + '
' + ); + $return_tours['tours']['agent_out_of_limits']['conf'] = array(); + $return_tours['tours']['agent_out_of_limits']['conf']['autostart'] = false; + $return_tours['tours']['agent_out_of_limits']['conf']['show_bullets'] = 0; + $return_tours['tours']['agent_out_of_limits']['conf']['show_step_numbers'] = 0; + //================================================================== + + return $return_tours; +} +?> \ No newline at end of file diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index ab4aeea8a2..a148403914 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -25,6 +25,8 @@ include_graphs_dependencies(); require_once ($config['homedir'] . '/include/functions_groups.php'); require_once ($config['homedir'] .'/include/functions_incidents.php'); +include_once($config['homedir'] . "/include/functions_clippy.php"); + check_login (); @@ -204,6 +206,11 @@ $table_contact->data[] = $data; $data[0] = '' . __('Next contact') . ''; $progress = agents_get_next_contact($id_agente); $data[1] = progress_bar($progress, 200, 20); + +if ($progress > 100) { + $data[1] .= clippy_context_help("agent_out_of_limits"); +} + $table_contact->data[] = $data; // END: TABLE CONTACT BUILD diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index fe10d57321..521675294b 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -722,8 +722,15 @@ foreach ($modules as $module) { " . - __('Full list of monitors') . ""; +echo "

"; +echo __('Full list of monitors'); +$modules_not_init = agents_monitor_notinit($id_agente); +if (!empty($modules_not_init)) { + echo clippy_context_help("modules_not_init"); +} +echo "

"; + + print_form_filter_monitors($id_agente, $status_filter_monitor, $status_text_monitor); if (empty ($table->data)) {