From e6631d1516b0e06e404f0df963a950fdeb685546 Mon Sep 17 00:00:00 2001
From: mabashian
Date: Thu, 14 Sep 2017 09:58:53 -0400
Subject: [PATCH 1/2] Removed UI references to deprecated Azure inv source and
cred
Signed-off-by: mabashian
---
awx/ui/client/src/credentials/credentials.form.js | 6 +++---
.../credentials/factories/become-method-change.factory.js | 6 ------
.../client/src/credentials/factories/kind-change.factory.js | 6 ------
.../inventories/related/sources/sources.form.js | 2 +-
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/awx/ui/client/src/credentials/credentials.form.js b/awx/ui/client/src/credentials/credentials.form.js
index b6b3e7f905..088dbd7737 100644
--- a/awx/ui/client/src/credentials/credentials.form.js
+++ b/awx/ui/client/src/credentials/credentials.form.js
@@ -150,7 +150,7 @@ export default ['i18n', function(i18n) {
"subscription": {
label: i18n._("Subscription ID"),
type: 'text',
- ngShow: "kind.value == 'azure' || kind.value == 'azure_rm'",
+ ngShow: "kind.value == 'azure_rm'",
awRequiredWhen: {
reqExpression: 'subscription_required',
init: false
@@ -169,7 +169,7 @@ export default ['i18n', function(i18n) {
labelBind: 'usernameLabel',
type: 'text',
ngShow: "kind.value && kind.value !== 'aws' && " +
- "kind.value !== 'gce' && kind.value!=='azure'",
+ "kind.value !== 'gce'",
awRequiredWhen: {
reqExpression: 'username_required',
init: false
@@ -241,7 +241,7 @@ export default ['i18n', function(i18n) {
labelBind: 'sshKeyDataLabel',
type: 'textarea',
ngShow: "kind.value == 'ssh' || kind.value == 'scm' || " +
- "kind.value == 'gce' || kind.value == 'azure' || kind.value == 'net'",
+ "kind.value == 'gce' || kind.value == 'net'",
awRequiredWhen: {
reqExpression: 'key_required',
init: true
diff --git a/awx/ui/client/src/credentials/factories/become-method-change.factory.js b/awx/ui/client/src/credentials/factories/become-method-change.factory.js
index 2d85acaf35..6f702be0e3 100644
--- a/awx/ui/client/src/credentials/factories/become-method-change.factory.js
+++ b/awx/ui/client/src/credentials/factories/become-method-change.factory.js
@@ -34,12 +34,6 @@ export default
"two words followed by a three digit number. Such " +
"as: ") + "
adjective-noun-000
";
break;
- case 'azure':
- scope.sshKeyDataLabel = i18n._('Management Certificate');
- scope.subscription_required = true;
- scope.key_required = true;
- scope.key_description = i18n._("Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Microsoft Azure console.");
- break;
case 'azure_rm':
scope.usernameLabel = i18n._("Username");
scope.subscription_required = true;
diff --git a/awx/ui/client/src/credentials/factories/kind-change.factory.js b/awx/ui/client/src/credentials/factories/kind-change.factory.js
index 7232d8a188..c9fc1d2d4f 100644
--- a/awx/ui/client/src/credentials/factories/kind-change.factory.js
+++ b/awx/ui/client/src/credentials/factories/kind-change.factory.js
@@ -91,12 +91,6 @@ export default
"two words followed by a three digit number. Such " +
"as: ") + "adjective-noun-000
";
break;
- case 'azure':
- scope.sshKeyDataLabel = i18n._('Management Certificate');
- scope.subscription_required = true;
- scope.key_required = true;
- scope.key_description = i18n._("Paste the contents of the PEM file that corresponds to the certificate you uploaded in the Microsoft Azure console.");
- break;
case 'azure_rm':
scope.usernameLabel = i18n._("Username");
scope.subscription_required = true;
diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
index 406f169e7c..1832da7288 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
@@ -132,7 +132,7 @@ return {
type: 'select',
ngOptions: 'source.label for source in source_region_choices track by source.value',
multiSelect: true,
- ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure' || source.value == 'azure_rm')",
+ ngShow: "source && (source.value == 'rax' || source.value == 'ec2' || source.value == 'gce' || source.value == 'azure_rm')",
dataTitle: i18n._('Source Regions'),
dataPlacement: 'right',
awPopOver: "" + i18n._("Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose") +
From c63c5230897d1b060769df16b188a44eb43df974 Mon Sep 17 00:00:00 2001
From: mabashian
Date: Fri, 15 Sep 2017 13:33:24 -0400
Subject: [PATCH 2/2] Pull azure regions from azure_rm_region_choices not
azure_region_choices
Signed-off-by: mabashian
---
.../inventories/related/sources/add/sources-add.controller.js | 2 +-
.../inventories/related/sources/edit/sources-edit.controller.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js
index 4b0fc3369f..248ecbff60 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js
@@ -251,7 +251,7 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
scope: $scope,
field: 'source_regions',
variable: 'azure_regions',
- choice_name: 'azure_region_choices',
+ choice_name: 'azure_rm_region_choices',
options: inventorySourcesOptions
});
diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
index 9cf465364c..4728e2747a 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
@@ -218,7 +218,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
scope: $scope,
field: 'source_regions',
variable: 'azure_regions',
- choice_name: 'azure_region_choices',
+ choice_name: 'azure_rm_region_choices',
options: inventorySourcesOptions
});
GetChoices({