diff --git a/ui/src/main/webapp/components/BaseFormView.jsx b/ui/src/main/webapp/components/BaseFormView.jsx index 84254e800..7b0eeb30d 100644 --- a/ui/src/main/webapp/components/BaseFormView.jsx +++ b/ui/src/main/webapp/components/BaseFormView.jsx @@ -124,6 +124,7 @@ class BaseFormView extends PureComponent { this.currentInput = context.rowData[props.serviceName][props.stanzaName]; } else if (props.mode === MODE_CONFIG) { this.currentInput = props.currentServiceState; + this.mode_config_title = tab.title; } else { this.currentInput = context.rowData[props.serviceName]; } @@ -592,10 +593,15 @@ class BaseFormView extends PureComponent { if (this.hook && typeof this.hook.onSaveSuccess === 'function') { this.hook.onSaveSuccess(); } - if (this.props.mode === MODE_EDIT || this.props.mode === MODE_CONFIG) { - generateToast(`Updated ${val.name}`, 'success'); + if (this.props.mode === MODE_EDIT) { + generateToast(`Updated "${val.name}"`, 'success'); + } else if (this.props.mode === MODE_CONFIG) { + generateToast( + `Updated "${this.mode_config_title ? this.mode_config_title : val.name}"`, + 'success' + ); } else { - generateToast(`Created ${val.name}`, 'success'); + generateToast(`Created "${val.name}"`, 'success'); } this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ true); }) diff --git a/ui/src/main/webapp/components/ControlWrapper.jsx b/ui/src/main/webapp/components/ControlWrapper.jsx index e79efe3a0..7cf0d3f33 100644 --- a/ui/src/main/webapp/components/ControlWrapper.jsx +++ b/ui/src/main/webapp/components/ControlWrapper.jsx @@ -34,8 +34,14 @@ class ControlWrapper extends React.PureComponent { ? CONTROL_TYPE_MAP[props.entity.type] : null; // Add 'optional' placeholder for optional field + // Note: for oauth field it is possible required is false but the field is actually required + // based on what type of authentication is selected this.options = this.props.entity.options; - if (!this.props.entity.required && !this.options?.placeholder) { + if ( + !this.props.entity.required && + !Object.prototype.hasOwnProperty.call(this.props.entity, 'oauth_field') && + !this.options?.placeholder + ) { this.options = { ...this.options, placeholder: 'optional', diff --git a/ui/src/main/webapp/components/DeleteModal.jsx b/ui/src/main/webapp/components/DeleteModal.jsx index 7855ce5d9..0b757b13c 100644 --- a/ui/src/main/webapp/components/DeleteModal.jsx +++ b/ui/src/main/webapp/components/DeleteModal.jsx @@ -60,7 +60,7 @@ class DeleteModal extends Component { ); this.setState({ isDeleting: false }); this.handleRequestClose(); - generateToast(`Deleted ${this.props.stanzaName}`, 'success'); + generateToast(`Deleted "${this.props.stanzaName}"`, 'success'); }); } );