[Kimchi-devel] [PATCH][Kimchi] Issue: #1008 Issues while editing a VEPA network
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Fri Oct 14 18:14:28 UTC 2016
I tested with one interface in my laptop Fedora, and two interface at
OpenSuse.
Steps:
Create VEPA with interfaces
See Edit to verify which interfaces are choosen.
Did not saw any duplicated.
On 10/14/2016 01:56 PM, Aline Manera wrote:
>
> Hi Ramon,
>
> Yeap! The JS are updated with your code.
>
> How did you test it? How many interfaces are in your VEPA network?
> I can also see in use interfaces being listed as possible values for
> selection and I can think your patch has fixed that.
>
> Regards,
> Aline Manera
>
> On 10/10/2016 03:46 PM, Ramon Medeiros wrote:
>>
>> Hi Aline,
>>
>>
>> i have tested this on my laptop and on my OpenSUSE vm. Both working.
>> Can you confirm if the js files are updated? To verify, click F12 to
>> inspect files and search in kimchi.min.js, the string
>> "buildInterfaceOpts" and verify if the code is:
>>
>> var loadIfaces = function(interfaceFilterArray){
>> var buildInterfaceOpts = function(result) {
>> kimchi.createInterfacesOpts(result, interfaceFilterArray);
>>
>> for (var i = 0; i < result.length; i++) {
>> $("#networkDestinationID option[value='" +
>> result[i]["name"] + "']").attr('selected','selected');
>> }
>> $('#networkDestinationID').selectpicker('refresh');
>> };
>>
>> THanks
>>
>>
>> On 10/10/2016 12:56 PM, Aline Manera wrote:
>>> Hi Ramon,
>>>
>>> I tested that and all the problems reported on #1008 are still there.
>>>
>>> I create a VEPA network with eth0 and eth1:
>>>
>>>
>>>
>>> While editing it, all the interfaces are checked;
>>>
>>>
>>>
>>> Also some in use interfaces are also listed and they should be not.
>>>
>>> On 10/06/2016 02:36 PM, Ramon Medeiros wrote:
>>>> The javascript was iterating a dict without any propose, and copying the
>>>> same objects inside of it. Just remove the iteration and adequate the
>>>> correct vars.
>>>>
>>>> Signed-off-by: Ramon Medeiros<ramonn at linux.vnet.ibm.com>
>>>> ---
>>>> ui/js/src/kimchi.network_edit_main.js | 10 ++--------
>>>> 1 file changed, 2 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/ui/js/src/kimchi.network_edit_main.js b/ui/js/src/kimchi.network_edit_main.js
>>>> index 4dd830a..ab1e285 100644
>>>> --- a/ui/js/src/kimchi.network_edit_main.js
>>>> +++ b/ui/js/src/kimchi.network_edit_main.js
>>>> @@ -93,16 +93,10 @@ kimchi.setupNetworkFormEventForEdit = function(network) {
>>>>
>>>> var loadIfaces = function(interfaceFilterArray){
>>>> var buildInterfaceOpts = function(result) {
>>>> - var currentIfaces = network['interfaces'];
>>>> - for (var i = 0; i < currentIfaces.length; i++) {
>>>> - kimchi.getInterface(currentIfaces[i], function(iface) {
>>>> - result.push(iface);
>>>> - } , null, true);
>>>> - }
>>>> kimchi.createInterfacesOpts(result, interfaceFilterArray);
>>>>
>>>> - for (var i = 0; i < currentIfaces.length; i++) {
>>>> - $("#networkDestinationID option[value='" + currentIfaces[i] + "']").attr('selected','selected');
>>>> + for (var i = 0; i < result.length; i++) {
>>>> + $("#networkDestinationID option[value='" + result[i]["name"] + "']").attr('selected','selected');
>>>> }
>>>> $('#networkDestinationID').selectpicker('refresh');
>>>> };
>>>
>>
>> --
>>
>> Ramon Nunes Medeiros
>> Kimchi Developer
>> Linux Technology Center Brazil
>> IBM Systems & Technology Group
>> Phone : +55 19 2132 7878
>> ramonn at br.ibm.com
>
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161014/b9d729bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 11625 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161014/b9d729bd/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 29246 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161014/b9d729bd/attachment-0001.jpe>
More information about the Kimchi-devel
mailing list