{{extend 'default.mobile/layout.html'}} {{import os, stat, time}} {{block sectionclass}}errors{{end}} {{if db_ready['status'] == False: switchurl = db_ready['errmessage'] switchbutton = XML("""switch to : db""" % dict(href=switchurl, title=db_ready['errmessage'])) else: switchurl = URL(args=[app, 'dbnew']) switchbutton = XML("""switch to : db""" % (switchurl)) pass}}

{{=T('Error logs for "%(app)s"',dict(app=app))}}



{{ if 'new' in method: }} {{base_url = 'db' in method and 'ticketdb' or 'ticket' }}

{{=T('Click row to expand traceback')}}

{{if 'db' in method:}} source : db switch to : filesystem lists by ticket {{else:}} source : filesystem {{=switchbutton}} lists by ticket {{pass}}

{{for e in errors:}} {{pass}}
{{=T("Delete")}} {{=T("Count")}} {{=T("File")}} {{=T("Error")}}
{{=e['count']}} {{=e['causer']}} {{=A(e['last_line'],_href="#",_onclick="collapse('%s');"%e['hash'])}} + {{=A(T('details'),_href=URL(base_url,args=[app,e['ticket']]))}}
{{=CODE(e['pickel']['traceback'])}}
{{ else: }}

{{=T('Click row to view a ticket')}}

{{if 'db' in method:}} source : db switch to : filesystem lists by exception {{else:}} source : filesystem {{=switchbutton}} lists by exception {{pass}}

{{for ticket in tickets:}} {{if 'db' in method:}} {{else:}} {{pass}} {{pass}}
{{=T("Delete")}} {{=T("Ticket")}} {{=T("Date and Time")}}
{{=ticket}} {{=time.strftime('%Y-%m-%d %H:%M:%S',times[ticket].timetuple())}}{{=ticket}} {{=time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(os.stat(os.path.join(request.folder,'../%s/errors/%s' % (app,ticket)))[stat.ST_CTIME]))}}
{{ pass }}