Skip to content

Commit

Permalink
Don't always load keyword list for dataset filter
Browse files Browse the repository at this point in the history
fixes #167
  • Loading branch information
raitisbe committed Mar 14, 2019
1 parent 30d4c4e commit a468320
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
19 changes: 10 additions & 9 deletions components/datasource_selector/datasource_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,16 @@ define(['angular', 'ol', 'map'],
$scope.id_selected = id_selected;
}

$http({
method: 'GET',
url: utils.proxify('http://opentransportnet.eu:8082/api/3/action/vocabulary_show?id=36c07014-c461-4f19-b4dc-a38106144e66')
}).then(function successCallback(response) {
$scope.otn_keywords = [{ title: '-' }];
angular.forEach(response.data.result.tags, function (tag) {
$scope.otn_keywords.push({ title: tag.name });
})
});
if(config.datasources && config.datasources.length > 0)
$http({
method: 'GET',
url: utils.proxify('http://opentransportnet.eu:8082/api/3/action/vocabulary_show?id=36c07014-c461-4f19-b4dc-a38106144e66')
}).then(function successCallback(response) {
$scope.otn_keywords = [{ title: '-' }];
angular.forEach(response.data.result.tags, function (tag) {
$scope.otn_keywords.push({ title: tag.name });
})
});

/**
* @function openMickaAdvancedSearch
Expand Down
20 changes: 10 additions & 10 deletions materialComponents/panelContents/datasourceBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ define(['angular', 'ol', 'angular-material'],
}
}
);

$http({
method: 'GET',
url: utils.proxify('http://opentransportnet.eu:8082/api/3/action/vocabulary_show?id=36c07014-c461-4f19-b4dc-a38106144e66')
}).then(function successCallback(response) {
$scope.otn_keywords = [{ title: '-' }];
angular.forEach(response.data.result.tags, function (tag) {
$scope.otn_keywords.push({ title: tag.name });
})
});
if(config.datasources && config.datasources.length > 0)
$http({
method: 'GET',
url: utils.proxify('http://opentransportnet.eu:8082/api/3/action/vocabulary_show?id=36c07014-c461-4f19-b4dc-a38106144e66')
}).then(function successCallback(response) {
$scope.otn_keywords = [{ title: '-' }];
angular.forEach(response.data.result.tags, function (tag) {
$scope.otn_keywords.push({ title: tag.name });
})
});

$scope.changeDS = function(dataset){
$scope.selectedDS = dataset;
Expand Down

0 comments on commit a468320

Please sign in to comment.