Skip to content

🐛 grafana: should show "No Alerts" or similar #3263

Open
@danieljelcic

Description

@danieljelcic

Workspace

grafana

📜 Description

This issue has to do with the EntityGrafanaAlertsCard component and the UnifiedAlertingGrafanaApiClient.alertsForSelector method.

When the following is true:

  • EntityGrafanaAlertsCard is present on the Entity page
  • the entity has grafana/alert-label-selector: 'label=value'
  • there is a rule on the connected Grafana instance which matched label and value
  • BUT there are no instances which match label and value

then

alertsResponse is {"status":"success","data":{"alerts":null}} and this line causes Cannot read properties of null (reading 'filter'):

Image

👍 Expected behavior

It should show "No Alerts" or similar

👎 Actual Behavior with Screenshots

Described above.

👟 Reproduction steps

Described above.

📃 Provide the context for the Bug.

Trying to set up Grafana plugin on a test backstage app.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions