From 5f58f500cc2ae58d8f4b8c891e9f0bd6e3dfdd5f Mon Sep 17 00:00:00 2001
From: John Mitchell
Date: Thu, 27 Jul 2017 14:49:09 -0400
Subject: [PATCH] fix color of schedule forms and bugs found in color audit
---
awx/ui/client/legacy-styles/ansible-ui.less | 2 +-
awx/ui/client/legacy-styles/forms.less | 2 +-
.../related/sources/sources.form.js | 40 ++++++++++++++-----
.../smart-inventory/smart-inventory.form.js | 2 +-
.../standard-inventory/inventory.form.js | 2 +-
.../src/organizations/organizations.form.js | 2 +-
.../instance-groups.directive.js | 5 ++-
.../instance-groups.partial.html | 6 ++-
.../date-picker/date-picker.block.less | 9 +++--
.../system-tracking-container.block.less | 1 +
.../job_templates/job-template.form.js | 5 ++-
.../multi-credential.block.less | 8 ++--
.../multi-credential.directive.js | 3 +-
.../multi-credential.partial.html | 11 +++--
.../templates/labels/labelsList.block.less | 1 +
.../shared/question-definition.form.js | 2 +-
16 files changed, 65 insertions(+), 36 deletions(-)
diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less
index bfabb4c7ed..04c245684d 100644
--- a/awx/ui/client/legacy-styles/ansible-ui.less
+++ b/awx/ui/client/legacy-styles/ansible-ui.less
@@ -2145,7 +2145,7 @@ tr td button i {
}
.select2-container--default .select2-selection--single {
- background-color: @field-secondary-bg;
+ background-color: @f2grey;
border: 1px solid @d7grey;
border-radius: 4px;
}
diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less
index fdde7e18a4..67932c9d95 100644
--- a/awx/ui/client/legacy-styles/forms.less
+++ b/awx/ui/client/legacy-styles/forms.less
@@ -678,7 +678,7 @@ input[type='radio']:checked:before {
height: inherit;
min-height: 30px;
max-height: 120px;
- overflow-y: scroll;
+ overflow-y: hidden;
}
.Form-variableHeightButtonGroup {
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 b25d3a2860..302dd8135e 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
@@ -43,6 +43,9 @@ return {
activeEditState: 'inventories.edit.inventory_sources.edit',
detailsClick: "$state.go('inventories.edit.inventory_sources.edit')",
well: false,
+ subFormTitles: {
+ sourceSubForm: i18n._('Source Details'),
+ },
fields: {
name: {
label: i18n._('Name'),
@@ -64,7 +67,8 @@ return {
ngOptions: 'source.label for source in source_type_options track by source.value',
ngChange: 'sourceChange(source)',
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
- ngModel: 'source'
+ ngModel: 'source',
+ hasSubForm: true
},
credential: {
label: i18n._('Credential'),
@@ -79,6 +83,7 @@ return {
reqExpression: "cloudCredentialRequired",
init: "false"
},
+ subForm: 'sourceSubForm',
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
watchBasePath: "credentialBasePath"
},
@@ -98,7 +103,8 @@ return {
init: "false"
},
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
- watchBasePath: "projectBasePath"
+ watchBasePath: "projectBasePath",
+ subForm: 'sourceSubForm'
},
inventory_file: {
label: i18n._('Inventory File'),
@@ -116,7 +122,8 @@ return {
dataTitle: i18n._('Inventory File'),
dataPlacement: 'right',
dataContainer: "body",
- includeInventoryFileNotFoundError: true
+ includeInventoryFileNotFoundError: true,
+ subForm: 'sourceSubForm'
},
source_regions: {
label: i18n._('Regions'),
@@ -129,7 +136,8 @@ return {
awPopOver: "" + i18n._("Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose") +
"" + i18n._("All") + " " + i18n._("to include all regions. Only Hosts associated with the selected regions will be updated.") + "
",
dataContainer: 'body',
- ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
+ ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
+ subForm: 'sourceSubForm'
},
instance_filters: {
label: i18n._('Instance Filters'),
@@ -140,7 +148,8 @@ return {
awPopOverWatch: 'instanceFilterPopOver',
awPopOver: '{{ instanceFilterPopOver }}',
dataContainer: 'body',
- ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
+ ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
+ subForm: 'sourceSubForm'
},
group_by: {
label: i18n._('Only Group By'),
@@ -153,7 +162,8 @@ return {
awPopOverWatch: 'groupByPopOver',
awPopOver: '{{ groupByPopOver }}',
dataContainer: 'body',
- ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
+ ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
+ subForm: 'sourceSubForm'
},
inventory_script: {
label : i18n._("Custom Inventory Script"),
@@ -168,6 +178,7 @@ return {
init: "false"
},
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
+ subForm: 'sourceSubForm'
},
custom_variables: {
id: 'custom_variables',
@@ -188,7 +199,8 @@ return {
"---
somevar: somevalue
password: magic
\n" +
'View JSON examples at www.json.org
' +
'View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
+ dataContainer: 'body',
+ subForm: 'sourceSubForm'
},
ec2_variables: {
id: 'ec2_variables',
@@ -211,7 +223,8 @@ return {
"---
somevar: somevalue
password: magic
\n" +
'View JSON examples at www.json.org
' +
'View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
+ dataContainer: 'body',
+ subForm: 'sourceSubForm'
},
vmware_variables: {
id: 'vmware_variables',
@@ -234,7 +247,8 @@ return {
"---
somevar: somevalue
password: magic
\n" +
'View JSON examples at www.json.org
' +
'View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
+ dataContainer: 'body',
+ subForm: 'sourceSubForm'
},
openstack_variables: {
id: 'openstack_variables',
@@ -257,7 +271,8 @@ return {
"---
somevar: somevalue
password: magic
\n" +
'View JSON examples at www.json.org
' +
'View YAML examples at docs.ansible.com
',
- dataContainer: 'body'
+ dataContainer: 'body',
+ subForm: 'sourceSubForm'
},
verbosity: {
label: i18n._('Verbosity'),
@@ -271,12 +286,14 @@ return {
dataPlacement: 'right',
dataContainer: "body",
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)',
+ subForm: 'sourceSubForm'
},
checkbox_group: {
label: i18n._('Update Options'),
type: 'checkbox_group',
ngShow: "source && (source.value !== '' && source.value !== null)",
class: 'Form-checkbox--stacked',
+ subForm: 'sourceSubForm',
fields: [{
name: 'overwrite',
label: i18n._('Overwrite'),
@@ -345,7 +362,8 @@ return {
'and a new inventory sync will be performed.
',
dataTitle: i18n._('Cache Timeout'),
dataPlacement: 'right',
- dataContainer: "body"
+ dataContainer: "body",
+ subForm: 'sourceSubForm'
}
},
diff --git a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js
index 07cf7db25c..494cb00cd6 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/smart-inventory.form.js
@@ -78,7 +78,7 @@ export default ['i18n', 'InventoryCompletedJobsList', function(i18n, InventoryCo
dataTitle: i18n._('Instance Groups'),
dataPlacement: 'right',
dataContainer: 'body',
- control: '',
+ control: '',
},
smartinventory_variables: {
label: i18n._('Variables'),
diff --git a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js
index 0be972390c..c5eaf5c73f 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/standard-inventory/inventory.form.js
@@ -86,7 +86,7 @@ function(i18n, InventoryCompletedJobsList) {
dataTitle: i18n._('Instance Groups'),
dataPlacement: 'right',
dataContainer: 'body',
- control: '',
+ control: '',
},
inventory_variables: {
realName: 'variables',
diff --git a/awx/ui/client/src/organizations/organizations.form.js b/awx/ui/client/src/organizations/organizations.form.js
index 42bda9b716..2a79118d70 100644
--- a/awx/ui/client/src/organizations/organizations.form.js
+++ b/awx/ui/client/src/organizations/organizations.form.js
@@ -41,7 +41,7 @@ export default ['NotificationsList', 'i18n',
dataTitle: i18n._('Instance Groups'),
dataContainer: 'body',
dataPlacement: 'right',
- control: '',
+ control: '',
}
},
diff --git a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.directive.js b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.directive.js
index 2a0277c45e..cdb781b1d9 100644
--- a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.directive.js
+++ b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.directive.js
@@ -3,7 +3,8 @@ export default ['templateUrl', '$compile',
function(templateUrl, $compile) {
return {
scope: {
- instanceGroups: '='
+ instanceGroups: '=',
+ fieldIsDisabled: '='
},
restrict: 'E',
templateUrl: templateUrl('shared/instance-groups-multiselect/instance-groups'),
@@ -15,4 +16,4 @@ export default ['templateUrl', '$compile',
}
};
}
-];
\ No newline at end of file
+];
diff --git a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.partial.html b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.partial.html
index 46eaf47b8c..bb237b77c1 100644
--- a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.partial.html
+++ b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups.partial.html
@@ -1,10 +1,12 @@