oncall-engine/engine/apps/api
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
..
serializers Add latest alert to public api alert groups endpoint (#5059) 2024-10-02 17:09:50 +00:00
tests Add declare incident step and model (#5047) 2024-10-02 13:38:33 +00:00
throttlers Add custom ratelimits per org (#5004) 2024-09-17 23:16:41 +00:00
views Add latest alert to public api alert groups endpoint (#5059) 2024-10-02 17:09:50 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group_table_columns.py Google OAuth2 flow + fetch Google Calendar OOO events (#4067) 2024-04-02 14:59:03 -04:00
errors.py Fix backend for resolution notes via mobile app (#2117) 2023-06-07 12:19:16 +00:00
label_filtering.py Webhook labels (#3383) 2023-11-22 11:17:41 +00:00
permissions.py fix: address RBAC Admin issue (#5087) 2024-09-26 12:40:07 -04:00
urls.py add POST /escalation public API endpoint + add public API docs for teams/organization endpoints (#4815) 2024-08-15 18:31:35 +00:00