mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Removed directives, moved to controllers and partials.
This commit is contained in:
parent
07ab1e7787
commit
b76b07955a
@ -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) {
|
||||
var vm = this;
|
||||
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',
|
||||
'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 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',
|
||||
'PaginateInit', 'ParamPass', 'Store', copyHostsDirectiveController
|
||||
'PaginateInit', 'ParamPass', 'Store', CopyHostsCtrl
|
||||
];
|
||||
@ -8,6 +8,8 @@ import {
|
||||
} from '../../../shared/template-url/template-url.factory';
|
||||
|
||||
import inventoryManageCopyCtrl from './copy.controller';
|
||||
import CopyGroupsCtrl from './copy-groups.controller';
|
||||
import CopyHostsCtrl from './copy-hosts.controller';
|
||||
|
||||
export default {
|
||||
copy: {
|
||||
@ -29,33 +31,29 @@ export default {
|
||||
copyGroup: {
|
||||
name: 'inventoryManage.copy.group',
|
||||
route: '/group/:group_id?groups',
|
||||
template: '<div><copy-groups></copy-groups></div>',
|
||||
templateUrl: templateUrl('inventories/manage/copy/copy-groups'),
|
||||
data: {
|
||||
group_id: 'group_id',
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
label: "GROUP"
|
||||
},
|
||||
resolve: {
|
||||
features: ['FeaturesService', function(FeaturesService) {
|
||||
return FeaturesService.get();
|
||||
}]
|
||||
}
|
||||
controller: CopyGroupsCtrl,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
},
|
||||
copyHost: {
|
||||
name: 'inventoryManage.copy.host',
|
||||
route: '/host/:host_id?groups',
|
||||
template: '<div><copy-hosts></copy-hosts></div>',
|
||||
templateUrl: templateUrl('inventories/manage/copy/copy-hosts'),
|
||||
data: {
|
||||
host_id: 'host_id',
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
label: "HOST"
|
||||
},
|
||||
resolve: {
|
||||
features: ['FeaturesService', function(FeaturesService) {
|
||||
return FeaturesService.get();
|
||||
}]
|
||||
}
|
||||
controller: CopyHostsCtrl,
|
||||
controllerAs: 'vm',
|
||||
bindToController: true
|
||||
}
|
||||
};
|
||||
|
||||
@ -5,13 +5,9 @@
|
||||
*************************************************/
|
||||
|
||||
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
|
||||
angular.module('inventory-copy', [])
|
||||
.directive('copyGroups', copyGroupsDirective)
|
||||
.directive('copyHosts', copyHostsDirective)
|
||||
.run(['$stateExtender', function($stateExtender) {
|
||||
$stateExtender.addState(route.copy);
|
||||
$stateExtender.addState(route.copyGroup);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user