Modify

Opened 16 years ago

Closed 16 years ago

#3372 closed task (fixed)

How I have to use charts control

Reported by: didley@… Owned by: Prentice Wongvibulsin
Priority: normal Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Very interesting plugin. But your link to charts control shows a webpage it's very confusing. There is an advice like:

To use the Charts Control, include the following source files in your web page

What means integrate in my webpage?

Do you have more information for me?

didley

Attachments (0)

Change History (6)

comment:1 Changed 16 years ago by Prentice Wongvibulsin

Resolution: invalid
Status: newclosed

I believe you followed a link to the YUI charts documentation page. You can download source for this plugin via SVN or download the packaged egg here.

To use this plugin, simply install it to your Trac and give users TSTATS_VIEW permission. Then a "Ticket Stats" tab should appear on your trac. (Users with TRAC_ADMIN should already be able to see the tab).

trac-admin /path/to/env permission add username TSTATS_VIEW

Let me know if you have any further questions.

comment:2 Changed 16 years ago by didley@…

Resolution: invalid
Status: closedreopened

Now I did download the source code I did cook an egg and installed it in my environment. After I got

2008-07-12 19:45:20,069 Trac[main] ERROR: HDF dataset not available. Check your clearsilver installation
Traceback (most recent call last):
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\main.py", line 447, in _dispatch_request
    dispatcher.dispatch(req)
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\main.py", line 215, in dispatch
    req.display(template, content_type or 'text/html')
  File "d:\programme\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\api.py", line 298, in display
    assert self.hdf, 'HDF dataset not available. Check your clearsilver installation'
AssertionError: HDF dataset not available. Check your clearsilver installation

After this I took your already egg and got the same.

I'm using

User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727)

Trac: 0.12dev
Python: 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
setuptools: 0.6c6
SQLite: 3.3.4
pysqlite: 2.3.2
Genshi: 0.5.1dev
Subversion: 1.4.3 (r23084)
jQuery: 1.2.6

didley

comment:3 Changed 16 years ago by Prentice Wongvibulsin

Resolution: fixed
Status: reopenedclosed

It looks like you are missing clearsilver. Trac seems to be migrating away from the cs templating system and now recommending the use of Genshi. Since trac 0.11 clearsilver was not a required component; however, it still work in 0.11. Installing clearsilver will fix your problems (assuming clearsilver works on 0.12dev).

comment:4 Changed 16 years ago by john@…

Resolution: fixed
Status: closedreopened

Running on a Debian Lenny system using Trac 0.11.1 I get the "Ticket Stats" tab appearing but when I click on it I get a page of errors as follows:

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 339, in send_error

'text/html')

File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 684, in render_template

data = self.populate_data(req, data)

File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 592, in populate_data

dchrome?.update(req.chrome)

File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 169, in getattr

value = self.callbacks[name](self)

File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 460, in prepare_request

for category, name, text in contributor.get_navigation_items(req):

File "build/bdist.linux-i686/egg/ticketstats/ticketstats.py", line 42, in get_navigation_items

if req.perm.has_permission('TSTATS_VIEW'):

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 523, in has_permission

return self._has_permission(action, resource)

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 537, in _has_permission

check_permission(action, perm.username, resource, perm)

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 424, in check_permission

perm)

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 282, in check_permission

get_user_permissions(username)

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 357, in get_user_permissions

for perm in self.store.get_user_permissions(username):

File "/usr/lib/python2.5/site-packages/trac/perm.py", line 175, in get_user_permissions

cursor.execute("SELECT username,action FROM permission")

File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 51, in execute

return self.cursor.execute(sql)

InternalError: current transaction is aborted, commands ignored until end of transaction block

comment:5 Changed 16 years ago by john@…

Seeing this in the postgres log as well:

2009-04-06 20:00:01 PDT ERROR: column "created" does not exist at character 131 2009-04-06 20:00:01 PDT STATEMENT: SELECT t.type AS type, owner, status, time AS created FROM ticket t, enum p WHERE p.name = t.priority AND p.type = 'priority' AND created <= 1220832000 2009-04-06 20:00:01 PDT ERROR: current transaction is aborted, commands ignored until end of transaction block 2009-04-06 20:00:01 PDT STATEMENT: SELECT username,action FROM permission 2009-04-06 20:00:01 PDT ERROR: current transaction is aborted, commands ignored until end of transaction block 2009-04-06 20:00:01 PDT STATEMENT: SELECT username,action FROM permission 2009-04-06 20:00:02 PDT ERROR: current transaction is aborted, commands ignored until end of transaction block 2009-04-06 20:00:02 PDT STATEMENT: SELECT username,action FROM permission 2009-04-06 20:02:01 PDT LOG: incomplete startup packet

running the command:

trac-admin /var/www/trac/ upgrade

does not help.

comment:6 Changed 16 years ago by john@…

Resolution: fixed
Status: reopenedclosed

the answer was in this patch for postgres db:

http://trac-hacks.org/ticket/3899

I could apply the 1st patch "pg-ticketstats.patch" but the 2nd seemed to be already taken care of and the code had changed enough that I couldn't possibly apply it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Prentice Wongvibulsin.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.