Move mr to um section
This commit is contained in:
parent
b7bf236f3c
commit
46b008708c
|
@ -40,9 +40,6 @@ if(!enterprise_installed()){
|
|||
$open=true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$memory_limit = ini_get("memory_limit");
|
||||
$memory_limit = str_replace("M", "", $memory_limit);
|
||||
$memory_limit = (int)$memory_limit;
|
||||
|
@ -66,7 +63,6 @@ if ($memory_limit < 100) {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
/* Translators: Do not translade Update Manager, it's the name of the program */
|
||||
|
||||
if (is_metaconsole()) {
|
||||
|
@ -86,16 +82,15 @@ echo "<span class='loading' style='font-size:18pt;'>";
|
|||
echo "<img src='images/wait.gif' />";
|
||||
echo "</span><br><br>";
|
||||
|
||||
echo "<div><b>".__('The last version of package installed is:')."</b></div><br>";
|
||||
echo "<div style='color:#82b92e;font-size:40pt;font-weight:bold;'>".$current_package."</div>";
|
||||
echo "<div><b>" . __('The last version of package installed is:') . "</b></div><br>";
|
||||
echo "<div style='color:#82b92e;font-size:40pt;font-weight:bold;'>" . $current_package . "</div>";
|
||||
|
||||
|
||||
echo "<div class='checking_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";
|
||||
echo __('Checking for the newest package.');
|
||||
echo __('Checking for the newest package.');
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='downloading_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";
|
||||
echo __('Downloading for the newest package.');
|
||||
echo __('Downloading for the newest package.');
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='content'></div>";
|
||||
|
@ -103,17 +98,39 @@ echo "<div style='color:#82b92e;font-size:40pt;font-weight:bold;'>".$current_pac
|
|||
echo "<div class='progressbar' style='display: none;'><img class='progressbar_img' src='' /></div>";
|
||||
|
||||
|
||||
/* Hello there! :)
|
||||
/* -------------------------------------------------------------------------
|
||||
|
||||
Hello there! :)
|
||||
|
||||
We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger’ of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :(
|
||||
We added some of what seems to be "buggy" messages to the openSource version
|
||||
recently. This is not to force open-source users to move to the enterprise
|
||||
version, this is just to inform people using Pandora FMS open source that it
|
||||
requires skilled people to maintain and keep it running smoothly without
|
||||
professional support. This does not imply open-source version is limited
|
||||
in any way. If you check the recently added code, it contains only warnings
|
||||
and messages, no limitations except one: we removed the option to add custom
|
||||
logo in header. In the Update Manager section, it warns about the 'danger’
|
||||
of applying automated updates without a proper backup, remembering in the
|
||||
process that the Enterprise version comes with a human-tested package.
|
||||
Maintaining an OpenSource version with more than 500 agents is not so
|
||||
easy, that's why someone using a Pandora with 8000 agents should consider
|
||||
asking for support. It's not a joke, we know of many setups with a huge
|
||||
number of agents, and we hate to hear that “its becoming unstable and slow” :(
|
||||
|
||||
You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years.
|
||||
You can of course remove the warnings, that's why we include the source and
|
||||
do not use any kind of trick. And that's why we added here this comment, to
|
||||
let you know this does not reflect any change in our opensource mentality of
|
||||
does the last 14 years.
|
||||
|
||||
*/
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
if($open){
|
||||
echo "<br><br><div id='updatemodal' class='publienterprisehide' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/icono_exclamacion_2.png'></div><br>
|
||||
";
|
||||
echo "
|
||||
<br><br>
|
||||
<div id='updatemodal' class='publienterprisehide' title='Community version' style=''>
|
||||
<img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/icono_exclamacion_2.png'>
|
||||
</div>
|
||||
<br>";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -346,98 +346,108 @@ if ($check_online_free_packages) {
|
|||
}
|
||||
|
||||
if ($update_last_free_package) {
|
||||
|
||||
$package = get_parameter('package', '');
|
||||
$version = get_parameter('version', '');
|
||||
$accept = (boolean)get_parameter('accept', false);
|
||||
$package_url = base64_decode($package);
|
||||
|
||||
$params = array('action' => 'get_package',
|
||||
'license' => $license,
|
||||
'limit_count' => $users,
|
||||
'current_package' => $current_package,
|
||||
'package' => $package,
|
||||
'version' => $config['version'],
|
||||
'build' => $config['build']);
|
||||
|
||||
$curlObj = curl_init();
|
||||
//curl_setopt($curlObj, CURLOPT_URL, $config['url_updatemanager']);
|
||||
curl_setopt($curlObj, CURLOPT_URL, $package_url);
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_FOLLOWLOCATION, true);
|
||||
//curl_setopt($curlObj, CURLOPT_POST, true);
|
||||
//curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
|
||||
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false);
|
||||
if (isset($config['update_manager_proxy_server'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXY, $config['update_manager_proxy_server']);
|
||||
}
|
||||
if (isset($config['update_manager_proxy_port'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXYPORT, $config['update_manager_proxy_port']);
|
||||
}
|
||||
if (isset($config['update_manager_proxy_user'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXYUSERPWD, $config['update_manager_proxy_user'] . ':' . $config['update_manager_proxy_password']);
|
||||
}
|
||||
|
||||
$result = curl_exec($curlObj);
|
||||
$http_status = curl_getinfo($curlObj, CURLINFO_HTTP_CODE);
|
||||
|
||||
curl_close($curlObj);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (empty($result)) {
|
||||
echo json_encode(array(
|
||||
'in_progress' => false,
|
||||
'message' => __('Fail to update to the last package.')));
|
||||
}
|
||||
else {
|
||||
file_put_contents(
|
||||
$config['attachment_store'] . "/downloads/last_package.tgz" , $result);
|
||||
|
||||
echo json_encode(array(
|
||||
'in_progress' => true,
|
||||
'message' => __('Starting to update to the last package.')));
|
||||
|
||||
|
||||
$progress_update_status = db_get_value(
|
||||
'value', 'tconfig', 'token', 'progress_update_status');
|
||||
|
||||
|
||||
|
||||
if (empty($progress_update_status)) {
|
||||
db_process_sql_insert('tconfig',
|
||||
array(
|
||||
'value' => 0,
|
||||
'token' => 'progress_update')
|
||||
);
|
||||
if ($accept) {
|
||||
$have_minor_releases = db_check_minor_relase_available();
|
||||
|
||||
if ($have_minor_releases) {
|
||||
|
||||
db_process_sql_insert('tconfig',
|
||||
array(
|
||||
'value' => json_encode(
|
||||
array(
|
||||
'status' => 'in_progress',
|
||||
'message' => ''
|
||||
)),
|
||||
'token' => 'progress_update_status')
|
||||
);
|
||||
}
|
||||
else {
|
||||
db_process_sql_update('tconfig',
|
||||
array('value' => 0),
|
||||
array('token' => 'progress_update'));
|
||||
$params = array('action' => 'get_package',
|
||||
'license' => $license,
|
||||
'limit_count' => $users,
|
||||
'current_package' => $current_package,
|
||||
'package' => $package,
|
||||
'version' => $config['version'],
|
||||
'build' => $config['build']);
|
||||
|
||||
db_process_sql_update('tconfig',
|
||||
array('value' => json_encode(
|
||||
$curlObj = curl_init();
|
||||
//curl_setopt($curlObj, CURLOPT_URL, $config['url_updatemanager']);
|
||||
curl_setopt($curlObj, CURLOPT_URL, $package_url);
|
||||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_FOLLOWLOCATION, true);
|
||||
//curl_setopt($curlObj, CURLOPT_POST, true);
|
||||
//curl_setopt($curlObj, CURLOPT_POSTFIELDS, $params);
|
||||
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false);
|
||||
if (isset($config['update_manager_proxy_server'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXY, $config['update_manager_proxy_server']);
|
||||
}
|
||||
if (isset($config['update_manager_proxy_port'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXYPORT, $config['update_manager_proxy_port']);
|
||||
}
|
||||
if (isset($config['update_manager_proxy_user'])) {
|
||||
curl_setopt($curlObj, CURLOPT_PROXYUSERPWD, $config['update_manager_proxy_user'] . ':' . $config['update_manager_proxy_password']);
|
||||
}
|
||||
|
||||
$result = curl_exec($curlObj);
|
||||
$http_status = curl_getinfo($curlObj, CURLINFO_HTTP_CODE);
|
||||
|
||||
curl_close($curlObj);
|
||||
|
||||
if (empty($result)) {
|
||||
echo json_encode(array(
|
||||
'in_progress' => false,
|
||||
'message' => __('Fail to update to the last package.')));
|
||||
}
|
||||
else {
|
||||
file_put_contents(
|
||||
$config['attachment_store'] . "/downloads/last_package.tgz" , $result);
|
||||
|
||||
echo json_encode(array(
|
||||
'in_progress' => true,
|
||||
'message' => __('Starting to update to the last package.')));
|
||||
|
||||
|
||||
$progress_update_status = db_get_value(
|
||||
'value', 'tconfig', 'token', 'progress_update_status');
|
||||
|
||||
|
||||
|
||||
if (empty($progress_update_status)) {
|
||||
db_process_sql_insert('tconfig',
|
||||
array(
|
||||
'status' => 'in_progress',
|
||||
'message' => ''
|
||||
)
|
||||
)
|
||||
),
|
||||
array('token' => 'progress_update_status'));
|
||||
'value' => 0,
|
||||
'token' => 'progress_update')
|
||||
);
|
||||
|
||||
db_process_sql_insert('tconfig',
|
||||
array(
|
||||
'value' => json_encode(
|
||||
array(
|
||||
'status' => 'in_progress',
|
||||
'message' => ''
|
||||
)),
|
||||
'token' => 'progress_update_status')
|
||||
);
|
||||
}
|
||||
else {
|
||||
db_process_sql_update('tconfig',
|
||||
array('value' => 0),
|
||||
array('token' => 'progress_update'));
|
||||
|
||||
db_process_sql_update('tconfig',
|
||||
array('value' => json_encode(
|
||||
array(
|
||||
'status' => 'in_progress',
|
||||
'message' => ''
|
||||
)
|
||||
)
|
||||
),
|
||||
array('token' => 'progress_update_status'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo json_encode(array(
|
||||
'in_progress' => false,
|
||||
'message' => __('Package not accepted.')));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -295,33 +295,88 @@ function update_last_package(package, version, homeurl) {
|
|||
$("#box_online .loading").show();
|
||||
$("#box_online .download_package").show();
|
||||
|
||||
var parameters = {};
|
||||
parameters['page'] = 'include/ajax/update_manager.ajax';
|
||||
parameters['update_last_free_package'] = 1;
|
||||
parameters['package'] = package;
|
||||
parameters['version'] = version;
|
||||
|
||||
jQuery.post(
|
||||
home_url + "ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
||||
install_free_package(package, version, homeurl);
|
||||
setTimeout(function () {
|
||||
check_progress_update(homeurl);
|
||||
}, 1000);
|
||||
}
|
||||
else {
|
||||
$("#box_online .content").html(data['message']);
|
||||
}
|
||||
$("<div id='pkg_apply_dialog' class= 'dialog ui-dialog-content'></div>").dialog ({
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: 'black'
|
||||
},
|
||||
"json"
|
||||
);
|
||||
width: 600,
|
||||
height: 350,
|
||||
buttons: {
|
||||
"Apply package": function () {
|
||||
$(this).dialog("close");
|
||||
|
||||
var parameters = {};
|
||||
parameters['page'] = 'include/ajax/update_manager.ajax';
|
||||
parameters['update_last_free_package'] = 1;
|
||||
parameters['package'] = package;
|
||||
parameters['version'] = version;
|
||||
parameters['accept'] = 1;
|
||||
|
||||
jQuery.post(
|
||||
home_url + "ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
||||
install_free_package(package, version, homeurl);
|
||||
setTimeout(function () {
|
||||
check_progress_update(homeurl);
|
||||
}, 1000);
|
||||
}
|
||||
else {
|
||||
$("#box_online .content").html(data['message']);
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
},
|
||||
"Cancel": function () {
|
||||
$(this).dialog("close");
|
||||
|
||||
var parameters = {};
|
||||
parameters['page'] = 'include/ajax/update_manager.ajax';
|
||||
parameters['update_last_free_package'] = 1;
|
||||
parameters['package'] = package;
|
||||
parameters['version'] = version;
|
||||
parameters['accept'] = 0;
|
||||
|
||||
jQuery.post(
|
||||
home_url + "ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
||||
install_free_package(package, version, homeurl);
|
||||
setTimeout(function () {
|
||||
check_progress_update(homeurl);
|
||||
}, 1000);
|
||||
}
|
||||
else {
|
||||
$("#box_online .content").html(data['message']);
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var dialog_text = "<div><h3>Do you want to apply the package?</h3></br>";
|
||||
|
||||
$('#pkg_apply_dialog').html(dialog_text);
|
||||
$('#pkg_apply_dialog').dialog('open');
|
||||
}
|
||||
|
||||
function check_progress_update(homeurl) {
|
||||
|
|
|
@ -445,8 +445,6 @@ if (! isset ($config['id_user'])) {
|
|||
$config['id_user'] = $nick_in_db;
|
||||
|
||||
if (is_user_admin($config['id_user'])) {
|
||||
$have_minor_releases = db_check_minor_relase_available();
|
||||
|
||||
// PHP configuration values
|
||||
$PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));
|
||||
$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit'));
|
||||
|
@ -467,7 +465,9 @@ if (! isset ($config['id_user'])) {
|
|||
if ($PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== '-1') {
|
||||
ini_set('memory_limit', config_return_in_bytes('500M'));
|
||||
}
|
||||
|
||||
/* MINOR RELEASE -- Arturo --
|
||||
$have_minor_releases = db_check_minor_relase_available();
|
||||
|
||||
if ($have_minor_releases) {
|
||||
$size_mr = get_number_of_mr();
|
||||
echo "<div class= 'dialog ui-dialog-content' title='".__("Minor release available")."' id='mr_dialog2'>" . __('') . "</div>";
|
||||
|
@ -508,6 +508,7 @@ if (! isset ($config['id_user'])) {
|
|||
</script>
|
||||
<?php
|
||||
}
|
||||
*/
|
||||
|
||||
set_time_limit((int)$PHPmax_execution_time);
|
||||
ini_set('upload_max_filesize', $PHPupload_max_filesize);
|
||||
|
@ -976,6 +977,7 @@ require('include/php_to_js_values.php');
|
|||
};
|
||||
})();
|
||||
|
||||
/* MINOR RELEASE -- Arturo --
|
||||
function apply_minor_release (n_mr) {
|
||||
var error = false;
|
||||
$("#apply_rr_button").remove();
|
||||
|
@ -1017,6 +1019,7 @@ require('include/php_to_js_values.php');
|
|||
$('#mr_dialog2').append("<h2>Updated finished successfully</h2>");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
function force_run_register () {
|
||||
run_identification_wizard (1, 0, 0);
|
||||
|
|
Loading…
Reference in New Issue