Replies: 4 comments 9 replies
-
Can you provide an example dashboard/panel of what you've tried or how the Grafana variables are set up? |
Beta Was this translation helpful? Give feedback.
-
I am trying to update the Grafana variable. I want to update both the text and value, but to different values.
For example, I want to update ${QPath01:text} to “Dashboard” and ${QPath01:value} to “/dashboard”. I can code it such that I update them independently (preferred) or I can update them at the same time (i.e. with the same call to htmlGraphics.locationService.partial) if need be.
I can try to put together a simple test panel if the above clarification is insufficient.
Thanks,
Pat
Patrick M. Sheehy | Portal Monitoring Program Management, Optum Digital
M (507) 251-9899
***@***.******@***.***> | www.myuhc.com<http://www.myuhc.com/>
Helping People Live Healthier Lives®
■ Integrity ■ Compassion ■ Relationships ■ Innovation ■ Performance
From: Ole Kristian (Zee) ***@***.***>
Sent: Monday, August 7, 2023 2:15 PM
To: gapitio/gapit-htmlgraphics-panel ***@***.***>
Cc: Sheehy, Patrick ***@***.***>; Author ***@***.***>
Subject: Re: [gapitio/gapit-htmlgraphics-panel] Update part of a Custom variable (Discussion #155)
Can you provide an example dashboard/panel of what you've tried or how the Grafana variables are set up?
I might be misreading, but are you trying to update the Grafana variable or the Custom Properties?
If you are trying to update the Grafana variable, are you trying to update the value and the text?
—
Reply to this email directly, view it on GitHub<#155 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWHT4SU6MWTSMO5ZO23ZFBTXUE5D5ANCNFSM6AAAAAA3HJ5WYI>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or intended recipient’s authorized agent, the reader is hereby
notified that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.
|
Beta Was this translation helpful? Give feedback.
-
The example shows updating a custom variable that contains only a list of values. My custom variable has a single “text : value” pair. I am not changing the variable name or label, only the content of the variable, but I want to be able to change each side of the content pair.
Patrick M. Sheehy | Portal Monitoring Program Management, Optum Digital
M (507) 251-9899
***@***.******@***.***> | www.myuhc.com<http://www.myuhc.com/>
Helping People Live Healthier Lives®
■ Integrity ■ Compassion ■ Relationships ■ Innovation ■ Performance
From: Ole Kristian (Zee) ***@***.***>
Sent: Tuesday, August 8, 2023 1:43 PM
To: gapitio/gapit-htmlgraphics-panel ***@***.***>
Cc: Sheehy, Patrick ***@***.***>; Author ***@***.***>
Subject: Re: [gapitio/gapit-htmlgraphics-panel] Update part of a Custom variable (Discussion #155)
You can update the Grafana variable value as shown in this example: https://gapit-htmlgraphics-panel.gapit.io/docs/examples/update-grafana-variable-example/
But you can't update the Grafana variable name or label without using the Grafana API to update the entire dashboard and change the template variable there. It would require a fetch/post command to the Grafana API, which requires the user to have edit permissions on the dashboard.
—
Reply to this email directly, view it on GitHub<#155 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWHT4SVZQHNP5MTZYNGWB2DXUKCD7ANCNFSM6AAAAAA3HJ5WYI>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or intended recipient’s authorized agent, the reader is hereby
notified that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.
|
Beta Was this translation helpful? Give feedback.
-
Here's the variable panel: I've also attached the JSON for a test dashboard that tries the four ways I experimented with. |
Beta Was this translation helpful? Give feedback.
-
I have several Custom variables which take advantage of the "text : value" format of that construct. I know I can retrieve the value of one half or the other by coding the JSON for the Custom Properties like so:
"QPath01text": "${QPath01:text}",
"QPath01value": "${QPath01:value}",
However, my efforts to set one half or the other (or set both sides at the same time) in the JavaScript have thus far not worked. Trying to set either half (using the Custom Properties aliases above) results in no change to the variable. If I add a third alias to the Custom Properties for the unqualified variable, as in:
"QPath01var": "${QPath01}",
and attempt a change, the provided value is inserted on both halves of the variable. This includes if I specify the value as
"newText : newValue"
The resulting variable value is "newText : newValue : newText : newValue"
If there any syntax that I can use to successfully set one side or the other (or both sides at the same time to separate values) or is this not possible and I will need to use separate Constant variables?
Beta Was this translation helpful? Give feedback.
All reactions