2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
<?php
|
2019-03-14 18:04:28 +01:00
|
|
|
/**
|
|
|
|
* Extension to manage a list of gateways and the node address where they should
|
|
|
|
* point to.
|
|
|
|
*
|
|
|
|
* @category Update Manager Offline
|
|
|
|
* @package Pandora FMS
|
|
|
|
* @subpackage Community
|
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
|
|
|
*
|
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
* Copyright (c) 2005-2019 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 for 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.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
|
|
|
global $config;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
check_login();
|
2016-04-13 13:51:01 +02:00
|
|
|
|
2019-03-14 18:04:28 +01:00
|
|
|
if (! check_acl($config['id_user'], 0, 'PM')
|
|
|
|
&& ! is_user_admin($config['id_user'])
|
|
|
|
) {
|
2019-01-30 16:18:44 +01:00
|
|
|
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
|
|
|
|
include 'general/noaccess.php';
|
|
|
|
return;
|
2016-04-13 13:51:01 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2015-06-30 12:59:23 +02:00
|
|
|
$baseurl = ui_get_full_url(false, false, false, false);
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
|
|
|
?>
|
2015-06-30 12:59:23 +02:00
|
|
|
|
2019-03-14 18:04:28 +01:00
|
|
|
<!-- Add the stylesheet here cause somehow the 'ui_require_css_file'
|
|
|
|
is not working on the metaconsole and there is no time to fix it -->
|
2015-06-30 12:59:23 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="<?php echo $baseurl; ?>/godmode/update_manager/update_manager.css">
|
|
|
|
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
<script type="text/javascript">
|
2019-01-30 16:18:44 +01:00
|
|
|
var drop_the_package_here_or = "<?php echo __('Drop the package here or'); ?>\n";
|
|
|
|
var browse_it = "<?php echo __('browse it'); ?>\n";
|
|
|
|
var the_package_has_been_uploaded_successfully = "<?php echo __('The package has been uploaded successfully.'); ?>\n";
|
|
|
|
var remember_that_this_package_will = "<?php echo __("Please keep in mind that this package is going to override your actual %s files and that it's recommended to conduct a backup before continuing the updating process.", get_product_name()); ?>\n";
|
|
|
|
var click_on_the_file_below_to_begin = "<?php echo __('Click on the file below to begin.'); ?>\n";
|
|
|
|
var updating = "<?php echo __('Updating'); ?>\n";
|
|
|
|
var package_updated_successfully = "<?php echo __('Package updated successfully.'); ?>\n";
|
|
|
|
var if_there_are_any_database_change = "<?php echo __('If there are any database change, it will be applied.'); ?>\n";
|
|
|
|
var mr_available = "<?php echo __('Minor release available'); ?>\n";
|
|
|
|
var package_available = "<?php echo __('New package available'); ?>\n";
|
|
|
|
var mr_not_accepted = "<?php echo __('Minor release rejected. Changes will not apply.'); ?>\n";
|
|
|
|
var mr_not_accepted_code_yes = "<?php echo __('Minor release rejected. The database will not be updated and the package will apply.'); ?>\n";
|
|
|
|
var mr_cancel = "<?php echo __('Minor release rejected. Changes will not apply.'); ?>\n";
|
|
|
|
var package_cancel = "<?php echo __('These package changes will not apply.'); ?>\n";
|
|
|
|
var package_not_accepted = "<?php echo __('Package rejected. These package changes will not apply.'); ?>\n";
|
|
|
|
var mr_success = "<?php echo __('Database successfully updated'); ?>\n";
|
|
|
|
var mr_error = "<?php echo __('Error in MR file'); ?>\n";
|
|
|
|
var package_success = "<?php echo __('Package updated successfully'); ?>\n";
|
|
|
|
var package_error = "<?php echo __('Error in package updated'); ?>\n";
|
|
|
|
var bad_mr_file = "<?php echo __('Database MR version is inconsistent, do you want to apply the package?'); ?>\n";
|
|
|
|
var mr_available_header = "<?php echo __('There are db changes'); ?>\n";
|
|
|
|
var text1_mr_file = "<?php echo __('There are new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
|
|
|
|
var text2_mr_file = "<?php echo __('We recommend launching '); ?>\n";
|
|
|
|
var text3_mr_file = "<?php echo __('planned downtime'); ?>\n";
|
2019-02-01 09:55:29 +01:00
|
|
|
|
|
|
|
var language = "<?php echo $config['language']; ?>";
|
|
|
|
var docsUrl = (language === "es")
|
|
|
|
? "http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29"
|
|
|
|
: "http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29";
|
|
|
|
var text4_mr_file = "<?php echo __(' to this process'); ?>";
|
|
|
|
text4_mr_file += "<br><br>";
|
|
|
|
text4_mr_file += "<a style=\"font-size:10pt;font-style:italic;\" target=\"blank\" href=\"" + docsUrl + "\">";
|
|
|
|
text4_mr_file += "<?php echo __('About minor release update'); ?>";
|
|
|
|
text4_mr_file += "</a>";
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
var text1_package_file = "<?php echo __('There is a new update available'); ?>\n";
|
|
|
|
var text2_package_file = "<?php echo __('There is a new update available to apply. Do you want to start the update process?'); ?>\n";
|
|
|
|
var applying_mr = "<?php echo __('Applying DB MR'); ?>\n";
|
|
|
|
var cancel_button = "<?php echo __('Cancel'); ?>\n";
|
|
|
|
var ok_button = "<?php echo __('Ok'); ?>\n";
|
|
|
|
var apply_mr_button = "<?php echo __('Apply MR'); ?>\n";
|
|
|
|
var apply_button = "<?php echo __('Apply'); ?>\n";
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<form id="form-offline_update" method="post" enctype="multipart/form-data" class="fileupload_form">
|
2019-01-30 16:18:44 +01:00
|
|
|
<div></div>
|
|
|
|
<ul></ul>
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
</form>
|
|
|
|
|
2015-06-30 12:59:23 +02:00
|
|
|
<script src="<?php echo $baseurl; ?>/include/javascript/jquery.fileupload.js"></script>
|
|
|
|
<script src="<?php echo $baseurl; ?>/include/javascript/jquery.iframe-transport.js"></script>
|
|
|
|
<script src="<?php echo $baseurl; ?>/include/javascript/jquery.knob.js"></script>
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
2015-06-30 12:59:23 +02:00
|
|
|
<script src="<?php echo $baseurl; ?>/include/javascript/update_manager.js"></script>
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2019-01-30 16:18:44 +01:00
|
|
|
form_upload("<?php echo $baseurl; ?>");
|
2019-02-01 09:55:29 +01:00
|
|
|
</script>
|