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

Add handling of new DataHoverEvent #77

Merged
merged 2 commits into from
Jan 4, 2023
Merged

Conversation

pesintta
Copy link
Contributor

New panel types in Grafana may emit DataHoverEvents instead of LegacyGraphHoverEvents.

Fixes #67

New panel types in Grafana may emit DataHoverEvents instead of LegacyGraphHoverEvents.

Fixes pR0Ps#67
Some graph types may emit events where there is no sensible value for x position.
Copy link

@Bart-1992 Bart-1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build your adoptions into on our local grafana plugins directory, they are working perfectly :)! Many thanks!!

@pR0Ps
Copy link
Owner

pR0Ps commented Jan 4, 2023

Looks good to me, thanks for contributing! (and thanks to @Bart-1992 for confirming it works)

@pR0Ps pR0Ps merged commit 6aa5434 into pR0Ps:master Jan 4, 2023
@CptHolzschnauz
Copy link

Cool. Thx. Don't you have to bump a new release or how is this received by Grafana Labs for the Plugin?

@umbm
Copy link

umbm commented Jan 5, 2023

Please release it as new version to grafana too.
There only the 2.1.2 without this fixes is available.
Thx

Edit
@Bart-1992
or could you give us a step by step how to implement it without using grafana-library?

@Bart-1992
Copy link

Bart-1992 commented Jan 9, 2023

@umbm I managed to get it working on our linux machine with following procedure:

First off all you need to make sure you can install 'unsigned' plugins into your grafana application:
Make the following changes in your grafana.ini ( settings file, for more info check : https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/ )

  1. Make sure you are in developer mode, add/change the following:

app_mode = development

Plugins section needs to look like this ( if not available in grafana.ini, just add this section ).


[plugins]
;enable_alpha = false
app_tls_skip_verify_insecure = true
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins = grafana-trackmap-panel
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
;plugin_admin_enabled = false
;plugin_admin_external_manage_enabled = false
;plugin_catalog_url = https://grafana.com/grafana/plugins/
# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
;plugin_catalog_hidden_plugins =

Remove the old Pr0ps plugin ( using Grafana GUI ) or manually using command line

  1. Download/clone @pesintta 's ( or this updates one )repository to your local machine:
    git clone https://github.com/pesintta/grafana-trackmap-panel.git
  2. Unzip the zip file:
    unzip grafana-trackmap-panel
  3. Move into the unzipped folder:
    cd /grafana-trackmap-panel/
  4. As mentioned on main page of this repository, build manually using following comands :
    npm install
    npm run build
  5. Copy the build ( the created 'dist' ) folder into your grafana plugins directory:
    cp -a /what-ever-your-location is/grafana-trackmap-panel-master/dist /var/lib/grafana/plugins/grafana-trackmap-panel
  6. Restart grafana
    sudo systemctl restart grafana-server

After this the plugin should be working.

@CptHolzschnauz
Copy link

Thx but i prefer signed plugins for prod servers. Would be nice to have it within grafana.

@pR0Ps
Copy link
Owner

pR0Ps commented Jan 10, 2023

Sorry all, I'll push an update hopefully later today. I've had issues with my setup to test this locally which I would normally like to do before pushing a release. In this case though it seems like the released version is just broken and @Bart-1992 reports that the current HEAD is not so I'll just go for it.

@CptHolzschnauz
Copy link

No worries, good to hear, that's the way, thank you for your work!

@pR0Ps
Copy link
Owner

pR0Ps commented Jan 11, 2023

Made a small change to the PR in 6406d78 to keep Grafana v7.x.x from breaking. Managed to test it on v8.5.13 and v9.1.7 too and it worked fine.

Plugin has been released as v2.1.3 as well as submitted to Grafana (no idea how long that process will take)

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.

Circle marker not working with the new time series graph
5 participants