Группа :: Система/Серверы
Пакет: pve-manager
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: pve-manager-dc-summary.patch
Скачать
Скачать
--- pve-manager/www/manager6/dc/Summary.js.nosubscription 2021-09-27 09:20:01.620316556 +0000
+++ pve-manager/www/manager6/dc/Summary.js 2021-09-27 09:27:43.059952023 +0000
@@ -52,25 +52,6 @@ Ext.define('PVE.dc.Summary', {
xtype: 'pveDcNodeView',
height: 250,
},
- {
- title: gettext('Subscriptions'),
- height: 220,
- items: [
- {
- itemId: 'subscriptions',
- xtype: 'pveHealthWidget',
- userCls: 'pointer',
- listeners: {
- element: 'el',
- click: function() {
- if (this.component.userCls === 'pointer') {
- window.open('https://www.proxmox.com/en/proxmox-ve/pricing', '_blank');
- }
- },
- },
- },
- ],
- },
],
listeners: {
@@ -209,60 +190,6 @@ Ext.define('PVE.dc.Summary', {
let dcHealth = me.getComponent('dcHealth');
me.mon(rstore, 'load', dcHealth.updateStatus, dcHealth);
- let subs = me.down('#subscriptions');
- me.mon(rstore, 'load', function(store, records, success) {
- var level;
- var mixed = false;
- for (let i = 0; i < records.length; i++) {
- let node = records[i];
- if (node.get('type') !== 'node' || node.get('status') === 'offline') {
- continue;
- }
-
- let curlevel = node.get('level');
- if (curlevel === '') { // no subscription beats all, set it and break the loop
- level = '';
- break;
- }
-
- if (level === undefined) { // save level
- level = curlevel;
- } else if (level !== curlevel) { // detect different levels
- mixed = true;
- }
- }
-
- let data = {
- title: Proxmox.Utils.unknownText,
- text: Proxmox.Utils.unknownText,
- iconCls: PVE.Utils.get_health_icon(undefined, true),
- };
- if (level === '') {
- data = {
- title: gettext('No Subscription'),
- iconCls: PVE.Utils.get_health_icon('critical', true),
- text: gettext('You have at least one node without subscription.'),
- };
- subs.setUserCls('pointer');
- } else if (mixed) {
- data = {
- title: gettext('Mixed Subscriptions'),
- iconCls: PVE.Utils.get_health_icon('warning', true),
- text: gettext('Warning: Your subscription levels are not the same.'),
- };
- subs.setUserCls('pointer');
- } else if (level) {
- data = {
- title: PVE.Utils.render_support_level(level),
- iconCls: PVE.Utils.get_health_icon('good', true),
- text: gettext('Your subscription status is valid.'),
- };
- subs.setUserCls('');
- }
-
- subs.setData(data);
- });
-
me.on('destroy', function() {
rstore.stopUpdate();
});