changed azure labels and added them into inventory groups modal window

This commit is contained in:
Jared Tabor 2014-07-28 17:06:30 -04:00
parent 0f5263c027
commit 504b810418
6 changed files with 67 additions and 6 deletions

View File

@ -396,6 +396,10 @@ function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $routePa
case 'gce':
$scope.email_address = data.username;
$scope.project = data.project;
break;
case 'azure':
$scope.subscription_id = data.username;
}
$scope.$emit('credentialLoaded');

View File

@ -138,7 +138,7 @@ angular.module('CredentialFormDefinition', [])
labelBind: 'usernameLabel',
type: 'text',
ngShow: "kind.value && kind.value !== 'aws' && " +
"kind.value !== 'gce'",
"kind.value !== 'gce' && kind.value!=='azure'",
awRequiredWhen: {
variable: 'aws_required',
init: false
@ -155,6 +155,18 @@ angular.module('CredentialFormDefinition', [])
},
autocomplete: false
},
"subscription_id": {
labelBind: "usernameLabel",
type: 'text',
ngShow: "kind.value == 'azure'",
awRequiredWhen: {
variable: 'subscription_required',
init: false
},
addRequired: false,
editRequired: false,
autocomplete: false
},
"api_key": {
label: 'API Key',
type: 'password',
@ -289,6 +301,7 @@ angular.module('CredentialFormDefinition', [])
editRequired: false,
autocomplete: false
},
"vault_password": {
label: "Vault Password",
type: 'password',

View File

@ -15,7 +15,7 @@ angular.module('SourceFormDefinition', [])
cancelButton: false,
name: 'source',
well: false,
fields: {
source: {
label: 'Source',
@ -47,7 +47,7 @@ angular.module('SourceFormDefinition', [])
source_regions: {
label: 'Regions',
type: 'text',
ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce')",
ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure')",
addRequired: false,
editRequired: false,
awMultiselect: 'source_region_choices',
@ -150,7 +150,7 @@ angular.module('SourceFormDefinition', [])
},
buttons: {
},
related: { }

View File

@ -27,6 +27,7 @@ angular.module('CredentialsHelper', ['Utilities'])
scope.username_required = false; // JT-- added username_required b/c mutliple 'kinds' need username to be required (GCE)
scope.key_required = false; // JT -- doing the same for key and project
scope.project_required = false;
scope.subscription_required = false;
if (!Empty(scope.kind)) {
// Apply kind specific settings
@ -51,6 +52,12 @@ angular.module('CredentialsHelper', ['Utilities'])
scope.key_required = true;
scope.project_required = true;
break;
case 'azure':
scope.usernameLabel = "Subscription ID";
scope.sshKeyDataLabel = 'RSA Private Key';
scope.subscription_required = true;
scope.key_required = true;
break;
}
}
@ -152,6 +159,9 @@ angular.module('CredentialsHelper', ['Utilities'])
case 'gce':
data.username = scope.email_address;
data.project = scope.project;
break;
case 'azure':
data.username = scope.subscription_id;
}
if (Empty(data.team) && Empty(data.user)) {

View File

@ -243,9 +243,17 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
text: 'All'
}]);
$('#source_form').addClass('squeeze');
} else if (scope.source.value === 'azure') {
scope.source_region_choices = scope.azure_regions;
//$('#s2id_group_source_regions').select2('data', []);
$('#s2id_source_source_regions').select2('data', [{
id: 'all',
text: 'All'
}]);
$('#source_form').addClass('squeeze');
}
if (scope.source.value === 'rax' || scope.source.value === 'ec2'|| scope.source.value==='gce') {
kind = (scope.source.value === 'rax') ? 'rax' : (scope.source.value==='gce') ? 'gce' : 'aws';
if (scope.source.value === 'rax' || scope.source.value === 'ec2'|| scope.source.value==='gce' || scope.source.value === 'azure') {
kind = (scope.source.value === 'rax') ? 'rax' : (scope.source.value==='gce') ? 'gce' : (scope.source.value==='azure') ? 'azure' : 'aws';
url = GetBasePath('credentials') + '?cloud=true&kind=' + kind;
LookUpInit({
url: url,
@ -1044,6 +1052,15 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
callback: 'choicesReadyGroup'
});
GetChoices({
scope: sources_scope,
url: GetBasePath('inventory_sources'),
field: 'source_regions',
variable: 'azure_regions',
choice_name: 'azure_region_choices',
callback: 'choicesReadyGroup'
});
Wait('start');
if (parent_scope.removeAddTreeRefreshed) {

17
config/awx-munin.conf Normal file
View File

@ -0,0 +1,17 @@
Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
Order Allow,Deny
Allow from all
Options FollowSymLinks
AuthUserFile /var/lib/awx/.munin_htpasswd
AuthName "Munin"
AuthType Basic
require valid-user
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310
</IfModule>
</Directory>