Add help clippy when all servers is down. Tiquet: #1660
This commit is contained in:
parent
750f62ccb5
commit
b94484fcb9
|
@ -13,6 +13,9 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
require_once ('include/functions_clippy.php');
|
||||
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
|
@ -29,10 +32,17 @@ global $tiny;
|
|||
|
||||
$servers = servers_get_info();
|
||||
if ($servers === false) {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
$server_clippy = clippy_context_help("servers_down");
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database').$server_clippy."</div>";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$stateServers = (int) servers_check_status ();
|
||||
if ($stateServers == 0)
|
||||
$server_clippy = clippy_context_help("servers_down");
|
||||
else
|
||||
$server_clippy = "";
|
||||
$table->width = '98%';
|
||||
$table->size = array ();
|
||||
|
||||
|
@ -46,7 +56,7 @@ $table->align[4] = 'center';
|
|||
$table->align[5] = 'center';
|
||||
$table->align[8] = 'center';
|
||||
|
||||
$table->title = __('Tactical server information');
|
||||
$table->title = __('Tactical server information') . $server_clippy;
|
||||
$table->titleclass = 'tabletitle';
|
||||
$table->titlestyle = 'text-transform:uppercase;';
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?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_servers_down() {
|
||||
|
||||
$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']['servers_down'] = array();
|
||||
$return_tours['tours']['servers_down']['steps'] = array();
|
||||
$return_tours['tours']['servers_down']['steps'][] = array(
|
||||
'init_step_context' => true,
|
||||
'intro' => '<table>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_title">' .
|
||||
__('All servers down') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'<tr>' .
|
||||
'<td class="context_help_body">' .
|
||||
__('Can you up all servers. You go to terminal in linux and execute the next command: "sudo /etc/init.d/pandora_server restart". It\'s possible need introduce root pass.') .
|
||||
'</td>' .
|
||||
'</tr>' .
|
||||
'</table>'
|
||||
);
|
||||
$return_tours['tours']['servers_down']['conf'] = array();
|
||||
$return_tours['tours']['servers_down']['conf']['autostart'] = true;
|
||||
$return_tours['tours']['servers_down']['conf']['show_bullets'] = 0;
|
||||
$return_tours['tours']['servers_down']['conf']['show_step_numbers'] = 0;
|
||||
//==================================================================
|
||||
|
||||
return $return_tours;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue