[IMP] runbot: add tree hash to views

This commit is contained in:
Xavier-Do 2024-04-15 14:41:02 +02:00
parent e521149d93
commit c067384b8b
3 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class Commit(models.Model):
) )
] ]
name = fields.Char('SHA') name = fields.Char('SHA')
tree_hash = fields.Char('Tree hash') tree_hash = fields.Char('Tree hash', readonly=True)
repo_id = fields.Many2one('runbot.repo', string='Repo group') repo_id = fields.Many2one('runbot.repo', string='Repo group')
date = fields.Datetime('Commit date') date = fields.Datetime('Commit date')
author = fields.Char('Author') author = fields.Char('Author')

View File

@ -36,6 +36,12 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td>Tree hash</td>
<td>
<t t-esc="commit.tree_hash"/>
</td>
</tr>
<tr> <tr>
<td>Repo</td> <td>Repo</td>
<td t-esc="commit.repo_id.name"/> <td t-esc="commit.repo_id.name"/>

View File

@ -8,6 +8,7 @@
<sheet> <sheet>
<group> <group>
<field name="name" widget="char_frontend_url"/> <field name="name" widget="char_frontend_url"/>
<field name="tree_hash"/>
<field name="dname"/> <field name="dname"/>
<field name="repo_id"/> <field name="repo_id"/>
<field name="date"/> <field name="date"/>
@ -29,6 +30,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Commits"> <tree string="Commits">
<field name="name" widget="char_frontend_url"/> <field name="name" widget="char_frontend_url"/>
<field name="tree_hash"/>
<field name="date"/> <field name="date"/>
<field name="repo_id"/> <field name="repo_id"/>
<field name="author_email"/> <field name="author_email"/>