REMOVE THE PROXMOX “NO VALID SUBSCRIPTION” MESSAGE: различия между версиями
Перейти к навигации
Перейти к поиску
Sol (обсуждение | вклад) |
Sol (обсуждение | вклад) |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 1: | Строка 1: | ||
+ | === pve 5.x => === | ||
+ | |||
+ | [https://github.com/foundObjects/pve-nag-buster pve-nag-buster] | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/install.sh | ||
+ | # Read the script | ||
+ | chmod +x install.sh && ./install.sh | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === pve old === | ||
+ | |||
+ | sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/ext*/pvemanagerlib.js | ||
+ | |||
=== pve 4.2 => === | === pve 4.2 => === | ||
Текущая версия на 13:59, 19 декабря 2019
pve 5.x =>
wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/install.sh
# Read the script
chmod +x install.sh && ./install.sh
pve old
sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/ext*/pvemanagerlib.js
pve 4.2 =>
cp /usr/share/pve-manager/ext6/pvemanagerlib.js /usr/share/pve-manager/ext6/pvemanagerlib.js.bck
vim /usr/share/pve-manager/ext6/pvemanagerlib.js
if (data.status === 'Active') {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
msg: PVE.Utils.noSubKeyHtml,
buttons: Ext.Msg.OK,
callback: function(btn) {
if (btn !== 'ok') {
return;
}
orig_cmd();
}
});
} else {
orig_cmd();
}
//if (data.status === 'Active') {
// Ext.Msg.show({
// title: gettext('No valid subscription'),
// icon: Ext.Msg.WARNING,
// msg: PVE.Utils.noSubKeyHtml,
// buttons: Ext.Msg.OK,
// callback: function(btn) {
// if (btn !== 'ok') {
// return;
// }
// orig_cmd();
// }
// });
//} else {
orig_cmd();
//}
pve 4.1 <
First, take a backup of the file:
cp /usr/share/pve-manager/ext4/pvemanagerlib.js /usr/share/pve-manager/ext4/pvemanagerlib.js_BKP
Then open the file using a text editor, vi for example.
vim /usr/share/pve-manager/ext4/pvemanagerlib.js
Currently on line 519 of the file, however it may change with future updates, there is a line similar to below;
if (data.status !== 'Active') {
This line is doing the check to see if your subscription status is not ‘Active’. This needs to be changed to return false to stop the subscription message from being shown.
if (false) {
And that annoying little popup will be a thing of the past!
Note: You may need to clear your web browser cache after applying this code change.