PVE 移除未订阅弹窗

Nasge

  1. 编辑 /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 文件:
nano /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
  1. ctl+w 输入并搜索 Ext.Msg.show ,改为 Ext.Msg.noshow ,大概是下面这个:
    checked_command: function(orig_cmd) {
        Proxmox.Utils.API2Request(
            {
                url: '/nodes/localhost/subscription',
                method: 'GET',
                failure: function(response, opts) {
                    Ext.Msg.alert(gettext('Error'), response.htmlStatus);
                },
                success: function(response, opts) {
                    let res = response.result;
                    if (res === null || res === undefined || !res || res
                        .data.status.toLowerCase() !== 'active') {
                        Ext.Msg.noshow({
                            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();
                    }
                },
            },
        );
    },

更新 PVE 后可能会失效,重新操作即可