public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: storage: find the correct storage record
Date: Thu, 26 Nov 2020 08:58:25 +0100	[thread overview]
Message-ID: <20201126075825.11727-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2020-11-26  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  7:58 Dominik Csapak [this message]
2020-11-26 10:00 ` [pve-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=20201126075825.11727-1-d.csapak@proxmox.com \
    --to=d.csapak@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 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