little-cui commented on a change in pull request #348: SCB-491 Add the Test 
Schema Feature
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/348#discussion_r187500146
 
 

 ##########
 File path: frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
 ##########
 @@ -207,7 +211,13 @@ angular.module('serviceCenter.sc')
                                    $scope.selectedInstance =  instances[0] || 
'';
 
                                    $scope.addresses = addresses[0];
-                                   $scope.selectedAddress = addresses[0][0] || 
'';
+                                   angular.forEach($scope.addresses, 
function(addr){
+                                       if(addr.indexOf("rest") >= 0){
+                            $scope.selectedAddress = addr;
+                        }
+                                       });
+                    $scope.selectedAddress = ($scope.selectedAddress == '') ? 
addresses[0][0] : $scope.selectedAddress;
+                    $scope.disableNext = 
$scope.selectedAddress.indexOf("highway") >= 0 ? true : false;
 
 Review comment:
   please do json format the code

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to