Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Added custom YLabel and Custom content on tooltip #153

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

sbengo
Copy link
Contributor

@sbengo sbengo commented Dec 2, 2020

Actually, custom label are not allowed, it directly uses the provided by
the query result as the target/alias

This feature allows to:

  • Split YLabel to store its partials and reuse them on link and extra tooltip field
  • Override YLabel with splitted and custom values
  • Added Custom Content to show metadata to the user on each serie

This PR fixes #152

Thanks,
Regards

Actually, custom label are not allowed, it directly uses the provided by
the query result as the target/alias

This feature allows to:

- Split YLabel to store its partials and reuse them on link and extra tooltip field
- Override YLabel with splitted and custom values
- Added Extra Tooltip to show metadata to the user on each serie
@diafour
Copy link
Collaborator

diafour commented Dec 8, 2020

Looks good. There are minor naming issues, but I'll fix them in a separate PR that will rework customContent into a new item type.

Will you add more PRs in the near future? There is a huge update coming to migrate the plugin to grafana-toolkit.

@sbengo
Copy link
Contributor Author

sbengo commented Dec 8, 2020

Thanks for the comment @diafour !

I like the rework of the customContent in new type item, but as I told you I suppose that it will break with the actual item definition, used for links

This PR #153 and #148 fills our needs to complete our current project (the real case described on issue), so I have no plans to do more PRs related with.
I suppose that the incoming migration to grafana-toolkit will break (short term), with Grafana 6.X, and as I told you in the related PR issue, we cannot manage a Grafana 7.X migration right now...

So, with the above I would ask you:

  • Can this PR be merged, so we can use the upstream plugin (not a release, but pointer to commit)?

Thanks again for your feedback,
Regards!

@diafour
Copy link
Collaborator

diafour commented Dec 8, 2020

I suppose that it will break with the actual item definition, used for links

Don't worry, it should not break existing panel configurations. There is a config migration for this purpose.

I suppose that the incoming migration to grafana-toolkit will break (short term), with Grafana 6.X

I thought it that way, but surprisingly the plugin works great in 6.6.2 after building by @grafana/toolkit 7.3.4. I plan to test more versions of Grafana and I think 6.2 or 6.3 will be the minimum supported version after the update.

Can this PR be merged

Yes! Thank you for your time and efforts! I merge it now.

@diafour diafour merged commit 6bda6de into flant:master Dec 8, 2020
@diafour diafour added this to the 0.4.0 milestone Feb 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Custom YLabel based on original series and ExtraInfo field on tooltip
2 participants