-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]; | ||
|
||
}]); | ||
$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); | ||
}); | ||
|
||
|
||
}]); |