Commit graph

1480 commits

Author SHA1 Message Date
Rares Mardare
a080d8fd7d review 2022-12-07 11:16:47 +02:00
Rares Mardare
c04590f746 mark classname as optional 2022-12-06 17:15:08 +02:00
Rares Mardare
c640653faa fixed double requests, specify timeout of 6000 in awaitFor calls 2022-12-06 16:53:26 +02:00
Rares Mardare
a34a39f4e0 test fix 2022-12-06 16:37:56 +02:00
Rares Mardare
d47efd12b2 linter 2022-12-06 15:38:47 +02:00
Rares Mardare
73518e70c9 clear timeout on unmount 2022-12-06 15:13:46 +02:00
Rares Mardare
2ccebb34fc tweaks + autoreload QR with loader display 2022-12-06 15:05:38 +02:00
Joey Orlando
53a7b02393
patch engine logging middleware (#950)
need to check that the user associated
with the request actually has an organization_id
attribute (there are certain cases, such as
if the request.user is a "django user"
where this attribute would not be present)
2022-12-05 17:01:49 +01:00
Joey Orlando
427dd4b5f7
helm chart v1.0.13 - update appVersion to v1.1.5 + change image.pullPolicy to "Always" (#937) 2022-12-02 13:27:37 +01:00
Michael Derynck
ad3cd8f5dd
Remove unused call for checking gcom api keys (#931) 2022-12-01 10:35:53 -07:00
Vadim Stepanov
d2b7e0f526
docker-compose small fixes (#930)
* docker-compose pull before running the hobby setup

* change mysql platform to linux/amd64 for developer docker-compose
2022-12-01 16:00:19 +00:00
Vadim Stepanov
1878b7e596
Mobile app FCM support (#923)
* Add ability to configure FCM_API_KEY and FCM_POST_URL

* Delete APNSDevice and GCMDevice instances when unlinking the mobile app backend

* Add a simple FCM relay endpoint

* GCM -> FCM

* comment
2022-12-01 15:17:01 +00:00
Joey Orlando
c08eeb72a3
add precommit rules for markdown/json files (#915)
* add markdownlint precommit steps + fix existing errors

* prettier json linting
2022-12-01 14:26:54 +01:00
Joey Orlando
9a7b8acd5a
centralize timezone validation + add serializer validation for on call shifts and schedules (#924)
* Centralize timezone validation into one spot + add serializer validation
for schedules and oncall shifts (both public and internal API)

* add engine-manage make command
2022-12-01 14:13:39 +01:00
Matias Bordese
c9c7208c46
Merge pull request #911 from grafana/matiasb/support-overrides-priority-level-backend
Update final schedule to consider priority level for overrides
2022-12-01 09:13:30 -03:00
Matias Bordese
01d85e8fb9
Add note to docs about required roles to get notifications (#922) 2022-12-01 07:25:47 +01:00
Matias Bordese
3e8417e000 Update final schedule to consider priority level for overrides 2022-11-30 10:26:33 -03:00
Matias Bordese
356986a1e1
Merge pull request #905 from grafana/matiasb/repetitions-and-until-issues
Do not include event repetitions terminated before start (until rrule)
2022-11-30 09:09:10 -03:00
Matias Bordese
1f49c6e44a Do not include event repetitions terminated before start (until rrule) 2022-11-30 08:56:19 -03:00
Joey Orlando
a9ac7e82df
update grafana API RBAC permissions endpoint 2022-11-30 09:03:10 +01:00
Joey Orlando
4caeefaf8e
Merge pull request #918 from grafana/jorlando/codeowners
add CODEOWNERS file
2022-11-30 07:36:48 +01:00
Joey Orlando
244a88d5cc
add CODEOWNERS file 2022-11-29 18:28:33 +01:00
Rares Mardare
329beb62ff
Tweaks for mobile app verification (#916)
* slightly style mobile app screen

* minor tweaks

* more changes

* wrap calls in waitFor to stop jest complains, PR review fix

* fixed polling

* use timeout instead of interval

* suggestion from Joe
2022-11-29 17:59:34 +01:00
Vadim Stepanov
96868e1038
Add a temporary URL for the mobile app API 2022-11-29 16:46:51 +00:00
Matias Bordese
706aef10f2
Merge pull request #827 from grafana/matiasb/fix-filtering-events-from-deleted-schedule
Handle error when updating ical cache from deleted web schedule
2022-11-29 09:12:48 -03:00
Joey Orlando
df2f96e43a
don't show user tabs they aren't authorized to see (#914) 2022-11-29 12:53:15 +01:00
Vadim Stepanov
0985094112
Add a temporary URL for the mobile app API 2022-11-29 11:46:19 +00:00
Joey Orlando
9e598385f4
Add RBAC Support (#777)
* Modify plugin.json to support RBAC role registration

* defines 26 new custom roles in plugin.json. The main roles are:

- Admin: read/write access to everything in OnCall
- Reader: read access to everything in OnCall
- OnCaller : read access to everything in OnCall + edit access to Alert Groups and Schedules
- <object-type> Editor: read/write access to everything related to <object-type>
- <object-type> Reader: read access for <object-type>
- User Settings Admin: read/write access to all user's settings, not just own settings. This is in comparison to User Settings Editor which can only read/write own settings

* update changelog and documentation (#686)

* implement RBAC for OnCall backend

This commit refactors backend authorization. It trys to use RBAC authorization if the org's grafana instance supports it, otherwise it falls back to basic role authorization.

* update RBAC backend tests

* add tests for RBAC changes
- run backend tests as matrix where RBAC is enabled/disabled. When RBAC is enabled, the permissions granted are read from the role grants in the frontend's plugin.json file (instead of relying what we specify in RBACPermission.Permissions)
- remove --reuse-db --nomigrations flags from engine/tox.ini
- minor autoformatting changes to docker-compose-developer.yml

* remove --ds=settings.ci-test from pytest CI command

DJANGO_SETTINGS_MODULE is already specified as an env var so this is just unecessary duplication

* update gitignore

* update github action job name for "test"

* RBAC frontend changes

* refactors the use of basic roles (ex. Viewer, Editor, Admin) use RBAC permissions (when supported), or falling back to basic roles when RBAC is not supported.

- updates the UserAction enum in grafana-plugin/src/state/userAction.ts. Previously this was hardcoded to a list of strings that were being returned by the OnCall API. Now the values here correspond to the permissions in plugin.json (plus a fallback role)

* changes per Gabriel's comments:
- get rid of group attribute in rbac roles
- remove displayName role attribute
- remove hidden role attribute
- add back role to includes section

* don't try to update user timezone if they don't have permission
2022-11-29 09:41:56 +01:00
Ildar Iskhakov
132cf1da7f
Add celery profiling (#913) 2022-11-29 16:20:41 +08:00
Ildar Iskhakov
3198612c65
Add flag to debug logs (#912) 2022-11-29 11:16:42 +08:00
Joey Orlando
eb97797d43
Merge pull request #880 from grafana/jorlando/mobile-app-qr-code
Fetch/Display Mobile App QR Code
2022-11-28 18:54:05 +01:00
Joey Orlando
5a4fc90fa4
fetch/render mobile app QR code in user settings modal 2022-11-28 18:47:59 +01:00
Michael Derynck
3582f9b08f
Improve Jinja Template feedback and error handling (#884)
* Improve feedback so template errors are given to user

* Add security error logging

* Add limits for templates, payloads, results

* Show popup error notification for webhook errors and template errors that don't have a result

* Update tests

* Split exceptions into warnings/errors to give more control when previewing, rendering, saving templates

* Limit title lengths

* Make TypeError a warning

* Adjust title length limit

* Remove length limiting on urlize since it is being done on template render

* Fix tests

* Add KeyError and ValueError to warnings

* No longer enforcing json result when saving webhook in case it is dependent on payload

* Add tests for expected exceptions coming from apply_jinja_template

* Update changelog

* Send raw post if template result is not JSON
2022-11-28 09:46:51 -07:00
Vadim Stepanov
dc6fcf5c05
Add internal API fields for the mobile app (#910)
* add permalinks list to internal API alertgroup view

* add user's name and full avatar URL to the user view

* make avatar_full_url a property

* fix tests

* fix user connection criteria
2022-11-28 15:52:31 +00:00
Matias Bordese
69f1218bab Handle error when updating ical cache from deleted web schedule 2022-11-28 10:24:52 -03:00
Vadim Stepanov
54d14d1025
Move MobileAppAuthToken view to mobile_app (#902) 2022-11-28 12:50:58 +00:00
Ildar Iskhakov
09bf0ee3d5
Add celery parameters to disable gossip, heartbeat, mingle (#907) 2022-11-28 14:18:27 +08:00
Vadim Stepanov
c23de808cb
Update CHANGELOG.md 2022-11-24 14:03:14 +00:00
Joey Orlando
3fc08b5656
Merge pull request #894 from grafana/jorlando/fix-grafana-toolkit-transitive-cve
fix yarn.lock
2022-11-24 12:52:56 +01:00
Innokentii Konstantinov
3b73522f5a
Fix saving source link template (#898)
* Add test for update integration templates

* Fix saving source link template
2022-11-24 16:26:12 +08:00
Innokentii Konstantinov
fdbcd43a70
Merge pull request #860 from grafana/rares/ui-improvements-9.3
Rares/UI improvements 9.3
2022-11-24 16:23:34 +08:00
Rares Mardare
d68563e687 Merge branch 'dev' into rares/ui-improvements-9.3 2022-11-24 09:59:36 +02:00
Joey Orlando
cc13990bf5
Merge pull request #896 from grafana/jorlando/remove-hostess-dependenc
remove hostess tool + add extra_hosts entry to oncall backend containers
2022-11-24 02:50:16 +01:00
Rares Mardare
f88b8223b8 fix casing 2022-11-23 23:43:21 +02:00
Joey Orlando
19e7fc4c00
remove hostess tool + add extra_hosts entry to oncall backend containers 2022-11-23 19:31:26 +01:00
Vadim Stepanov
255964ceaf
Mobile app messaging backend (#874)
* move mobile notifications to a separate backend, remove critical notification

* remove outdated mobile app code

* MOBILE_APP_PUSH_NOTIFICATIONS_ENABLED -> FEATURE_MOBILE_APP_INTEGRATION_ENABLED

* create error log if no devices are set up

* move mobile auth related code to the mobile_app Django app

* move mobile auth related code to the mobile_app Django app

* move mobile auth related code to the mobile_app Django app

* fix typing

* add GCMDevice todos

* add user connection capabilities

* add user connect/disconnect to the messaging backend

* move APNS endpoint to mobile_app Django app

* restore critical notifications

* support hackathon app

* tweak migrations so mobile app auth tokens are preserved

* reuse notify_by IDs

* use mobile app template to render push notification

* add GCM/FCM (Android) support

* fix unlink user

* logger.error -> logger.info
2022-11-23 15:56:43 +00:00
Rares Mardare
987700bbf4 make tabs horizontally scroll if <1500px 2022-11-23 17:04:27 +02:00
Rares Mardare
af418573e3 minor merge fixes 2022-11-23 15:59:54 +02:00
Joey Orlando
f21eec3c6a
fix yarn.lock 2022-11-23 14:40:59 +01:00
Rares Mardare
b15ff7d30c Merge branch 'dev' into rares/ui-improvements-9.3 2022-11-23 15:25:48 +02:00