powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

exception while opening dashboards if pg_qualstats is not availible #13

Closed tbe closed 8 years ago

tbe commented 8 years ago

Hi,

we get an exception if we try to open any query dashboard:

[E 151221 15:05:47 web:1524] Uncaught exception GET /database/bsrips/query/3772292926/overview/ (10.23.16.34)
    HTTPServerRequest(protocol='http', host='dbspgd031a:8888', method='GET', uri='/database/bsrips/query/3772292926/overview/', version='HTTP/1.1', remote_ip='10.23.16.34', headers={'Accept-Language': 'de,en-US;q=0.8,en;q=0.6,zh-TW;q=0.4,zh;q=0.2', 'Accept-Encoding': 'gzip, deflate, sdch', 'Host': 'dbspgd031a:8888', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36', 'Dnt': '1', 'Connection': 'keep-alive', 'Referer': 'http://dbspgd031a:8888/database/bsrips/overview/', 'Cookie': 'username="2|1:0|10:1450706732|8:username|12:cG9zdGdyZXM=|c1eff77dfeb8a652dcb7077945eb937f3e17e82713513e70e4ed1665a2469612"; password="2|1:0|10:1450706732|8:password|24:SmZ3WDJTTEJpNkY1V2dPTw==|1e3412698b146ecbec66f67dc690baa4204f12001beef482057fb4f85b09411d"; server="2|1:0|10:1450706732|6:server|8:bWFpbg==|0018e508fe02d7763fa44de7ababebd94de74721d9d0b2102da24c3c352b7fbe"; _flashes="2|1:0|10:1450706742|8:_flashes|4:Ti4=|8240af00b8e07fd8def8b67130d63fd9530ab17371689a03a0460a5bb1aac4a0"', 'Upgrade-Insecure-Requests': '1'})
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1443, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/var/lib/postgresql/powa-web-3.0.2/powa/dashboards.py", line 37, in get
        param_dashboard = self.dashboard.parameterized_json(self, **params)
    AttributeError: 'NoneType' object has no attribute 'parameterized_json'
rdunklau commented 8 years ago

Hello.

Could you attach the extensions you're using ? You should be able to get the whole list at yourserver/config/

tbe commented 8 years ago

After a little bit of research we found that the pg_qualstats extension was not installed in the powa database. After CREATE EXTENSION the exception is gone

rjuju commented 8 years ago

Thank you for the report! This issue is now fixed.