REMOVE THE PROXMOX “NO VALID SUBSCRIPTION” MESSAGE: различия между версиями

Материал из Webko Wiki
Перейти к навигации Перейти к поиску
(Новая страница: «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 tex…»)
 
Строка 1: Строка 1:
 +
=== 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
 +
 +
<syntaxhighlight lang="bash">
 +
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();
 +
}
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="bash">
 +
//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();
 +
//}
 +
</syntaxhighlight>
 +
 +
 +
=== pve 4.1 < ===
 
First, take a backup of the file:
 
First, take a backup of the file:
 
  cp /usr/share/pve-manager/ext4/pvemanagerlib.js /usr/share/pve-manager/ext4/pvemanagerlib.js_BKP
 
  cp /usr/share/pve-manager/ext4/pvemanagerlib.js /usr/share/pve-manager/ext4/pvemanagerlib.js_BKP

Версия 23:13, 25 июля 2016

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.