mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot_merge: add staging status to dashboard
The dashboard can be a bit unclear as to the state of a PR when everything's gone well. Make it more clear / explicit that it's ready or staged. Fixes #888
This commit is contained in:
parent
ceb2bd457e
commit
f4035932e3
@ -287,10 +287,12 @@ def raster_render(pr):
|
||||
'' if p['checked'] else 'unchecked',
|
||||
'' if p['reviewed'] else 'unreviewed',
|
||||
'' if p['attached'] else 'detached',
|
||||
'staged' if p['pr'].staging_id else 'ready' if p['pr']._ready else ''
|
||||
]):
|
||||
label = f' {attribute}'
|
||||
color = SUCCESS if attribute in ('staged', 'ready') else ERROR
|
||||
draw.text((offset, top), label,
|
||||
fill=blend(ERROR, opacity, over=background),
|
||||
fill=blend(color, opacity, over=background),
|
||||
font=supfont)
|
||||
offset += supfont.getbbox(label)[2]
|
||||
offset += math.ceil(supfont.getlength(" "))
|
||||
@ -302,6 +304,7 @@ def raster_render(pr):
|
||||
Color = Tuple[int, int, int]
|
||||
TEXT: Color = (102, 102, 102)
|
||||
ERROR: Color = (220, 53, 69)
|
||||
SUCCESS: Color = (40, 167, 69)
|
||||
BG: Mapping[str | None, Color] = collections.defaultdict(lambda: (255, 255, 255), {
|
||||
'info': (217, 237, 247),
|
||||
'success': (223, 240, 216),
|
||||
|
@ -597,6 +597,12 @@ action = batches
|
||||
<sup t-if="not p['attached']"
|
||||
t-attf-title="detached: {{p['pr'].detach_reason}}"
|
||||
class="text-warning fa fa-unlink"/>
|
||||
<sup t-if="p['pr'].staging_id" class="text-success">
|
||||
staged
|
||||
</sup>
|
||||
<sup t-elif="p['pr']._ready" class="text-success">
|
||||
ready
|
||||
</sup>
|
||||
</span>
|
||||
</td>
|
||||
<td t-else=""/>
|
||||
|
Loading…
Reference in New Issue
Block a user