oncall-engine/engine/apps/api/views
Joey Orlando d568ad6707
few add responders patches (#3220)
# Which issue(s) this PR fixes

Closes https://github.com/grafana/support-escalations/issues/8143

Fix a few minor issues introduced in #3128:

- Fix slow `GET /users` internal API endpoint related to [this
change](https://github.com/grafana/oncall/blob/dev/engine/apps/api/views/user.py#L239)
- Fix slow `GET /teams` internal API endpoint. Introduced a `short`
query parameter that only invokes
`apps.schedules.ical_utils.get_oncall_users_for_multiple_schedules` when
`short=false`.
- Order results from `GET /teams` internal API endpoint by name
(ascending)
- Fix search issue when searching for teams in the add responders popup
window (this was strictly a frontend issue)
- CSS changes to add responders dropdown to fix lonnnggg results list:
  **Before**
<img width="377" alt="Screenshot 2023-10-31 at 10 06 20"
src="https://github.com/grafana/oncall/assets/9406895/246c7c3b-7bea-44a1-afec-a38144c2c2d1">
  **After**
<img width="444" alt="Screenshot 2023-10-31 at 10 48 12"
src="https://github.com/grafana/oncall/assets/9406895/b5602a22-c691-4dc7-bd3d-e4d6b76d04a0">



## Still todo

The `apps.schedules.ical_utils.get_oncall_users_for_multiple_schedules`
method is still very slow when an instance has a lot of users (ex.
`ops`). Ideally we should refactor this method to be more efficient
because we still need to call this method under some circumstances. Ex.
to populate this dropdown when Direct Paging a user (note that it didn't
finish loading here on `ops`):
<img width="1037" alt="Screenshot 2023-10-30 at 18 14 59"
src="https://github.com/grafana/oncall/assets/9406895/9d91a57c-5db8-4ff9-862a-cd3755f52690">



## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-10-31 11:18:33 -04:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group.py Resolution note source mobile app (#3174) 2023-10-20 15:22:45 +01:00
alert_receive_channel.py Add labels implementation for integration (#3014) 2023-10-20 07:30:11 +00:00
alert_receive_channel_template.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
alerts.py Add alert detail view (#385) 2022-08-19 14:03:07 +05:00
auth.py Reworked slack login pipeline errors (#2526) 2023-07-18 13:31:11 +00:00
channel_filter.py Fix duplicate orders on routes and escalation policies (#2568) 2023-07-18 17:17:53 +00:00
custom_button.py Fix MultipleObjectsReturned error on webhook endpoints (#1996) 2023-05-23 16:23:06 +00:00
escalation_chain.py Add mobile app auth on integration & escalation chain endpoints (#3056) 2023-09-26 16:31:26 +01:00
escalation_policy.py remove two unused feature flags (#2734) 2023-08-02 14:07:47 -04:00
features.py Add labels implementation for integration (#3014) 2023-10-20 07:30:11 +00:00
integration_heartbeat.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
labels.py Permissions for labels (#3173) 2023-10-23 11:03:51 +00:00
live_setting.py Fix Telegram ratelimit on live setting change (#2100) 2023-06-06 15:18:12 +00:00
on_call_shifts.py Update insight logs for shift swaps requests (#2987) 2023-09-07 11:49:33 +00:00
organization.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
paging.py Add responders improvements (#3128) 2023-10-27 12:12:07 -04:00
preview_template_options.py Fix of templates api behaviour for public and private api (#1408) 2023-03-01 16:32:15 +08:00
public_api_tokens.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
resolution_note.py Add mobile app auth on integration & escalation chain endpoints (#3056) 2023-09-26 16:31:26 +01:00
route_regex_debugger.py remove references to AlertGroup.is_archived and AlertGroup.unarchived_objects (#2524) 2023-07-18 11:48:34 +00:00
schedule.py Fix iCal imported schedules related users and next shifts per user (#3178) 2023-10-23 22:15:02 +00:00
shift_swap.py Notify user when their shift swap request is taken (#2992) 2023-09-07 14:59:54 +00:00
slack_channel.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
slack_team_settings.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
team.py few add responders patches (#3220) 2023-10-31 11:18:33 -04:00
telegram_channels.py apps.get_model -> import (#2619) 2023-07-25 09:43:23 +00:00
user.py few add responders patches (#3220) 2023-10-31 11:18:33 -04:00
user_group.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
user_notification_policy.py WIP: Direct paging improvements (#3064) 2023-09-28 03:57:49 +00:00
webhooks.py Add webhook presets (#2996) 2023-09-27 07:22:52 -06:00