mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 16:20:44 +01:00
2e1ad91e7a
- Link models with tables - Basic API to fetch everything
19 lines
590 B
JavaScript
19 lines
590 B
JavaScript
define(function () {
|
|
app.registerController('ProjectTemplatesCtrl', ['$scope', '$http', '$uibModal', 'Project', function ($scope, $http, $modal, Project) {
|
|
$scope.reload = function () {
|
|
$http.get(Project.getURL() + '/templates').success(function (templates) {
|
|
$scope.templates = templates;
|
|
});
|
|
}
|
|
|
|
$scope.remove = function (environment) {
|
|
$http.delete(Project.getURL() + '/templates/' + environment.id).success(function () {
|
|
$scope.reload();
|
|
}).error(function () {
|
|
swal('error', 'could not delete template..', 'error');
|
|
});
|
|
}
|
|
|
|
$scope.reload();
|
|
}]);
|
|
}); |