[Kimchi-devel] [PATCH 1/2] Bug #265 fix: Avoid remove 'default' storagepool

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Thu Dec 19 17:31:17 UTC 2013


This patch disables the "undefine" button if the storagepool is the
'default'.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.storage_main.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
index 169e32a..70ea9a3 100644
--- a/ui/js/src/kimchi.storage_main.js
+++ b/ui/js/src/kimchi.storage_main.js
@@ -113,6 +113,8 @@ kimchi.storageBindClick = function() {
         var deleteButton = storage_action.find('.pool-delete');
         if ('active' === deleteButton.data('stat')) {
             deleteButton.attr('disabled', 'disabled');
+        } else if ('default' === $(this).data('name')) {
+            deleteButton.attr('disabled', 'disabled');
         } else {
             deleteButton.removeAttr('disabled');
         }
-- 
1.8.1.4




More information about the Kimchi-devel mailing list