mirror of
https://github.com/ansible/awx.git
synced 2026-04-11 13:09:21 -02:30
changed azure labels and added them into inventory groups modal window
This commit is contained in:
@@ -396,6 +396,10 @@ function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $routePa
|
|||||||
case 'gce':
|
case 'gce':
|
||||||
$scope.email_address = data.username;
|
$scope.email_address = data.username;
|
||||||
$scope.project = data.project;
|
$scope.project = data.project;
|
||||||
|
break;
|
||||||
|
case 'azure':
|
||||||
|
$scope.subscription_id = data.username;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.$emit('credentialLoaded');
|
$scope.$emit('credentialLoaded');
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ angular.module('CredentialFormDefinition', [])
|
|||||||
labelBind: 'usernameLabel',
|
labelBind: 'usernameLabel',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
ngShow: "kind.value && kind.value !== 'aws' && " +
|
ngShow: "kind.value && kind.value !== 'aws' && " +
|
||||||
"kind.value !== 'gce'",
|
"kind.value !== 'gce' && kind.value!=='azure'",
|
||||||
awRequiredWhen: {
|
awRequiredWhen: {
|
||||||
variable: 'aws_required',
|
variable: 'aws_required',
|
||||||
init: false
|
init: false
|
||||||
@@ -155,6 +155,18 @@ angular.module('CredentialFormDefinition', [])
|
|||||||
},
|
},
|
||||||
autocomplete: false
|
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": {
|
"api_key": {
|
||||||
label: 'API Key',
|
label: 'API Key',
|
||||||
type: 'password',
|
type: 'password',
|
||||||
@@ -289,6 +301,7 @@ angular.module('CredentialFormDefinition', [])
|
|||||||
editRequired: false,
|
editRequired: false,
|
||||||
autocomplete: false
|
autocomplete: false
|
||||||
},
|
},
|
||||||
|
|
||||||
"vault_password": {
|
"vault_password": {
|
||||||
label: "Vault Password",
|
label: "Vault Password",
|
||||||
type: 'password',
|
type: 'password',
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ angular.module('SourceFormDefinition', [])
|
|||||||
cancelButton: false,
|
cancelButton: false,
|
||||||
name: 'source',
|
name: 'source',
|
||||||
well: false,
|
well: false,
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
source: {
|
source: {
|
||||||
label: 'Source',
|
label: 'Source',
|
||||||
@@ -47,7 +47,7 @@ angular.module('SourceFormDefinition', [])
|
|||||||
source_regions: {
|
source_regions: {
|
||||||
label: 'Regions',
|
label: 'Regions',
|
||||||
type: 'text',
|
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,
|
addRequired: false,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
awMultiselect: 'source_region_choices',
|
awMultiselect: 'source_region_choices',
|
||||||
@@ -150,7 +150,7 @@ angular.module('SourceFormDefinition', [])
|
|||||||
},
|
},
|
||||||
|
|
||||||
buttons: {
|
buttons: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
related: { }
|
related: { }
|
||||||
|
|||||||
@@ -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.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.key_required = false; // JT -- doing the same for key and project
|
||||||
scope.project_required = false;
|
scope.project_required = false;
|
||||||
|
scope.subscription_required = false;
|
||||||
|
|
||||||
if (!Empty(scope.kind)) {
|
if (!Empty(scope.kind)) {
|
||||||
// Apply kind specific settings
|
// Apply kind specific settings
|
||||||
@@ -51,6 +52,12 @@ angular.module('CredentialsHelper', ['Utilities'])
|
|||||||
scope.key_required = true;
|
scope.key_required = true;
|
||||||
scope.project_required = true;
|
scope.project_required = true;
|
||||||
break;
|
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':
|
case 'gce':
|
||||||
data.username = scope.email_address;
|
data.username = scope.email_address;
|
||||||
data.project = scope.project;
|
data.project = scope.project;
|
||||||
|
break;
|
||||||
|
case 'azure':
|
||||||
|
data.username = scope.subscription_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Empty(data.team) && Empty(data.user)) {
|
if (Empty(data.team) && Empty(data.user)) {
|
||||||
|
|||||||
@@ -243,9 +243,17 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
|||||||
text: 'All'
|
text: 'All'
|
||||||
}]);
|
}]);
|
||||||
$('#source_form').addClass('squeeze');
|
$('#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') {
|
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' : 'aws';
|
kind = (scope.source.value === 'rax') ? 'rax' : (scope.source.value==='gce') ? 'gce' : (scope.source.value==='azure') ? 'azure' : 'aws';
|
||||||
url = GetBasePath('credentials') + '?cloud=true&kind=' + kind;
|
url = GetBasePath('credentials') + '?cloud=true&kind=' + kind;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
url: url,
|
url: url,
|
||||||
@@ -1044,6 +1052,15 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
|||||||
callback: 'choicesReadyGroup'
|
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');
|
Wait('start');
|
||||||
|
|
||||||
if (parent_scope.removeAddTreeRefreshed) {
|
if (parent_scope.removeAddTreeRefreshed) {
|
||||||
|
|||||||
17
config/awx-munin.conf
Normal file
17
config/awx-munin.conf
Normal 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>
|
||||||
Reference in New Issue
Block a user