Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Conversation

@ryft
Copy link

@ryft ryft commented Mar 7, 2018

This is a simple implementation of a panel option being used to navigate to a new URL on click.

Instances of $country in the clickthrough URL will be replaced with the selected country. In fact this should work regardless of location data type, so perhaps "country" is not the most appropriate keyword.

See #62 and #121.

This is a simple implementation of a panel option being used to
navigate to a new URL on click.
@CLAassistant
Copy link

CLAassistant commented Mar 7, 2018

CLA assistant check
All committers have signed the CLA.

amotl added a commit to grafana-toolbox/panodata-map-panel that referenced this pull request May 6, 2019
…a#190

Add basic variable interpolation based on keys from `dataPoint`.
Saying that, all metric values have been added to the dataPoint
beforehand by prefixing them with `point_` to allow for setting
things like `clickthroughURL: /url/to/$point_station_id` if
there’s a field called `station_id` in the current datapoint.
@amotl
Copy link

amotl commented May 11, 2019

Dear James,

Introduction

We cherry-picked your improvements into our working branch at [1], wrote about this and further updates at [2] and just announced the outcome at [3], which you might also be interested in. Thanks a bunch for sharing your efforts.

Details

As you can see from the screenshot below, we improved the situation where only a field called country would get interpolated and extended this to a bunch of more variables coming from the dashboard and the database. You will find more details about this specific feature at [4], along with the other option for click-through URLs coming thoroughly from the database #190.

image

With kind regards,
Andreas.

[1] https://github.com/hiveeyes/grafana-worldmap-panel
[2] https://community.grafana.com/t/giving-the-grafana-worldmap-panel-some-love/17210
[3] https://community.hiveeyes.org/t/grafana-worldmap-panel-0-3-0-dev-series/1824
[4] https://community.hiveeyes.org/t/grafana-worldmap-panel-0-3-0-dev-series/1824/13

@ronansalmon
Copy link

Hi all,
we have forked worldmap-panel and fixed the conflict and got this link clicking working. Are you interested in this patch ? Is so, I can push a PR.

Ronan.

@amotl
Copy link

amotl commented Aug 29, 2019

Dear @ronansalmon,

click-through should work in https://github.com/hiveeyes/grafana-worldmap-panel already. Can you verify that?

With kind regards,
Andreas.

@ronansalmon
Copy link

Dear @ronansalmon,

click-through should work in https://github.com/hiveeyes/grafana-worldmap-panel already. Can you verify that?

With kind regards,
Andreas.

I tried, but the plugin does not work over here :

Plugin Error
this.$location is undefined

I tried both the 0.4.0 and the latest devel. We are using a pretty old version of Grafana v5.1.3 and I am not allowed to update it yet.

Ronan.

@amotl
Copy link

amotl commented Sep 5, 2019

Dear @ronansalmon,

thanks for sharing your observations. May I humbly ask how you installed the latest release from [1]? The last time we tried, we have been able to get it running successfully by following the guidelines at [2].

With kind regards,
Andreas.

[1] https://github.com/hiveeyes/grafana-worldmap-panel
[2] https://community.grafana.com/t/giving-the-grafana-worldmap-panel-some-love/17210

@ronansalmon
Copy link

ronansalmon commented Sep 10, 2019

Hi,
the plugin seams to be running with a recent grafana version. I will try to use it.
Thanks,

Dear @ronansalmon,

thanks for sharing your observations. May I humbly ask how you installed the latest release from [1]? The last time we tried, we have been able to get it running successfully by following the guidelines at [2].

@amotl
Copy link

amotl commented Nov 18, 2019

Dear @ryft and @ronansalmon,

The [forked] plugin seams to be running with a recent Grafana version. I will try to use it.

Thanks for letting us know. There are some minor updates on [1], mainly about the most recent build 0.6.0 together with respective instructions on how to install the refurbished panel now called Map Panel side-by-side with the canonical Worldmap Panel in order to give you some leg room trying it out, even on production installations of Grafana.

May we humbly ask @ryft to try out the clickthrough feature there (thanks for your contribution again!) and - given it works as intended - to close this PR?

With kind regards,
Andreas.

[1] https://community.grafana.com/t/giving-the-grafana-worldmap-panel-some-love/17210/11

@ryft
Copy link
Author

ryft commented Dec 3, 2019

Hi Andreas, apologies for the delayed response, I'm happy to close this PR.

