runbot/runbot/views/error_log_views.xml
Christophe Monniez c9d966a95c [IMP] runbot: search build errors in build error logs
When managing build errors, it's sometimes useful to search for other
occurrences of the error in all the build logs. Although it's possible
to do it manually, the operation is tedious.

With this commit, a button is added on the error page to automatically
perform the search for the same error in all the build error logs
(sql view).
2024-01-31 10:40:32 +01:00

87 lines
3.3 KiB
XML

<odoo>
<data>
<record id="runbot_error_log_form_view" model="ir.ui.view">
<field name="name">Runbot Error Log form view</field>
<field name="model">runbot.error.log</field>
<field name="arch" type="xml">
<form string="Build Error">
<header>
</header>
<sheet>
<div class="oe_button_box" name="button_box" groups="base.group_user">
</div>
<div class="oe_title">
<h1><field name="build_id"/></h1>
<field name="build_url" widget="url"/>
&amp;nbsp;<field name="log_create_date"/>
</div>
<group>
<group>
<field name="log_type"/>
</group>
<group>
<field name="name"/>
<field name="func"/>
<field name="path"/>
</group>
</group>
<notebook>
<page string="Log message" name="log_message">
<group>
<field name="message"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="runbot_error_log_tree_view" model="ir.ui.view">
<field name="name">Runbot Error Log tree view</field>
<field name="model">runbot.error.log</field>
<field name="arch" type="xml">
<tree string="Build Errors">
<button name="action_goto_build" type="object" icon="fa-external-link" title="View build"/>
<field name="build_id"/>
<field name="bundle_ids" widget="many2many_tags"/>
<field name="log_create_date"/>
<field name="name"/>
<field name="func"/>
<field name="path"/>
<field name="summary"/>
<field name="log_type"/>
</tree>
</field>
</record>
<record id="runbot_logs_search_view" model="ir.ui.view">
<field name="name">runbot.error.log.filter</field>
<field name="model">runbot.error.log</field>
<field name="arch" type="xml">
<search string="Search master">
<field name="message"/>
<field name="name" string="Module"/>
<field name="func"/>
<field name="build_id"/>
<filter string="Failed builds" name="filter_failed_builds" domain="[('global_state', '=', 'done'), ('global_result', '=', 'ko')]"/>
<separator/>
<filter string="Master bundle" name="filter_master_bundle" domain="[('bundle_ids.name', '=', 'master')]"/>
<filter string="Sticky bundles" name="filter_sticky_bundles" domain="[('sticky', '=', True)]"/>
<separator/>
<filter name="filter_create_date" string="Create Date" date="log_create_date" default_period="this_month"/>
</search>
</field>
</record>
<record id="open_view_error_log_tree" model="ir.actions.act_window">
<field name="name">Error Logs</field>
<field name="res_model">runbot.error.log</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_sticky_bundles': True, 'search_default_failed_builds': True, 'search_default_filter_create_date': True}</field>
</record>
</data>
</odoo>