[IMP] runbot: improve log message layout

This commit is contained in:
Xavier-Do 2024-04-23 02:10:02 +02:00 committed by Christophe Monniez
parent c577b72a66
commit a3c85d87d0

View File

@ -283,10 +283,10 @@
<t t-set="path" t-value="l.path.replace('/data/build/%s/' % repo_name, '')"/>
<t t-set="href" t-value="'https://%s/blob/%s/%s#L%s' % (repo_base_url, commit_hash, path, l.line)"/>
</t>
<a t-att-href="href" t-att-title="l.func"><t t-esc="l.name"/>:<t t-esc="l.line"/></a>
<a t-att-href="href" t-attf-title="Func: {{l.func}}"><t t-esc="l.name"/>:<t t-esc="l.line"/></a>
</t>
</t>
<t t-if="l.type == 'link' and len(l.message.split('$$')) == 3">
<span class="log_message" t-if="l.type == 'link' and len(l.message.split('$$')) == 3">
<t t-set="message" t-value="l.message.split('$$')"/>
<t t-if="message[1].startswith('fa-')">
<t t-esc="message[0]"/>
@ -302,9 +302,9 @@
</a>
<t t-esc="message[2]"/>
</t>
</t>
<t t-elif="l.type == 'markdown'" t-out="l._markdown()"/>
<t t-else="">
</span>
<span class="log_message" t-elif="l.type == 'markdown'" t-out="l._markdown()"/>
<span class="log_message" t-else="">
<t t-if="'\n' not in l.message" t-esc="l.message"/>
<pre t-if="'\n' in l.message" style="margin:0;padding:0; border: none;"><t t-esc="l.message"/></pre>
<t t-if="l.type == 'subbuild' and nb_subbuild &lt;= 20 and build.local_result != 'ok' and subbuild.sudo().error_log_ids">
@ -330,12 +330,12 @@
</table>
</div>
</t>
</t>
</span>
</td>
<td t-attf-class="bg-{{message_class.strip() or logclass}}-subtle">
<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.">
<a groups="runbot.group_runbot_5admin" 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>