Commit graph

2081 commits

Author SHA1 Message Date
Ildar Iskhakov
61dced5bd9
Add is_default fields to templates, remove WritableSerialiserMethodFi… (#1759)
…eld, refactor fields

# 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-04-18 04:44:51 +00:00
Ildar Iskhakov
5da5b8d430
Allow use of dynamic payloads in alert receive channels preview templ… (#1756)
…ate in private api

# 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-04-18 03:57:40 +00:00
Ildar Iskhakov
7dd726622a
Add endpoints to start and stop maintenance in alert receive channel … (#1755)
…private api

# 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-04-18 03:31:49 +00:00
Ildar Iskhakov
9d19493561
Added preview and migration API endpoints for route migration from regex into jinja2 (#1715)
# What this PR does
This PR adds new API endpoints for migrating routes from regex format to
jinja2 format. The changes include the following:

* `filtering_term_as_jinja2` field to GET `channels_filters` endpoint
* A POST endpoint
`channel_filters/ABCDEF123/convert_from_regex_to_jinja2/` for migrating
routes to jinja2 format.

These new endpoints will allow users to preview and migrate their
existing regex routes to the more flexible and maintainable jinja2
format.

Check the screenshot where this endpoints will be used
<img width="407" alt="Screenshot 2023-04-14 at 09 50 23"
src="https://user-images.githubusercontent.com/2262529/231920771-20792c7e-d6ef-4681-80e1-c82bb4aa4b8e.png">

## 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-04-18 02:53:53 +00:00
Ildar Iskhakov
f825fdf1a3
Send demo alert with dynamic payload and get demo payload example on private api (#1700)
# 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-04-18 02:48:11 +00:00
Joey Orlando
e93347e75b
temporarily disable is_restricted column + migration (#1765) 2023-04-17 19:30:31 +02:00
Vadim Stepanov
d99bb7b8bc
PD migrator: ignore 404s on delete + delete ONCALL_DEFAULT_CONTACT_METHOD (#1764) 2023-04-17 13:12:21 +01:00
Matthias Teich
0c42c2a86d
Add option to use helm hook for migration job (#1386)
# What this PR does
This PR adds the option to use helm hooks for the database migration.

## Which issue(s) this PR fixes
Currently oncall always shows as out-of-sync in argo-cd because the name
changes on each hard refresh.
When using a helm hook the job is executed on sync but does not show as
out-of-sync

## Checklist

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

---------

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-04-17 10:22:05 +00:00
Innokentii Konstantinov
15e7baad88
Insight logs format fixes (#1763)
# What this PR does
Minot fixes of insight logs formatting
2023-04-17 10:10:47 +00:00
Joey Orlando
75824dc9ad
ignore .http file extensions (#1762) 2023-04-17 10:52:03 +02:00
Innokentii Konstantinov
c68fdf5681
Fix insight_logs exceptions (#1757)
Most of the PR is just renaming ChatOpsType to ChatOpsPlug, core changes
are linked below:

- Fix insight_logs error writing unlink_backend error
https://github.com/grafana/oncall/pull/1757/files#diff-7ae187be84e55ebac962bad0984f7569186cdc83c896132b2ebcbcbb31bbf5dd
- Fix insight_logs error writing updated schedule with installed slack
integration
(https://github.com/grafana/oncall/pull/1757/files#diff-4037b7bbef9fc16d9b541beb3ed46f760916d7cd720847c3123adf7afb5ab4b4L690)
2023-04-17 07:16:18 +00:00
Matias Bordese
4f26ea3a68
Fix responses context when no response (#1754) 2023-04-14 17:30:32 +00:00
Joey Orlando
de6e8d1226
Update CHANGELOG.md 2023-04-14 12:08:00 +02:00
Joey Orlando
482809996f
fix small bug in IRMBanner rendering logic (#1749) 2023-04-14 12:03:37 +02:00
Joey Orlando
bededd5544
update changelog 2023-04-14 09:18:34 +02:00
Joey Orlando
3b274f45f4
add several new database columns + emit two new Django signals (#1522)
# What this PR does

- add new columns `gcom_org_contract_type`,
`gcom_org_irm_sku_subscription_start_date`, and
`gcom_org_oldest_admin_with_billing_privileges_user_id` to
`user_management_organization` table + `is_restricted` column to
`alerts_alertgroup` table
- emit two new Django signals
- `org_sync_signal` at the end of the
`engine/apps/user_management/sync.py::sync_organization` method
  - `alert_group_created_signal` when a new Alert Group is created

## Checklist

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

---------

Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2023-04-14 09:15:57 +02:00
Innokentii Konstantinov
3544ab14ec
Support PD integrations without vendor (#1748) 2023-04-14 06:32:23 +00:00
Michael Derynck
449342b02a Merge master 2023-04-13 14:24:13 -06:00
Michael Derynck
79d39b7ec9
Update CHANGELOG.md 2023-04-13 14:18:01 -06:00
Michael Derynck
457f2370d4
New webhook improvements (#1728)
- Enable/Disable Toggle
- Add Integrations Filter
- Enable log for non-triggered webhook for troubleshooting
- Improve UI to better show enabled, trigger status, request status
- Standardize terms New, Firing, Triggered to Firing
- Mask password field
- Fix bug where UI did not update when webhook is deleted
- Change responses to be referenced by webhook ID rather than trigger
type
2023-04-13 12:52:29 -06:00
Ben Sully
303670947b
Fix web_link property of AlertGroup (#1738)
The routing of the OnCall plugin has changed and no longer uses URL
params
but instead uses paths. This link is used when declaring an Incident
from
the OnCall Slack alert and needs to match the correct pattern in order
for
Incident to correctly detect it.
2023-04-12 16:44:27 +00:00
Innokentii Konstantinov
6ccde4a5e2
Migrate unsupported integrations to webhook (#1737)
## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1718
2023-04-12 16:53:38 +03:00
Michael Derynck
6f11d73f3d
Fix GForm Select dropdowns (#1726)
Return behavior so GForm select drop-down accesses value field instead
of using the KeyValuePair.
2023-04-12 13:28:17 +00:00
Joey Orlando
ed9371d11e
run e2e tests against grafana 8.5.22 on CI job (#1729) 2023-04-12 12:56:14 +02:00
Yulia Shanyrova
62a0961b81
creating escalation chain from integration fix (#1733)
# What this PR does
It was a bug
https://raintank-corp.slack.com/archives/C0415S5L76Y/p1681287849538729
2023-04-12 09:50:02 +00:00
Yulya Artyukhina
f61af74411
Add mobile app auth for notification_policies endpoint (#1725)
Add mobile app authentication for `notification_policies` endpoint
2023-04-11 16:36:46 +00:00
Matvey Kukuy
1d096b2fb4 Readme updates 2023-04-11 15:46:21 +03:00
Matvey Kukuy
e14cf8f269 Readme updates 2023-04-11 15:43:52 +03:00
Yulya Artyukhina
86f0a6dbef
Add Slack Api error "message_limit_exceeded" to SlackAPIRateLimitException (#1721)
Catch the new Slack error code "message_limit_exceeded" as a rate limit
error
2023-04-11 12:49:19 +02:00
Rares Mardare
5b1ce3988e
Fix a bug in GForm (#1712)
# What this PR does

Fixed `onChange` handler within `GForm` component
2023-04-11 12:23:55 +03:00
Ildar Iskhakov
bafadb658b
Merge pull request #1709 from grafana/helm-release/1.2.8
Merge: Release oncall Helm chart 1.2.8
2023-04-11 13:44:15 +08:00
Matias Bordese
2fbf3f503d
Add more context data to webhook templating (#1706)
Enable additional context data when building webhooks payload.
2023-04-06 17:52:23 +00:00
GitHub Actions
912ed42815 Release oncall Helm chart 1.2.8 2023-04-06 05:48:44 +00:00
Ildar Iskhakov
9a1eda004c
Merge pull request #1708 from grafana/dev
v1.2.8
2023-04-06 13:43:59 +08:00
Ildar Iskhakov
6884a42603
Update CHANGELOG.md 2023-04-06 13:41:29 +08:00
Matias Bordese
bc1ca0f376
Add user endpoint to get upcoming shifts details (#1705)
Add internal API endpoint to get users' upcoming shifts:
`GET /api/internal/v1/users/<USER PK>/upcoming_shifts`

Related to https://github.com/grafana/oncall-private/issues/1602.
2023-04-05 20:19:02 +00:00
Ashley Harrison
b27fb94fbb
Docs: change 'Alerts & incidents' to 'Alerts & IRM' in the docs (#1699)
# What this PR does

- changes `Alerts & incidents` to `Alerts & IRM` in the docs

## 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-04-05 12:37:04 +00:00
Matias Bordese
2a89374adf
Add escalation chain support for new webhooks (#1654)
Allow setting a webhook as escalation chain policy step.
2023-04-05 12:03:55 +00:00
Maxim Mordasov
617c7bf724
Restore escalation policy importance explanations (#1702)
# What this PR does

Restore escalation policy importance explanations

## 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-04-05 10:11:16 +00:00
Ildar Iskhakov
498e7ed5f3
Allow editing assigned team via public api (#1619)
# What this PR does

For example, changing the integration's team
```
curl "localhost:8080/api/v1/integrations/CLYV3QBVHDV3T/" \
  --request PUT \
  --header "Authorization: meow" \
  --header "Content-Type: application/json" --data '{"team_id": "TWP6JJJN6LYZX"}'
```

## 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-04-05 06:39:30 +00:00
Joey Orlando
42291748b5
temporarily disable e2e CI job (#1693)
Will re-enable them (and set this job as a required passing build step)
once all of the sub-tasks of
https://github.com/grafana/oncall/issues/1692 are fixed
2023-04-04 08:54:34 +02:00
Ildar Iskhakov
27b5ffad88
Update CHANGELOG.md 2023-04-04 11:59:53 +08:00
Ildar Iskhakov
840669235a
Disable mentions when resolution note is created (#1696)
# 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-04-04 11:57:38 +08:00
Ildar Iskhakov
532996176a
Display warnings on users page in a clean and consistent way (#1681)
# What this PR does

Before:
<img width="942" alt="Screenshot 2023-03-31 at 10 00 25"
src="https://user-images.githubusercontent.com/2262529/229003826-1f42820f-6997-4fec-82ed-acf4355b6758.png">


After:
<img width="937" alt="Screenshot 2023-03-31 at 09 59 22"
src="https://user-images.githubusercontent.com/2262529/229003723-6ac1743d-316f-4272-a73a-a1bebb27618f.png">


## 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-04-03 18:18:59 +08:00
github-actions[bot]
e6e2fbbcaf
Merge: Release oncall Helm chart 1.2.7 (#1691)
Merge this PR to `main` branch to start another [github actions
job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart (version: 1.2.7,
appVersion: v1.2.7) into `grafana/helm-charts` helm repository.

This PR was created automatically by this [github
action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml).

Co-authored-by: GitHub Actions <actions@github.com>
2023-04-03 12:07:49 +02:00
Joey Orlando
5a32defe99
Merge pull request #1690 from grafana/dev
v1.2.7
2023-04-03 11:51:43 +02:00
Joey Orlando
c4f2b28c2f
update changelog 2023-04-03 11:50:55 +02:00
Joey Orlando
0b23ad3d24
fix changelog 2023-04-03 11:50:00 +02:00
Vadim Stepanov
47b0ab4465
PD migrator: include service & integration names to ruleset (#1687)
# What this PR does
Allows to include service & integration names to migrated ruleset name
when passing `EXPERIMENTAL_MIGRATE_EVENT_RULES_LONG_NAMES=True`.
2023-03-31 18:12:45 +01:00
Vadim Stepanov
cf026c6c9a
PD migrator: migrate push notification user rules (#1685) 2023-03-31 14:53:27 +01:00