oncall-engine/grafana-plugin
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
..
integration-tests Improve schedule quality feature (#1602) 2023-03-27 11:03:16 +00:00
provisioning World, meet OnCall! 2022-06-03 08:09:47 -06:00
src Improve schedule quality feature (#1602) 2023-03-27 11:03:16 +00:00
tools Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.env.example add IS_OPEN_SOURCE env var to UI integration tests (#1546) 2023-03-15 06:56:03 +01:00
.eslintignore World, meet OnCall! 2022-06-03 08:09:47 -06:00
.eslintrc.js added dotenv to read env variables, pass faro instance to this.faro 2022-12-15 17:47:30 +02:00
.gitignore improve e2e tests authentication flow (#1470) 2023-03-10 06:45:15 +01:00
.prettierrc.js World, meet OnCall! 2022-06-03 08:09:47 -06:00
.release-it.js World, meet OnCall! 2022-06-03 08:09:47 -06:00
.stylelintignore World, meet OnCall! 2022-06-03 08:09:47 -06:00
.stylelintrc add selector-max-type stylelint rule 2022-11-02 11:44:42 +00:00
babel.config.json add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
Dockerfile.dev One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
grafana-plugin.yml.example World, meet OnCall! 2022-06-03 08:09:47 -06:00
jest.config.js first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
jest.setup.ts Get rid of installation token + add a bunch of tests (#624) 2022-11-21 16:26:00 +01:00
LICENSE World, meet OnCall! 2022-06-03 08:09:47 -06:00
package.json first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
playwright.config.ts improve e2e tests authentication flow (#1470) 2023-03-10 06:45:15 +01:00
plopfile.js Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
tsconfig.json first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
webpack.config.js review 2022-12-22 13:38:47 +02:00
yarn.lock Bump webpack from 5.75.0 to 5.76.1 in /grafana-plugin (#1551) 2023-03-20 17:04:41 +00:00