23 lines
525 B
JavaScript
23 lines
525 B
JavaScript
var app = angular.module('wfHistoryApp', []);
|
|
|
|
app.controller('wfHistoryController', function($scope, $http) {
|
|
$scope.workflows = [];
|
|
$scope.currentWf = {};
|
|
|
|
|
|
$scope.reload = function() {
|
|
$http.get('./api/wfs/?' + $.now()).then(function successCallback(res) {
|
|
$scope.workflows = res.data;
|
|
}, function errorCallback(res) {
|
|
alert('ERROR: ' + res.data.message);
|
|
});
|
|
};
|
|
|
|
$scope.setCurrentWf = function(wf) {
|
|
$scope.currentWf = angular.copy(wf);
|
|
}
|
|
|
|
|
|
$scope.reload();
|
|
});
|