-
-
Notifications
You must be signed in to change notification settings - Fork 630
feat: Implement announcements #1204
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive announcements system that allows displaying important system-wide messages at the top of the status page. The feature includes announcement configuration, timeline-based display with visual type indicators, and automatic refresh functionality.
- Adds announcement configuration support with validation and type-specific styling
- Creates a collapsible timeline UI component with dark mode support
- Integrates announcements into the API endpoint and frontend data flow
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web/static/css/app.css | Updates compiled CSS with new announcement styling classes and animations |
| web/app/src/views/Home.vue | Integrates AnnouncementBanner component and passes announcements prop |
| web/app/src/components/AnnouncementBanner.vue | New Vue component with timeline UI for displaying announcements |
| web/app/src/App.vue | Adds announcement fetching and periodic refresh logic |
| config/config.go | Adds announcements field to Config struct with validation |
| config/announcement/announcement.go | New package defining announcement types and validation logic |
| api/config_test.go | Updates test to match new JSON response format including announcements |
| api/config.go | Modifies config endpoint to include announcements in response |
| api/api.go | Updates ConfigHandler initialization to include config reference |
| README.md | Documents announcements configuration and usage |
Comments suppressed due to low confidence (1)
api/config.go:34
- [nitpick] Using
[]interface{}{}is inconsistent with the typed approach used when announcements exist. Consider using a consistent type like[]*announcement.Announcement{}or define a proper response struct.
response["announcements"] = []interface{}{}
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.22.0` -> `v5.23.1` | --- ### Release Notes <details> <summary>TwiN/gatus (ghcr.io/twin/gatus)</summary> ### [`v5.23.1`](https://github.com/TwiN/gatus/releases/tag/v5.23.1) [Compare Source](TwiN/gatus@v5.23.0...v5.23.1) #### What's Changed - fix(ui): Update endpoints in-place instead of reloading every time by [@​TwiN](https://github.com/TwiN) in TwiN/gatus#1209 - docs: improve `extra-labels` description by [@​salim-b](https://github.com/salim-b) in TwiN/gatus#1208 **Full Changelog**: TwiN/gatus@v5.23.0...v5.23.1 ### [`v5.23.0`](https://github.com/TwiN/gatus/releases/tag/v5.23.0) [Compare Source](TwiN/gatus@v5.22.0...v5.23.0) This is a big one, and for the occasion, I'll highlight the two big changes: - **New UI**: That's right, a brand new modern UI. This was long overdue. I hope you like it. - **Announcements**: Want to update your users/customers about an outage? You can, now.  Thoughts on the UI & announcements? Just like any healthy relationship, communicate with me on [TwiN/gatus#1206](TwiN/gatus#1206) #### What's Changed - feat(ui): New status page UI by [@​TwiN](https://github.com/TwiN) in TwiN/gatus#1198 - feat: Implement announcements by [@​TwiN](https://github.com/TwiN) in TwiN/gatus#1204 - feat(alerting): Support extra labels in email alerts by [@​appleboy](https://github.com/appleboy) in TwiN/gatus#1191 - fix(ui): Replace filter value "nothing" by "none" by [@​TwiN](https://github.com/TwiN) in TwiN/gatus#1202 - docs: tweak `minimum-reminder-interval` description by [@​salim-b](https://github.com/salim-b) in TwiN/gatus#1194 **Full Changelog**: TwiN/gatus@v5.22.0...v5.23.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4zNS4wIiwidXBkYXRlZEluVmVyIjoiNDEuMS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbWFnZSJdfQ==--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/1241 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
Summary
Fixes #1203
Checklist
README.md, if applicable.