backstage-plugin-grafana
backstage-plugin-grafana copied to clipboard
Allow getting data from multiple tags
With this feature, now it's possible to fetch the alerts and dashboards for multiple tags.
This feature was also needed in our company, and it was rather simple to implement.
The idea is just adding a list of tags separated by commas. So instead of my-tag
, now you can use my-tag-1,my-tag-2
, and the API will make 2 requests to fetch all the information for both tags. Finally, I'm executing an extra check to remove duplicates, as a dashboard could have multiple tags and be fetched multiple times.
This change is small and should be easy to review, but if you need more data, please don't hesitate asking.
Applied the requested changes. I added a new parameter to the dashboard, so the ID is also stored in there and the filtering can be performed.
Hey @K-Phoen , any update on this? We need this feature and the other I created so we can integrate the plugin in our project :)
Sorry to ping again @K-Phoen, could you have a look at this MR? We'd really like to switch back to this plugin again, so far we have to use a fork.
@K-Phoen @dweber019 @jmfrancois Any way to review this, our organization could use the same feature :)
Hi @K-Phoen , I have updated the PR to have the latest changes from the main branch. I have also simplified a bit how to do it. I tested it locally and it's working fine for both clients.
It would be great if this gets merged, then we could use this plugin instead our forked version, because we need the multiple-tag-approach for our use-case.
@K-Phoen Possible to get a review on this?
Not to step on anyone's toes, but I've also forked K-Phoen's repo and implemented my own version of this that supports several logical operators and doesn't require an additional annotation.
This should be addressed by #63 :)