dnet-applications/apps/dnet-is-application/src/main/resources/static/js/wf_history.js

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();
});