Add query name validation
MODIFY
app/components/Settings/scheduler/create-modal.jsx
app/components/Settings/scheduler/create-modal.jsx
@@ -104,6 +104,9 @@ class CreateModal extends Component {
if (!this.state.interval) {
return this.setState({error: 'Please select an interval above.'});
}
+ if (this.state.name && this.state.name.trim().length === 0) {
+ return this.setState({error: 'Please enter a valid query name above.'});
+ }
this.setState({saving: true, error: null});
this.props

MODIFY
app/components/Settings/scheduler/preview-modal.jsx
app/components/Settings/scheduler/preview-modal.jsx
@@ -87,6 +87,11 @@ export class PreviewModal extends Component {
if (this.state.editing) {
const {connectionId, fid, requestor, uids, refreshInterval} = this.props.query;
const {code: query, cronInterval, name} = this.state;
+
+ if (this.state.name && this.state.name.trim().length === 0) {
+ return this.setState({error: 'Please enter a valid query name above.'});
+ }
+
this.setState({loading: true, error: null});
this.props
.onSave({

Add query name validation