From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 1/1] ui: node status: use helper for formatting repository status
Date: Fri, 9 Jul 2021 14:44:15 +0200 [thread overview]
Message-ID: <20210709124416.129299-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210709124416.129299-1-f.ebner@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Dependency bump for widget-toolkit is needed.
www/manager6/node/StatusView.js | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
index d7a08529..3c52ce95 100644
--- a/www/manager6/node/StatusView.js
+++ b/www/manager6/node/StatusView.js
@@ -27,26 +27,7 @@ Ext.define('PVE.node.StatusView', {
return 'unknown';
},
repoStatusMessage: function(get) {
- const status = get('repoStatus');
-
- let fmt = (txt, cls) => `<i class="fa fa-fw fa-lg fa-${cls}"></i>${txt}`;
-
- let getUpdates = Ext.String.format(gettext('{0} updates'), 'Proxmox VE');
-
- if (status === 'ok') {
- return fmt(getUpdates, 'check-circle good') + ' ' +
- fmt(gettext('Production-ready Enterprise repository enabled'), 'check-circle good');
- } else if (status === 'no-sub') {
- return fmt(gettext('Production-ready Enterprise repository enabled'), 'check-circle good') + ' ' +
- fmt(gettext('Enterprise repository needs valid subscription'), 'exclamation-circle warning');
- } else if (status === 'non-production') {
- return fmt(getUpdates, 'check-circle good') + ' ' +
- fmt(gettext('Non production-ready repository enabled!'), 'exclamation-circle warning');
- } else if (status === 'no-repo') {
- return fmt(gettext('No Proxmox VE repository enabled!'), 'exclamation-circle critical');
- }
-
- return Proxmox.Utils.unknownText;
+ return Proxmox.Utils.formatNodeRepoStatus(get('repoStatus'), 'Proxmox VE');
},
},
},
--
2.30.2
WARNING: multiple messages have this Message-ID
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH pve-manager 1/1] ui: node status: use helper for formatting repository status
Date: Fri, 9 Jul 2021 14:44:15 +0200 [thread overview]
Message-ID: <20210709124416.129299-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210709124416.129299-1-f.ebner@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Dependency bump for widget-toolkit is needed.
www/manager6/node/StatusView.js | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
index d7a08529..3c52ce95 100644
--- a/www/manager6/node/StatusView.js
+++ b/www/manager6/node/StatusView.js
@@ -27,26 +27,7 @@ Ext.define('PVE.node.StatusView', {
return 'unknown';
},
repoStatusMessage: function(get) {
- const status = get('repoStatus');
-
- let fmt = (txt, cls) => `<i class="fa fa-fw fa-lg fa-${cls}"></i>${txt}`;
-
- let getUpdates = Ext.String.format(gettext('{0} updates'), 'Proxmox VE');
-
- if (status === 'ok') {
- return fmt(getUpdates, 'check-circle good') + ' ' +
- fmt(gettext('Production-ready Enterprise repository enabled'), 'check-circle good');
- } else if (status === 'no-sub') {
- return fmt(gettext('Production-ready Enterprise repository enabled'), 'check-circle good') + ' ' +
- fmt(gettext('Enterprise repository needs valid subscription'), 'exclamation-circle warning');
- } else if (status === 'non-production') {
- return fmt(getUpdates, 'check-circle good') + ' ' +
- fmt(gettext('Non production-ready repository enabled!'), 'exclamation-circle warning');
- } else if (status === 'no-repo') {
- return fmt(gettext('No Proxmox VE repository enabled!'), 'exclamation-circle critical');
- }
-
- return Proxmox.Utils.unknownText;
+ return Proxmox.Utils.formatNodeRepoStatus(get('repoStatus'), 'Proxmox VE');
},
},
},
--
2.30.2
next prev parent reply other threads:[~2021-07-09 12:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 12:44 [pve-devel] [PATCH proxmox-widget-toolkit 1/1] utils: add helper to format node's " Fabian Ebner
2021-07-09 12:44 ` [pbs-devel] " Fabian Ebner
2021-07-09 12:44 ` Fabian Ebner [this message]
2021-07-09 12:44 ` [pbs-devel] [PATCH pve-manager 1/1] ui: node status: use helper for formatting " Fabian Ebner
2021-07-09 12:44 ` [pve-devel] [PATCH proxmox-backup 1/1] ui: dashboard: show node's repository/subscription status Fabian Ebner
2021-07-09 12:44 ` [pbs-devel] " Fabian Ebner
2021-07-12 5:19 ` [pve-devel] applied: " Thomas Lamprecht
2021-07-12 5:19 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210709124416.129299-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal