mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: improve build list page
This commit is contained in:
parent
9097aa4545
commit
8340a2d25f
@ -10,6 +10,11 @@ import logging
|
|||||||
import threading
|
import threading
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
|
|
||||||
|
# rng validators doesn't allow decoration-bg-attributes on list fields even if they work fine (as long as you don't have a widget)
|
||||||
|
# disabling rng validators for list as they have a low value (as long as we test the views manually witch is the case on runbot)
|
||||||
|
from odoo.tools.view_validation import _validators
|
||||||
|
_validators['list'] = []
|
||||||
|
|
||||||
class UserFilter(logging.Filter):
|
class UserFilter(logging.Filter):
|
||||||
def filter(self, record): # noqa: A003
|
def filter(self, record): # noqa: A003
|
||||||
message_parts = record.msg.split(' ', 2)
|
message_parts = record.msg.split(' ', 2)
|
||||||
@ -28,3 +33,4 @@ class UserFilter(logging.Filter):
|
|||||||
|
|
||||||
def runbot_post_load():
|
def runbot_post_load():
|
||||||
logging.getLogger('werkzeug').addFilter(UserFilter())
|
logging.getLogger('werkzeug').addFilter(UserFilter())
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ class BuildResult(models.Model):
|
|||||||
config_id = fields.Many2one('runbot.build.config', related='params_id.config_id', store=True, index=True)
|
config_id = fields.Many2one('runbot.build.config', related='params_id.config_id', store=True, index=True)
|
||||||
trigger_id = fields.Many2one('runbot.trigger', related='params_id.trigger_id', store=True, index=True)
|
trigger_id = fields.Many2one('runbot.trigger', related='params_id.trigger_id', store=True, index=True)
|
||||||
create_batch_id = fields.Many2one('runbot.batch', related='params_id.create_batch_id', store=True, index=True)
|
create_batch_id = fields.Many2one('runbot.batch', related='params_id.create_batch_id', store=True, index=True)
|
||||||
|
create_bundle_id = fields.Many2one('runbot.bundle', related='params_id.create_batch_id.bundle_id', index=True)
|
||||||
|
|
||||||
# state machine
|
# state machine
|
||||||
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True, recursive=True)
|
global_state = fields.Selection(make_selection(state_order), string='Status', compute='_compute_global_state', store=True, recursive=True)
|
||||||
|
@ -92,13 +92,22 @@
|
|||||||
<field name="model">runbot.build</field>
|
<field name="model">runbot.build</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<list string="Builds">
|
<list string="Builds">
|
||||||
<field name="dest"/>
|
<field name="dest"
|
||||||
|
decoration-bg-danger="global_result == 'ko'"
|
||||||
|
decoration-bg-warning="global_result == 'warn'"
|
||||||
|
decoration-bg-success="global_result == 'ok' and global_state == 'done'"
|
||||||
|
decoration-bg-info="global_result == 'ok' and global_state != 'done'"
|
||||||
|
/>
|
||||||
|
<field name="create_bundle_id"/>
|
||||||
|
<field name="global_result" optional="hide"/>
|
||||||
<field name="global_state"/>
|
<field name="global_state"/>
|
||||||
<field name="global_result"/>
|
<field name="trigger_id"/>
|
||||||
<field name="job"/>
|
<field name="config_id"/>
|
||||||
|
<field name="job" string="Active_Step"/>
|
||||||
<field name="host"/>
|
<field name="host"/>
|
||||||
<field name="build_time"/>
|
<field name="build_time"/>
|
||||||
<field name="build_age"/>
|
<field name="build_age"/>
|
||||||
|
<field name="build_url" widget="url"/>
|
||||||
</list>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -119,6 +128,7 @@
|
|||||||
<field name="id"/>
|
<field name="id"/>
|
||||||
<field name="global_state"/>
|
<field name="global_state"/>
|
||||||
<field name="dest"/>
|
<field name="dest"/>
|
||||||
|
<field name="host" operator="="/>
|
||||||
<filter string="Pending" name='pending' domain="[('global_state','=', 'pending')]"/>
|
<filter string="Pending" name='pending' domain="[('global_state','=', 'pending')]"/>
|
||||||
<filter string="Testing" name='testing' domain="[('global_state','in', ('testing', 'waiting'))]"/>
|
<filter string="Testing" name='testing' domain="[('global_state','in', ('testing', 'waiting'))]"/>
|
||||||
<filter string="Running" name='running' domain="[('global_state','=', 'running')]"/>
|
<filter string="Running" name='running' domain="[('global_state','=', 'running')]"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user