]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: cifs: reset proxy cache also if user or password change
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 09:50:36 +0000 (11:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 1 Jul 2020 09:50:45 +0000 (11:50 +0200)
not only on server address change.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/storage/CIFSEdit.js

index f0b3a6ce4af4d1ac98e098945dd363e67c6a2f9c..970c685d31e91c9ac028b0a3063a3a4b7f9d32a5 100644 (file)
@@ -36,18 +36,39 @@ Ext.define('PVE.storage.CIFSScan', {
        me.callParent();
     },
 
-    setServer: function(server) {
-       this.cifsServer = server;
+    resetProxy: function() {
+       let me = this;
+       me.lastQuery = null;
+       if (!me.readOnly && !me.disabled) {
+           if (me.isExpanded) {
+               me.collapse();
+           }
+       }
     },
 
+    setServer: function(server) {
+       if (this.cifsServer !== server) {
+           this.cifsServer = server;
+           this.resetProxy();
+       }
+    },
     setUsername: function(username) {
-       this.cifsUsername = username;
+       if (this.cifsUsername !== username) {
+           this.cifsUsername = username;
+           this.resetProxy();
+       }
     },
     setPassword: function(password) {
-       this.cifsPassword = password;
+       if (this.cifsPassword !== password) {
+           this.cifsPassword = password;
+           this.resetProxy();
+       }
     },
     setDomain: function(domain) {
-       this.cifsDomain = domain;
+       if (this.cifsDomain !== domain) {
+           this.cifsDomain = domain;
+           this.resetProxy();
+       }
     },
 
     initComponent: function() {