1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Putting list views and form views on same page

for remaining CRUD pages
This commit is contained in:
Jared Tabor 2016-01-06 12:56:57 -05:00
parent efe62a093a
commit 414a5e2be0
17 changed files with 92 additions and 69 deletions

View File

@ -371,8 +371,8 @@ var tower = angular.module('Tower', [
}
}).
state('jobTemplateAdd', {
url: '/job_templates/add',
state('jobTemplates.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/job_templates.html',
controller: JobTemplatesAdd,
ncyBreadcrumb: {
@ -386,8 +386,8 @@ var tower = angular.module('Tower', [
}
}).
state('jobTemplateEdit', {
url: '/job_templates/:template_id',
state('jobTemplates.edit', {
url: '/:template_id',
templateUrl: urlPrefix + 'partials/job_templates.html',
controller: JobTemplatesEdit,
resolve: {
@ -569,8 +569,8 @@ var tower = angular.module('Tower', [
}
}).
state('organizationsAdd', {
url: '/organization/add',
state('organizations.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/organizations.html',
controller: OrganizationsAdd,
ncyBreadcrumb: {
@ -584,8 +584,8 @@ var tower = angular.module('Tower', [
}
}).
state('organizationEdit', {
url: '/organizations/:organization_id',
state('organizations.edit', {
url: '/:organization_id',
templateUrl: urlPrefix + 'partials/organizations.html',
controller: OrganizationsEdit,
resolve: {
@ -654,8 +654,8 @@ var tower = angular.module('Tower', [
}
}).
state('teamsAdd', {
url: '/teams/add',
state('teams.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/teams.html',
controller: TeamsAdd,
ncyBreadcrumb: {
@ -669,8 +669,8 @@ var tower = angular.module('Tower', [
}
}).
state('teamEdit', {
url: '/teams/:team_id',
state('teams.edit', {
url: '/:team_id',
templateUrl: urlPrefix + 'partials/teams.html',
controller: TeamsEdit,
resolve: {
@ -783,8 +783,8 @@ var tower = angular.module('Tower', [
}
}).
state('credentialAdd', {
url: '/credentials/add',
state('credentials.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/credentials.html',
controller: CredentialsAdd,
ncyBreadcrumb: {
@ -798,8 +798,8 @@ var tower = angular.module('Tower', [
}
}).
state('credentialEdit', {
url: '/credentials/:credential_id',
state('credentials.edit', {
url: '/:credential_id',
templateUrl: urlPrefix + 'partials/credentials.html',
controller: CredentialsEdit,
resolve: {
@ -824,8 +824,8 @@ var tower = angular.module('Tower', [
}
}).
state('userAdd', {
url: '/users/add',
state('users.add', {
url: '/add',
templateUrl: urlPrefix + 'partials/users.html',
controller: UsersAdd,
ncyBreadcrumb: {
@ -839,8 +839,8 @@ var tower = angular.module('Tower', [
}
}).
state('userEdit', {
url: '/users/:user_id',
state('users.edit', {
url: '/:user_id',
templateUrl: urlPrefix + 'partials/users.html',
controller: UsersEdit,
resolve: {

View File

@ -11,9 +11,10 @@
*/
export function CredentialsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, CredentialList,
GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller,
ClearScope, ProcessErrors, GetBasePath, SelectionInit, GetChoices, Wait, Stream) {
export function CredentialsList($scope, $rootScope, $location, $log,
$stateParams, Rest, Alert, CredentialList, GenerateList, Prompt, SearchInit,
PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath,
SelectionInit, GetChoices, Wait, Stream, $state) {
ClearScope();
@ -93,11 +94,11 @@ export function CredentialsList($scope, $rootScope, $location, $log, $stateParam
};
$scope.addCredential = function () {
$location.path($location.path() + '/add');
$state.transitionTo('credentials.add');
};
$scope.editCredential = function (id) {
$location.path($location.path() + '/' + id);
$state.transitionTo('credentials.edit', {credential_id: id});
};
$scope.deleteCredential = function (id, name) {
@ -124,9 +125,11 @@ export function CredentialsList($scope, $rootScope, $location, $log, $stateParam
};
}
CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'CredentialList', 'generateList',
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
'SelectionInit', 'GetChoices', 'Wait', 'Stream'
CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'CredentialList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'GetChoices', 'Wait',
'Stream', '$state'
];

View File

@ -11,9 +11,11 @@
*/
export function JobTemplatesList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, JobTemplateList,
GenerateList, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors,
GetBasePath, JobTemplateForm, CredentialList, LookUpInit, PlaybookRun, Wait, Stream, CreateDialog, $compile) {
export function JobTemplatesList($scope, $rootScope, $location, $log,
$stateParams, Rest, Alert, JobTemplateList, GenerateList, Prompt,
SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors,
GetBasePath, JobTemplateForm, CredentialList, LookUpInit, PlaybookRun,
Wait, Stream, CreateDialog, $compile, $state) {
ClearScope();
@ -63,11 +65,11 @@ export function JobTemplatesList($scope, $rootScope, $location, $log, $statePara
};
$scope.addJobTemplate = function () {
$location.path($location.path() + '/add');
$state.transitionTo('jobTemplates.add');
};
$scope.editJobTemplate = function (id) {
$location.path($location.path() + '/' + id);
$state.transitionTo('jobTemplates.edit', {template_id: id});
};
$scope.deleteJobTemplate = function (id, name) {
@ -235,10 +237,12 @@ export function JobTemplatesList($scope, $rootScope, $location, $log, $statePara
};
}
JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'JobTemplateList',
'generateList', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'JobTemplateForm', 'CredentialList', 'LookUpInit',
'PlaybookRun', 'Wait', 'Stream', 'CreateDialog' , '$compile'
JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'JobTemplateList', 'generateList',
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'JobTemplateForm', 'CredentialList',
'LookUpInit', 'PlaybookRun', 'Wait', 'Stream', 'CreateDialog' , '$compile',
'$state'
];
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm,

View File

@ -11,8 +11,10 @@
*/
export function OrganizationsList($stateParams, $scope, $rootScope, $location, $log, Rest, Alert, Prompt,
GenerateList, OrganizationList, SearchInit, PaginateInit, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) {
export function OrganizationsList($stateParams, $scope, $rootScope, $location,
$log, Rest, Alert, Prompt, GenerateList, OrganizationList, SearchInit,
PaginateInit, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait,
Stream, $state) {
ClearScope();
@ -59,11 +61,11 @@ export function OrganizationsList($stateParams, $scope, $rootScope, $location, $
};
$scope.addOrganization = function () {
$location.path($location.path() + '/add');
$state.transitionTo('organizations.add');
};
$scope.editOrganization = function (id) {
$location.path($location.path() + '/' + id);
$state.transitionTo('organizations.edit', {organization_id: id});
};
$scope.deleteOrganization = function (id, name) {
@ -91,9 +93,11 @@ export function OrganizationsList($stateParams, $scope, $rootScope, $location, $
};
}
OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope', '$location', '$log', 'Rest', 'Alert', 'Prompt',
'generateList', 'OrganizationList', 'SearchInit', 'PaginateInit', 'ClearScope', 'ProcessErrors', 'GetBasePath', 'SelectionInit', 'Wait',
'Stream'
OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope',
'$location', '$log', 'Rest', 'Alert', 'Prompt', 'generateList',
'OrganizationList', 'SearchInit', 'PaginateInit', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'Wait',
'Stream', '$state'
];

View File

@ -11,9 +11,10 @@
*/
export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, TeamList, GenerateList,
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath, SelectionInit, Wait,
Stream) {
export function TeamsList($scope, $rootScope, $location, $log, $stateParams,
Rest, Alert, TeamList, GenerateList, Prompt, SearchInit, PaginateInit,
ReturnToCaller, ClearScope, ProcessErrors, SetTeamListeners, GetBasePath,
SelectionInit, Wait, Stream, $state) {
ClearScope();
@ -68,11 +69,11 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Res
};
$scope.addTeam = function () {
$location.path($location.path() + '/add');
$state.transitionTo('teams.add');
};
$scope.editTeam = function (id) {
$location.path($location.path() + '/' + id);
$state.transitionTo('teams.edit', {team_id: id});
};
$scope.deleteTeam = function (id, name) {
@ -105,9 +106,11 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams, Res
};
}
TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'TeamList', 'generateList',
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
'SetTeamListeners', 'GetBasePath', 'SelectionInit', 'Wait', 'Stream'
TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'TeamList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'SetTeamListeners', 'GetBasePath', 'SelectionInit', 'Wait',
'Stream', '$state'
];

View File

@ -11,8 +11,10 @@
*/
export function UsersList($scope, $rootScope, $location, $log, $stateParams, Rest, Alert, UserList, GenerateList,
Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit, Wait, Stream) {
export function UsersList($scope, $rootScope, $location, $log, $stateParams,
Rest, Alert, UserList, GenerateList, Prompt, SearchInit, PaginateInit,
ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, SelectionInit,
Wait, Stream, $state) {
ClearScope();
@ -60,11 +62,11 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams, Res
};
$scope.addUser = function () {
$location.path($location.path() + '/add');
$state.transitionTo('users.add');
};
$scope.editUser = function (id) {
$location.path($location.path() + '/' + id);
$state.transitionTo('users.edit', {user_id: id});
};
$scope.deleteUser = function (id, name) {
@ -95,9 +97,10 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams, Res
};
}
UsersList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'UserList', 'generateList',
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
'SelectionInit', 'Wait', 'Stream'
UsersList.$inject = ['$scope', '$rootScope', '$location', '$log',
'$stateParams', 'Rest', 'Alert', 'UserList', 'generateList', 'Prompt',
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'Wait', 'Stream', '$state'
];

View File

@ -7,8 +7,8 @@
import {templateUrl} from '../../shared/template-url/template-url.factory';
export default {
name: 'inventoryScriptsAdd',
route: '/inventory_scripts/add',
name: 'inventoryScripts.add',
route: '/add',
templateUrl: templateUrl('inventory-scripts/add/add'),
controller: 'inventoryScriptsAddController',
resolve: {
@ -17,7 +17,7 @@ export default {
}]
},
ncyBreadcrumb: {
parent: 'inventoryScriptsList',
parent: 'inventoryScripts',
label: 'CREATE INVENTORY SCRIPT'
}
};

View File

@ -7,8 +7,8 @@
import {templateUrl} from '../../shared/template-url/template-url.factory';
export default {
name: 'inventoryScriptsEdit',
route: '/inventory_scripts/:inventory_script_id',
name: 'inventoryScripts.edit',
route: '/:inventory_script_id',
templateUrl: templateUrl('inventory-scripts/edit/edit'),
controller: 'inventoryScriptsEditController',
params: {inventory_script: null},

View File

@ -38,7 +38,7 @@ export default
scope.search(list.iterator);
scope.editCustomInv = function(){
$state.transitionTo('inventoryScriptsEdit',{
$state.transitionTo('inventoryScripts.edit',{
inventory_script_id: this.inventory_script.id,
inventory_script: this.inventory_script
});
@ -74,7 +74,7 @@ export default
};
scope.addCustomInv = function(){
$state.transitionTo('inventoryScriptsAdd');
$state.transitionTo('inventoryScripts.add');
};
}

View File

@ -1,3 +1,4 @@
<div class="tab-pane" id="inventory_scripts">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
</div>

View File

@ -7,7 +7,7 @@
import {templateUrl} from '../../shared/template-url/template-url.factory';
export default {
name: 'inventoryScriptsList',
name: 'inventoryScripts',
route: '/inventory_scripts',
templateUrl: templateUrl('inventory-scripts/list/list'),
controller: 'inventoryScriptsListController',

View File

@ -1,3 +1,4 @@
<div class="tab-pane" id="credentials">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
</div>

View File

@ -1,4 +1,5 @@
<div class="tab-pane" id="job_templates">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
<div ng-include="'/static/partials/schedule_dialog.html'"></div>
<div ng-include="'/static/partials/logviewer.html'"></div>
@ -11,4 +12,4 @@
<div class="error survey_error ng-hide" ng-show="copy_form.new_copy_name.$dirty && copy_form.new_copy_name.$error.required">Please enter a name for this job template copy.</div></input>
</form>
</div>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="tab-pane" id="organizations">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
</div>

View File

@ -1,3 +1,4 @@
<div class="tab-pane" id="teams">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
</div>

View File

@ -1,3 +1,4 @@
<div class="tab-pane" id="users">
<div ui-view></div>
<div ng-cloak id="htmlTemplate"></div>
</div>

View File

@ -63,7 +63,7 @@
Manage the cleanup of old job history, activity streams, data marked for deletion, and system tracking info.
</div>
</a>
<a ui-sref="inventoryScriptsList" class="SetupItem SetupItem--aside HoverIcon Media">
<a ui-sref="inventoryScripts" class="SetupItem SetupItem--aside HoverIcon Media">
<i class="HoverIcon-icon HoverIcon-icon--opacity HoverIcon-icon--color Media-figure SetupItem-icon SetupItem-icon--aside ">
<aw-icon name="InventoryScripts"></aw-icon>
</i>