Commit graph

166 commits

Author SHA1 Message Date
ak0nst
44e93b6ab4
Email and phone limits now environment variable (#1219)
# What this PR does
Email and phone limits now environment variables:
EMAIL_NOTIFICATIONS_LIMIT=200, PHONE_NOTIFICATIONS_LIMIT=200

## Which issue(s) this PR fixes
#1010

## Checklist

- [ ] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-03-07 10:48:05 +00:00
Rares Mardare
d182e71f62
fix for #1273, added component for showing permission restricted acce… (#1422)
# What this PR does

- Removed unused code
- Added another component for displaying Error Messages based on
permissions access (so that we do not duplicate this code everywhere
it's needed)
- Fix for #1273 

## Which issue(s) this PR fixes

- #1273 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-02 15:32:59 +00:00
Vadim Stepanov
5f4a791abb
Update CHANGELOG.md 2023-03-01 17:00:33 +00:00
Vadim Stepanov
8170ca491c
Fix pagination issue when searching schedules (#1437)
# What this PR does
Fixes a bug with inconsistent schedule count when searching by name.

Example (2 schedules returned, but count is incorrectly set to 12):

![image](https://user-images.githubusercontent.com/20116910/222198919-2f2124bc-52b2-4e5f-a949-79bbf89a5a26.png)

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-03-01 16:28:40 +00:00
Rares Mardare
1b0643fef2
Schedule Filters tweaks (#1406)
# What this PR does

Improvements over schedule filters

## Which issue(s) this PR fixes

#941 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-01 13:30:01 +00:00
Innokentii Konstantinov
7f706c5a26 Update CHANGELOG.md 2023-03-01 17:05:25 +08:00
Innokentii Konstantinov
6a5e75e083
Fix of templates api behaviour for public and private api (#1408)
# What this PR does

This PR fixes templates behaviour for public and private api. It fix
"reset to default" for templates from messaging backends and some minor
bugs. Also added acknowledge signal and source link templates

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-01 16:32:15 +08:00
Innokentii Konstantinov
d1d8a9ae32 Update CHANGELOG.md 2023-03-01 14:56:20 +08:00
Vadim Stepanov
a25fd429da
Show 100 latest alerts on alert group page (#1417)
# What this PR does
Make internal API return 100 latest alerts for alert group.

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

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-02-28 14:12:56 +00:00
Maxim Mordasov
bee9943706
#415 #1292 #940 #1293 #1002 bug fixes (#1356)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-27 16:27:11 +00:00
Matias Bordese
04c42e2796
Matiasb/fix task refresh ical when empty value (#1401)
This should fix task error as seen in logs, trying to parse an empty
string as ical value:
```
Task apps.schedules.tasks.refresh_ical_files.refresh_ical_file[] raised unexpected: ValueError("Found no components where exactly one is required: ''")
```
2023-02-24 21:16:09 +00:00
Matias Bordese
721ab9fbb9
Use UTC instead of Etc/UTC when passing tz to dateutil rrule (#1414)
Fixes https://github.com/grafana/oncall-private/issues/1648
2023-02-24 20:54:20 +00:00
Michael Derynck
b3659872a7
Get reCAPTCHA site key from backend env (#1400)
# What this PR does
Move reCAPTCHA site key to backend environment for easier management to
support multiple environments.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-24 15:53:35 +00:00
Joey Orlando
71f81f844a
fixed UI permission related bug where Editors could not export their user iCal link (#1412)
# Which issue(s) this PR fixes

https://www.loom.com/share/c6da9a51786a483999b19eba94c7e2f5

## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-02-24 16:27:11 +01:00
Matias Bordese
98b3b918a5
Add schedule pagination to plugin API (#1309)
Related to #1289

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-02-24 14:59:03 +00:00
Rares Mardare
12a04db2ed
Append grafana styles to head instead of referencing the wrong path (#1348)
# What this PR does

Fixed #672 so that we import the css as a whole and add it as a `style`
element, instead of relying on path location which can differ if url is
rewritten.

## Which issue(s) this PR fixes

#672 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-24 11:14:45 +00:00
Vadim Stepanov
82694bf7c5
Update CHANGELOG.md 2023-02-23 13:55:22 +00:00
Joey Orlando
b61f2ce41f
patch minor sync issue when HTTP 302 is received from Grafana API instance (#1393)
# What this PR does

this PR refactors the `sync_organization` and
`GrafanaAPIClient.is_rbac_enabled_for_organization` methods to check the
connected response bool rather than explicit check on HTTP 200. This
handles the legitimate case where the Grafana instance may return an
HTTP 302 (redirect) rather than an HTTP 200.

## Which issue(s) this PR fixes

See
[this](https://grafana.slack.com/archives/C02LSUUSE2G/p1677136582890269)
Slack thread in the community channel for more context

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-02-23 13:23:57 +00:00
Vadim Stepanov
a2eed312f9
PD migrator: migrate on-call shifts using public API (#1317)
Allow PD migrator tool to migrate on-call shifts when migrating
schedules (currently it migrates schedules using PD ICal file):
https://github.com/grafana/oncall/issues/1283.

This PR will allow to select the mode of schedule migration via
`SCHEDULE_MIGRATION_MODE_WEB` env variable (`ical` or `web`). Due to
differences in the scheduling systems of PD and OnCall, it's not always
possible to migrate shifts automatically (migration plan will show any
schedules and layers that can't be migrated).

PD rotations that will be possible to migrate:
- Any rotation without restrictions ("restriction" is a PD term for
describing active periods for rotation)
- Daily rotations with daily restrictions
- Weekly rotations with weekly restrictions
- Some weekly rotations with daily restrictions
- Some daily rotations with weekly restrictions

There will be a separate PR to update the
[instruction](https://github.com/grafana/oncall/tree/dev/tools/pagerduty-migrator#readme)
since this one is pretty huge already.
2023-02-23 11:34:03 +00:00
Innokentii Konstantinov
ba314077a4 Update CHANGELOG.md 2023-02-23 15:47:43 +08:00
Joey Orlando
b3ad70abb3
update CHANGELOG 2023-02-22 07:42:17 +01:00
Joey Orlando
c55a9010f7
Add Google reCAPTCHA for mobile app phone verification (#1373)
# What this PR does

Adds reCAPTCHA validation to the get mobile verification code endpoint

## Which issue(s) this PR fixes

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Maxim <maxim.mordasov@grafana.com>
2023-02-21 20:17:06 +01:00
Yulia Shanyrova
2cf83a9650
1305 backlink tosource (#1316)
# What this PR does
- Header of Incident page was reworked: clickable labels instead of just
names, users section was deleted
- Go to Integration button was deleted, because the functionality moved
to clickable labels
- Link to source was added
- 
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/1305

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ v] `CHANGELOG.md` updated
2023-02-21 11:47:21 +00:00
Innokentii Konstantinov
61fdcfdc72
Add ratelimit for phone number verification (#1354)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-21 16:47:52 +08:00
Vadim Stepanov
adac88f1c0
Update CHANGELOG.md 2023-02-20 19:06:50 +00:00
Innokentii Konstantinov
78e1cbabab Update CHANGELOG.md 2023-02-20 19:24:07 +08:00
Yulya Artyukhina
058665b8a8
Fix too long declare incident link (#1342)
# What this PR does

## Which issue(s) this PR fixes
Issue with too long declare incident link in Slack

## Checklist

- [x] `CHANGELOG.md` updated
2023-02-20 18:42:44 +08:00
Vadim Stepanov
84164ff5e6
Update CHANGELOG.md 2023-02-16 13:11:05 +00:00
Vadim Stepanov
f194df0e99
Add App Store link to web UI (#1328)
# What this PR does
Adds the IPhone mobile app link to web UI.

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-16 10:49:37 +00:00
Yulia Shanyrova
4ee2f09e7a
823 direct paging users (#1215)
# What this PR does

Adds direct user paging

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/823

## Checklist

- [ ] Tests updated
- [ ] Documentation added (documentation will be added later)
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Maxim <maxim.mordasov@grafana.com>
2023-02-10 14:10:09 +03:00
Yulia Shanyrova
21691d64dc
Cleaning out Incident word from frontend (#704)
**What this PR does**:

**Which issue(s) this PR fixes**:

**Checklist**
- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-08 17:07:51 +01:00
Matias Bordese
a121f84a89
Rework slack login to check backend before redirecting (#1306)
Also:
- Remove unused slack login views in `social_auth` app
- Disable unlink actions in the profile if user is not owner (otherwise
it will disconnect the logged in user, not the one being shown on
screen)
2023-02-08 09:08:18 -03:00
Rares Mardare
81b5741d34
Changes to make screens more responsive + incident status toggler change (#1237)
# What this PR does

- Changes to make a few screens be more responsive
- Removed incident actions and replaced incident status with a toggler
- Renamed `IncidentStatus.new` to `IncidentStatus.Firing`
- Removed old schedules code (unused)

## Which issue(s) this PR fixes

#1000 

## Checklist

- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-07 13:28:58 +02:00
Yulia Shanyrova
89f22207c2
Polishing design for User tooltip in Schedules (#1290)
# What this PR does
Design polishing for Schedules User tooltip and Incident action icons

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-06 15:59:36 +01:00
Vadim Stepanov
cd3a357c49
v1.1.23 changelog 2023-02-06 14:28:12 +00:00
Vadim Stepanov
d40db5a352
Make emails case-insensitive for ICal schedules (#1297)
# What this PR does
Fixes a bug when current on-call users for web UI and Slack user group
are incorrect.

This happens when both conditions below are true:
- Using an ICal schedule
- Email of a user in Grafana has a different case than an event in ICal
(e.g. `User@gmail.com` in Grafana, `user@gmail.com` in ICal event)

The bug was introduced by https://github.com/grafana/oncall/pull/1169

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

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-02-06 12:11:13 +00:00
Vadim Stepanov
e5a420f75a
v1.1.22 2023-02-03 12:49:55 +00:00
Vadim Stepanov
070eb6e538
Enable mobile app backend by default on OSS (#1286)
# What this PR does
Enables mobile app backend by default on OSS.

## Checklist
- [x] `CHANGELOG.md` updated
2023-02-03 12:44:22 +00:00
Ildar Iskhakov
710f7755c0
Fix bug with root/dependant alert groups list api endpoint (#1284)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-03 19:53:35 +08:00
Rares Mardare
a2e0633fcc
Fix on teams switch NPE (#1281)
# What this PR does

Fix for teams switch NPE
2023-02-03 13:38:48 +02:00
Ildar Iskhakov
335c8fe65b
Optimize alert and alert group public api endpoints, add filter by id (#1274)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-03 17:05:08 +08:00
Vadim Stepanov
04b04ba02b
v1.1.21 changelog 2023-02-02 14:55:02 +00:00
Rares Mardare
3f6e6168a8
Rares/coming soon (#1272)
# What this PR does

Added Coming Soon label for `iOS`

- [x] `CHANGELOG.md` updated
2023-02-02 14:55:22 +02:00
Rares Mardare
e8411d7b8b
Rares/1083 fix integrations (#1256)
# What this PR does

- Fix for #1083 
- Fix for #1257 

- [x] `CHANGELOG.md` updated
2023-02-02 10:34:40 +02:00
Ildar Iskhakov
df1517573e
Cache web template rendered fields for alert and alertgroup endpoints (#1261)
# What this PR does
This PR adds same approach as introduced
[here](https://github.com/grafana/oncall/pull/1236) to all alert and
alertgroup endpoints

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-02 11:37:52 +08:00
Joey Orlando
94fe7979cf
add django-dbconn-retry library (#1262) 2023-01-31 20:17:54 +01:00
Joey Orlando
7420e11b4f
update CHANGELOG for new release 2023-01-30 14:11:42 +01:00
Matias Bordese
b1fc123d9f
Add a filter by involved users to alert groups page (#1240)
Related to #1119 

It also adds a shortcut to filter current user's related alert groups
(alert groups user was notified by, or in which user participated). Make
the filter visible by default, with a false value.
2023-01-30 14:08:18 +02:00
Maxim Mordasov
9421ae25be
Add Server URL below QR code for OSS for debugging purposes (#1209)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: teodosii <rares.mardare@grafana.com>
2023-01-30 13:34:35 +03:00
Joey Orlando
63e91f896b
[RBAC] - minor UI bug fixes (#1185)
# What this PR does

- remove hardcoded references to "Admin" and "Editor". Instead, use the
`determineRequiredAuthString` and `generateMissingPermissionMessage`
methods from `utils/authorization` which conditionally show the
permission or role depending on whether RBAC is enabled or not
- fix bug on list users page that always showed "Loading...".
![Screenshot 2023-01-21 at 09 29
35](https://user-images.githubusercontent.com/9406895/213859785-e9852838-5671-4275-aaed-4df75446ab6a.png)
- only show users the user's table if they are allowed, otherwise show
them this
  - RBAC enabled
![Screenshot 2023-01-26 at 09 09
57](https://user-images.githubusercontent.com/9406895/214786723-3389ce9c-7353-4216-9176-6547f2076660.png)
  - RBAC disabled
![Screenshot 2023-01-26 at 09 05
30](https://user-images.githubusercontent.com/9406895/214786739-eb9ee108-e79c-4105-912a-8bb5bf03cb32.png)
- `Schedules Editor` role minor issue
- Viewers are not allowed to list users by default, so granting schedule
edit permission to them won’t allow them to see who rotations are
assigned to or assign a rotation to a user. To make this a more
straightforward user experience, instead of saying "No options found",
we will tell the user that they are missing a particular role/permission
to view these users:
    Before:
![Screenshot 2023-01-23 at 09 52
28](https://user-images.githubusercontent.com/9406895/213999896-d889540e-2835-4133-965a-306923a3e33b.png)
    After:
![Screenshot 2023-01-26 at 12 39
30](https://user-images.githubusercontent.com/9406895/214827179-d127002f-793e-4ab7-ad75-dfab653b7d7d.png)


## Which issue(s) this PR fixes

- closes #971 

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-01-30 11:23:02 +01:00