This patch disables the "undefine" button if the storagepool is the
'default'.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)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