[Kimchi-devel] [PATCH v2][Kimchi] Issue: #1008 Issues while editing a VEPA network

Lucio Correia luciojhc at linux.vnet.ibm.com
Mon Oct 17 15:33:44 UTC 2016


Reviewed-By: Lucio Correia <luciojhc at linux.vnet.ibm.com>

On 17/10/2016 10:45, Ramon Medeiros wrote:
> The list of interfaces was being appended to a non-clean list. Just
> create it and add the results.
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> Changes:
>
> v2:
> Create empty result var
>
>  ui/js/src/kimchi.network_edit_main.js | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/ui/js/src/kimchi.network_edit_main.js b/ui/js/src/kimchi.network_edit_main.js
> index 4dd830a..21f4c45 100644
> --- a/ui/js/src/kimchi.network_edit_main.js
> +++ b/ui/js/src/kimchi.network_edit_main.js
> @@ -94,12 +94,13 @@ kimchi.setupNetworkFormEventForEdit = function(network) {
>      var loadIfaces = function(interfaceFilterArray){
>          var buildInterfaceOpts = function(result) {
>              var currentIfaces = network['interfaces'];
> +            ifaces = [];
>              for (var i = 0; i < currentIfaces.length; i++) {
>                  kimchi.getInterface(currentIfaces[i], function(iface) {
> -                    result.push(iface);
> +                    ifaces.push(iface);
>                  } , null, true);
>              }
> -            kimchi.createInterfacesOpts(result, interfaceFilterArray);
> +            kimchi.createInterfacesOpts(ifaces, interfaceFilterArray);
>
>              for (var i = 0; i < currentIfaces.length; i++) {
>                  $("#networkDestinationID option[value='" + currentIfaces[i] + "']").attr('selected','selected');
>


-- 
Lucio Correia
Software Engineer
IBM LTC Brazil




More information about the Kimchi-devel mailing list