mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Testing with nested views/states
tested with inventories and projects pages
This commit is contained in:
parent
7a75f6d12a
commit
f9f8083a5c
@ -428,9 +428,9 @@ var tower = angular.module('Tower', [
|
||||
}
|
||||
}).
|
||||
|
||||
state('projectAdd', {
|
||||
url: '/projects/add',
|
||||
templateUrl: urlPrefix + 'partials/projects.html',
|
||||
state('projects.add', {
|
||||
url: '/add',
|
||||
templateUrl: urlPrefix + 'partials/projects.add.html',
|
||||
controller: ProjectsAdd,
|
||||
ncyBreadcrumb: {
|
||||
parent: "projects",
|
||||
@ -443,8 +443,8 @@ var tower = angular.module('Tower', [
|
||||
}
|
||||
}).
|
||||
|
||||
state('projectEdit', {
|
||||
url: '/projects/:id',
|
||||
state('projects.edit', {
|
||||
url: '/:id',
|
||||
templateUrl: urlPrefix + 'partials/projects.html',
|
||||
controller: ProjectsEdit,
|
||||
resolve: {
|
||||
@ -501,8 +501,8 @@ var tower = angular.module('Tower', [
|
||||
}
|
||||
}).
|
||||
|
||||
state('inventoryAdd', {
|
||||
url: '/inventories/add',
|
||||
state('inventories.add', {
|
||||
url: '/add',
|
||||
templateUrl: urlPrefix + 'partials/inventories.html',
|
||||
controller: InventoriesAdd,
|
||||
ncyBreadcrumb: {
|
||||
@ -516,8 +516,8 @@ var tower = angular.module('Tower', [
|
||||
}
|
||||
}).
|
||||
|
||||
state('inventoryEdit', {
|
||||
url: '/inventories/:inventory_id',
|
||||
state('inventories.edit', {
|
||||
url: '/:inventory_id',
|
||||
templateUrl: urlPrefix + 'partials/inventories.html',
|
||||
controller: InventoriesEdit,
|
||||
resolve: {
|
||||
|
||||
@ -317,7 +317,8 @@ export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
};
|
||||
|
||||
$scope.editInventory = function (id) {
|
||||
$location.path($location.path() + '/' + id);
|
||||
// $location.path($location.path() + '/' + id);
|
||||
$state.go('inventories.edit', {inventory_id: id});
|
||||
};
|
||||
|
||||
$scope.manageInventory = function(id){
|
||||
|
||||
@ -11,9 +11,11 @@
|
||||
*/
|
||||
|
||||
|
||||
export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, ProjectUpdate,
|
||||
Refresh, Wait, Stream, GetChoices, Empty, Find, LogViewer, GetProjectIcon, GetProjectToolTip, $filter) {
|
||||
export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit,
|
||||
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath,
|
||||
SelectionInit, ProjectUpdate, Refresh, Wait, Stream, GetChoices, Empty,
|
||||
Find, LogViewer, GetProjectIcon, GetProjectToolTip, $filter, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -197,11 +199,13 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
};
|
||||
|
||||
$scope.addProject = function () {
|
||||
$location.path($location.path() + '/add');
|
||||
// $location.path($location.path() + '/add');
|
||||
$state.transitionTo('projects.add');
|
||||
};
|
||||
|
||||
$scope.editProject = function (id) {
|
||||
$location.path($location.path() + '/' + id);
|
||||
// $location.path($location.path() + '/' + id);
|
||||
$state.transitionTo('projects.edit', {id: id});
|
||||
};
|
||||
|
||||
if ($scope.removeShowLogViewer) {
|
||||
@ -392,7 +396,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList',
|
||||
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'SelectionInit', 'ProjectUpdate', 'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
||||
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter'
|
||||
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state'
|
||||
];
|
||||
|
||||
|
||||
|
||||
1
awx/ui/client/src/partials/projects.add.html
Normal file
1
awx/ui/client/src/partials/projects.add.html
Normal file
@ -0,0 +1 @@
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
@ -1,5 +1,6 @@
|
||||
<div class="tab-pane" id="projects">
|
||||
<div ui-view></div>
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div ng-include="'/static/partials/logviewer.html'"></div>
|
||||
<div ng-include="'/static/partials/schedule_dialog.html'"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user