You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/05/11 01:17:43 UTC

[GitHub] little-cui commented on a change in pull request #348: SCB-491 Add the Test Schema Feature

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:
users@infra.apache.org


With regards,
Apache Git Services