@vmanju123
Copy link

Hi Ryft

I made these changes on my local source and compiled the plugin and i am able to launch the URL, how do i pass context into the URL, ? I have following issues

  1. I would like to pass start time , end time from the dashboard where i am launching worldmap panel, i use elastic search db in backend, grafana supports __to and __from built in variables for from and to time frames, I did not see the URL picking up the grafana built in variables
  2. I would like the URL to be launched in seperate tab ? is there a way to do this ?
  3. I would like to pass variables in the URL, I tried template variables but its not picking up the values of the variables in the URL

thanks
vmanju123

@amotl
Copy link

amotl commented Mar 12, 2020

Dear @vmanju123,

please have a look at #129 (comment) and #248 (comment) where we described that we implemented this feature within our fork [1,2]. It has incorporated more sophisticated drill-down/clickthrough features from the community as well as some advanced variable interpolation features from our own pen. Both features might help you here.

The updated plugin can be installed easily [3]. We hope this helps and we will be happy to hear about the outcome for you.

With kind regards,
Andreas.

[1] https://github.com/panodata/grafana-map-panel
[2] https://community.panodata.org/t/grafana-map-panel/121
[3] https://community.panodata.org/t/grafana-map-panel/121#setup

@vmanju123
Copy link

I tried downloading the latest DEV branch code 0.9.0 and compile it, I am seeing following error
while compiling , I have grafana 6.5.2 code base

ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts
[tsl] ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts(54,17)
TS2339: Property 'url' does not exist on type 'JQueryXHR'.

ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts
[tsl] ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts(69,17)
TS2339: Property 'url' does not exist on type 'JQueryXHR'.

ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts
[tsl] ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/core.ts(88,17)
TS2339: Property 'url' does not exist on type 'JQueryXHR'.

ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/chrome.ts
[tsl] ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/chrome.ts(65,5)
TS2571: Object is of type 'unknown'.

ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/chrome.ts
[tsl] ERROR in /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/src/chrome.ts(69,5)
TS2571: Object is of type 'unknown'.
Child mini-css-extract-plugin ../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/src/index.js??ref--6-2!styles/dark.css:
Entrypoint mini-css-extract-plugin = *
[0] ../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/src??ref--6-2!./styles/dark.css 1.02 KiB {0} [built]
[1] ../node_modules/css-loader/dist/runtime/api.js 2.04 KiB {0} [built]
Child mini-css-extract-plugin ../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/src/index.js??ref--6-2!styles/light.css:
Entrypoint mini-css-extract-plugin = *
[0] ../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/src??ref--6-2!./styles/light.css 778 bytes {0} [built]
[1] ../node_modules/css-loader/dist/runtime/api.js 2.04 KiB {0} [built]

Trace: Build failed
at /root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/node_modules/@grafana/src/cli/utils/useSpinner.ts:13:15
at step (/root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/node_modules/tslib/tslib.js:136:27)
at Object.throw (/root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/node_modules/tslib/tslib.js:117:57)
at rejected (/root/go/src/github.com/grafana/grafana/data/plugins/grafana-map-panel/node_modules/tslib/tslib.js:108:69)
at
✖ Build failed

@amotl
Copy link

amotl commented Mar 12, 2020

Dear @vmanju123,

thanks for the feedback. I have diverted further discussions to grafana-toolbox#56 in order not to clutter the original issue.

With kind regards,
Andreas.

@vmanju123
Copy link

vmanju123 commented Mar 13, 2020

Thanks, coming back to original issue, I am trying to pass the URL as below
https://xyz.com/d/xyz-monitor/xyz-monitor?&from=${__from}&to=${__to}&var-Filter=clientGeo|=|${__field_clientGeo}&var-Filter=applicationDescription|=|${__field_applicationDescription}

in the above URL clientGeo is the geo hashpoint and applicationDescription is another field both from elastic search, I can see __from and __to picking up the time fields form the main panel but clientGeo and applicationDescription are not resolving to values, both clientGeo and applicationDescription are in the elastic query and returning data to main panel, but not getting resolved to values in the click through URL

@amotl
Copy link

amotl commented Mar 13, 2020

Dear @vmanju123,

the variable interpolation feature does not have anything to do with this pull request. Please open an issue about that on our fork [1].

With kind regards,
Andreas.

[1] https://github.com/panodata/grafana-map-panel

@vmanju123
Copy link

ok & thanks, makes sense

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.

5 participants