[Kimchi-devel] [PATCH 1/2] Bug #265 fix: Avoid remove 'default' storagepool
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Dec 23 11:55:20 UTC 2013
Hi Rodrigo,
As I commented to you, first we need to identify if libvirt allows
remove default storage pool and network.
If libvirt can work fine without default storage pool/network we need to
improve this path and only block deletion when there is a template/vm
using the storage pool/network.
On 12/19/2013 03:31 PM, Rodrigo Trujillo wrote:
> 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');
> }
More information about the Kimchi-devel
mailing list