From 19fc92250425469248f8ff2d9313c3035e28e094 Mon Sep 17 00:00:00 2001 From: jiahuay Date: Wed, 10 Sep 2014 16:13:08 -0700 Subject: [PATCH] Fix retrieving interfaces on Network page Change-Id: I799145af2b7326e085e2b15d945703a36239b394 --- v2/src/app/wizard/network.tpl.html | 4 ++-- v2/src/app/wizard/wizard.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/v2/src/app/wizard/network.tpl.html b/v2/src/app/wizard/network.tpl.html index 2635c74..2ffbff5 100644 --- a/v2/src/app/wizard/network.tpl.html +++ b/v2/src/app/wizard/network.tpl.html @@ -92,8 +92,8 @@

Autofill Hostname

diff --git a/v2/src/app/wizard/wizard.js b/v2/src/app/wizard/wizard.js index f08447f..36a0586 100644 --- a/v2/src/app/wizard/wizard.js +++ b/v2/src/app/wizard/wizard.js @@ -549,6 +549,16 @@ angular.module('compass.wizard', [ dataService.getClusterHosts(cluster.id).success(function(data) { $scope.servers = data; + + // Assume all hosts in the same cluster have same interface settings + if($scope.servers[0].networks) { + if(Object.keys($scope.servers[0].networks).length != 0) { + $scope.interfaces = $scope.servers[0].networks; + wizardFactory.setInterfaces($scope.interfaces); + } + } + + $scope.tableParams = new ngTableParams({ page: 1, // show first page count: $scope.servers.length + 1 // count per page