fixed toolbar issue 1111, thanks niphlod
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.2.1 (2012-10-29 08:59:50) stable
|
Version 2.2.1 (2012-10-29 09:06:49) stable
|
||||||
|
|||||||
+16
-14
@@ -435,21 +435,23 @@ class Response(Storage):
|
|||||||
admin = URL("admin", "default", "design",
|
admin = URL("admin", "default", "design",
|
||||||
args=current.request.application)
|
args=current.request.application)
|
||||||
from gluon.dal import THREAD_LOCAL
|
from gluon.dal import THREAD_LOCAL
|
||||||
if hasattr(THREAD_LOCAL, 'instances'):
|
dbs = getattr(THREAD_LOCAL,'db_instances',{}).items()
|
||||||
dbstats = [TABLE(*[TR(PRE(row[0]), '%.2fms' % (row[1] * 1000))
|
dbstats = []
|
||||||
for row in i.db._timings])
|
dbtables = {}
|
||||||
for i in THREAD_LOCAL.instances]
|
for db_uid, db_group in dbs:
|
||||||
dbtables = dict([(regex_nopasswd.sub('******', i.uri),
|
for db in db_group:
|
||||||
{'defined':
|
if not db._uri:
|
||||||
sorted(list(set(i.db.tables) -
|
continue
|
||||||
set(i.db._LAZY_TABLES.keys()))) or
|
k = regex_nopasswd.sub('******',db._uri)
|
||||||
|
dbstats.append(TABLE(*[TR(PRE(row[0]),'%.2fms' %
|
||||||
|
(row[1]*1000)) \
|
||||||
|
for row in db._timings]))
|
||||||
|
dbtables[k] = {'defined':
|
||||||
|
sorted(list(set(db.tables) -
|
||||||
|
set(db._LAZY_TABLES.keys()))) or
|
||||||
'[no defined tables]',
|
'[no defined tables]',
|
||||||
'lazy': sorted(i.db._LAZY_TABLES.keys()) or
|
'lazy': sorted(db._LAZY_TABLES.keys()) or
|
||||||
'[no lazy tables]'})
|
'[no lazy tables]'}
|
||||||
for i in THREAD_LOCAL.instances])
|
|
||||||
else:
|
|
||||||
dbstats = [] # if no db or on GAE
|
|
||||||
dbtables = {}
|
|
||||||
u = web2py_uuid()
|
u = web2py_uuid()
|
||||||
backtotop = A('Back to top', _href="#totop-%s" % u)
|
backtotop = A('Back to top', _href="#totop-%s" % u)
|
||||||
return DIV(
|
return DIV(
|
||||||
|
|||||||
Reference in New Issue
Block a user