2012-04-13 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_config.php, index.php,
	extensions/update_manager/lib/functions.ajax.php,
	extensions/update_manager/lib/functions.php,
	extensions/update_manager/main.php,
	extensions/update_manager/update_pandora.php,
	general/logon_ok.php:: some fixeds and some changes for run fine and
	pretty the update manager. 
	
	Merged from the branch "pandora_4.0"
	



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5970 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-04-13 10:39:28 +00:00
parent 8b2f13d112
commit 9169cd5ea5
8 changed files with 82 additions and 56 deletions

View File

@ -1,3 +1,15 @@
2012-04-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, index.php,
extensions/update_manager/lib/functions.ajax.php,
extensions/update_manager/lib/functions.php,
extensions/update_manager/main.php,
extensions/update_manager/update_pandora.php,
general/logon_ok.php:: some fixeds and some changes for run fine and
pretty the update manager.
Merged from the branch "pandora_4.0"
2012-04-13 Junichi Satoh <junichi@rworks.jp>
* godmode/alerts/configure_alert_compound.php: Added special days

View File

@ -131,7 +131,7 @@ function update_pandora_download_package() {
if ($conf_update_pandora['download_mode'] == 'wget') {
$command = "wget " .
$package_url . " -P " . $dir .
$package_url . " -O " . $dir . $package .
" -o /tmp/" . $package . ".info.txt";
$return = array('correct' => 0);

View File

@ -143,11 +143,13 @@ function update_pandora_get_list_downloaded_packages($mode = 'operation') {
if (empty($packages)) {
if ($mode == 'operation') {
$packages[] = array('name' =>
__('There are not downloaded packages in your Pandora Console.'));
__('There are not downloaded packages in your Pandora Console.'),
'time' => '');
}
else {
$packages[] = array('empty' => true, 'name' =>
__('There are not downloaded packages in your Pandora Console.'));
__('There are not downloaded packages in your Pandora Console.'),
'time' => '');
}
}
@ -233,7 +235,7 @@ function update_pandora_print_javascript_admin() {
draggable: false,
modal: true,
height: 400,
width: 600,
width: 650,
overlay: {
opacity: 0.5,
background: "black"
@ -258,7 +260,7 @@ function update_pandora_print_javascript_admin() {
draggable: true,
modal: true,
height: 400,
width: 600,
width: 650,
overlay: {
opacity: 0.5,
background: "black"
@ -336,6 +338,7 @@ function update_pandora_print_javascript_admin() {
$("#info_text").html('');
$("#button_close_download_disabled").hide();
$("#button_close_download").show();
}
}
@ -394,6 +397,7 @@ function update_pandora_print_javascript_admin() {
else {
$("#title_installing_update_pandora").hide();
$("#title_installed_update_pandora").show();
$("#button_close_download_disabled").hide();
$("#button_close_download").show();
}
}
@ -423,16 +427,15 @@ function update_pandora_print_javascript_admin() {
$("tbody", "#online_packages").append(
'<tr class="package_' + data['package'] + '">' +
'<td style=" text-align:left; width:50%;" class="name_package">' +
'<?php echo '<b>' . __('There is a new version:') . '</b> '; ?>' +
'<td style=" text-align:left; width:50%;" valign="top" class="name_package">' +
'<?php echo '<b>' . __('There is a new version:') . '</b><br><br> '; ?>' +
data['package'] +
'</td>' +
'<td style=" text-align:left; width:30%;" class="timestamp_package">' +
'<td style=" text-align:left; width:30%;" valign="bottom" class="timestamp_package">' +
data['timestamp'] +
'</td>' +
'<td style=" text-align:center; width:50px;">' +
'<td style=" text-align:center; width:50px;" valign="bottom">' +
buttonUpdate +
' ' + data['text_adv'] +
'</td>' +
'</tr>');

View File

@ -84,16 +84,12 @@ function main_view_enterprise($settings, $user_key) {
}
echo '<h4>';
echo __('Your Pandora FMS Enterprise version number is') . ' ' .
$settings->current_update;
echo "</h4>";
$table = null;
$table->width = '98%';
$table->style = array();
$table->style[0] = 'font-weight: bolder; font-size: 20px;';
$table->data = array();
$table->data[0][0] = __('Your Pandora FMS Enterprise version number is')
. ' ' . $settings->current_update;
html_print_table($table);
echo "<br><br>";
/* Translators: Do not translade Update Manager, it's the name of the program */

View File

@ -79,15 +79,18 @@ function update_pandora_administration($settings, $user_key) {
$conf_update_pandora = update_pandora_get_conf();
$table = null;
$table->width = '98%';
$table->style = array();
$table->style[0] = 'font-weight: bolder; font-size: 20px;';
$table->data = array();
$table->data[0][0] = __('Your Pandora FMS open source package installed is') .
if (!empty($conf_update_pandora['last_installed'])){
echo '<h4>';
echo __('Your Pandora FMS open source package installed is') .
' ' . $conf_update_pandora['last_installed'];
html_print_table($table);
echo "</h4>";
} else {
echo '<h4>';
echo __('Your Pandora FMS does not have any update installed yet');
echo "</h4>";
}
echo "<br><br>";
ui_print_info_message(
'<p>' .
@ -98,12 +101,9 @@ function update_pandora_administration($settings, $user_key) {
'</p>'
);
$table = null;
$table->width = '98%';
$table->data = array();
$table->data[0][0] = '<h4>' . __('Online') . '</h4>';
$table->data[1][0] =
'<table id="online_packages" class="databox" width="80%" cellspacing="4" cellpadding="4" border="0" style="">' .
echo "<h4>". __('Online') . '</h4>';
echo '<table id="online_packages" class="databox" width="95%" cellspacing="4" cellpadding="4" border="0" style="">' .
'<tbody>
<tr id="online_packages-0" class="spinner_row" style="">
<td id="online_packages-0-0" style=" text-align:left; width:80%;">' .
@ -113,22 +113,21 @@ function update_pandora_administration($settings, $user_key) {
</tr>
</tbody>' .
'</table>';
html_print_table($table);
?>
<div id="dialog_download" title="<?php echo __('Process packge'); ?>"
style="display:none;">
<div style="position:absolute; top:20%; text-align: center; left:0%; right:0%; width:600px;">
<div style="position:absolute; top:10%; text-align: center; left:0%; right:0%; width:600px;">
<?php
echo '<h2 id="title_downloading_update_pandora">' . __('Downloading <span class="package_name">package</span> in progress') . " ";
echo '<h4 id="title_downloading_update_pandora">' . __('Downloading <span class="package_name">package</span> in progress') . " ";
html_print_image('images/spinner.gif');
echo '</h2>';
echo '<h2 style="display: none;" id="title_downloaded_update_pandora">' . __('Downloaded <span class="package_name">package</span>') . '</h2>';
echo '<h2 style="display: none;" id="title_installing_update_pandora">' . __('Installing <span class="package_name">package</span> in progress') . " ";
echo '</h4>';
echo '<h4 style="display: none;" id="title_downloaded_update_pandora">' . __('Downloaded <span class="package_name">package</span>') . '</h2>';
echo '<h4 style="display: none;" id="title_installing_update_pandora">' . __('Installing <span class="package_name">package</span> in progress') . " ";
html_print_image('images/spinner.gif');
echo '</h2>';
echo '<h2 style="display: none;" id="title_installed_update_pandora">' . __('Installed <span class="package_name">package</span> in progress') . '</h2>';
echo '<h2 style="display: none;" id="title_error_update_pandora">' . __('Fail download <span class="package_name">package</span>') . '</h2>';
echo '</h4>';
echo '<h4 style="display: none;" id="title_installed_update_pandora">' . __('Installed <span class="package_name">package</span> in progress') . '</h2>';
echo '<h4 style="display: none;" id="title_error_update_pandora">' . __('Fail download <span class="package_name">package</span>') . '</h2>';
echo '<br /><br />';
echo "<div id='progress_bar_img'>";
echo progress_bar(0, 300, 20, 0 . '%', 1, false, "#00ff00");
@ -139,6 +138,11 @@ function update_pandora_administration($settings, $user_key) {
</div>";
?>
<div id="button_close_download_disabled" style="position: absolute; top:280px; right:43%;">
<?php
html_print_submit_button(__("Close"), 'hide_download_disabled_dialog', true, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only" style="width:100px;"');
?>
</div>
<div id="button_close_download" style="display: none; position: absolute; top:280px; right:43%;">
<?php
html_print_submit_button(__("Close"), 'hide_download_dialog', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only" style="width:100px;"');
@ -148,10 +152,10 @@ function update_pandora_administration($settings, $user_key) {
</div>
<?php
echo '<h4>' . __('Downloaded Packages') . '</h4>';
$tableMain = null;
$tableMain->width = '98%';
$tableMain->width = '95%';
$tableMain->data = array();
$tableMain->data[0][0] = '<h4>' . __('Downloaded Packages') . '</h4>';
$list_downloaded_packages = update_pandora_get_list_downloaded_packages('administration');
$table = null;

View File

@ -23,7 +23,7 @@ global $config;
check_login ();
/* Call all extensions login function */
extensions_call_login_function ();
//extensions_call_login_function ();
require_once ("include/functions_reporting.php");
require_once ($config["homedir"] . '/include/functions_graph.php');

View File

@ -586,7 +586,7 @@ function config_process_config () {
}
if (!isset ($config['autoupdate'])) {
config_update_value ( 'autoupdate', 0);
config_update_value ( 'autoupdate', 1);
}
if (!isset ($config['api_password'])) {

View File

@ -126,6 +126,8 @@ $page = $sec2; //Reference variable for old time sake
$sec = get_parameter_get ('sec');
$sec = safe_url_extraclean ($sec);
$process_login = false;
$searchPage = false;
$search = get_parameter_get("head_search_keywords");
if (strlen($search) > 0) {
@ -169,6 +171,8 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
$nick_in_db = process_user_login ($nick, $pass);
if ($nick_in_db !== false) {
$process_login = true;
unset ($_GET["sec2"]);
$_GET["sec"] = "general/logon_ok";
$home_page ='';
@ -265,6 +269,10 @@ if (isset ($_GET["bye"])) {
* Load here, because if not, some extensions not load well, I don't why.
*/
extensions_load_extensions ($config['extensions']);
if ($process_login) {
/* Call all extensions login function */
extensions_call_login_function ();
}
// Header
if ($config["pure"] == 0) {
@ -282,11 +290,14 @@ else {
// Session locking concurrency speedup!
session_write_close ();
// Main block of content
if ($config["pure"] == 0) {
echo '<div id="main">';
}
// Page loader / selector
if ($searchPage) {
require ('operation/search_results.php');