Proxmox VE 7.x 关订阅提示
1.WinSCP登录到PVE,编辑打开这个文件:/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js (防止手贱,建议备份)
2.搜索 data.status.toLowerCase,找到这一段:
success: function(response, opts) {
let res = response.result;
if (res === null || res === undefined || !res || res
.data.status.toLowerCase() !== 'active') {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
buttons: Ext.Msg.OK,
callback: function(btn) {
if (btn !== 'ok') {
return;
}
orig_cmd();
},
});
} else {
orig_cmd();
}
},
},
3.直接删掉红框内容,变成如下图,最后保存。
如果更新到PVE 7.1-5或者更新,发现改了上面的没效果,那么就要多改一步:
继续搜索 res.data.status.toLowerCase,找到这一段:
Proxmox.Utils.API2Request({
url: `/nodes/${me.nodename}/subscription`,
method: 'GET',
failure: (response, opts) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
success: function(response, opts) {
const res = response.result;
const subscription = !(!res || !res.data || res.data.status.toLowerCase() !== 'active');
vm.set('subscriptionActive', subscription);
me.getController().updateState();
},
});
直接删掉红框内容,变成如下图,最后保存即可。
4.改完保存,重进PVE界面刷新,去更新点击刷新,就没订阅提示了。