pocket query data location


Where is pocketquery template and query data located? Is the data  within a database or within some configuration files?

I am asking because I need to remove one particular template which has rendered my entire pocketquery admin page useless. 

I tried to re install pocketquery add-on but the action didn't remove my existing queries and templates.





5 answers

1 accepted

1 vote
Accepted answer

I see. Please note that PocketQuery has a JS wrapper around the Google Chart library, so you should never need such code as above. The main problem in your case, however, is that you have <html>, <head> and <body> elements around your code. This is wrong since the template will be rendered within an existing HTML document. This is probably what broke your code. Otherwise, the correct template for you would probably be something like:

PocketQuery.chart('MotionChart', {
	dataTable: [
		['Apples',  new Date (1988,0,1), 1000, 300, 'East'],
  	    ['Oranges', new Date (1988,0,1), 1150, 200, 'West'],
        ['Bananas', new Date (1988,0,1), 300,  250, 'West'],
        ['Apples',  new Date (1989,6,1), 1200, 400, 'East'],
        ['Oranges', new Date (1989,6,1), 750,  150, 'West'],
        ['Bananas', new Date (1989,6,1), 788,  617, 'West']

However, I still don't understand how a PocketQuery template can have influence on the admin screen. I guess you already deleted the template and don't have a screenshot?

I found the solution

connect to confluence database and execute query

update confluence.bandana set bandanavalue='test' where bandanakey='anime';


Anime is the name of problematic pocketquery template.

This fixes the problem.

Hi Delisa,

Actually, the keys are not simply the names, but a (long) namespace like: de.scandio.confluence.plugins.pocketquery.templates.anime

However, I don't quite understand this:

has rendered my entire pocketquery admin page useless

How did you achieve this? The templates are not rendered on the admin screen.

Regards, Felix [Scandio]

Hi Felix

I was playing with animation libraries for google charts and I pasted this code into template.

After that, admin screen showed only template area. It was broken, and only action allowed was to add new template. After a new template would be added into broken admin screen, postback returned only one json line. 


    &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["motionchart"]});
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Fruit');
        data.addColumn('date', 'Date');
        data.addColumn('number', 'Sales');
        data.addColumn('number', 'Expenses');
        data.addColumn('string', 'Location');
          ['Apples',  new Date (1988,0,1), 1000, 300, 'East'],
          ['Oranges', new Date (1988,0,1), 1150, 200, 'West'],
          ['Bananas', new Date (1988,0,1), 300,  250, 'West'],
          ['Apples',  new Date (1989,6,1), 1200, 400, 'East'],
          ['Oranges', new Date (1989,6,1), 750,  150, 'West'],
          ['Bananas', new Date (1989,6,1), 788,  617, 'West']

        var chart = new google.visualization.MotionChart(document.getElementById('chart_div'));

        chart.draw(data, {width: 600, height:300});
    &lt;div id="chart_div" style="width: 600px; height: 300px;"&gt;&lt;/div&gt;

Kind Regards

Regarding the query, the bandanacontext attribute has value: 


but the name of actual template is saved within "bandanakey" attribute as a single string.

The entire xml with a namespace, name tag and content tag is saved as 'bandanavalue'.


               PocketQuery.chart(&amp;apos;drawMarkersMap&amp;apos;, {&amp;#x0D;                                                          
               showTip: true,&amp;#x0D;                                                                                       
               dataTable: [&amp;#x0D;                                                                                         
               [&amp;apos;Town&amp;apos;, &amp;apos;Population&amp;apos;],&amp;#x0D;                                                      
               [&amp;apos;Zagreb&amp;apos;, &amp;apos;Zagreb: 1,363,800,000&amp;apos;],&amp;#x0D;                                         
               [&amp;apos;Split&amp;apos;, &amp;apos;Split: 1,242,620,000&amp;apos;]&amp;#x0D;                                            




Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

455 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you