DEV Community

Fega Suseno
Fega Suseno

Posted on

Disable Subscription Warning on Proxmox

Notifikasi “No valid subscription” di Proxmox VE, itu hal yang sangat umum dan normal jika kita pakai Proxmox versi gratis (tanpa langganan enterprise). Pada postingan ini kita akan mencoba menghilangkan pop-up “No valid subscription” pada proxmox.

Pertama kita backup file proxmoxlib.js

cd /usr/share/javascript/proxmox-widget-toolkit
Enter fullscreen mode Exit fullscreen mode
cp proxmoxlib.js proxmoxlib.js.old
Enter fullscreen mode Exit fullscreen mode

Setelah itu baru kita edit file

nano proxmoxlib.js
Enter fullscreen mode Exit fullscreen mode

ganti pada bagaian ini

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();
                    }
Enter fullscreen mode Exit fullscreen mode

Perhatikan pada bagian yg saya beri tanda merah, kita akan ganti function itu dengan void.

if (res === null || res === undefined || !res || res
                        .data.status.toLowerCase() !== 'active') {
+                       void({
                            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();
                    }

Enter fullscreen mode Exit fullscreen mode

Kemudian restart proxmox web service

systemctl restart pveproxy.service
Enter fullscreen mode Exit fullscreen mode

Lakukan uji coba dengan login ke Proxmox Web UI seharusnya sudah tidak muncul.

Top comments (0)