oncall-engine/engine/common
Ildar Iskhakov 784b7e5344
Add latest alert to public api alert groups endpoint (#5059)
# What this PR does

Added last alert information 
and optimized the API call so it makes 10x less queries by:
* prefetching chatops messages (based on @vadimkerr 's
https://github.com/grafana/oncall/pull/4738)
* using `enrich` from private api

Previously: 
<img width="1102" alt="Screenshot 2024-09-24 at 4 47 00 PM"
src="https://github.com/user-attachments/assets/84edb78e-257a-49cd-bc94-083dd8d043d7">
Now:
<img width="1066" alt="Screenshot 2024-09-24 at 4 44 56 PM"
src="https://github.com/user-attachments/assets/e7dfcc40-dce6-4a0d-9677-910aab2b4f17">



## Which issue(s) this PR closes

Related to [issue link here]

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2024-10-02 17:09:50 +00:00
..
api_helpers Add latest alert to public api alert groups endpoint (#5059) 2024-10-02 17:09:50 +00:00
cloud_auth_api update mobile app proxy's usage of the Cloud Auth API (#4194) 2024-04-11 14:45:21 +00:00
constants Prepare OnCall for Unified Slack App (#4232) 2024-06-03 09:07:10 +00:00
custom_celery_tasks chore: fix some comments (#4055) 2024-03-14 15:36:00 +00:00
exceptions don't force create default user notification policies (#4608) 2024-07-05 15:08:17 -04:00
incident_api Add declare incident step and model (#5047) 2024-10-02 13:38:33 +00:00
insight_log Enable flake8-bugbear, fix issues (#3454) 2023-11-29 15:04:48 +00:00
jinja_templater Add doc references to regex_search jinja filter (#4973) 2024-09-04 17:47:09 +00:00
migrations Add instruction on removing nullable fields from Django models (#2659) 2023-08-08 12:46:18 +00:00
oncall_gateway Prepare OnCall for Unified Slack App (#4232) 2024-06-03 09:07:10 +00:00
ordered_model Update OrderedModel serializer not to save previously updated order (#4706) 2024-07-19 11:56:26 +00:00
recaptcha Add validation of hostname for recapctha (#1445) 2023-03-06 08:59:48 +00:00
tests Add doc references to regex_search jinja filter (#4973) 2024-09-04 17:47:09 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
cache.py bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
database.py Fix Grafana teams sync (#1652) 2023-03-28 18:26:24 +00:00
l10n.py add user locale field to mobile app user settings table + change going on call push notification text (#2131) 2023-06-14 12:19:58 -04:00
public_primary_keys.py Re-enable a few mypy rules + fix existing errors (#2725) 2023-08-03 09:43:03 +00:00
timezones.py shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
utils.py fix: sanitize email HTML templates (#5108) 2024-10-02 15:55:24 +00:00