Skip to content

Commit

Permalink
[FIX] runbot: small fix following BS 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier-Do committed Apr 23, 2024
1 parent 816af5a commit 13e3d9d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
5 changes: 5 additions & 0 deletions runbot/static/src/css/runbot.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
--bs-btn-disabled-border-color: #17a2b8;
}


.accordion {
--bs-accordion-btn-padding-y: 0.3rem; /* more condensed build error views */
}

.text-bg-default {
color: var(--bs-body-color) !important;
background-color: RGBA(var(--bs-body-bg-rgb), var(--bs-bg-opacity, 1)) !important;
Expand Down
4 changes: 2 additions & 2 deletions runbot/templates/batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<data>
<template id="runbot.batch">
<t t-call="runbot.layout">
<div class="row">
<div class="row g-0">
<div class="col-lg-6">
<t t-set="batch_class" t-value="'bg-info-subtle' if batch.state=='preparing' else 'bg-success-subtle' if not any(log.level != 'INFO' for log in batch.log_ids) else 'bg-warning-subtle'"/>
<table class="table table-stripped">
Expand Down Expand Up @@ -56,7 +56,7 @@
<i class="fa fa-fw fa-clock-o" t-if="commit_link.match_type == 'base_head'" title="This commit is the head of a base branch"/>
<span class="label" t-esc="commit.dname"/>
</a>
<a t-att-href="'https://%s/commit/%s' % (commit_link.branch_id.remote_id.base_url, commit_link.commit_id.name)" class="badge text-bg-subtle" title="View Commit on Github"><i class="fa fa-github"/></a>
<a t-att-href="'https://%s/commit/%s' % (commit_link.branch_id.remote_id.base_url, commit_link.commit_id.name)" title="View Commit on Github"><i class="fa fa-github"/></a>
<small t-if="commit_link.match_type and commit_link.match_type.startswith('base')">
from base:
<span t-esc="commit_link.branch_id.name"/>
Expand Down
4 changes: 2 additions & 2 deletions runbot/templates/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
</form>
</t>
<div class="row">
<div class="row g-0">
<div class="col-md-12">
<t t-set="batches" t-value="build.top_parent.with_context(active_test=False).slot_ids.mapped('batch_id')"/>
<t t-set="bundles" t-value="batches.mapped('bundle_id')"/>
Expand Down Expand Up @@ -370,7 +370,7 @@
</template>
<template id="runbot.build_search">
<t t-call='runbot.layout'>
<div class="row">
<div class="row g-0">
<div class="col-md-12">
<table class="table table-condensed">
<t t-foreach="builds" t-as="build">
Expand Down
2 changes: 1 addition & 1 deletion runbot/templates/build_stats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<t t-call='runbot.layout'>
<t t-set="bundles" t-value="build.slot_ids.mapped('batch_id.bundle_id')"/>
<div>
<div class="row">
<div class="row g-0">
<div class="col-md-4">
<div class="bg-success-subtle">
<b>Build: </b><a t-attf-href="/runbot/build/{{build.id}}"><t t-esc="build.id"/></a><br/>
Expand Down
6 changes: 4 additions & 2 deletions runbot/templates/bundle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<t t-esc="bundle.name"/>
<i t-if="bundle.sticky" class="fa fa-star" style="color: #f0ad4e" />
<div class="btn-group" role="group">
<a groups="runbot.group_runbot_advanced_user" t-attf-href="/web/#id={{bundle.id}}&amp;view_type=form&amp;model=runbot.bundle&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default btn-sm" target="new" title="View in Backend">
<a groups="runbot.group_runbot_advanced_user" t-attf-href="/web/#id={{bundle.id}}&amp;view_type=form&amp;model=runbot.bundle&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default" target="new" title="View in Backend">
<i class="fa fa-list"/>
</a>
<a groups="runbot.group_runbot_advanced_user" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force" title="Force A New Batch">
Expand All @@ -20,7 +20,9 @@
<a t-if="bundle.env.user.has_group('runbot.group_runbot_advanced_user') or (bundle.env.user.has_group('runbot.group_user') and ':' in bundle.name)" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force/1" title="Force A New Batch with automatic rebase">
<i class="fa fa-fast-forward"/>
</a>
<t t-call="runbot.branch_copy_button"/>
<t t-call="runbot.branch_copy_button">
<t t-set="btn_size" t-value="'btn'"/>
</t>
<t t-call="runbot.bundle_stats_dropdown"/>
</div>
</span>
Expand Down
4 changes: 2 additions & 2 deletions runbot/templates/commit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template id="runbot.commit">
<t t-call='runbot.layout'>
<div class="row">
<div class="row g-0">
<!-- Commit base informations -->
<div class="col-md-6">
<table class="table table-stripped">
Expand Down Expand Up @@ -96,7 +96,7 @@
</table>
</div>
</div>
<div class="row">
<div class="row g-0">
<div class="col-md-6">
<h3>Branch presence history</h3>
<table class="table table-stripped">
Expand Down
6 changes: 3 additions & 3 deletions runbot/templates/utils.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
<i t-attf-class="fa {{'fa-spinner' if bu.global_state == 'pending' else 'fa-cog'}} {{'' if bu.global_state in ('done', 'running') else 'fa-spin'}} fa-fw"/>
<span class="caret"/>
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu">
<div class="dropdown-menu dropdown-menu-end" role="menu">
<a t-if="bu.global_result=='skipped'" groups="runbot.group_runbot_admin" class="dropdown-item" href="#" data-runbot="rebuild" t-att-data-runbot-build="bu['id']">
<i class="fa fa-level-up"/>
Force Build
Expand Down Expand Up @@ -367,7 +367,7 @@
</template>

<template id="runbot.branch_copy_button">
<button t-attf-class="btn btn-default btn-ssm" title="Copy Bundle name" aria-label="Copy Bundle name" t-attf-onclick="copyToClipboard('{{ bundle.name.split(':')[-1] }}')">
<button t-attf-class="btn btn-default {{btn_size or 'btn-ssm'}}" title="Copy Bundle name" aria-label="Copy Bundle name" t-attf-onclick="copyToClipboard('{{ bundle.name.split(':')[-1] }}')">
<i t-attf-class="fa fa-clipboard"/>
</button>
</template>
Expand All @@ -378,7 +378,7 @@
<i t-attf-class="fa fa-bar-chart"/>
<span class="caret"/>
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu">
<div class="dropdown-menu dropdown-menu-end" role="menu">
<t t-foreach="project.trigger_ids" t-as="trigger">
<a class="dropdown-item" t-if="trigger.has_stats" t-attf-href="/runbot/stats/{{bundle.id}}/{{trigger.id}}">
<t t-esc="trigger.name" />
Expand Down

0 comments on commit 13e3d9d

Please sign in to comment.