Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add friendly message for invalid query and 0 results #653

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Conversation

gdubicki
Copy link
Member

@gdubicki gdubicki commented Dec 28, 2021

Add friendly message for invalid query and 0 results

instead of, respectively, showing the raw HTTP 400 without
the specific reason and not showing anything.

Also:
* show the number of results when they are > 0,
* use fixed-width font to query textarea and the error
  message (if there is one), to point to error in the
  the query precisely,
* remove the nonsense "cancel" button, make the "submit"
  look active,

@gdubicki
Copy link
Member Author

gdubicki commented Dec 28, 2021

This is how it looks like:

  • zero results:

Screenshot 2021-12-28 at 19 09 04

  • error in query:

Screenshot 2021-12-28 at 19 11 04

  • normal result:

Screenshot_2021-12-28_at_19_10_54

@gdubicki
Copy link
Member Author

Originally I wanted to finish #429 and this was supposed to be just a warmup, but it turned out to be enough work to release it as a separate PR.

@codecov
Copy link

codecov bot commented Dec 28, 2021

Codecov Report

Merging #653 (c38c15b) into master (4c2f1d9) will increase coverage by 1.70%.
The diff coverage is 90.62%.

❗ Current head c38c15b differs from pull request most recent head 333950f. Consider uploading reports for the commit 333950f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   81.01%   82.72%   +1.70%     
==========================================
  Files          12       12              
  Lines         885      897      +12     
==========================================
+ Hits          717      742      +25     
+ Misses        168      155      -13     
Impacted Files Coverage Δ
puppetboard/app.py 78.25% <86.95%> (+2.43%) ⬆️
puppetboard/utils.py 93.87% <100.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c2f1d9...333950f. Read the comment docs.

@gdubicki gdubicki force-pushed the query_to_csv branch 2 times, most recently from c38c15b to ba675db Compare December 29, 2021 13:56
instead of, respectively, showing the raw HTTP 400 without
the specific reason and not showing anything.

Also:
* show the number of results when they are > 0,
* use fixed-width font to query textarea and the error
  message (if there is one), to point to error in the
  the query precisely,
* remove the nonsense "cancel" button, make the "submit"
  look active,
@gdubicki gdubicki merged commit c51198c into master Jan 6, 2022
@gdubicki gdubicki deleted the query_to_csv branch January 6, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants