2012-04-12 Miguel de Dios <miguel.dedios@artica.es>
* include/styles/pandora.css: add changes for the new standarized messages. * extensions/update_manager/update_pandora.php: reverded the deleted file, sorry. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5959 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
eb6b18a1cf
commit
ccdf37d90e
|
@ -1,3 +1,10 @@
|
|||
2012-04-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/styles/pandora.css: add changes for the new standarized messages.
|
||||
|
||||
* extensions/update_manager/update_pandora.php: reverded the deleted file,
|
||||
sorry.
|
||||
|
||||
2012-04-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_ui.php: standariced the messages and added one more for
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
<?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 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.
|
||||
|
||||
require_once('lib/functions.php');
|
||||
|
||||
if (is_ajax ()) {
|
||||
global $config;
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config["id_user"], 0, "PM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access event viewer");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
require_once('lib/functions.ajax.php');
|
||||
|
||||
$get_packages_online = (bool) get_parameter('get_packages_online');
|
||||
$download_package = (bool) get_parameter('download_package');
|
||||
$check_download_package = (bool) get_parameter('check_download_package');
|
||||
$install_package = (bool) get_parameter('install_package');
|
||||
$check_install_package = (bool) get_parameter('check_install_package');
|
||||
|
||||
if ($get_packages_online)
|
||||
update_pandora_get_packages_online_ajax();
|
||||
if ($download_package)
|
||||
update_pandora_download_package();
|
||||
if ($check_download_package)
|
||||
update_pandora_check_download_package();
|
||||
if ($install_package)
|
||||
update_pandora_install_package();
|
||||
if ($check_install_package)
|
||||
update_pandora_check_install_package();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function update_pandora_administration($settings, $user_key) {
|
||||
global $config;
|
||||
global $conf_update_pandora;
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config["id_user"], 0, "PM")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access event viewer");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!update_pandora_check_installation()) {
|
||||
ui_print_error_message(__('First execution of Update Pandora'));
|
||||
update_pandora_installation();
|
||||
}
|
||||
|
||||
$delete_package = (bool)get_parameter('delete_package');
|
||||
if ($delete_package) {
|
||||
$package = get_parameter('package');
|
||||
|
||||
$dir = $config['attachment_store'] . '/update_pandora/';
|
||||
|
||||
$result = unlink($dir . $package);
|
||||
}
|
||||
|
||||
$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') .
|
||||
' ' . $conf_update_pandora['last_installed'];
|
||||
html_print_table($table);
|
||||
|
||||
|
||||
ui_print_info_message(
|
||||
'<p>' .
|
||||
__('This is a automatilly update Pandora Console only. Be careful if you have changed any php file of console, please make a backup this modified files php. Because the update action ovewrite all php files in Pandora console.') .
|
||||
'</p>' .
|
||||
'<p>' .
|
||||
__('Update Manager sends anonymous information about Pandora FMS usage (number of agents and modules running). To disable it, just delete extension or remove remote server address from Update Manager plugin setup.') .
|
||||
'</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="">' .
|
||||
'<tbody>
|
||||
<tr id="online_packages-0" class="spinner_row" style="">
|
||||
<td id="online_packages-0-0" style=" text-align:left; width:80%;">' .
|
||||
__('Get list online Package') . " " . html_print_image('images/spinner.gif', true) .
|
||||
'</td>
|
||||
<td id="online_packages-0-1" style=" text-align:center; width:50px;"></td>
|
||||
</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;">
|
||||
<?php
|
||||
echo '<h2 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') . " ";
|
||||
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 '<br /><br />';
|
||||
echo "<div id='progress_bar_img'>";
|
||||
echo progress_bar(0, 300, 20, 0 . '%', 1, false, "#00ff00");
|
||||
echo "</div>";
|
||||
|
||||
echo "<div style='padding-top: 10px; display: none;' id='info_text'>
|
||||
<b>Size:</b> 666/666 kbytes <b>Speed:</b> 666 bytes/second
|
||||
</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;"');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$tableMain = null;
|
||||
$tableMain->width = '98%';
|
||||
$tableMain->data = array();
|
||||
$tableMain->data[0][0] = '<h4>' . __('Downloaded Packages') . '</h4>';
|
||||
|
||||
$list_downloaded_packages = update_pandora_get_list_downloaded_packages('administration');
|
||||
$table = null;
|
||||
$table->width = '100%';
|
||||
$table->size = array('50%', '25%', '25%');
|
||||
$table->align = array('left', 'center');
|
||||
$table->data = array();
|
||||
foreach ($list_downloaded_packages as $package) {
|
||||
$actions = '';
|
||||
if (!isset($package['empty'])) {
|
||||
if (!$package['current']) {
|
||||
$actions = html_print_button(__('Install'),
|
||||
'install_' . uniqid(), false,
|
||||
'ajax_start_install_package(\'' . $package['name'] . '\');',
|
||||
'class="sub next" style="width: 40%;"', true);
|
||||
}
|
||||
else {
|
||||
$actions = html_print_button(__('Reinstall'),
|
||||
'reinstall_' . uniqid(), false,
|
||||
'ajax_start_install_package(\'' . $package['name'] . '\');',
|
||||
'class="sub upd" style="width: 40%;"', true);
|
||||
}
|
||||
$actions .= ' ' . html_print_button(__('Delete'),
|
||||
'delete' . uniqid(), false,
|
||||
'delete_package(\'' . $package['name'] . '\');',
|
||||
'class="sub delete" style="width: 40%;"', true);
|
||||
}
|
||||
$table->data[] = array($package['name'], $package['time'], $actions);
|
||||
}
|
||||
$tableMain->data[1][0] = html_print_table($table, true);
|
||||
|
||||
html_print_table($tableMain);
|
||||
|
||||
ui_require_css_file ('dialog');
|
||||
ui_require_jquery_file ('ui.core');
|
||||
ui_require_jquery_file ('ui.dialog');
|
||||
|
||||
update_pandora_print_javascript_admin();
|
||||
}
|
||||
?>
|
|
@ -310,7 +310,8 @@ label {
|
|||
th > label {
|
||||
padding-top: 7px;
|
||||
}
|
||||
input.chk {margin-right: 0px;
|
||||
input.chk {
|
||||
margin-right: 0px;
|
||||
border: 0px none;
|
||||
height: 14px;
|
||||
}
|
||||
|
@ -845,7 +846,7 @@ span.rmess, span.nrmess {
|
|||
/* Style for login form */
|
||||
.databox_login {
|
||||
#margin-top: 100px !important;
|
||||
width: 657x !important;
|
||||
width: 657px !important;
|
||||
height: 400px;
|
||||
border: none !important;
|
||||
background-color: #fafafa;
|
||||
|
@ -853,7 +854,7 @@ span.rmess, span.nrmess {
|
|||
}
|
||||
/* Style for login form */
|
||||
.databox_logout {
|
||||
width: 657x !important;
|
||||
width: 657px !important;
|
||||
height: 400px;
|
||||
border: none !important;
|
||||
background-color: #fafafa;
|
||||
|
@ -861,7 +862,7 @@ span.rmess, span.nrmess {
|
|||
}
|
||||
|
||||
.databox_error {
|
||||
width: 657x !important;
|
||||
width: 657px !important;
|
||||
height: 400px;
|
||||
border: none !important;
|
||||
background-color: #fafafa;
|
||||
|
@ -1436,7 +1437,7 @@ div.cellCritical {
|
|||
}
|
||||
|
||||
div.cellWarning {
|
||||
width:100%;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background: #fce94f;
|
||||
color: #000;
|
||||
|
@ -1474,3 +1475,21 @@ div.cellBig {
|
|||
height:100%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.info_box {
|
||||
background: #EBEBEB;
|
||||
margin: 10px auto;
|
||||
padding: 5px;
|
||||
border: 1px solid #A8A8A8;
|
||||
width: 85% !important;
|
||||
}
|
||||
|
||||
.info_box .title * {
|
||||
font-size: 10pt !important;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.info_box .icon {
|
||||
width: 30px !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue