public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager v2] ui: dc/Cluster: show errors on 'join' info in the view
@ 2021-10-29  9:14 Dominik Csapak
  2021-11-07 20:04 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-10-29  9:14 UTC (permalink / raw)
  To: pve-devel

so instead of getting the 'standalone node' message, the grid
is masked with the actual api error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
changes from v1:
* only show error if it does not match the 'standalone' error

not sure if matching the *exact* error message is very robust, but AFAICS,
this did not change for a while now, and even if we'd change it, it
would be very apparent, as we could not create a cluster in the gui
anymore.

 www/manager6/dc/Cluster.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/manager6/dc/Cluster.js b/www/manager6/dc/Cluster.js
index 12fd9468..10834b66 100644
--- a/www/manager6/dc/Cluster.js
+++ b/www/manager6/dc/Cluster.js
@@ -62,9 +62,15 @@ Ext.define('PVE.ClusterAdministration', {
 		    view.on('destroy', view.store.stopUpdate);
 		},
 
-		onLoad: function(store, records, success) {
+		onLoad: function(store, records, success, operation) {
 		    let vm = this.getViewModel();
 		    if (!success || !records || !records[0].data) {
+			let error = operation.getError();
+			let msg = Proxmox.Utils.getResponseErrorMessage(error);
+			if (msg !== 'node is not in a cluster, no join info available! (500)') {
+			    // show the real message
+			    Proxmox.Utils.setErrorMask(this.getView(), msg);
+			}
 			vm.set('totem', {});
 			vm.set('isInCluster', false);
 			vm.set('nodelist', []);
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager v2] ui: dc/Cluster: show errors on 'join' info in the view
  2021-10-29  9:14 [pve-devel] [PATCH manager v2] ui: dc/Cluster: show errors on 'join' info in the view Dominik Csapak
@ 2021-11-07 20:04 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-07 20:04 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 29.10.21 11:14, Dominik Csapak wrote:
> so instead of getting the 'standalone node' message, the grid
> is masked with the actual api error
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> changes from v1:
> * only show error if it does not match the 'standalone' error
> 
> not sure if matching the *exact* error message is very robust, but AFAICS,
> this did not change for a while now, and even if we'd change it, it
> would be very apparent, as we could not create a cluster in the gui
> anymore.
> 
>  www/manager6/dc/Cluster.js | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
>

applied, thanks! I made some changes in pve-cluster to return a special error case
for this situation to match on, dropping the error now would be rather a breaking
change (our UI would break too..), else I'd have gone for that.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-07 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29  9:14 [pve-devel] [PATCH manager v2] ui: dc/Cluster: show errors on 'join' info in the view Dominik Csapak
2021-11-07 20:04 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal