[
https://issues.apache.org/jira/browse/SCB-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672773#comment-16672773
]
ASF GitHub Bot commented on SCB-993:
------------------------------------
asifdxtreme closed pull request #480: SCB-993 Can not test Schema if instance
port greater than 4 digits
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/480
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
index ab24663a..cd21f130 100644
--- a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
+++ b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
@@ -261,14 +261,8 @@ angular.module('serviceCenter.sc')
httpService.apiRequest(url, method, null, headers,
"nopopup").then(function(response) {
$(".loader").hide();
if (response && response.data &&
response.data.schema) {
- if ($scope.selectedAddress.indexOf("rest")
!= -1) {
- var rest =
$scope.selectedAddress.split(':');
- var ip = rest[1].substring(2,
rest[1].length) + ":" + rest[2].substring(0, 4);
- }
- if
($scope.selectedAddress.indexOf("highway") != -1) {
- var highway =
$scope.selectedAddress.split(':');
- var ip = highway[1].substring(2,
highway[1].length) + ":" + highway[2].substring(0, 4);
- }
+ var arr =
/^(?:\w+:\/\/)?([^\/?#]+)(.*)$/.exec($scope.selectedAddress);
+ var ip = arr[1];
var schema = response.data.schema;
schema = schema.replace(/\\\s/g, "");
var json = YAML.parse(schema);
----------------------------------------------------------------
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]
> Bug fixes
> ---------
>
> Key: SCB-993
> URL: https://issues.apache.org/jira/browse/SCB-993
> Project: Apache ServiceComb
> Issue Type: Bug
> Components: Service-Center
> Reporter: little-cui
> Assignee: little-cui
> Priority: Major
> Fix For: service-center-1.1.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)