]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node: repo: highlight proxmox repos that are not producition-ready
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 1 Jul 2021 16:38:04 +0000 (18:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 2 Jul 2021 06:04:39 +0000 (08:04 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/node/APTRepositories.js

index 9a4418a83d4da18297639dd093b8e12c76b7b372..e34abb674508f9276ac81f0a195cea6ca4d8a04e 100644 (file)
@@ -295,8 +295,23 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
        {
            header: gettext('Components'),
            dataIndex: 'Components',
-           renderer: function(components, cell, record) {
-               return components.join(' ');
+           renderer: function(components, metaData, record) {
+               let err = '';
+               if (components.length === 1) {
+                   // FIXME: this should be a flag set to the actual repsotiories, i.e., a tristate
+                   // like production-read =
+                   if (components[0].match(/\w+(-no-subscription|test)\s*$/i)) {
+                       metaData.tdCls = 'proxmox-warning-row';
+                       err = '<i class="fa fa-fw warning fa-exclamation-circle"></i> ';
+
+                       let qtip = components[0].match(/no-subscription/)
+                           ? gettext('The no-subscription repository is NOT production-ready')
+                           : gettext('The test repository may contain unstable updates')
+                           ;
+                           metaData.tdAttr = `data-qtip="${Ext.htmlEncode(qtip)}"`;
+                   }
+               }
+               return components.join(' ') + err;
            },
            width: 170,
        },