2014-08-14 Miguel de Dios <miguel.dedios@artica.es>
* 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
This commit is contained in:
parent
6ef5f02e48
commit
c66b9c6a54
|
@ -1,3 +1,12 @@
|
|||
2014-08-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* 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 <miguel.dedios@artica.es>
|
||||
|
||||
* include/help/clippy/godmode_agentes_modificar_agente.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 = '';
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Clippy
|
||||
*/
|
||||
|
||||
function clippy_agent_out_of_limits() {
|
||||
|
||||
$return_tours = array();
|
||||
$return_tours['first_step_by_default'] = true;
|
||||
$return_tours['help_context'] = true;
|
||||
$return_tours['tours'] = array();
|
||||
|
||||
//==================================================================
|
||||
//Help tour about the monitoring with a ping (step 3)
|
||||
//------------------------------------------------------------------
|
||||
$return_tours['tours']['agent_out_of_limits'] = array();
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'] = array();
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'][] = array(
|
||||
'init_step_context' => true,
|
||||
'intro' => '<table>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_title">' .
|
||||
__('Agent contact date passed it\'s ETA!.') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_body">' .
|
||||
__('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.') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'</table>'
|
||||
);
|
||||
$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;
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Clippy
|
||||
*/
|
||||
|
||||
function clippy_modules_not_init() {
|
||||
|
||||
$return_tours = array();
|
||||
$return_tours['first_step_by_default'] = true;
|
||||
$return_tours['help_context'] = true;
|
||||
$return_tours['tours'] = array();
|
||||
|
||||
//==================================================================
|
||||
//Help tour about the monitoring with a ping (step 3)
|
||||
//------------------------------------------------------------------
|
||||
$return_tours['tours']['agent_out_of_limits'] = array();
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'] = array();
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'][] = array(
|
||||
'init_step_context' => true,
|
||||
'intro' => '<table>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_title">' .
|
||||
__('You have non initialized modules') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_body">' .
|
||||
__('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.') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'</table>'
|
||||
);
|
||||
$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;
|
||||
}
|
||||
?>
|
|
@ -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] = '<b>' . __('Next contact') . '</b>';
|
||||
$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
|
||||
|
|
|
@ -722,8 +722,15 @@ foreach ($modules as $module) {
|
|||
</script>
|
||||
<?php
|
||||
|
||||
echo "<h4 style='padding-top:0px !important;'>" .
|
||||
__('Full list of monitors') . "</h4>";
|
||||
echo "<h4 style='padding-top:0px !important;'>";
|
||||
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 "</h4>";
|
||||
|
||||
|
||||
|
||||
print_form_filter_monitors($id_agente, $status_filter_monitor, $status_text_monitor);
|
||||
if (empty ($table->data)) {
|
||||
|
|
Loading…
Reference in New Issue