PocketQuery - SQL Query Parameter to Template

eminkevich_scg August 17, 2014

Hi,

Is there a way to reference a PocketQuery macro parameter in a template?

I have "hostname" param that is being passed to the SQL query:

select * from load_average where hostname=:hostname

can I reference the parameter in the template as well? Something like:

<script>

var options = { 
title: $hostname,
height: 300,
width: 600,
vAxis: { minValue: 0, maxValue: 1, format:'#%' },
hAxis: {slantedTextAngle:45},
legend: {position:'none'}
};

PocketQuery.chart('LineChart', options);

</script>

Thank you.

1 answer

1 accepted

2 votes
Answer accepted
Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2014

Hi Evgeny,

Yes you can! Try $queryParameters.hostname and it should work! Let me know if you need further help!

Regards, Felix

eminkevich_scg August 17, 2014

Thank you! Works!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events