<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 10/14/2016 03:14 PM, Ramon Medeiros
wrote:<br>
</div>
<blockquote
cite="mid:904fe508-4102-13fe-f09f-7d9f6c188030@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<p>I tested with one interface in my laptop Fedora, and two
interface at OpenSuse.</p>
<p><br>
Steps:<br>
Create VEPA with interfaces</p>
<p>See Edit to verify which interfaces are choosen.</p>
<p><br>
</p>
<p>Did not saw any duplicated. <br>
</p>
<br>
</blockquote>
<br>
I know why you are not seeing the issue. With your patch, on edit
network, ALL the interfaces are selected now. As you are testing on
a machine with only 2 interfaces, it seems correct to you.<br>
<br>
Add one more interface to you VM and try again. You will see what I
am saying.<br>
<br>
<blockquote
cite="mid:904fe508-4102-13fe-f09f-7d9f6c188030@linux.vnet.ibm.com"
type="cite">
<div class="moz-cite-prefix">On 10/14/2016 01:56 PM, Aline Manera
wrote:<br>
</div>
<blockquote
cite="mid:abd0f4a7-7f82-c289-86eb-2153dd777aef@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<br>
Hi Ramon,<br>
<br>
Yeap! The JS are updated with your code.<br>
<br>
How did you test it? How many interfaces are in your VEPA
network?<br>
I can also see in use interfaces being listed as possible values
for selection and I can think your patch has fixed that.<br>
<br>
Regards,<br>
Aline Manera<br>
<br>
<div class="moz-cite-prefix">On 10/10/2016 03:46 PM, Ramon
Medeiros wrote:<br>
</div>
<blockquote
cite="mid:3cfa4faa-f36a-aa8e-7292-bbb23abb8e70@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<p>Hi Aline,</p>
<p><br>
</p>
<p>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:<br>
<br>
var loadIfaces = function(interfaceFilterArray){<br>
var buildInterfaceOpts = function(result) {<br>
kimchi.createInterfacesOpts(result,
interfaceFilterArray);<br>
<br>
for (var i = 0; i < result.length; i++) {<br>
$("#networkDestinationID option[value='" +
result[i]["name"] + "']").attr('selected','selected');<br>
}<br>
$('#networkDestinationID').selectpicker('refresh');<br>
};<br>
<br>
THanks<br>
</p>
<br>
<div class="moz-cite-prefix">On 10/10/2016 12:56 PM, Aline
Manera wrote:<br>
</div>
<blockquote
cite="mid:dae578fa-3f81-d6bb-ade0-f27a84618b85@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
Hi Ramon,<br>
<br>
I tested that and all the problems reported on #1008 are
still there.<br>
<br>
I create a VEPA network with eth0 and eth1:<br>
<br>
<img src="cid:part1.6BEB0797.81071105@linux.vnet.ibm.com"
alt=""><br>
<br>
While editing it, all the interfaces are checked;<br>
<br>
<img src="cid:part2.1796F5D3.67B19ED2@linux.vnet.ibm.com"
alt=""><br>
<br>
Also some in use interfaces are also listed and they should
be not.<br>
<br>
<div class="moz-cite-prefix">On 10/06/2016 02:36 PM, Ramon
Medeiros wrote:<br>
</div>
<blockquote
cite="mid:1475775404-32346-1-git-send-email-ramonn@linux.vnet.ibm.com"
type="cite">
<pre wrap="">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 <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ramonn@linux.vnet.ibm.com"><ramonn@linux.vnet.ibm.com></a>
---
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');
};
</pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:ramonn@br.ibm.com">ramonn@br.ibm.com</a> </pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:ramonn@br.ibm.com">ramonn@br.ibm.com</a> </pre>
</blockquote>
<br>
</body>
</html>