If an image section is included in the JSON payload for MS Teams alerts
when no image URL exists, rendering of the alert in the client fails.
This change makes sure that an image section is only included in the
JSON payload if an image URL exists.
Closes#16082
* master: (322 commits)
graphInterval needs to update after query execution, fixes#14364
Explore: Parse initial dates
Aligned styling of stats popover/box with rest of grafana & minor css refactoring
Prometheus: Make result transformer more robust for empty responses
Rebase fixes
Explore: Logging line parsing and field stats
fixed unit tests
made unknown color theme aware and sync with graph color, some minor cleanup
Explore: improve error handling
use render props instead of cloneElement
sort of a hacky way to figure if the small variation should be used for the label
add basic button group component, using the the same label style as is
explore logs styling
wip: alternative level styling & hover effect
wip: explore logs styling
more detailed error message for loki
If user login equals user email, only show the email once #14341
UserPicker and TeamPicker should use min-width instead of fixed widths to avoid overflowing form buttons. #14341
wip: explore logs styling
restoring monospace & making sure width are correct when hiding columns
...
See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
pkg/services/alerting/notifiers/telegram.go:130:2⚠️ should check returned error before deferring imageFile.Close() (SA5001) (megacheck)
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/services/alerting/notifiers/telegram_test.go:55:44⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:71:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:88:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/services/alerting/notifiers/telegram_test.go:104:45⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
If notification state is pending and last update of state was made
less than a minute ago. In the case of a grafana instance is shut down/crashes
between setting pending state and before sending the notification/marks as complete
this logic should allow the notification to be sent after some time instead of
being left in an inconsistent state where no notifications are being sent.