Commit graph

2520 commits

Author SHA1 Message Date
Matias Bordese
2739db0394 Merge main to dev 2023-06-22 12:14:54 -03:00
Matias Bordese
6f387557d6
Update CHANGELOG.md 2023-06-22 12:01:21 -03:00
Yulia Shanyrova
2cdab7e804
Grouping templating chatops fix (#2307)
[css fixes, displaying chatops button visibility fix]
2023-06-22 13:01:11 +03:00
Rares Mardare
a339d80c62
Added missing chatOpsDisplayName to OSS + some ui tweaks (#2305)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-22 10:55:00 +03:00
Ildar Iskhakov
0a493be126
Fix template preview markup (#2304)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-22 14:34:54 +08:00
Ildar Iskhakov
8bfaccf733
Fix broken markup on alert group page, declutter, make time format consistent (#2295)
# What this PR does

This PR changes Alert Group layout according to the feedback from this
issue https://github.com/grafana/oncall/issues/2008

Also it makes time format more consistent across OnCall

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-21 15:24:50 +00:00
Rares Mardare
42a851309d
light theme fixes (#2302)
# What this PR does

- light theme fixes for templates&grouping
2023-06-21 14:46:50 +03:00
Vadim Stepanov
eada4a4355
Fix duplicate orders for user notification policies (#2278)
# What this PR does

Fixes an issue when multiple user notification policies have duplicated
order values, leading to the following unexpected behaviours:
1. Not possible to rearrange notification policies that have duplicated
orders.
2. The notification system only executes the first policy from each
order group. For example, if there are policies with orders `[0, 0, 0,
0]`, only the first policy will be executed, and all others will be
skipped. So the user will see four policies in the UI, while only one of
them will be actually executed.

This PR fixes the issue by adding a unique index on `(user_id,
important, order)` for `UserNotificationPolicy` model. However, it's not
possible to add that unique index using the ordering library that we use
due to it's implementation details.
I added a new abstract Django model `OrderedModel` that's able to work
with such unique indices + under concurrent load.

Important info on this new `OrderedModel` abstract model:
- Orders are unique on the DB level
- Orders are allowed to be non-consecutive, for example order sequence
`[100, 150, 400]` is valid
- When deleting an instance, orders of other instances don't change.
This is a notable difference from the library we use. I think it's
better to only delete the instance without changing any other orders,
because it reduces the number of dependencies between instances (e.g.
Terraform drift will be much smaller this way if a policy is deleted via
the web UI).

## Which issue(s) this PR fixes

Related to https://github.com/grafana/oncall-private/issues/1680

## 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-06-21 11:13:56 +00:00
Yulya Artyukhina
0c46b41498
Metrics doc (#2149)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] 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)

---------

Co-authored-by: Matias Bordese <mbordese@gmail.com>
2023-06-21 11:00:13 +00:00
Rares Mardare
f48d4f1f25
Fixes for templates&grouping (#2300)
# What this PR does

- Fixed a few issues when using the light theme
- Show/Hide Escalation - Search Escalation - Reload Escalation (all
fixes)
- Inbound Email show in http endpoint
- Allow opening the route template in collapsed state (added new button
for it)
2023-06-21 13:42:01 +03:00
Yulya Artyukhina
64976d6b8d
Add dashboard for oncall metrics to provisioning plugin settings (#1973)
Add dashboard for oncall metrics to the plugin settings by following
[this
instruction](https://community.grafana.com/t/how-to-include-dashboards-in-your-data-source-plugin/62749).
Dashboards files should be in `.json` format and stored in the plugin's
directory in `/src/dashboards/`.
As the result the dashboard can be imported from the `Dashboards` tab at
the plugin settings page:
<img width="1504" alt="Screenshot 2023-06-21 at 11 28 31"
src="https://github.com/grafana/oncall/assets/22730923/8c2bfe4a-f3c8-480a-b18c-7ba21a9b8e30">

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-21 10:11:04 +00:00
Joey Orlando
cf6aefbd00
adjust stale PR bot to use pr:stale label instead (#2298) 2023-06-21 04:28:07 -04:00
Yulya Artyukhina
af939dc83a
Optimize getting response time for alert groups (#2296)
Optimize getting response time for alert groups in calculation metrics
task

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-21 08:16:35 +00:00
Joey Orlando
861a419b92
upgrade playwright (#2297) 2023-06-21 04:08:26 -04:00
Rares Mardare
bc32726fbb
Templates&grouping changes (#2291)
# What this PR does

- Fixed newlines in cheatsheat display
- Reference templates by keys instead of display names
- UI esthetic changes asked by Raphael (borders, sizing, spacing etc)
- Increased Demo Alert Modal height
- Moved MoveUp/MoveDown on routes to ellipsis on the right
- Hide Heartbeat Settings if there's none to display
- Removed Telegram request as now the data is available in response
2023-06-20 16:03:07 +00:00
Yulia Shanyrova
e4788d5732
Grouping templating polishing11 (#2293)
- [x] Alert group scroll
- [x] Result scroll right padding
- [x] Cheatsheet scroll right padding
- [x] Template editor and cheatsheet title alight center
- [x] Edit custom payload - left padding
- [x] Change background of Use custom payload title like Template Editor
- [x] No alert groups is missing right border
- [x] Save template - should not close the drawer if there is an error
- [x] Width cheatsheet code 100%
- [x] Edit/close Alert payload margin 8px
- [x] Background secondary Result - when Select alert group message
2023-06-20 15:11:31 +00:00
Matias Bordese
89834ee232
Changed web schedule updates to sync refresh ical (#2279)
Updating a schedule using the web UI sometimes you don't get the change
immediately available (since the ical refresh is async).
Related to https://github.com/grafana/oncall/issues/1968
2023-06-20 15:01:35 +00:00
Matias Bordese
f30e41eb27
Update test helper to match schedule UI change (#2294) 2023-06-20 11:41:10 -03:00
Ildar Iskhakov
21a6979aa1
Add inbound email field to private api (#2287)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-20 21:54:07 +08:00
Maxim Mordasov
9f0064f21b
Schedules 2nd iteration updates (#1720)
# What this PR does

Features and bugs related to [[Q1 2023] Iteration with
Schedules](https://github.com/grafana/oncall-private/issues/1660)
milestone

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [ ] 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)

---------

Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Matias Bordese <mbordese@gmail.com>
2023-06-20 16:18:56 +03:00
Yulia Shanyrova
9e15fe6875
Grouping templating polishing10 (#2276)
# What this PR does
- Description of Alert Manager info box was changed
- Fix for filtering Escalation chains in Integration 
- Alt text for Image template
- Conditional result for Template was fixed
2023-06-20 12:47:54 +00:00
Salvatore Giordano
0177301bb8
refactor title and subtitle of shift notifications (#2288)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-20 10:49:13 +00:00
Joey Orlando
4f2d3bee9f
add is_restricted column to alert_group table (#2289)
# What this PR does

Plus mark `alert_receive_channel.restricted_at` column as deprecated.
This column will be removed in a future release.

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-20 06:20:32 -04:00
Joey Orlando
75682517f1
install requirements-dev.txt dependencies oncall docker image dev target (#2284)
# What this PR does

install `requirements-dev.txt` dependencies oncall docker image dev
target to allow commands like `make test` to properly work. Otherwise
you currently get:
```bash
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "pytest": executable file not found in $PATH: unknown
make: *** [test] Error 1
```

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-19 05:50:59 -04:00
Innokentii Konstantinov
5d035808bb
Dev to main (#2282)
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Matias Bordese <mbordese@gmail.com>
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
Co-authored-by: Ruslan Gainanov <gromrx1@gmail.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-06-19 13:52:34 +08:00
Innokentii Konstantinov
79b17ad15a Update CHANGELOG.md 2023-06-19 13:39:40 +08:00
Ildar Iskhakov
c71ed490b4
Optmise autoresolve query (#2273)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-06-19 04:43:46 +00:00
Ildar Iskhakov
10661b6752
Refactor template for edit for DRY (#2264)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Ruslan Gainanov <gromrx1@gmail.com>
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-06-16 11:46:19 +00:00
Joey Orlando
111ecb9297
remove legacy permission strings (#2269)
# What this PR does

Remove deprecated `permissions` `List[str]` from internal API user
response. These permission strings are no longer used and AFAICT are not
referenced anywhere in the UI.

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-16 10:00:14 +00:00
Ruslan Gainanov
691a503cfa
fix existingSecret for RabbitMQ to default value (see #761) (#864)
**What this PR does**:
The existing value brokes the release when using external RabbitMQ. 
```
 Warning  Failed     6s (x11 over 112s)  kubelet            Error: couldn't find key password in Secret monitoring/oncall-rabbitmq-external
```

**Which issue(s) this PR fixes**:
Related MR [#761](https://github.com/grafana/oncall/pull/761)

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

---------

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-06-16 03:14:36 +00:00
Matias Bordese
91461991de
Update daily shifts by day to handle changed week start (#2263)
Related to
https://github.com/grafana/oncall/issues/2118#issuecomment-1592889257
2023-06-16 01:01:32 +00:00
Ildar Iskhakov
85beacaeb0
Add telegram details field (#2255)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-15 23:52:01 +08:00
Rares Mardare
76309292e2
Fix telegram request in templates&grouping (#2260)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-15 17:33:09 +03:00
Matias Bordese
d38315def7
Handle non-UTC UNTIL datetime value when repeating ical events (#2241) 2023-06-15 13:53:53 +00:00
Joey Orlando
687fcc2829
disable mypy job for now 2023-06-15 15:46:45 +02:00
Joey Orlando
0b926f8721
debugging github issues workflow 2023-06-15 15:42:14 +02:00
Joey Orlando
a45f66a353
debugging issue templates 2023-06-15 15:39:31 +02:00
Joey Orlando
998532ef23
debugging github issue workflow 2023-06-15 15:36:34 +02:00
Joey Orlando
76eacd3ea3
update github issues workflows 2023-06-15 15:34:04 +02:00
Joey Orlando
c7291f98fb
remove on issue label added workflow 2023-06-15 15:28:18 +02:00
Joey Orlando
a44bd31e94
add new bug and feature-request GitHub Issue templates (#2230)
This is how `grafana/grafana` handles [bug
reports](https://github.com/grafana/grafana/issues/new?assignees=&labels=&projects=&template=0-bug-report.yaml&title=Product-Area-Here%3A+short+description+of+bug+here)
(for feature requests they have an [external
link](https://github.com/grafana/grafana/issues/new/choose) pointing
people to head over to their repo's Discussion page).

This _should_ solve the problem of people opening new issues without
properly filling in all the necessary information. Because users that
are not a part of the `grafana` GitHub organization, do not have
permission to add labels, this also solves that by automatically adding
either the "bug" or "feature request" label based on which issue
template they choose to use.
2023-06-15 09:25:10 -04:00
Rares Mardare
9953e1292b
Fixed route expansion in templates&grouping (#2246)
# What this PR does

## Which issue(s) this PR fixes

- Fixed route expansion in templates&grouping
- Added notifications for add/delete routes
2023-06-15 16:14:28 +03:00
Matias Bordese
d272868cec
Update schedule preview to not create new shift by default (#2223) 2023-06-14 19:24:03 +00:00
Matias Bordese
3fae89ad43
Preserve schedule update_shift links on delete (#2224) 2023-06-14 19:13:35 +00:00
Matias Bordese
9e758c3bd5
Unify "name" and "title" field for oncall shift (#2239)
Porting changes from https://github.com/grafana/oncall/pull/1833
2023-06-14 19:05:19 +00:00
Joey Orlando
572131b921
add user locale field to mobile app user settings table + change going on call push notification text (#2131)
# What this PR does

- add user locale field to mobile app user settings table + add a test
that sends `PATCH` requests to this endpoint
- change "you're going on call" push notification text to include
localized shift time. The general format is now:
  ```python
f"You're going on call in {time_until_going_oncall} for schedule
{schedule.name}, {formatted_shift}"
  ```
- `time_until_going_oncall` is a "human-readable" format of the time
until the start)
  - `schedule.name` is self-explanatory
- `formatted_shift` this depends on the shift. If the shift starts and
ends on the same day, the format will be "HH:mm - HH:mm". Otherwise, if
the shift starts and ends on different days, the format will be
"YYYY-MM-DD HH:mm - YYYY-MM-DD HH:mm". **Note** that all datetime
related formatting will use the new `locale` field that we are now
storing in the mobile app user settings table. If no locale is yet
present we will fallback to "en"

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/2024
https://github.com/grafana/oncall-mobile-app/issues/187

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [ ] 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-06-14 12:19:58 -04:00
Michael Derynck
c8669ce94c
Add field descriptions for webhooks (#2225)
- Add descriptions for fields
- Change default value of request_data to avoid confusing situation
where if there was a error before request data is built, like in the
template for the request headers, request_data would be a python dict
resulting in hard to read text in the UI status page.
2023-06-14 08:37:30 -06:00
Matias Bordese
4b6e80b27a
Merge pull request #2235 from grafana/helm-release/1.2.44
Merge: Release oncall Helm chart 1.2.44
2023-06-14 11:22:55 -03:00
GitHub Actions
06aa12244a Release oncall Helm chart 1.2.44 2023-06-14 13:37:08 +00:00
Matias Bordese
7bfb552e90
Merge pull request #2234 from grafana/dev
v1.2.44
2023-06-14 10:35:15 -03:00