[pve-devel] [PATCH 3/5] forbid edit|delete of pending delete, and move_disk of pending disk

Alexandre Derumier aderumier at odiso.com
Wed Dec 31 14:40:51 CET 2014


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 www/manager/qemu/HardwareView.js |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/www/manager/qemu/HardwareView.js b/www/manager/qemu/HardwareView.js
index 5738d9a..4abb3f6 100644
--- a/www/manager/qemu/HardwareView.js
+++ b/www/manager/qemu/HardwareView.js
@@ -270,6 +270,9 @@ Ext.define('PVE.qemu.HardwareView', {
 		if (!rec) {
 		    return false;
 		}
+		if(rec.data['delete']){
+		    return false;
+		}
 		var rowdef = rows[rec.data.key];
 		return !!rowdef.editor;
 	    },
@@ -298,6 +301,9 @@ Ext.define('PVE.qemu.HardwareView', {
 		if (!rec || rec.data.key.match(/^unused\d+/)) {
 		    return false;
 		}
+		if(rec.data['pending'] || rec.data['delete']){
+		    return false;
+		}
 		var rowdef = rows[rec.data.key];
 		return rowdef.tdCls == 'pve-itype-icon-storage' && !rec.data.value.match(/media=cdrom/);
 	    },
@@ -336,6 +342,9 @@ Ext.define('PVE.qemu.HardwareView', {
 		if (!rec) {
 		    return false;
 		}
+		if(rec.data['delete']){
+		    return false;
+		}
 		var rowdef = rows[rec.data.key];
 
 		return rowdef.never_delete !== true;    
-- 
1.7.10.4




More information about the pve-devel mailing list