Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes made in channels package in Grafana repository from 7/14 to 8/30 #15

Merged
merged 11 commits into from
Aug 30, 2022

Conversation

yuri-tceretian
Copy link
Contributor

No description provided.

JacobsonMT and others added 10 commits August 30, 2022 11:07
…#52254)

Team's webhook API does not always use the status code to communicate errors.
There are cases where it returns 200 and an error message in the body.
For example, 429 - Too Many Requests or when the message is too large.
Instead, what we should be looking for is a response body = "1".

https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL#send-messages-using-curl-and-powershell
# Conflicts:
#	alerting/channels/email_test.go
This commit fixes push notifications for Slack which used to show "This content cannot be displayed". The text field is shown in both the message and the push notification.
…n header (#52515)

* Allow the webhook notifier to support a custom Authorization header

Instead of doing something clever of re-using the existing username/password fields of Basic Authentication - I opted for two diffent fields to match the upstream Alertmanager configuration (that in turn is based of the HTTP Basic authentication).

 It'll fail if you have values for both HTTP Basic Authentication and Authorization.
…2593)

This reverts commit 0af09b8c579e2a738c7e2a9431ce2511ed706b59.
* replace ioutil.ReadFile -> os.ReadFile

* replace ioutil.ReadAll -> io.ReadAll

* replace ioutil.TempFile -> os.CreateTemp

* replace ioutil.NopCloser -> io.NopCloser

* replace ioutil.WriteFile -> os.WriteFile

* replace ioutil.TempDir -> os.MkdirTemp

* replace ioutil.Discard -> io.Discard
This commit changes the cards in Teams notifications from Office 365
Connector cards to Adaptive Cards to fix an issue where images were not
shown in Teams for desktop and web. Since Office 365 Connector cards
are deprecated, it made sense to move to Adapative Cards and fix this
bug at the same time.

The Adaptive Card messages maintain the design of the Office 365
Connector Card with a number of minor differences:

- In Adaptive Card messages the color of the title is red or green
  depending on the status of the alerts, where as with Office 365
  connector cards there was a colored border at the top of the title

- In Adaptive Card messages the title is bold to make it easier to read
  when the color is red or green

- In Adaptive Card messages the thumbnails for images are medium size
  if there are more than two images, otherwise large size
This commit fixes notifications for Microsoft Teams where notifications
would just contain "Card" rather than the title.
@CLAassistant
Copy link

CLAassistant commented Aug 30, 2022

CLA assistant check
All committers have signed the CLA.

@yuri-tceretian yuri-tceretian self-assigned this Aug 30, 2022
@yuri-tceretian
Copy link
Contributor Author

I ran tests locally and confirmed them passing

@yuri-tceretian yuri-tceretian merged commit eb37d6e into main Aug 30, 2022
@yuri-tceretian yuri-tceretian deleted the port-from-grafana-8-30 branch August 30, 2022 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants