Commit b11dbd6a authored by Severine Duvaud's avatar Severine Duvaud
Browse files

Do not use the API, use /datasets instead

parent 727e4225
......@@ -23,7 +23,7 @@ arrayMap.factory('BeaconService', ['$http', '$q', function ($http, $q) {
var defer = $q.defer();
// var url = "http://arraymap.org/api/?db=arraymap&api_out=icdmlist&api_out=icdmlist&api_doctype=json&icdm_m=8,9";
var url = "http://arraymap.org/qsubsets/?db=arraymap&collection=subsets&subsettype=ICDMORPHOLOGYCODE&querytext=8|9";
var url = "/dataset?id=all";
var req = {
method: 'GET',
......@@ -33,9 +33,7 @@ arrayMap.factory('BeaconService', ['$http', '$q', function ($http, $q) {
//return $http.get(url)
return $http(req)
.then(function(response){
console.log("response ok");
console.timeEnd("getDatasets");
return response.info.info.datasets;
return response.data;
},
function(){
console.log("response not ok");
......@@ -107,8 +105,6 @@ arrayMap.controller('BeaconController', ['$scope', '$location', 'BeaconService',
console.log("Error getting datasets");
}
);
$scope.datasets = [];
}]);
......
......@@ -29,7 +29,7 @@
<label for="datasetSelect" class="col-sm-2 control-label">Dataset Ids</label>
<div class="col-sm-4">
<select id="datasetSelect" ng-model="config.datasetIds" class="form-control">
<option ng-repeat="ds in datasets" value="{{ds.code}}" >({{ds.code}}) {{ds.description}}</option>
<option ng-repeat="ds in datasets" value="{{ds.id}}" >({{ds.id}}) {{ds.description}}</option>
</select>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment