Semaphore/public/js/factories/task.js
Matej Kramny be0fc0b324 Ability to run tasks, results streamed back to the user
- Updated Readme
- Nicer overview of a playbook
2014-08-30 19:05:44 +01:00

21 lines
433 B
JavaScript

define(['app'], function (app) {
app.registerFactory('Task', ['$http', function ($http) {
var Task = function (id) {
if (!id) {
return;
}
this.id = id;
}
Task.prototype.delete = function (playbook, job) {
return $http.delete('/playbook/'+playbook.data._id+'/job/'+job._id+'/task/'+this.data._id);
}
Task.prototype.get = function () {
return $http.get('/task/'+this.id);
}
return Task;
}])
})