mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
Removed directives, moved to controllers and partials.
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
/*************************************************
|
|
||||||
* Copyright (c) 2015 Ansible, Inc.
|
|
||||||
*
|
|
||||||
* All Rights Reserved
|
|
||||||
*************************************************/
|
|
||||||
|
|
||||||
/* jshint unused: vars */
|
|
||||||
import copyGroupsDirectiveController from './copy-groups.directive.controller';
|
|
||||||
|
|
||||||
export default ['templateUrl',
|
|
||||||
function(templateUrl) {
|
|
||||||
return {
|
|
||||||
restrict: 'EA',
|
|
||||||
scope: true,
|
|
||||||
replace: true,
|
|
||||||
templateUrl: templateUrl('inventories/manage/copy/copy-groups-directive/copy-groups.directive'),
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
|
|
||||||
},
|
|
||||||
controller: copyGroupsDirectiveController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindToController: true
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
function copyGroupsDirectiveController($compile, $state, $scope, $location, Rest, ProcessErrors, CreateDialog,
|
function CopyGroupsCtrl($compile, $state, $scope, $location, Rest, ProcessErrors, CreateDialog,
|
||||||
GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit, GetRootGroups, ParamPass, Store) {
|
GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit, GetRootGroups, ParamPass, Store) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
var name;
|
var name;
|
||||||
@@ -299,5 +299,5 @@ function copyGroupsDirectiveController($compile, $state, $scope, $location, Rest
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default ['$compile', '$state', '$scope', '$location', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
export default ['$compile', '$state', '$scope', '$location', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
||||||
'PaginateInit', 'GetRootGroups', 'ParamPass', 'Store', copyGroupsDirectiveController
|
'PaginateInit', 'GetRootGroups', 'ParamPass', 'Store', CopyGroupsCtrl
|
||||||
];
|
];
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
/*************************************************
|
|
||||||
* Copyright (c) 2015 Ansible, Inc.
|
|
||||||
*
|
|
||||||
* All Rights Reserved
|
|
||||||
*************************************************/
|
|
||||||
|
|
||||||
/* jshint unused: vars */
|
|
||||||
import copyHostsDirectiveController from './copy-hosts.directive.controller';
|
|
||||||
|
|
||||||
export default ['templateUrl',
|
|
||||||
function(templateUrl) {
|
|
||||||
return {
|
|
||||||
restrict: 'EA',
|
|
||||||
scope: true,
|
|
||||||
replace: true,
|
|
||||||
templateUrl: templateUrl('inventories/manage/copy/copy-hosts-directive/copy-hosts.directive'),
|
|
||||||
link: function(scope, element, attrs) {
|
|
||||||
|
|
||||||
},
|
|
||||||
controller: copyHostsDirectiveController,
|
|
||||||
controllerAs: 'vm',
|
|
||||||
bindToController: true
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErrors, CreateDialog, GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit, ParamPass, Store) {
|
function CopyHostsCtrl($compile, $state, $scope, Rest, ProcessErrors, CreateDialog, GetBasePath, Wait, GenerateList, GroupList, SearchInit, PaginateInit, ParamPass, Store) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
var name;
|
var name;
|
||||||
|
|
||||||
@@ -235,5 +235,5 @@ function copyHostsDirectiveController($compile, $state, $scope, Rest, ProcessErr
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default ['$compile', '$state', '$scope', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
export default ['$compile', '$state', '$scope', 'Rest', 'ProcessErrors', 'CreateDialog', 'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
|
||||||
'PaginateInit', 'ParamPass', 'Store', copyHostsDirectiveController
|
'PaginateInit', 'ParamPass', 'Store', CopyHostsCtrl
|
||||||
];
|
];
|
||||||
@@ -8,6 +8,8 @@ import {
|
|||||||
} from '../../../shared/template-url/template-url.factory';
|
} from '../../../shared/template-url/template-url.factory';
|
||||||
|
|
||||||
import inventoryManageCopyCtrl from './copy.controller';
|
import inventoryManageCopyCtrl from './copy.controller';
|
||||||
|
import CopyGroupsCtrl from './copy-groups.controller';
|
||||||
|
import CopyHostsCtrl from './copy-hosts.controller';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
copy: {
|
copy: {
|
||||||
@@ -29,33 +31,29 @@ export default {
|
|||||||
copyGroup: {
|
copyGroup: {
|
||||||
name: 'inventoryManage.copy.group',
|
name: 'inventoryManage.copy.group',
|
||||||
route: '/group/:group_id?groups',
|
route: '/group/:group_id?groups',
|
||||||
template: '<div><copy-groups></copy-groups></div>',
|
templateUrl: templateUrl('inventories/manage/copy/copy-groups'),
|
||||||
data: {
|
data: {
|
||||||
group_id: 'group_id',
|
group_id: 'group_id',
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: "GROUP"
|
label: "GROUP"
|
||||||
},
|
},
|
||||||
resolve: {
|
controller: CopyGroupsCtrl,
|
||||||
features: ['FeaturesService', function(FeaturesService) {
|
controllerAs: 'vm',
|
||||||
return FeaturesService.get();
|
bindToController: true
|
||||||
}]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
copyHost: {
|
copyHost: {
|
||||||
name: 'inventoryManage.copy.host',
|
name: 'inventoryManage.copy.host',
|
||||||
route: '/host/:host_id?groups',
|
route: '/host/:host_id?groups',
|
||||||
template: '<div><copy-hosts></copy-hosts></div>',
|
templateUrl: templateUrl('inventories/manage/copy/copy-hosts'),
|
||||||
data: {
|
data: {
|
||||||
host_id: 'host_id',
|
host_id: 'host_id',
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: "HOST"
|
label: "HOST"
|
||||||
},
|
},
|
||||||
resolve: {
|
controller: CopyHostsCtrl,
|
||||||
features: ['FeaturesService', function(FeaturesService) {
|
controllerAs: 'vm',
|
||||||
return FeaturesService.get();
|
bindToController: true
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
import route from './copy.route';
|
import route from './copy.route';
|
||||||
import copyGroupsDirective from './copy-groups-directive/copy-groups.directive';
|
|
||||||
import copyHostsDirective from './copy-hosts-directive/copy-hosts.directive';
|
|
||||||
|
|
||||||
export default
|
export default
|
||||||
angular.module('inventory-copy', [])
|
angular.module('inventory-copy', [])
|
||||||
.directive('copyGroups', copyGroupsDirective)
|
|
||||||
.directive('copyHosts', copyHostsDirective)
|
|
||||||
.run(['$stateExtender', function($stateExtender) {
|
.run(['$stateExtender', function($stateExtender) {
|
||||||
$stateExtender.addState(route.copy);
|
$stateExtender.addState(route.copy);
|
||||||
$stateExtender.addState(route.copyGroup);
|
$stateExtender.addState(route.copyGroup);
|
||||||
|
|||||||
Reference in New Issue
Block a user