mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
Fix Deleting playbooks
- Update Screenshot
This commit is contained in:
parent
dc2dac98ad
commit
fdf0d4d616
Binary file not shown.
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 254 KiB |
@ -2,8 +2,8 @@ define([
|
||||
'app',
|
||||
'services/playbooks'
|
||||
], function(app) {
|
||||
app.registerController('PlaybookCtrl', ['$scope', '$state', 'playbooks', function($scope, $state, playbooks) {
|
||||
console.log($scope.playbook);
|
||||
app.registerController('PlaybookCtrl', ['$scope', '$state', 'playbooks', 'playbook', function($scope, $state, playbooks, playbook) {
|
||||
$scope.playbook = playbook;
|
||||
|
||||
$scope.delete = function () {
|
||||
$scope.playbook.delete();
|
||||
|
@ -27,11 +27,13 @@ define([
|
||||
.state('playbook', {
|
||||
abstract: true,
|
||||
url: '/playbook/:playbook_id',
|
||||
controller: 'PlaybookCtrl',
|
||||
templateUrl: '/view/playbook/view',
|
||||
controller: ['$scope', 'playbook', function ($scope, playbook) {
|
||||
$scope.playbook = playbook;
|
||||
}],
|
||||
resolve: {
|
||||
dummy: $couchPotatoProvider.resolve(['controllers/playbook/playbook',
|
||||
'controllers/host/hosts',
|
||||
'controllers/job/jobs',
|
||||
'controllers/task/tasks']),
|
||||
playbook: function (Playbook, $stateParams, $q, $state) {
|
||||
var deferred = $q.defer();
|
||||
|
||||
@ -50,14 +52,7 @@ define([
|
||||
})
|
||||
|
||||
.state('playbook.view', {
|
||||
url: '/',
|
||||
controller: 'PlaybookCtrl',
|
||||
resolve: {
|
||||
dummy: $couchPotatoProvider.resolve(['controllers/playbook/playbook',
|
||||
'controllers/host/hosts',
|
||||
'controllers/job/jobs',
|
||||
'controllers/task/tasks'])
|
||||
},
|
||||
url: '',
|
||||
views: {
|
||||
tasks: {
|
||||
templateUrl: '/view/task/tasks',
|
||||
|
Loading…
Reference in New Issue
Block a user