diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less index d2b727746a..cfbc0ad460 100644 --- a/awx/ui/client/legacy-styles/forms.less +++ b/awx/ui/client/legacy-styles/forms.less @@ -187,7 +187,7 @@ .Form-formGroup--checkbox{ display: flex; - align-items: flex-end; + margin-top: 10px; } .Form-checkbox--stacked { diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js index 67778ce50f..96099587ef 100644 --- a/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js +++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js @@ -46,7 +46,6 @@ export default function() { script: { label: 'Custom Script', type: 'textarea', - hintText: "Drag and drop an inventory script on the field below", class: 'Form-formGroup--fullWidth', elementClass: 'Form-monospace', addRequired: true, diff --git a/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html b/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html index a48f9de95e..db236894e8 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html +++ b/awx/ui/client/src/job-detail/host-event/host-event-modal.partial.html @@ -12,10 +12,10 @@
- - - - + + + +
@@ -26,9 +26,9 @@
- - + class="btn btn-sm btn-default HostEvent-button">Prev Host + +
diff --git a/awx/ui/client/src/job-detail/host-event/host-event.block.less b/awx/ui/client/src/job-detail/host-event/host-event.block.less index 4df56a4d8c..6edfc450ec 100644 --- a/awx/ui/client/src/job-detail/host-event/host-event.block.less +++ b/awx/ui/client/src/job-detail/host-event/host-event.block.less @@ -2,6 +2,16 @@ @import "awx/ui/client/src/shared/branding/colors.default.less"; @import "awx/ui/client/src/shared/layouts/one-plus-two.less"; +.noselect { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Chrome/Safari/Opera */ + -khtml-user-select: none; /* Konqueror */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + not supported by any browser */ +} + @media screen and (min-width: 768px){ .HostEvent .modal-dialog{ width: 700px; @@ -16,16 +26,42 @@ padding-left: 15px; padding-right: 15px; background-color: @default-link; + border-color: @default-link; &:hover{ background-color: @default-link-hov; + border-color: @default-link-hov; } } .HostEvent-body{ margin-bottom: 10px; } +.HostEvent-tab { + color: @btn-txt; + background-color: @btn-bg; + font-size: 12px; + border: 1px solid @btn-bord; + height: 30px; + border-radius: 5px; + margin-right: 20px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 5px; + padding-top: 5px; + transition: background-color 0.2s; + text-transform: uppercase; + text-align: center; + white-space: nowrap; + .noselect; +} +.HostEvent-tab:hover { + color: @btn-txt; + background-color: @btn-bg-hov; + cursor: pointer; +} .HostEvent-tab--selected{ - background-color: #D7D7D7 !important; - border-color: #D7D7D7 !important; + color: @btn-txt-sel!important; + background-color: @default-icon!important; + border-color: @default-icon!important; } .HostEvent-view--container{ width: 100%; @@ -106,3 +142,6 @@ align-self: flex-end; } } +.HostEvent-button:disabled { + pointer-events: all!important; +} diff --git a/awx/ui/client/src/job-detail/host-events/host-events.block.less b/awx/ui/client/src/job-detail/host-events/host-events.block.less index 7923b24a7b..f41c04d03e 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.block.less +++ b/awx/ui/client/src/job-detail/host-events/host-events.block.less @@ -7,18 +7,20 @@ .HostEvents .modal-footer{ border: 0; margin-top: 0px; - padding-top: 5px; + padding: 0px 20px 20px 20px; } button.HostEvents-close{ width: 70px; - color: #FFFFFF; + color: #FFFFFF!important; text-transform: uppercase; padding-left: 15px; padding-right: 15px; background-color: @default-link; - &:hover{ - background-color: @default-link-hov; - } + border-color: @default-link; + &:hover{ + background-color: @default-link-hov; + border-color: @default-link-hov; + } } .HostEvents-status--ok{ color: @green; diff --git a/awx/ui/client/src/notifications/add/add.controller.js b/awx/ui/client/src/notifications/add/add.controller.js index 2d4d45fc43..148940e8a1 100644 --- a/awx/ui/client/src/notifications/add/add.controller.js +++ b/awx/ui/client/src/notifications/add/add.controller.js @@ -88,8 +88,19 @@ export default $scope.typeChange = function () { for(var fld in form.fields){ if(form.fields[fld] && form.fields[fld].subForm){ - $scope[fld] = null; - $scope.notification_template_form[fld].$setPristine(); + if(form.fields[fld].type === 'checkbox_group' && form.fields[fld].fields) { + // Need to loop across the groups fields to null them out + for(var i=0; i (form.fields[i].ngShow && form.fields[i].ngShow.indexOf(v) > -1)) .map(i => [i, processValue($scope[i], i , form.fields[i])])); + delete params.notification_configuration.checkbox_group; + + for(var j = 0; j < form.fields.checkbox_group.fields.length; j++) { + if(form.fields.checkbox_group.fields[j].ngShow && form.fields.checkbox_group.fields[j].ngShow.indexOf(v) > -1) { + params.notification_configuration[form.fields.checkbox_group.fields[j].name] = Boolean($scope[form.fields.checkbox_group.fields[j].name]); + } + } + Wait('start'); Rest.setUrl(url); Rest.post(params) diff --git a/awx/ui/client/src/notifications/edit/edit.controller.js b/awx/ui/client/src/notifications/edit/edit.controller.js index 4ff9f55bf3..4e0bc35772 100644 --- a/awx/ui/client/src/notifications/edit/edit.controller.js +++ b/awx/ui/client/src/notifications/edit/edit.controller.js @@ -54,25 +54,36 @@ export default master[fld] = data[fld]; } - if(data.notification_configuration[fld]){ - $scope[fld] = data.notification_configuration[fld]; - master[fld] = data.notification_configuration[fld]; - - if(form.fields[fld].type === 'textarea'){ - if (form.fields[fld].name === 'headers') { - $scope[fld] = JSON.stringify($scope[fld], null, 2); - } else { - $scope[fld] = $scope[fld].toString().replace(',' , '\n'); + if(form.fields[fld].type === 'checkbox_group') { + // Loop across the group and put the child data on scope + for(var j=0; j (form.fields[i].ngShow && form.fields[i].ngShow.indexOf(v) > -1)) .map(i => [i, processValue($scope[i], i , form.fields[i])])); + delete params.notification_configuration.checkbox_group; + + for(var j = 0; j < form.fields.checkbox_group.fields.length; j++) { + if(form.fields.checkbox_group.fields[j].ngShow && form.fields.checkbox_group.fields[j].ngShow.indexOf(v) > -1) { + params.notification_configuration[form.fields.checkbox_group.fields[j].name] = Boolean($scope[form.fields.checkbox_group.fields[j].name]); + } + } + Wait('start'); Rest.setUrl(url+ id+'/'); Rest.put(params) diff --git a/awx/ui/client/src/notifications/notificationTemplates.form.js b/awx/ui/client/src/notifications/notificationTemplates.form.js index 942e956153..d748ab96e4 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.form.js +++ b/awx/ui/client/src/notifications/notificationTemplates.form.js @@ -355,19 +355,31 @@ export default function() { ngShow: "notification_type.value == 'irc' ", subForm: 'typeSubForm' }, - use_tls: { - label: 'Use TLS', - type: 'checkbox', - ngShow: "notification_type.value == 'email' ", - subForm: 'typeSubForm' - }, use_ssl: { - labelBind: 'sslLabel', + label: 'SSL Connection', type: 'checkbox', - ngShow: "notification_type.value == 'email' || notification_type.value == 'irc' ", + ngShow: "notification_type.value == 'irc'", subForm: 'typeSubForm' }, - + checkbox_group: { + label: 'Options', + type: 'checkbox_group', + subForm: 'typeSubForm', + ngShow: "notification_type.value == 'email'", + fields: [{ + name: 'use_tls', + label: 'Use TLS', + type: 'checkbox', + ngShow: "notification_type.value == 'email' ", + labelClass: 'checkbox-options stack-inline' + }, { + name: 'use_ssl', + label: 'Use SSL', + type: 'checkbox', + ngShow: "notification_type.value == 'email'", + labelClass: 'checkbox-options stack-inline' + }] + } }, buttons: { //for now always generates