diff --git a/src/app/d3Bindings/calendarView/calenderViewTemplate.tpl.html b/src/app/d3Bindings/calendarView/calenderViewTemplate.tpl.html index a8a5a0ae..6da3e90d 100644 --- a/src/app/d3Bindings/calendarView/calenderViewTemplate.tpl.html +++ b/src/app/d3Bindings/calendarView/calenderViewTemplate.tpl.html @@ -6,4 +6,6 @@
  • {{dataPoint}}
  • -
    \ No newline at end of file +
    + + {{filteredAudioRecordings}} \ No newline at end of file diff --git a/src/app/d3Bindings/d3TestPage.js b/src/app/d3Bindings/d3TestPage.js index 98935f24..919b52f2 100644 --- a/src/app/d3Bindings/d3TestPage.js +++ b/src/app/d3Bindings/d3TestPage.js @@ -1,8 +1,36 @@ var bawD3 = bawD3 || angular.module("bawApp.d3", []); -bawD3.controller('D3TestPageCtrl', ['$scope', function($scope) { +bawD3.controller('D3TestPageCtrl', ['$scope', 'conf.paths', '$http', function ($scope, paths, $http) { - // use the REST API in here - // assign the resulting data to scope (not great but it will do for now - $scope.basicData = [0,1,2,3,4,5]; + // use the REST API in here + // assign the resulting data to scope (not great but it will do for now + $scope.basicData = [0, 1, 2, 3, 4, 5]; - }]); \ No newline at end of file + $scope.siteId = 399; + + var request_filter = { + "filter": { + "site_id":{ + "eq":$scope.siteId + } + }, + "projection": { + "include": ["id", "recorded_date", "duration_seconds"] + }//, + //"paging":{ + // "page":2, + // "items":30 + //} + }; + + $http.post(paths.api.routes.audioRecording.filterAbsolute, request_filter) + .success(function (data, status, headers, config) { + + $scope.filteredAudioRecordings = data; + }) + .error(function (data, status, headers, config) { + $scope.filteredAudioRecordings = data; + console.warn('Filtered audio recordings failed.', data, status, headers, config); + }); + + +}]); \ No newline at end of file