public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: storage: find the correct storage record
@ 2020-11-26  7:58 Dominik Csapak
  2020-11-26 10:00 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-11-26  7:58 UTC (permalink / raw)
  To: pve-devel

by default, findRecord only anchors at the beginning, e.g.
findRecord('id', 'foo');
could find either an entry with id 'foo', 'foobar', 'foobaz', etc.

extend the call to set 'exactMatch' to true, else we sometimes
used the content types of storage e.g., 'local-lvm' for showing
the panels for 'local'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
this is the most stupid interface i could imagine for something
called 'findRecord'... i'll go ahead and check where we use this,
and try to see if we need to change it there as well...

 www/manager6/storage/Browser.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js
index c0036d6a..aeca8979 100644
--- a/www/manager6/storage/Browser.js
+++ b/www/manager6/storage/Browser.js
@@ -44,6 +44,10 @@ Ext.define('PVE.storage.Browser', {
 	    let storageInfo = PVE.data.ResourceStore.findRecord(
 		'id',
 		`storage/${nodename}/${storeid}`,
+		0, // startIndex
+		false, // anyMatch
+		true, // caseSensitive
+		true, // exactMatch
 	    );
 	    let res = storageInfo.data;
 	    let plugin = res.plugintype;
-- 
2.20.1





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

end of thread, other threads:[~2020-11-26 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26  7:58 [pve-devel] [PATCH manager] ui: storage: find the correct storage record Dominik Csapak
2020-11-26 10:00 ` [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