Hi
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.
Tnx.
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?
Regarding the query, the bandanacontext attribute has value:
'de.scandio.confluence.plugins.pocketquery.entities.Template',
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'.
Example:
<de.scandio.confluence.plugins.pocketquery.entities.Template> <name>geochart</name> <content>&lt;script&gt;&#x0D; PocketQuery.chart(&apos;drawMarkersMap&apos;, {&#x0D; showTip: true,&#x0D; dataTable: [&#x0D; [&apos;Town&apos;, &apos;Population&apos;],&#x0D; [&apos;Zagreb&apos;, &apos;Zagreb: 1,363,800,000&apos;],&#x0D; [&apos;Split&apos;, &apos;Split: 1,242,620,000&apos;]&#x0D; ]&#x0D; });&#x0D; &lt;/script&gt;</content> </de.scandio.confluence.plugins.pocketquery.entities.Template>
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
<html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["motionchart"]}); google.setOnLoadCallback(drawChart); 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'); data.addRows([ ['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}); } </script> </head> <body> <div id="chart_div" style="width: 600px; height: 300px;"></div> </body> </html>
Kind Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.