[Kimchi-devel] [PATCH] [Kimchi] Edit template storage path should start with "/"

Aline Manera alinefm at linux.vnet.ibm.com
Fri Nov 4 20:07:36 UTC 2016


Is there an information somewhere to let user know that restriction?

On 11/02/2016 06:58 AM, rajgupta at linux.vnet.ibm.com wrote:
> From: Rajat Gupta <rajat.triumph at gmail.com>
>
> Edit template storage path should start with "/"
>
> Signed-off-by: Rajat Gupta <rajat.triumph at gmail.com>
> ---
>   ui/js/src/kimchi.template_edit_main.js | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
> index 1a6e473..758201f 100644
> --- a/ui/js/src/kimchi.template_edit_main.js
> +++ b/ui/js/src/kimchi.template_edit_main.js
> @@ -339,7 +339,8 @@ kimchi.template_edit_main = function() {
>                   });
>
>                   $(storageRow + ' input.storage-path').on('change input keyup',function(){
> -                    if($(storageRow + ' input.storage-path').val()){
> +                    var storagepath = $(storageRow + ' input.storage-path').val();
> +                    if( storagepath && storagepath.charAt(0) == '/'){
>                           $(storageRow + ' span.storage-path').removeClass('has-error');
>                       }else{
>                           $(storageRow + ' span.storage-path').addClass('has-error');




More information about the Kimchi-devel mailing list