all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ContentView: block removal of in-use container image
@ 2020-08-27 11:16 Fabian Ebner
  2020-08-28  8:25 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 6+ messages in thread
From: Fabian Ebner @ 2020-08-27 11:16 UTC (permalink / raw)
  To: pve-devel

Since commit 5dae1a319b32ea3ebbb0b48a9f0b5e3abd1833c9 in pve-storage,
list_volumes correctly returns content type 'rootdir' for container images.
Adapt the relevant check here to make removal behave like it does
for VM images again.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/storage/ContentView.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index c70c732c..194ad42e 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -432,7 +432,8 @@ Ext.define('PVE.storage.ContentView', {
 	    selModel: sm,
 	    delay: 5,
 	    enableFn: function(rec) {
-		if (rec && rec.data.content !== 'images') {
+		if (rec && rec.data.content !== 'images' &&
+			   rec.data.content !== 'rootdir') {
 		    imageRemoveButton.setVisible(false);
 		    removeButton.setVisible(true);
 		    return true;
@@ -450,7 +451,8 @@ Ext.define('PVE.storage.ContentView', {
 	    hidden: true,
 	    text: gettext('Remove'),
 	    enableFn: function(rec) {
-		if (rec && rec.data.content === 'images') {
+		if (rec && (rec.data.content === 'images' ||
+			    rec.data.content === 'rootdir')) {
 		    removeButton.setVisible(false);
 		    imageRemoveButton.setVisible(true);
 		    return true;
-- 
2.20.1





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

end of thread, other threads:[~2020-10-05 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 11:16 [pve-devel] [PATCH manager] ContentView: block removal of in-use container image Fabian Ebner
2020-08-28  8:25 ` [pve-devel] applied: " Thomas Lamprecht
2020-08-28 12:51   ` [pve-devel] sdn patches ready for review Alexandre DERUMIER
2020-08-28 13:09     ` Thomas Lamprecht
2020-08-28 14:17       ` Alexandre DERUMIER
2020-10-05 15:20     ` Alexandre Aderumier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal