Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Commit 6e0d5b9

Browse files
committed
get d2rq-mapper api url from configuration
1 parent 606477e commit 6e0d5b9

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/main/webapp/js/services.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,10 @@ module.factory("GraphGroupService", function($http, $q, Config, AccountService)
11461146
};
11471147
});
11481148

1149-
module.factory("OntologyService", function($http, $q) {
1149+
module.factory("OntologyService", function($http, $q, ConfigurationService) {
1150+
var d2rqServices = ConfigurationService.getComponentServices(":D2RQ");
1151+
var d2rqServiceUrl = d2rqServices[0].serviceUrl;
1152+
11501153
var ontologies = [];
11511154
var isLoaded = false;
11521155

@@ -1156,7 +1159,7 @@ module.factory("OntologyService", function($http, $q) {
11561159
deferred.resolve(ontologies);
11571160
return deferred.promise;
11581161
} else {
1159-
return $http.get("http://localhost:8080/d2rq-mapper-web-service/api/ontologies/uris/get")
1162+
return $http.get(d2rqServiceUrl + "/ontologies/uris/get")
11601163
.then(function(response) {
11611164
ontologies = response.data;
11621165
isLoaded = true;
@@ -1180,7 +1183,10 @@ module.factory("OntologyService", function($http, $q) {
11801183
};
11811184
});
11821185

1183-
module.factory("D2RQService", function($http, $q) {
1186+
module.factory("D2RQService", function($http, $q, ConfigurationService) {
1187+
var d2rqServices = ConfigurationService.getComponentServices(":D2RQ");
1188+
var d2rqServiceUrl = d2rqServices[0].serviceUrl;
1189+
11841190
var mappingGroups = [];
11851191
var tasks = [];
11861192

@@ -1193,7 +1199,7 @@ module.factory("D2RQService", function($http, $q) {
11931199
deferred.resolve(mappingGroups);
11941200
return deferred.promise;
11951201
} else {
1196-
return $http.get("http://localhost:8080/d2rq-mapper-web-service/api/mappings/groups/metadata/get")
1202+
return $http.get(d2rqServiceUrl + "/mappings/groups/metadata/get")
11971203
.then(function(response) {
11981204
mappingGroups = response.data;
11991205
mappingGroupsLoaded = true;
@@ -1216,7 +1222,7 @@ module.factory("D2RQService", function($http, $q) {
12161222
deferred.resolve(tasks);
12171223
return deferred.promise;
12181224
} else {
1219-
return $http.get("http://localhost:8080/d2rq-mapper-web-service/api/tasks/metadata/get")
1225+
return $http.get(d2rqServiceUrl + "/tasks/metadata/get")
12201226
.then(function(response) {
12211227
tasks = response.data;
12221228
tasksLoaded = true;

0 commit comments

Comments
 (0)