371 % self._cw.form.get('logLevel', default_level)) |
371 % self._cw.form.get('logLevel', default_level)) |
372 w(u'\n<form action="#"><fieldset>') |
372 w(u'\n<form action="#"><fieldset>') |
373 w(u'<label>%s</label>' % self._cw._(u'Message threshold')) |
373 w(u'<label>%s</label>' % self._cw._(u'Message threshold')) |
374 w(u'<select class="log_filter" onchange="filterLog(\'%s\', this.options[this.selectedIndex].value)">' |
374 w(u'<select class="log_filter" onchange="filterLog(\'%s\', this.options[this.selectedIndex].value)">' |
375 % self.view.domid) |
375 % self.view.domid) |
376 for level in ('Debug', 'Info', 'Warning', 'Error', 'Fatal'): |
376 for level in ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL'): |
377 w('<option value="%s">%s</option>' % (level, self._cw._(level))) |
377 w('<option value="%s">%s</option>' % (level.capitalize(), |
|
378 self._cw._(level))) |
378 w(u'</select>') |
379 w(u'</select>') |
379 w(u'</fieldset></form>') |
380 w(u'</fieldset></form>') |
380 super(LogTableLayout, self).render_table(w, actions, paginate) |
381 super(LogTableLayout, self).render_table(w, actions, paginate) |
381 |
382 |
382 def table_attributes(self): |
383 def table_attributes(self): |
419 return int(self.data[rownum][0]) |
420 return int(self.data[rownum][0]) |
420 |
421 |
421 class URLRenderer(pyviews.PyValTableColRenderer): |
422 class URLRenderer(pyviews.PyValTableColRenderer): |
422 def render_cell(self, w, rownum): |
423 def render_cell(self, w, rownum): |
423 url = self.data[rownum][1] |
424 url = self.data[rownum][1] |
424 w(url and tags.a(url, href=url) or u' ') |
425 if url and url.startswith('http'): |
|
426 url = tags.a(url, href=url) |
|
427 w(url or u' ') |
425 |
428 |
426 class LineRenderer(pyviews.PyValTableColRenderer): |
429 class LineRenderer(pyviews.PyValTableColRenderer): |
427 def render_cell(self, w, rownum): |
430 def render_cell(self, w, rownum): |
428 line = self.data[rownum][2] |
431 line = self.data[rownum][2] |
429 w(line or u' ') |
432 w(line or u' ') |