Added the context help icon for the learning mode in form of agent. TICKET #1311
This commit is contained in:
parent
d1ffe504d3
commit
2b247e0ed1
|
@ -94,6 +94,7 @@ if (is_ajax ()) {
|
|||
// Load global vars
|
||||
enterprise_include ('godmode/agentes/agent_manager.php');
|
||||
|
||||
require_once ('include/functions_clippy.php');
|
||||
require_once ('include/functions_servers.php');
|
||||
require_once ('include/functions_gis.php');
|
||||
require_once($config['homedir'] . "/include/functions_agents.php");
|
||||
|
@ -288,9 +289,11 @@ $table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255
|
|||
$table->data[1][0] = __('Module definition') .
|
||||
ui_print_help_icon("module_definition", true);
|
||||
$table->data[1][1] = __('Learning mode') . ' ' .
|
||||
html_print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true);
|
||||
html_print_radio_button_extended ("modo", 1, '', $modo, false, 'show_modules_not_learning_mode_context_help();',
|
||||
'style="margin-right: 40px;"', true);
|
||||
$table->data[1][1] .= __('Normal mode') . ' ' .
|
||||
html_print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true);
|
||||
html_print_radio_button_extended ("modo", 0, '', $modo, false, 'show_modules_not_learning_mode_context_help();',
|
||||
'style="margin-right: 40px;"', true);
|
||||
|
||||
// Status (Disabled / Enabled)
|
||||
$table->data[2][0] = __('Status');
|
||||
|
@ -414,7 +417,22 @@ if (!empty($fields)) {
|
|||
}
|
||||
|
||||
echo '<div class="action-buttons" style="width: ' . $table->width . '">';
|
||||
|
||||
|
||||
//The context help about the learning mode
|
||||
if ($modo == 0) {
|
||||
echo "<span id='modules_not_learning_mode_context_help' style=''>";
|
||||
}
|
||||
else {
|
||||
echo "<span id='modules_not_learning_mode_context_help' style='display: none;'>";
|
||||
}
|
||||
echo clippy_context_help("modules_not_learning_mode");
|
||||
echo "</span>";
|
||||
|
||||
|
||||
|
||||
if ($id_agente) {
|
||||
|
||||
html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
|
||||
html_print_input_hidden ('update_agent', 1);
|
||||
html_print_input_hidden ('id_agente', $id_agente);
|
||||
|
@ -465,6 +483,15 @@ function changeIcons() {
|
|||
//$("#icon_default").attr("src", "<?php echo $path; ?>" + icon +
|
||||
}
|
||||
|
||||
function show_modules_not_learning_mode_context_help() {
|
||||
if ($("input[name='modo'][value=1]").is(':checked')) {
|
||||
$("#modules_not_learning_mode_context_help").hide();
|
||||
}
|
||||
else {
|
||||
$("#modules_not_learning_mode_context_help").show();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready (function () {
|
||||
$("select#id_os").pandoraSelectOS ();
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<?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_learning_mode() {
|
||||
|
||||
$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']['modules_not_learning_mode'] = array();
|
||||
$return_tours['tours']['modules_not_learning_mode']['steps'] = array();
|
||||
$return_tours['tours']['modules_not_learning_mode']['steps'][] = array(
|
||||
'init_step_context' => true,
|
||||
'position' => 'left',
|
||||
'intro' => '<table>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_body">' .
|
||||
__('Please note that you have your agent setup to do not add new modules coming from the data XML.') . '<br />' .
|
||||
__('That means if you have a local plugin or add manually new modules to the configuration file, you won\'t have it in your agent, unless you first create manually in the interface (with the exact name and type as coming in the XML file).') . '<br />' .
|
||||
__('You should use the "normal" mode (non learn) only when you don\'t intend to add more modules to the agent.') .
|
||||
ui_print_help_icon ('module_definition', true, '', 'images/help.png') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'</table>'
|
||||
);
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf'] = array();
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf']['autostart'] = false;
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf']['show_bullets'] = 0;
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf']['show_step_numbers'] = 0;
|
||||
//==================================================================
|
||||
|
||||
return $return_tours;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue