mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-16 04:51:50 -05:00
Add basic component functionality
This commit is contained in:
12
awx/ui/client/src/credentials/index.controller.js
Normal file
12
awx/ui/client/src/credentials/index.controller.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function IndexController () {
|
||||
let vm = this;
|
||||
|
||||
vm.panel = {
|
||||
title: 'Credentials',
|
||||
titleBadge: 5
|
||||
};
|
||||
}
|
||||
|
||||
// IndexController.$inject = [];
|
||||
|
||||
export default IndexController;
|
||||
17
awx/ui/client/src/credentials/index.js
Normal file
17
awx/ui/client/src/credentials/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import IndexController from './index.controller';
|
||||
|
||||
function routes ($stateProvider) {
|
||||
$stateProvider.state({
|
||||
name: 'credentials',
|
||||
url: '/credentials',
|
||||
templateUrl: '/static/views/credentials/index.view.html',
|
||||
controller: IndexController,
|
||||
controllerAs: 'vm'
|
||||
});
|
||||
}
|
||||
|
||||
routes.$inject = [
|
||||
'$stateProvider'
|
||||
];
|
||||
|
||||
angular.module('at.feature.credentials', []).config(routes);
|
||||
6
awx/ui/client/src/credentials/index.view.html
Normal file
6
awx/ui/client/src/credentials/index.view.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<at-panel>
|
||||
<at-panel-heading config="vm.panel">
|
||||
</at-panel-heading>
|
||||
<at-panel-body>
|
||||
</at-panel-body>
|
||||
</at-panel>
|
||||
@@ -1,61 +0,0 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2016 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
import ownerList from './ownerList.directive';
|
||||
import CredentialsList from './list/credentials-list.controller';
|
||||
import CredentialsAdd from './add/credentials-add.controller';
|
||||
import CredentialsEdit from './edit/credentials-edit.controller';
|
||||
import BecomeMethodChange from './factories/become-method-change.factory';
|
||||
import CredentialFormSave from './factories/credential-form-save.factory';
|
||||
import KindChange from './factories/kind-change.factory';
|
||||
import OwnerChange from './factories/owner-change.factory';
|
||||
import CredentialList from './credentials.list';
|
||||
import CredentialForm from './credentials.form';
|
||||
import { N_ } from '../i18n';
|
||||
|
||||
export default
|
||||
angular.module('credentials', [])
|
||||
.directive('ownerList', ownerList)
|
||||
.factory('BecomeMethodChange', BecomeMethodChange)
|
||||
.factory('CredentialFormSave', CredentialFormSave)
|
||||
.factory('KindChange', KindChange)
|
||||
.factory('OwnerChange', OwnerChange)
|
||||
.controller('CredentialsList', CredentialsList)
|
||||
.controller('CredentialsAdd', CredentialsAdd)
|
||||
.controller('CredentialsEdit', CredentialsEdit)
|
||||
.factory('CredentialList', CredentialList)
|
||||
.factory('CredentialForm', CredentialForm)
|
||||
.config(['$stateProvider', 'stateDefinitionsProvider',
|
||||
function($stateProvider, stateDefinitionsProvider) {
|
||||
let stateDefinitions = stateDefinitionsProvider.$get();
|
||||
|
||||
// lazily generate a tree of substates which will replace this node in ui-router's stateRegistry
|
||||
// see: stateDefinition.factory for usage documentation
|
||||
$stateProvider.state({
|
||||
name: 'credentials',
|
||||
url: '/credentials',
|
||||
lazyLoad: () => stateDefinitions.generateTree({
|
||||
parent: 'credentials',
|
||||
modes: ['add', 'edit'],
|
||||
list: 'CredentialList',
|
||||
form: 'CredentialForm',
|
||||
controllers: {
|
||||
list: CredentialsList,
|
||||
add: CredentialsAdd,
|
||||
edit: CredentialsEdit
|
||||
},
|
||||
data: {
|
||||
activityStream: true,
|
||||
activityStreamTarget: 'credential'
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
parent: 'setup',
|
||||
label: N_('CREDENTIALS')
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
]);
|
||||
Reference in New Issue
Block a user