Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runbot/models/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Config(models.Model):
group = fields.Many2one('runbot.build.config', 'Configuration group', help="Group of config's and config steps")
group_name = fields.Char('Group name', related='group.name')
step_ids = fields.Many2many('runbot.build.config.step', compute='_compute_step_ids')
warning = fields.Html('Warning message', help="Warning message to display on build page")

@api.model_create_multi
def create(self, vals_list):
Expand Down
8 changes: 8 additions & 0 deletions runbot/templates/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@
</table>
</div>
<t t-set="nb_subbuild" t-value="len(build.children_ids)"/>
<t t-set="warning" t-value="([b.config_id.warning for b in build.ancestors if b.config_id.warning] + [''])[0]"/>
<div class="col-md-12" t-if="warning">
<div class="row">
<div t-attf-class="alert alert-warning text-center">
<b t-out="warning"/>
</div>
</div>
</div>
<div class="col-md-12">
<table class="table table-condensed">
<tr>
Expand Down
1 change: 1 addition & 0 deletions runbot/views/config_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</field>
<field name="protected"/>
<field name="group" groups="base.group_no_one"/>
<field name="warning"/>
</group>
</sheet>
<chatter/>
Expand Down