mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: add a frontend btn to parse a single log
This commit is contained in:
parent
68892398cd
commit
c322458c5b
@ -624,3 +624,8 @@ class Runbot(Controller):
|
||||
run_url = build._get_run_url(db_suffix)
|
||||
_logger.info('Redirecting to %s', run_url)
|
||||
return werkzeug.utils.redirect(run_url)
|
||||
|
||||
@route(['/runbot/parse_log/<model("ir.logging"):ir_log>'], type='http', auth='user', website=True, sitemap=False)
|
||||
def parse_log(self, ir_log, **kwargs):
|
||||
request.env['runbot.build.error']._parse_logs(ir_log)
|
||||
return werkzeug.utils.redirect('/runbot/build/%s' % ir_log.build_id.id)
|
||||
|
@ -313,6 +313,15 @@
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
<td t-attf-class="bg-{{message_class.strip() or logclass}}-light">
|
||||
<t t-if="l.level in ('CRITICAL', 'ERROR', 'WARNING') and not l.with_context(active_test=False).error_id">
|
||||
<small>
|
||||
<a groups="runbot.group_runbot_admin" t-attf-href="/runbot/parse_log/{{l.id}}" class="sm" title="Parse this log line to follow this error.">
|
||||
<i t-attf-class="fa fa-magic"/>
|
||||
</a>
|
||||
</small>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<t t-if="l.with_context(active_test=False).error_id">
|
||||
<t t-set="icon" t-value="'list'"/>
|
||||
@ -325,7 +334,7 @@
|
||||
</t>
|
||||
<tr>
|
||||
<td/><td/><td/>
|
||||
<td t-attf-class="bg-{{'info' if error.active else 'success'}}-light {{size}}">
|
||||
<td t-attf-class="bg-{{'info' if error.active else 'success'}}-light {{size}}" colspan="2">
|
||||
This error is already <t t-esc="'known' if error.active else 'fixed'"/>.
|
||||
<a groups="runbot.group_user" t-attf-href="/web#id={{l.error_id.id}}&view_type=form&model=runbot.build.error&menu_id={{env.ref('runbot.runbot_menu_root').id}}" title="View in Backend" target="new">
|
||||
<i t-attf-class="fa fa-{{icon}}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user