-
-
Save zentavr/f95194d99b7859a1de3d60c9c5a2e903 to your computer and use it in GitHub Desktop.
--- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js.bak 2018-05-14 12:06:33.000000000 +0300 | |
+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2018-07-25 23:55:45.513350604 +0300 | |
@@ -350,6 +350,8 @@ Ext.define('Proxmox.Utils', { utilities: | |
var data = response.result.data; | |
if (data.status !== 'Active') { | |
+ | |
+ /************************************************* | |
Ext.Msg.show({ | |
title: gettext('No valid subscription'), | |
icon: Ext.Msg.WARNING, | |
@@ -362,6 +364,8 @@ Ext.define('Proxmox.Utils', { utilities: | |
orig_cmd(); | |
} | |
}); | |
+ ************************************************/ | |
+ orig_cmd(); | |
} else { | |
orig_cmd(); | |
} |
--- /usr/share/pve-manager/js/pvemanagerlib.js.bak 2018-05-14 15:04:15.000000000 +0300 | |
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2018-07-25 23:39:29.990884809 +0300 | |
@@ -31676,6 +31676,7 @@ Ext.define('PVE.dc.Support', { | |
success: function(response, opts) { | |
var data = response.result.data; | |
+ /*********************************** | |
if (data.status === 'Active') { | |
if (data.level === 'c') { | |
me.updateCommunity(data); | |
@@ -31685,6 +31686,8 @@ Ext.define('PVE.dc.Support', { | |
} else { | |
me.updateInactive(data); | |
} | |
+ **********************************/ | |
+ | |
} | |
}); | |
}; |
systemctl restart pveproxy.service |
1st file alternation is enough, patch for 2nd file is outdated, no service restart is necessary.
Can confirm that not only the 2nd file alteration is not required, but breaks the interface to a blank page. Nice hack by the way.
This seems to be broken at Proxmox 5.4.3. I followed the instruction to edit /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
but the message still pops up. Can someone else confirm or deny this?
Proxmox 5.4-4:
For proxmoxlib.js, you can try this to avoid a blank page.... But msg still pop-up.
Tabs added to see the problem in the script !
success: function(response, opts) {
var data = response.result.data;
-
/**************************************************** if (data.status !== 'Active') { Ext.Msg.show({ title: gettext('No valid subscription'), icon: Ext.Msg.WARNING, msg: Proxmox.Utils.getNoSubKeyHtml(data.url), buttons: Ext.Msg.OK, callback: function(btn) { if (btn !== 'ok') { return; } orig_cmd(); } }); } else { orig_cmd(); }
-
****************************************************/
-
orig_cmd(); }
Not working on PVE 5.4.3
Edit: Editing pvemanagerlib.js works for me after rebooting the host (PVE 5.4.3).
It's seems to be a browser problem with javascript. Don't forget to reload the page from the server !
Try Ctrl+Enter. I've test with patch/unpatch and each time, the same problem, the browser cache.
For your information, when you apply the patch, it's IMPOSSIBLE to call "getNoSubKeyHtml" who display
the message and this function called nowhere else !
- 1 / patch (or unpatch for test)
- 2 / pveproxy restart
- 3 / Browser. Ctrl+Enter to reload from the server
Just "/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js" to patch. Nothing else.
You can try to comment the single line from "/etc/apt/sources.list.d/pve-enterprise.list" if you want
to apply Proxmox recommendation. But not working for me.
perfect, works on Proxmox 5.3-5 too