marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

Error checking/user feedback to require at least one output field #117

Closed cskeefer closed 6 years ago

cskeefer commented 6 years ago

This change makes makes it a requirement to include at least one output field when creating a query or a view. For a query, this means selecting the option of 'Both' or 'Results Only' for at least one field. For a view, this means selecting the option 'Yes' for at least one field. If a user doesn't not select at least one output field, an error is displayed at the top of the field list (and the browser scrolls to make the error visible).

Note: Previously the Save button would become enabled when the users had filled out the required params and included at least one field (didn't take into account if it was an output field or not). Now the Save button is enabled once the other required fields are populated (query name, type and database)

cskeefer commented 6 years ago

Looks way more complicated than it should. Tried to rebase with master because there was a conflict so it included all changes from when I first started this until now. Can see my changes if you look at the last commits that are from today (25 May).

To test, try to add a query with only search fields (none with value of both or results only). Should get an error message. Also try to add a view with no fields marked yes.