Latest UI changes. Credential List and Edit working -need to add ask pw option and validation around team vs. user. Lookup dialog is now a generic helper that can be shared by all controllers. Credentials controller is first to use api-loader which reads the \/api and \/api\/v1 to determine base set of urls. And more...

This commit is contained in:
chouseknecht
2013-05-09 23:49:51 -04:00
parent 2cbed11034
commit fdceb46c12
25 changed files with 1218 additions and 65 deletions

View File

@@ -19,7 +19,7 @@ angular.module('ansible', [
'ListGenerator',
'AWToolTip',
'PromptDialog',
'APIDefaults',
'ApiLoader',
'RelatedSearchHelper',
'RelatedPaginateHelper',
'SearchHelper',
@@ -38,7 +38,10 @@ angular.module('ansible', [
'GroupListDefinition',
'TeamsListDefinition',
'TeamFormDefinition',
'TeamHelper'
'TeamHelper',
'CredentialListDefinition',
'CredentialFormDefinition',
'LookUpHelper'
])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.
@@ -98,6 +101,21 @@ angular.module('ansible', [
when('/teams/:id', { templateUrl: urlPrefix + 'partials/teams.html',
controller: TeamsEdit }).
when('/teams/:id/users', { templateUrl: urlPrefix + 'partials/teams.html',
controller: UsersList }).
when('/teams/:organization_id/users/:id', { templateUrl: urlPrefix + 'partials/teams.html',
controller: UsersEdit }).
when('/credentials', { templateUrl: urlPrefix + 'partials/credentials.html',
controller: CredentialsList }).
when('/credentials/add', { templateUrl: urlPrefix + 'partials/credentials.html',
controller: CredentialsAdd }).
when('/credentials/:id', { templateUrl: urlPrefix + 'partials/credentials.html',
controller: CredentialsEdit }).
when('/users', { templateUrl: urlPrefix + 'partials/users.html',
controller: UsersList }).
@@ -114,8 +132,11 @@ angular.module('ansible', [
otherwise({redirectTo: '/'});
}])
.run(function($rootScope, $location, Authorization) {
.run(['$rootScope', '$location', 'Authorization','LoadBasePaths',
function($rootScope, $location, Authorization, LoadBasePaths) {
LoadBasePaths();
$rootScope.breadcrumbs = new Array();
$rootScope.crumbCache = new Array();
@@ -141,11 +162,10 @@ angular.module('ansible', [
// If browser refresh, activate the correct tab
var base = ($location.path().replace(/^\//,'').split('/')[0]);
if (base == '') {
console.log(base);
base = 'organizations';
$location.path('/organizations');
}
else {
$('.nav-tabs a[href="#' + base + '"]').tab('show');
}
});
}]);