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

feat(ui): expose 30d badges and response chart selector for duration #994

Merged
merged 13 commits into from
Feb 11, 2025

Conversation

toredash
Copy link
Contributor

@toredash toredash commented Feb 5, 2025

Summary

This PR will expose the 30d badges in the endpoints details view, it may be confusing to not find it in the details view, as reported here.

Additionally, PR exposes a new dropdown menu in the endpoints details view to allow the user to select a different response time chart period. I'm a little unsure about the styling of it, but the end-result looks like this:
image

I noticed that there was no support for 1h response time chart. I added code for it with an additional test. If you want this present but with a dedicated PR please let me know.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to build it locally and I got this:

VueCompilerError: Invalid end tag.
at <secret>/gatus/web/app/src/views/Details.vue:48:9
46 |            <option value="7d">7 days</option>
47 |            <option value="30d">30 days</option>
48 |          </select>
   |          ^
49 |        </div>
50 |        <img :src="generateResponseTimeChartImageURL(selectedChartDuration)" alt="response time chart" class="mt-6" />

web/app/src/views/Details.vue Outdated Show resolved Hide resolved
@TwiN TwiN added feature New feature or request area/ui Related to the user interface labels Feb 6, 2025
Repository owner deleted a comment from codecov bot Feb 7, 2025
@toredash toredash requested a review from TwiN February 7, 2025 07:29
This reverts commit 517f0ce.
README.md Show resolved Hide resolved
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.91%. Comparing base (9d8928d) to head (e1df1c1).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #994      +/-   ##
==========================================
+ Coverage   75.82%   75.91%   +0.08%     
==========================================
  Files          74       75       +1     
  Lines        6764     6883     +119     
==========================================
+ Hits         5129     5225      +96     
- Misses       1328     1345      +17     
- Partials      307      313       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

api/chart.go Outdated Show resolved Hide resolved
response time is only stored at 1h intervals, having a chart for the past 1h does not make sense.
@toredash toredash requested a review from TwiN February 10, 2025 08:25
Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! Thank you for contributing @toredash!

@TwiN TwiN merged commit 64b4c53 into TwiN:master Feb 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Related to the user interface feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants