[pve-devel] [PATCH manager] ui: storage: find the correct storage record
Dominik Csapak
d.csapak at proxmox.com
Thu Nov 26 08:58:25 CET 2020
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 at 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
More information about the pve-devel
mailing list