Commit graph

642 commits

Author SHA1 Message Date
Rares Mardare
a3d9b181c3
Templates&grouping tweaks&fixes (#2147)
# What this PR does

Templates&grouping tweaks \ fixes
- responsiveness fixes
- changed new route default template to be comment instead
- some other minor changes
2023-06-09 12:56:21 +03:00
Ildar Iskhakov
f37c3a90d1
Edit route hint (#2114)
# 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-09 00:34:32 +08:00
Matvey Kukuy
6e82e9400f Merge remote-tracking branch 'origin/dev' into dev 2023-06-08 18:48:35 +03:00
Matvey Kukuy
b30769e7b5 Docs fixes 2023-06-08 18:48:23 +03:00
Yulia Shanyrova
b50b10d491
fix for templates for routes (#2136)
# What this PR does
- Wrong behaviour after saving Route template fix
- Add notification/error when try to save empty template for routes.
2023-06-08 15:20:46 +00:00
Yulia Shanyrova
7a569dae02
Fixes for search, for last alert payload and some design changes (#2129)
## Which issue(s) this PR fixes
Fixes for search, for last alert payload and some design changes
2023-06-08 08:16:16 +00:00
Rares Mardare
6570790442
Rares/templates tweaks 5 (#2116)
# What this PR does

- Removed duplicate copy within Routes
- Made drawer content of templates more responsive
- Fetch telegram info and display it accordingly
- Fixed pagination being reset when going back to table view
- Some other minor things
2023-06-07 12:30:05 +00:00
Innokentii Konstantinov
594a18a1b0
Fix phone code verification field (#2119)
# What this PR does
Fix issue when phone code verification field not became active after
verifying number via phone

## 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-07 11:07:47 +00:00
Matvey Kukuy
130ec3cf0a
Using "sentence case" in the nav for consistency with the rest of grafana nav. (#1723)
Escalation Chains -> Escalation chains

etc.

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-07 05:20:53 +00:00
Yulia Shanyrova
ed7da1953f
UID has been added to Integrations table, Integration page and routes (#2112)
# What this PR does
UID has been added to Integrations table, Integration page and routes
2023-06-06 11:59:21 +00:00
Michael Derynck
bc535ac5df
Webhooks 2 hide secrets (#2104)
Replace password and authorization header fields with placeholders when
returning data to the UI. Mask the authorization header field when
editing and in the status logs.
2023-06-06 07:59:12 +00:00
Alexander Cherepanov
5f067af14f
Do not hide not secret settings in the web plugin UI (#1964)
# What this PR does

In the web plugin UI Settings -> Env Variables if variable is not
secret, do not hide its value.

## 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)
- [x] `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>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-06-05 12:25:51 +00:00
Yulia Shanyrova
85d5e57331
fix for MonacoEditor height (#2089)
## Which issue(s) this PR fixes
When Opening Template Editor, on first load Monaco editor height is 0
2023-06-02 12:33:52 +00:00
Alexander Cherepanov
e66fe67174
Fix a bug #1617 with permissions for telegram user settings (#2075)
# What this PR does

Changes a required role for telegram user settings from Admin to Editor.

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/1617

## 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-01 10:08:39 +00:00
Ildar Iskhakov
5975b9dd8c
Change integrations page wording and add more guidance (#1986)
# 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: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-05-31 11:26:36 +00:00
Yulia Shanyrova
f299fb9814
bug fixes (#2067)
## Which issue(s) this PR fixes

- Wrong field name in validation (Verbal name is required, but should be
Name is required)
- For messenger templates we need to keep \n in the beginning of the
result
-Save and Open in slack button should not close drawer
- If user edit templates, button Cancel should return to templates
drawer
- Cheatsheet should have a scroll, not main drawer
- narrow screen issues in cheatsheet
- How integration works should have the dynamic integration name (first
red mark). Alerting Contact point and notification policy should be
mentioned only for Grafana Alerting
https://files.slack.com/files-pri/T02S4RCS0-F0592BHP42G/screenshot_2023-05-23_at_11.45.29_am.png
- Cheatsheet title doesn't match to template
- Image is not rendered in Result of Edit Template
https://files.slack.com/files-tmb/T02S4RCS0-F058TEPD214-27c1136ad2/screenshot_2023-05-23_at_1.02.47_pm_720.png
- Add description to the Result of conditional template: if True
Selected alert will resolve alert group else Selected alert will not
resolve alert group. And change the icon from Warning to X
- Opening cheatsheet resets the non-saved
template](https://github.com/grafana/oncall-private/issues/1824#issuecomment-1560348999)
2023-05-31 09:40:21 +00:00
Rares Mardare
76a37bd90b
Templates&grouping changes (#2066)
# What this PR does

- removed msteams usage from public
- removed check for chatops
2023-05-31 12:27:39 +03:00
Rares Mardare
b93413c032
Rares/templates tweaks 3 (#2052)
# What this PR does

- Added option to expand tree view on main block click
- Fixed showing contact policy for grafana alerting
2023-05-31 07:40:02 +00:00
Ahmed Qashlan
e3181a5afb
Edit critical to be Important to align with the rest of app convention (#2063)
# What this PR does
- Edits the send important notification button to be send critical
notification button to align with the app conventions
## Which issue(s) this PR fixes
Ref #2043
2023-05-31 13:00:43 +08:00
Joey Orlando
5a07db851d
add description to "Default channel for Slack notifications" UI dropdown (#2051)
# What this PR does
<img width="1005" alt="Screenshot 2023-05-30 at 07 53 20"
src="https://github.com/grafana/oncall/assets/9406895/a3533104-5773-4ce4-b717-74feeca1f0f0">

## 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)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-30 14:53:48 -04:00
Rares Mardare
4b5b183520
Templating&grouping bugfixing (#2044)
# What this PR does

Bug fixing - responsiveness, functional, copy changes etc
2023-05-30 07:37:37 +00:00
Matias Bordese
e8c9d08301
Enable selecting active days for every shift freq (#2037)
Make it possible to select "by day" active periods for every shift
frequency (ie. enable it for hourly and monthly recurrent rotations).
2023-05-29 13:33:45 +00:00
Yulia Shanyrova
d953315dfc
bug fixes (#2020)
bug fixes

https://github.com/grafana/oncall-private/issues/1824
2023-05-26 07:46:05 +00:00
Innokentii Konstantinov
1f786e8d2a
Phone provider refactoring (#1713)
# What this PR does
This PR moves phone notification logic into separate object PhoneBackend
and introduces PhoneProvider interface to hide actual implementation of
external phone services provider. It should allow add new phone
providers just by implementing one class (See SimplePhoneProvider for
example).
# Why 
[Asterisk PR](https://github.com/grafana/oncall/pull/1282) showed that
our phone notification system is not flexible. However this is one of
the most frequent community questions - how to add "X" phone provider.
Also, this refactoring move us one step closer to unifying all
notification backends, since with PhoneBackend all phone notification
logic is collected in one place and independent from concrete
realisation.
# Highligts
1. PhoneBackend object - contains all phone notifications business
logic.
2. PhoneProvider - interface to  external phone services provider.
3. TwilioPhoneProvider and SimplePhoneProvider - two examples of
PhoneProvider implementation.
4. PhoneCallRecord and SMSRecord models. I introduced these models to
keep phone notification limits logic decoupled from external providers.
Existing TwilioPhoneCall and TwilioSMS objects will be migrated to the
new table to not to reset limits counter. To be able to receive status
callbacks and gather from Twilio TwilioPhoneCall and TwilioSMS still
exists, but they are linked to PhoneCallRecord and SMSRecord via fk, to
not to leat twilio logic into core code.

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-05-24 06:27:48 +00:00
Joey Orlando
eefe7be56a
e2e tests on CI - actually await k8s resources to be ready before starting tests (#1997)
Occasionally, the Playwright global setup step (which authenticates w/
the Grafana API + configures the plugin) would fail, leading to the CI
job to instantly fail (playwright doesn't retry global setup if it
fails).

My current hypothesis as to why this is happening is because the
`oncall-engine` and `oncall-celery` pods aren't _actually_ ready in
these cases based on the way the `jupyterhub/action-k8s-await-workloads`
action await k8s workloads:

<img width="1076" alt="Screenshot 2023-05-23 at 18 24 36"
src="https://github.com/grafana/oncall/assets/9406895/68d8d2d9-4274-4749-8788-e0a9a3dbad83">


By using the `kubectl rollout status deployment/<deployment-name>
--timeout=300s` instead, we can be sure that these pods are _actually_
ready to receive traffic before we start the tests.
```bash
❯ kubectl rollout status --help
Show the status of the rollout.

 By default 'rollout status' will watch the status of the latest rollout until it's done. If you don't want to wait for
the rollout to finish then you can use --watch=false. Note that if a new rollout starts in-between, then 'rollout
status' will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled
over by another revision, use --revision=N where N is the revision you need to watch for.
```

Lastly, even despite this, sometimes the `POST
/api/internal/v1/plugin/sync` endpoint will return HTTP 500 ([example
logs](https://github.com/grafana/oncall/actions/runs/5062712137/jobs/9088529416#step:19:2536)
from failed CI job). In this case, let's setup the Playwright global
setup to retry 3 times.
2023-05-23 20:20:46 -04:00
Joey Orlando
c793e550c6
re-enable e2e UI tests on CI (#1961)
#1692 is still open. This PR is not an ideal approach, but it's a quick
win while we wait for that issue to be resolved.

By retrying failing tests up to 3 times, we _should_ be fine to
re-enable these on CI. If a test is failing > 3 times, there's likely a
legitimate issue occuring.
2023-05-23 17:26:12 -04:00
Rares Mardare
98be80c200
Make payload be readonly within Templates drawer (#1994)
# What this PR does

Make payload be readonly within Templates drawer
2023-05-23 13:44:19 +00:00
Rares Mardare
3c54d1bd30
Fix autosuggestions in monaco editor (#1953)
# What this PR does

Bugfix for Monaco Editor on showing suggestions
2023-05-23 13:17:46 +00:00
Rares Mardare
71e9237611
Templates tweaks (#1993)
# What this PR does


- Hide timeline numbering when `isDisabled` is being sent
- Fixed tooltips within expanded route for escalation chains actions
- Replaced GSelect with Select to allow refreshing list manually
2023-05-23 12:33:19 +00:00
Rares Mardare
d43ce506b8
Fixed delete integration copy (#1988)
# What this PR does

Fixed delete integration copy
2023-05-23 11:20:03 +03:00
Rares Mardare
129bd98328
Refactored templates within templates&grouping (#1981)
# What this PR does

As the title says -> Refactored templates within templates&grouping

- File structure was changed
- Templates config added instead of manually rendering each item, this
way that config can be easily overwritten in oncall-private
2023-05-23 07:55:18 +00:00
Rares Mardare
5001759bc1
Templates tweaks (#1979)
# What this PR does

- Fixed Templates view
- Fixed main integration page view for smaller screens
- Show No Escalation Chain/ChatOps (Slack/Telegram for now, no MS teams
yet)
2023-05-22 08:12:03 +00:00
Innokentii Konstantinov
ac2f6edd9b
Mobile push dynamic setting (#1967) 2023-05-18 19:45:31 +08:00
Innokentii Konstantinov
c5b285ce78 Show ratelimit message for test mobile push 2023-05-18 16:53:00 +08:00
Innokentii Konstantinov
f51e6fff5e
Test mobile push (#1933)
# What this PR does
Adds ability to send test push notification

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2023-05-18 15:52:42 +08:00
Roman Pertl
39770c2266
Feat(Dev): Improve Building of Grafana Plugin in Development Env + update node version (#1890)
# What this PR does

- Improvement to the local development environment for the grafana
plugin
- Run initial yarn build inside the docker container with the same
version that is later used for periodic rebuilds
  - Removes the requirement for having yarn/nodejs installed locally
- Using a named volume for storing the node_modules, so they are only
stored once
  - Remove the yarn install step from the Dockerfile
- Ideally we store the node_modules only once inside the named volumes.
Currently they are stored times
- on the host system outside of dockerin grafana-plugins/node_modules
    - inside the docker image
- inside the anonymous docker volume created at the start of a container
- update `node` to 18.16.0 (14.17.0 has reached end-of-life as of 3
weeks ago)

## Which issue(s) this PR fixes

## Checklist

- [X] ~Unit, integration, and e2e (if applicable) tests updated~ N/A
- [ ] 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>
2023-05-17 16:12:51 -04:00
Rares Mardare
e2284ef337
Fix escalation reordering (#1957)
# What this PR does

Fixed bug in Escalation Chains where reordering an item crashed the list

#1936
2023-05-17 14:48:45 +03:00
Yulia Shanyrova
2cc3be2ee4
Integration input field fix (#1955)
Integration input field fix
2023-05-17 11:36:41 +00:00
Yulia Shanyrova
d2191766a7
Fix for creating Integration (#1951)
# What this PR does

Fix for creating Integration
After creating Integration we land on Integration page, not a table
Added error notification for TemplateFoEdit obj to avoid crashing
Loading state for AlertGroup List
Small style fixes
2023-05-17 10:28:27 +00:00
Yulia Shanyrova
5fae708d0a
Grouping templating polishing 2 (#1947)
Fixes for:
Suggestions in the code,
Heartbeat,
Deleting integration, 
Editing regexp route,
Style changes
etc
2023-05-16 16:23:40 +03:00
Rares Mardare
319cc72cdd
Rares/templating settings (#1937)
# What this PR does

Iteration on templates&grouping

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-05-16 11:18:00 +00:00
Yulia Shanyrova
43b6e34c9e
Grouping templating polishing 1st part (#1907)
# What this PR does

- Design polishing of Integration Table, IntegrationForm
- Pagination for Integrations2 page
- Edit regexp route template modal
- Bug fixes
2023-05-15 08:07:04 +00:00
Joey Orlando
9be8080e51
add the ability to set/display "currently undergoing maintenance message" in the UI (#1917)
# What this PR does

add a new endpoint, `GET /maintenance-mode/`, which returns either a
string message pulled from the
`CURRENTLY_UNDERGOING_MAINTENANCE_MESSAGE` env var, or `None` + update
the UI to conditionally show this message if it is set

<img width="1321" alt="Screenshot 2023-05-10 at 11 28 16"
src="https://github.com/grafana/oncall/assets/9406895/833a77fb-3a90-4f9f-88d6-dae0d98d99d4">


## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] 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-05-12 15:44:09 +00:00
Matias Bordese
e57941e650
Minor updates to new/edit webhooks drawer (#1918)
- Do not close drawer when clicking outside of it
 - Update title to show the close icon
 - Add cancel button
 - Move `forward_all` above `data`
 - Enable/Disable `data` based on `forward_all` value
2023-05-12 12:56:07 +00:00
Ildar Iskhakov
56e7ab9112
Iskhakov/fix frontend tests (#1878)
# What this PR does
```
    /Users/ildariskhakov/src/github.com/grafana/oncall/grafana-plugin/node_modules/@grafana/ui/node_modules/uplot/dist/uPlot.cjs.js:3570
    		stroke ??= transparent;
    		       ^^^

    SyntaxError: Unexpected token '??='
```
#### Fix
upgrade to node 16 
OR
add `uplot` to `transformIgnorePatterns`
## 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-05-12 02:20:27 +00:00
Vadim Stepanov
b8f54f1c53
Add docs & logo for AppDynamics integration (#1916)
# What this PR does
Adds docs & logo for AppDynamics integration. 
Main PR in private repo:
https://github.com/grafana/oncall-private/pull/1790.

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

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- No changelog (AppDynamics integration will be only available in cloud)
2023-05-11 16:41:51 +00:00
Maxim Mordasov
ec6d8c2242
fix-new-schedule-creation (#1902)
# What this PR does

Fix autoclosing new schedule form drawer

## 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-05-09 12:37:42 +03:00
Rares Mardare
fcf8a9bacb
Templates&Grouping tweaks&improvements (#1879)
# What this PR does

## Which issue(s) this PR fixes

- Adds option to go back to the Integrations table
- Fixed IntegrationCollapsibleTreeView component issue on
expand/collapse
- Reused/Renamed old CounterBadge to TooltipBadge
- Added maintenance until/hearbeat display to integration
- Changed `maintenace until` display on Integrations table
2023-05-08 08:42:08 +03:00
Ildar Iskhakov
a61b0d8b3d
Use the correct description (#1883)
# 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-05-05 17:52:45 +08:00
Oleg Zaytsev
41f7c23c65
Fix and tidy alertmanager heartbeat template (#1865)
# What this PR does


There was an unnecessary indentation in the `rules:` key which made it
invalid YAML.

Also replaced the mentions to Amixr with Grafana OnCall, used some
`<code>` tags and reworded some sentences.

Also removed the anchor tag from the webhook link: we don't want people
to follow that in their browser, we want them to copy it

## Result screenshot


![image](https://user-images.githubusercontent.com/1511481/236173565-b5201b81-4d69-4d0b-944a-a2106f8fbab3.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)

---------

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-05-05 00:25:05 +00:00