Manage hosts directive set up w/ route

This commit is contained in:
Ken Hoes 2016-03-18 10:37:26 -04:00
parent a76b361f18
commit 66b96ced38
9 changed files with 85 additions and 1 deletions

View File

@ -1,5 +1,8 @@
<div class="tab-pane" id="inventory_edit">
<div ui-view></div>
<ui-view/>
<div ui-view class="manage">In the ui view
<manage-hosts></manage-hosts>
</div>
<div ng-cloak id="htmlTemplate">
<div class="row">

View File

@ -7,8 +7,13 @@
import route from './inventory-manage.route';
import controller from './inventory-manage.controller';
import manageHostsDirective from './manage-hosts/manage-hosts.directive';
import manageHostsRoute from './manage-hosts/manage-hosts.route';
export default
angular.module('inventoryManage', [])
.directive('manageHosts', manageHostsDirective)
.run(['$stateExtender', function($stateExtender) {
$stateExtender.addState(route);
$stateExtender.addState(manageHostsRoute);
}]);

View File

@ -0,0 +1,20 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
function manageHostDirectiveController($q, $rootScope, $scope, $state,
$stateParams, $compile, Rest, ProcessErrors,
CreateDialog, GetBasePath, Wait, GenerateList, GroupList, SearchInit,
PaginateInit, GetRootGroups) {
var vm = this;
};
export default ['$q', '$rootScope', '$scope', '$state', '$stateParams',
'ScopePass', '$compile', 'Rest', 'ProcessErrors', 'CreateDialog',
'GetBasePath', 'Wait', 'generateList', 'GroupList', 'SearchInit',
'PaginateInit', 'GetRootGroups', manageHostDirectiveController
];

View File

@ -0,0 +1,25 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
/* jshint unused: vars */
import manageHostsController from './manage-hosts.controller';
export default ['templateUrl',
function(templateUrl) {
return {
restrict: 'EA',
scope: true,
replace: true,
templateUrl: templateUrl('inventories/manage/manage-hosts/manage-hosts'),
link: function(scope, element, attrs) {
},
// controller: manageHostsController,
// controllerAs: 'vm',
// bindToController: true
};
}
];

View File

@ -0,0 +1,2 @@
<div class="manage-hosts">This is the manage hosts directive.
</div>

View File

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