1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

fix color of schedule forms and bugs found in color audit

This commit is contained in:
John Mitchell 2017-07-27 14:49:09 -04:00
parent 53700c10b9
commit 5f58f500cc
16 changed files with 65 additions and 36 deletions

View File

@ -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;
}

View File

@ -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 {

View File

@ -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: "<p>" + i18n._("Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose") +
"<em>" + i18n._("All") + "</em> " + i18n._("to include all regions. Only Hosts associated with the selected regions will be updated.") + "</p>",
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 {
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
dataContainer: 'body'
dataContainer: 'body',
subForm: 'sourceSubForm'
},
ec2_variables: {
id: 'ec2_variables',
@ -211,7 +223,8 @@ return {
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
dataContainer: 'body'
dataContainer: 'body',
subForm: 'sourceSubForm'
},
vmware_variables: {
id: 'vmware_variables',
@ -234,7 +247,8 @@ return {
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
dataContainer: 'body'
dataContainer: 'body',
subForm: 'sourceSubForm'
},
openstack_variables: {
id: 'openstack_variables',
@ -257,7 +271,8 @@ return {
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
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.</p>',
dataTitle: i18n._('Cache Timeout'),
dataPlacement: 'right',
dataContainer: "body"
dataContainer: "body",
subForm: 'sourceSubForm'
}
},

View File

@ -78,7 +78,7 @@ export default ['i18n', 'InventoryCompletedJobsList', function(i18n, InventoryCo
dataTitle: i18n._('Instance Groups'),
dataPlacement: 'right',
dataContainer: 'body',
control: '<instance-groups-multiselect instance-groups="instance_groups"></instance-groups-multiselect>',
control: '<instance-groups-multiselect instance-groups="instance_groups" field-is-disabled="!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)"></instance-groups-multiselect>',
},
smartinventory_variables: {
label: i18n._('Variables'),

View File

@ -86,7 +86,7 @@ function(i18n, InventoryCompletedJobsList) {
dataTitle: i18n._('Instance Groups'),
dataPlacement: 'right',
dataContainer: 'body',
control: '<instance-groups-multiselect instance-groups="instance_groups"></instance-groups-multiselect>',
control: '<instance-groups-multiselect instance-groups="instance_groups" field-is-disabled="!(inventory_obj.summary_fields.user_capabilities.edit || canAdd)"></instance-groups-multiselect>',
},
inventory_variables: {
realName: 'variables',

View File

@ -41,7 +41,7 @@ export default ['NotificationsList', 'i18n',
dataTitle: i18n._('Instance Groups'),
dataContainer: 'body',
dataPlacement: 'right',
control: '<instance-groups-multiselect instance-groups="instance_groups"></instance-groups-multiselect>',
control: '<instance-groups-multiselect instance-groups="instance_groups" field-is-disabled="!(organization_obj.summary_fields.user_capabilities.edit || canAdd)"></instance-groups-multiselect>',
}
},

View File

@ -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'),

View File

@ -1,10 +1,12 @@
<div class="input-group Form-mixedInputGroup">
<span class="input-group-btn">
<button type="button" class="Form-lookupButton btn btn-default" ng-click="openInstanceGroupsModal()">
<button type="button" class="Form-lookupButton btn btn-default" ng-click="openInstanceGroupsModal()"
ng-disabled="fieldIsDisabled">
<i class="fa fa-search"></i>
</button>
</span>
<span id="InstanceGroups" class="form-control Form-textInput Form-textInput--variableHeight input-medium lookup LabelList-lookupTags">
<span id="InstanceGroups" class="form-control Form-textInput Form-textInput--variableHeight input-medium lookup LabelList-lookupTags"
ng-disabled="fieldIsDisabled">
<div class="LabelList-tagContainer" ng-repeat="tag in instanceGroupsTags">
<div class="LabelList-deleteContainer"
ng-click="deleteTag(tag)">

View File

@ -7,25 +7,26 @@
padding: 6px 12px;
font-size: 14px;
border-radius: 4px 0 0 4px;
border: 1px solid #ccc;
border: 1px solid @b7grey;
border-right: 0;
background-color: @default-bg;
}
&-icon:hover {
background-color: @default-border;
background-color: @f6grey;
}
&-icon:focus,
&-icon:active {
background-color: #ccc;
background-color: @f6grey;
}
&-input {
flex: 1 0 auto;
border-radius: 0 4px 4px 0;
border: 1px solid #ccc;
border: 1px solid @b7grey;
padding: 6px 12px;
background-color: @f2grey;
}
&-input:focus,

View File

@ -18,6 +18,7 @@
.DatePicker-input {
width: 100%;
flex: none;
background: @f2grey;
}
.DatePicker-icon {

View File

@ -135,7 +135,8 @@ function(NotificationsList, CompletedJobsList, i18n) {
prompt="ask_credential_on_launch"
selected-credentials="selectedCredentials"
credential-not-present="credentialNotPresent"
credentials-to-post="credentialsToPost">
credentials-to-post="credentialsToPost"
field-is-disabled="!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)">
</multi-credential>`,
required: true,
awPopOver: "<p>" + i18n._("Select credentials that allow {{BRAND_NAME}} to access the nodes this job will be ran against. You can only select one credential of each type.<br /><br />You must select either a machine (SSH) credential or \"Prompt on launch\". \"Prompt on launch\" requires you to select a machine credential at run time.<br /><br />If you select credentials AND check the \"Prompt on launch\" box, you make the selected credentials the defaults that can be updated at run time.") + "</p>",
@ -208,7 +209,7 @@ function(NotificationsList, CompletedJobsList, i18n) {
dataTitle: i18n._('Instance Groups'),
dataContainer: 'body',
dataPlacement: 'right',
control: '<instance-groups-multiselect instance-groups="instance_groups"></instance-groups-multiselect>',
control: '<instance-groups-multiselect instance-groups="instance_groups" field-is-disabled="!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)"></instance-groups-multiselect>',
},
job_tags: {
label: i18n._('Job Tags'),

View File

@ -41,13 +41,14 @@
padding: 2px 10px;
margin: 4px 0px;
font-size: 12px;
color: @default-interface-txt;
background-color: @default-bg;
margin-right: 10px;
max-width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
background-color: @default-link;
color: @default-bg;
padding-left: 15px;
}
.MultiCredential-tag--deletable {
@ -56,9 +57,8 @@
border-bottom-left-radius: 0px;
border-right: 0;
max-width: ~"calc(100% - 23px)";
background-color: @default-link;
color: @default-bg;
margin-right: 10px;
padding-left: 10px;
}
.MultiCredential-deleteContainer {

View File

@ -12,7 +12,8 @@ export default ['templateUrl', '$compile',
selectedCredentials: '=',
prompt: '=',
credentialNotPresent: '=',
credentialsToPost: '='
credentialsToPost: '=',
fieldIsDisabled: '='
},
restrict: 'E',
templateUrl: templateUrl('templates/job_templates/multi-credential/multi-credential'),

View File

@ -3,7 +3,8 @@
<button type="button"
class="Form-lookupButton
Form-lookupButton--variableHeight btn btn-default"
ng-click="openMultiCredentialModal()">
ng-click="openMultiCredentialModal()"
ng-disabled="fieldIsDisabled">
<i class="fa fa-search"></i>
</button>
</span>
@ -13,6 +14,7 @@
'ng-invalid': credentialNotPresent,
'ng-dirty': fieldDirty
}"
ng-disabled="fieldIsDisabled"
style="padding: 4px 6px;">
<div class="MultiCredential-tags">
<div class="MultiCredential-tagSection">
@ -20,12 +22,13 @@
<div class="MultiCredential-tagContainer ng-scope"
ng-repeat="tag in credentialsToPost track by $index">
<div class="MultiCredential-deleteContainer"
ng-click="removeCredential(tag.id)">
ng-click="removeCredential(tag.id)"
ng-hide="fieldIsDisabled">
<i class="fa fa-times MultiCredential-tagDelete">
</i>
</div>
<div class="MultiCredential-tag
MultiCredential-tag--deletable">
<div class="MultiCredential-tag"
ng-class="{!fieldIsDisabled: 'MultiCredential-tag--deletable'}">
<span class="MultiCredential-name--label
ng-binding">
{{ tag.kind }}

View File

@ -88,6 +88,7 @@
.LabelList-lookupTags {
display: flex;
padding: 0 12px;
overflow-y: hidden;
}
.LabelList-lookupTags--disabled {

View File

@ -302,7 +302,7 @@ export default
},
buttons: {
question_cancel : {
label: 'Cancel',
label: 'Clear',
'class' : 'btn btn-default Form-cancelButton',
ngClick: 'generateAddQuestionForm()',
ngDisabled: 'survey_question_form.$pristine'