web/views/debug.py
changeset 8669 62213a34726e
parent 8190 2a3c1b787688
child 8696 0bb18407c053
equal deleted inserted replaced
8668:4fea61c636b2 8669:62213a34726e
   101         for element in sorted(stats):
   101         for element in sorted(stats):
   102             w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>'
   102             w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>'
   103                    % (element, xml_escape(unicode(stats[element])),
   103                    % (element, xml_escape(unicode(stats[element])),
   104                       element.endswith('percent') and '%' or '' ))
   104                       element.endswith('percent') and '%' or '' ))
   105         w(u'</table>')
   105         w(u'</table>')
   106         if req.cnx._cnxtype == 'inmemory' and req.user.is_in_group('managers'):
   106         if req.cnx.is_repo_in_memory and req.user.is_in_group('managers'):
   107             w(u'<h3>%s</h3>' % _('opened sessions'))
   107             w(u'<h3>%s</h3>' % _('opened sessions'))
   108             sessions = repo._sessions.values()
   108             sessions = repo._sessions.values()
   109             if sessions:
   109             if sessions:
   110                 w(u'<ul>')
   110                 w(u'<ul>')
   111                 for session in sessions:
   111                 for session in sessions: