Reviewed-By: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
On 06/10/2016 14:36, 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(a)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');
};
--
Lucio Correia
Software Engineer
IBM LTC Brazil