oncall-engine/engine/apps/api/views
Vadim Stepanov a936c8c7fe
Improve schedule quality feature (#1602)
# What this PR does

Before:

<img width="281" alt="Screenshot 2023-03-23 at 16 56 42"
src="https://user-images.githubusercontent.com/20116910/227279464-c883ec05-a964-4360-bda2-3443409ca90a.png">

After:

<img width="338" alt="Screenshot 2023-03-23 at 16 57 41"
src="https://user-images.githubusercontent.com/20116910/227279476-468bffba-922a-45ea-b400-5f34d6bf0534.png">


- Add scores for overloaded users, e.g. `(+25% avg)` which means the
user is scheduled to be on-call 25% more than average for given
schedule.
- Add score for gaps, e.g. `Schedule has gaps (29% not covered)` which
means 29% of time no one is scheduled to be on-call.
- Make things easier to understand when there are gaps in the schedule,
add `(see overloaded users)` text.
- Consider events for next 52 weeks (~1 year) instead of 90 days (~3
months), so the quality report is more accurate. Also treat any balance
quality >95% as perfectly balanced. These two changes (period change and
adding 95% threshold) should help eliminate false positives for _most_
schedules.
- Modify backend & frontend so the backend returns all necessary user
information to render without using the user store.
- Move quality report generation to `OnCallSchedule` model, add more
tests.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1552

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
(public docs will be added in a separate PR)
2023-03-27 11:03:16 +00:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
alert_receive_channel.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08: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 Add SLACK_INTEGRATION_MAINTENANCE env var (#1582) 2023-03-21 08:15:35 +00:00
channel_filter.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
custom_button.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
escalation_chain.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
escalation_policy.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
features.py remove mobile app feature flag (#1484) 2023-03-08 11:22:44 +01:00
gitops.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
integration_heartbeat.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
live_setting.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
maintenance.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
on_call_shifts.py Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
organization.py Introduce org uuid (#947) 2022-12-06 22:42:58 +08:00
paging.py Teams redesign (#1528) 2023-03-22 00:57:20 +08: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 Fix resource duplication caused by available_teams_lookup_args (#1593) 2023-03-22 15:43:32 +08:00
route_regex_debugger.py Optimize alert group list view (#299) 2022-07-27 14:14:59 +03:00
schedule.py Improve schedule quality feature (#1602) 2023-03-27 11:03:16 +00:00
slack_channel.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
slack_team_settings.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
subscription.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
team.py Add rbac to teams endpoint (#1592) 2023-03-22 15:25:30 +08:00
telegram_channels.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
test_insight_logs.py Fix propagation for the insight logger 2022-07-25 12:59:12 +04:00
user.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
user_group.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
user_notification_policy.py Allow messaging backends to be enabled/disabled per organization (#1151) 2023-01-18 15:52:25 +00:00
webhooks.py Add filters to outgoing webhooks 2 (#1598) 2023-03-23 09:52:59 +08:00