[Kimchi-devel] [PATCH] Issue 299 Inactive storage pools are listed while editing template

Aline Manera alinefm at linux.vnet.ibm.com
Fri Feb 28 03:00:05 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 02/27/2014 06:16 PM, Adam King wrote:
> Omit any inactive pools from the template edit pool selection list.
>
> Signed-off-by: Adam King <rak at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.storagepool_add_main.js | 2 +-
>   ui/js/src/kimchi.template_edit_main.js   | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js
> index 63c6d11..5960c8d 100644
> --- a/ui/js/src/kimchi.storagepool_add_main.js
> +++ b/ui/js/src/kimchi.storagepool_add_main.js
> @@ -140,7 +140,7 @@ kimchi.validateForm = function() {
>           kimchi.message.error.code('KCHPOOL6001E');
>           return false;
>       }
> -    if (name.contains("/")) {
> +    if (name.indexOf("/")!=-1) {
>           kimchi.message.error.code('KCHPOOL6004E');
>           return false;
>       }
> diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
> index 5a928ae..17e9a41 100644
> --- a/ui/js/src/kimchi.template_edit_main.js
> +++ b/ui/js/src/kimchi.template_edit_main.js
> @@ -30,7 +30,7 @@ kimchi.template_edit_main = function() {
>               var options = [];
>               if (result && result.length) {
>                   $.each(result, function(index, storagePool) {
> -                    if(storagePool.type !== 'kimchi-iso') {
> +                    if ((storagePool.state=="active") && (storagePool.type !== 'kimchi-iso')) {
>                           options.push({
>                               label: storagePool.name,
>                               value: '/storagepools/' + storagePool.name




More information about the Kimchi-devel mailing list