Further modularization.

This commit is contained in:
Ken Hoes 2016-03-16 09:23:05 -04:00
parent 989cf4d1ae
commit b0b416341d
17 changed files with 225 additions and 15 deletions

View File

@ -26,7 +26,7 @@ import {CredentialsAdd, CredentialsEdit, CredentialsList} from './controllers/Cr
import {JobsListController} from './controllers/Jobs';
import {PortalController} from './controllers/Portal';
import systemTracking from './system-tracking/main';
import inventory from './inventory/main';
import inventories from './inventories/main';
import inventoryScripts from './inventory-scripts/main';
import organizations from './organizations/main';
import permissions from './permissions/main';
@ -91,6 +91,7 @@ var tower = angular.module('Tower', [
RestServices.name,
browserData.name,
systemTracking.name,
inventories.name,
inventoryScripts.name,
organizations.name,
permissions.name,
@ -372,6 +373,7 @@ var tower = angular.module('Tower', [
}
}).
<<<<<<< 3e32787490a4faf3899b1a5d125475e73521ef35
state('inventories', {
url: '/inventories',
templateUrl: urlPrefix + 'partials/inventories.html',
@ -382,6 +384,22 @@ var tower = angular.module('Tower', [
},
ncyBreadcrumb: {
label: "INVENTORIES"
=======
state('organizations', {
url: '/organizations',
templateUrl: urlPrefix + 'partials/organizations.html',
controller: OrganizationsList,
data: {
activityStream: true,
activityStreamTarget: 'organization'
},
ncyBreadcrumb: {
parent: function($scope) {
$scope.$parent.$emit("ReloadOrgListView");
return "setup";
},
label: "ORGANIZATIONS"
>>>>>>> Further modularization.
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
@ -390,6 +408,7 @@ var tower = angular.module('Tower', [
}
}).
<<<<<<< 3e32787490a4faf3899b1a5d125475e73521ef35
state('inventories.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/inventories.html',
@ -397,6 +416,15 @@ var tower = angular.module('Tower', [
ncyBreadcrumb: {
parent: "inventories",
label: "CREATE INVENTORY"
=======
state('organizations.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/organizations.crud.html',
controller: OrganizationsAdd,
ncyBreadcrumb: {
parent: "organizations",
label: "CREATE ORGANIZATION"
>>>>>>> Further modularization.
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
@ -405,6 +433,7 @@ var tower = angular.module('Tower', [
}
}).
<<<<<<< 3e32787490a4faf3899b1a5d125475e73521ef35
state('inventories.edit', {
url: '/:inventory_id',
templateUrl: urlPrefix + 'partials/inventories.html',
@ -427,6 +456,18 @@ var tower = angular.module('Tower', [
activityStream: true,
activityStreamTarget: 'inventory',
activityStreamId: 'inventory_id'
=======
state('organizations.edit', {
url: '/:organization_id',
templateUrl: urlPrefix + 'partials/organizations.crud.html',
controller: OrganizationsEdit,
data: {
activityStreamId: 'organization_id'
},
ncyBreadcrumb: {
parent: "organizations",
label: "{{name}}"
>>>>>>> Further modularization.
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {

View File

@ -10,7 +10,7 @@
* @description This controller's for the Inventory page
*/
import '../job-templates/main';
import '../../job-templates/main';
function InventoriesAdd($scope, $rootScope, $compile, $location, $log,
$stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,

View File

@ -0,0 +1,24 @@
/*************************************************
* Copyright (c) 2016 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import {templateUrl} from '../../shared/template-url/template-url.factory';
import InventoriesAdd from './inventory-add.controller';
export default {
name: 'inventories.add',
route: '/add',
templateUrl: templateUrl('inventories/inventories'),
controller: InventoriesAdd,
ncyBreadcrumb: {
parent: "inventories",
label: "CREATE INVENTORY"
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
return FeaturesService.get();
}]
}
};

View File

@ -0,0 +1,14 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import route from './inventory-add.route';
import controller from './inventory-add.controller';
export default
angular.module('inventoryAdd', [])
.run(['$stateExtender', function($stateExtender) {
$stateExtender.addState(route);
}]);

View File

@ -10,7 +10,7 @@
* @description This controller's for the Inventory page
*/
import '../job-templates/main';
import '../../job-templates/main';
function InventoriesEdit($scope, $rootScope, $compile, $location,
$log, $stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,

View File

@ -0,0 +1,26 @@
/*************************************************
* Copyright (c) 2016 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import {templateUrl} from '../../shared/template-url/template-url.factory';
import InventoriesEdit from './inventory-edit.controller';
export default {
name: 'inventories.edit',
route: '/:inventory_id',
templateUrl: templateUrl('inventories/inventories'),
controller: InventoriesEdit,
data: {
activityStreamId: 'inventory_id'
},
ncyBreadcrumb: {
label: "INVENTORY EDIT"
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
return FeaturesService.get();
}]
}
};

View File

@ -0,0 +1,14 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import route from './inventory-edit.route';
import controller from './inventory-edit.controller';
export default
angular.module('inventoryEdit', [])
.run(['$stateExtender', function($stateExtender) {
$stateExtender.addState(route);
}]);

View File

@ -10,7 +10,7 @@
* @description This controller's for the Inventory page
*/
import '../job-templates/main';
import '../../job-templates/main';
function InventoriesList($scope, $rootScope, $location, $log,
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList,

View File

@ -0,0 +1,27 @@
/*************************************************
* Copyright (c) 2016 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import {templateUrl} from '../../shared/template-url/template-url.factory';
import InventoriesList from './inventory-list.controller';
export default {
name: 'inventories',
route: '/inventories',
templateUrl: templateUrl('inventories/inventories'),
controller: InventoriesList,
data: {
activityStream: true,
activityStreamTarget: 'inventory'
},
ncyBreadcrumb: {
label: "INVENTORIES"
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
return FeaturesService.get();
}]
}
};

View File

@ -0,0 +1,14 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import route from './inventory-list.route';
import controller from './inventory-list.controller';
export default
angular.module('inventoryList', [])
.run(['$stateExtender', function($stateExtender) {
$stateExtender.addState(route);
}]);

View File

@ -0,0 +1,18 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import inventoryAdd from './add/main';
import inventoryEdit from './edit/main';
import inventoryList from './list/main';
import inventoryManage from './manage/main';
export default
angular.module('inventory', [
inventoryAdd.name,
inventoryEdit.name,
inventoryList.name,
inventoryManage.name,
]);

View File

@ -10,7 +10,7 @@
* @description This controller's for the Inventory page
*/
import '../job-templates/main';
import '../../job-templates/main';
function InventoriesManage($log, $scope, $rootScope, $location,
$state, $compile, generateList, ClearScope, Empty, Wait, Rest, Alert,

View File

@ -0,0 +1,28 @@
/*************************************************
* Copyright (c) 2016 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import {templateUrl} from '../../shared/template-url/template-url.factory';
import InventoriesManage from './inventory-manage.controller';
export default {
name: 'inventoryManage',
route: '/inventories/:inventory_id/manage',
templateUrl: templateUrl('inventories/manage/inventory-manage'),
controller: InventoriesManage,
data: {
activityStream: true,
activityStreamTarget: 'inventory',
activityStreamId: 'inventory_id'
},
ncyBreadcrumb: {
label: "INVENTORY MANAGE"
},
resolve: {
features: ['FeaturesService', function(FeaturesService) {
return FeaturesService.get();
}]
}
};

View File

@ -0,0 +1,14 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import route from './inventory-manage.route';
import controller from './inventory-manage.controller';
export default
angular.module('inventoryManage', [])
.run(['$stateExtender', function($stateExtender) {
$stateExtender.addState(route);
}]);

View File

@ -1,10 +0,0 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default
angular.module('inventory', [
])