Wire in AlmaLinux web UI branding

Ship and enable the AlmaLinux branding set for the openQA web UI:

- Branding templates (templates/webapi/branding/AlmaLinux/): docbox,
  sponsorbox, style and a self-contained external_reporting that links
  failing jobs to bugs.almalinux.org (preselecting the AlmaLinux-N
  MantisBT project by job version; no reporter plugin dependency).
- Logo asset almalinux.svg installed into assets/images/ (served at
  /images/almalinux.svg).
- Wire the branding-layout patch into the spec: swap the navbar logo for
  the AlmaLinux mark and pull the branding stylesheet into the page head.
- Enable the branding by default via an openqa.ini.d drop-in
  (00-almalinux-branding.ini) so a fresh install is branded out of the box.
- style.html.ep: restore symmetric .navbar-brand>img padding so the navbar
  logo matches the openqa.almalinux.org rendering (openQA 5's bootstrap
  sets padding-top:0, which otherwise enlarges/top-aligns the logo).
This commit is contained in:
Andrew Lukoshko 2026-07-24 12:56:36 +02:00
parent 8d19a92e7e
commit e51babfd9d
8 changed files with 259 additions and 1 deletions

View File

@ -5,7 +5,7 @@
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
- <a class="navbar-brand" href="/"><img src="<%= icon_url 'logo.svg'%>" alt="openQA"></a>
+ <a class="navbar-brand" href="/"><img src="/images/almalinux.svg" alt="AlmaLinux" style="height:34px"></a>
+ <a class="navbar-brand" href="/"><img src="/images/almalinux.svg" alt="openQA"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

86
SOURCES/almalinux.svg Normal file
View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Слой_1"
x="0px"
y="0px"
viewBox="0 0 128 128"
xml:space="preserve"
width="128"
height="128"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:i="&amp;ns_ai;"><defs
id="defs33" />
<style
type="text/css"
id="style2">
.st0{fill:#86DA2F;}
.st1{fill:#24C2FF;}
.st2{fill:#FFCB12;}
.st3{fill:#0069DA;}
.st4{fill:#FF4649;}
</style>
<switch
id="switch28"
transform="matrix(1.4411343,0,0,1.4411343,-8.3201853,-8.5200283)">
<foreignObject
requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"
x="0"
y="0"
width="1"
height="1">
</foreignObject>
<g
i:extraneous="self"
id="g26">
<g
id="g24">
<path
class="st0"
d="m 86,55.9 c 3.6,-0.3 6.5,2.1 6.8,5.7 0.3,3.8 -2.4,6.8 -6,7.1 -3.5,0.3 -6.5,-2.4 -6.8,-5.8 -0.3,-3.8 2.2,-6.6 6,-7 z"
id="path4" />
<path
class="st1"
d="m 42.1,85.5 c 0,-3.6 2.8,-6.4 6.1,-6.4 3.3,0 6.5,3.1 6.5,6.5 0,3.3 -2.8,6.3 -6,6.4 -4,0 -6.6,-2.5 -6.6,-6.5 z"
id="path6" />
<path
class="st2"
d="m 51.9,44.9 c -0.6,0.3 -0.8,-0.1 -1,-0.6 -5.1,-9.6 -3.6,-21.7 5.4,-28.9 2.4,-1.9 6.8,-2.4 8.8,-0.4 0.8,0.7 1,1.5 1.1,2.5 0.3,2.1 0.7,4.2 2.1,5.8 1.5,1.8 3.5,2.5 5.7,2.4 1.9,0 3.9,-0.3 5.1,1.9 0.7,1.3 0.4,6.1 -0.7,7.1 -0.6,0.4 -1,0.1 -1.4,0 -3.2,-1.3 -6.5,-1.3 -9.9,-0.7 -1.1,0.1 -1.7,-0.1 -1.7,-1.4 -0.1,-2.1 -0.6,-4 -1.7,-5.8 -2.1,-3.8 -6,-3.9 -8.5,-0.4 -2.1,2.8 -2.6,6.1 -3.2,9.4 -0.4,3 -0.2,6.1 -0.1,9.1 0,0 -0.1,0 0,0 z"
id="path8" />
<path
class="st0"
d="m 55.4,47 c -0.3,-0.4 -0.1,-0.8 0.3,-1.1 7.9,-7.2 19.7,-8.6 28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.5,-0.4 1.8,0.6 1.3,3.2 3.8,5.6 6.5,7.5 1,0.8 1,1.4 0.1,2.4 -1.7,1.8 -2.6,4 -2.8,6.5 -0.3,3.1 1.5,5 4.6,5 1.9,0 3.8,-0.7 5.4,-1.5 4.3,-2.2 7.6,-5.4 10.8,-8.8 0.6,0 0.8,-0.3 1.3,-0.2 z"
id="path14" />
<path
class="st4"
d="m 26.3,22.3 c 0.3,0 1,0.1 1.7,0.3 5.1,1 8.3,-0.8 10,-5.7 1.1,-3.2 3.5,-4.2 6.5,-2.5 0.1,0 0.1,0.1 0.3,0.1 3.1,1.8 3.1,2.1 1,4.9 -1.7,2.2 -2.5,4.7 -2.9,7.4 -0.3,1.5 -0.8,1.8 -2.2,1.3 -2.2,-0.8 -4.6,-0.8 -6.9,0 -2.6,0.8 -3.8,3.2 -2.9,5.8 1.1,3.5 4.2,5 6.8,6.8 2.6,1.8 5.7,2.8 8.6,4 0.4,0.1 1.1,0.1 1,0.8 -0.1,0.4 -0.7,0.4 -1.3,0.4 C 39.7,46.2 33.8,45.2 28.9,41 24.3,37.2 21,32.7 21.5,26.3 c 0.7,-2.1 2.2,-3.6 4.8,-4 z"
id="path16" />
<path
class="st3"
d="m 15,61.3 c -3.3,0.4 -6.7,-2.4 -6.9,-5.8 -0.3,-3.3 2.5,-6.7 5.7,-6.9 3.6,-0.4 6.9,2.1 7.2,5.4 0.1,3.1 -2,7 -6,7.3 z"
id="path18" />
<path
class="st2"
d="m 73.3,11.8 c 3.5,-0.3 6.8,2.5 7.1,6 0.3,3.3 -2.5,6.5 -5.8,6.8 -3.6,0.3 -6.8,-2.4 -7.1,-5.8 -0.3,-3.5 2.2,-6.7 5.8,-7 z"
id="path20" />
<path
class="st4"
d="m 37,14.5 c 0.4,3.6 -2.1,6.7 -5.8,7.2 -3.2,0.4 -6.5,-2.2 -6.9,-5.3 -0.4,-4 1.8,-6.9 5.6,-7.4 3.4,-0.4 6.7,2.3 7.1,5.5 z"
id="path22" />
</g>
</g>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,3 @@
<h1>Welcome to <%= $appname %></h1>
<p>Life is too short for manual testing!</p>
<p><a class="btn btn-primary btn-lg" href="http://open.qa" role="button">Learn more »</a></p>

View File

@ -0,0 +1,19 @@
%# AlmaLinux external issue reporting: link the failing job to the AlmaLinux
%# Bug Tracker (https://bugs.almalinux.org, MantisBT). Self-contained - unlike
%# the openSUSE branding it does not need a report_external_issue helper/plugin,
%# so no extra Perl plugin has to be packaged. MantisBT cannot prefill the bug
%# form via GET, so we preselect the matching AlmaLinux-N project and carry the
%# failing scenario/module in the link tooltip.
% my $job = stash('job');
% if ($job) {
% my ($major) = ($job->VERSION // '') =~ /^(\d+)/;
% my %project_ids = (8 => 2, 9 => 3, 10 => 4);
% my $pid = $major ? $project_ids{$major} : undef;
% my $url = 'https://bugs.almalinux.org/bug_report_page.php';
% $url .= "?project_id=$pid" if $pid;
% my $module = stash('moduleid') // '';
% my $scenario = $job->scenario_name // '';
% my $label = 'Report bug in the AlmaLinux Bug Tracker';
% $label .= " (scenario '$scenario'" . ($module ? ", module '$module'" : '') . ')' if $scenario;
%= stepaction_for($label => $url, 'fa-bug', 'report almalinux_bugtracker')
% }

View File

@ -0,0 +1,6 @@
<div class="text-right" id="sponsorbox">
<a href="https://almalinux.org" title="AlmaLinux">
<img alt="AlmaLinux" class="icons-sponsor_suse" src="/images/almalinux.svg" />
</a>
</div>

View File

@ -0,0 +1,103 @@
<style>
.navbar {
background-color: #082336;
}
.navbar-light .navbar-nav .nav-link {
color: #ffffff;
}
.navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus {
background-color: transparent;
}
.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus {
color: #0069DA;
}
.navbar-nav {
font-size: 15px;
font-weight: 500;
}
.navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%33' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")
}
body h1 {
font-size: 1.8rem!important;
}
body h2 {
font-size: 1.5rem!important;
}
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji" !important;
}
.jumbotron {
background-color: #dcd7d740;
}
.btn-primary {
color: #ffffff;
background-color: #0069DA;
}
a.btn.btn-primary:hover {
background: #004bbc;
}
.col-md-9 h1 {
color: #2c3e50;
}
.card {
border: 1px solid rgba(48,75,94,0.30);
}
.card-header {
color: #ffffff;
background-color: #304b5e;
}
.card-header strong {
color: #ffffff!important;
}
.card-header span {
color: #ffffff!important;
}
.build-results a {
color: #017698;
}
.build-dashboard .progress-bar-passed {
background-color: #68bc11;
}
.build-dashboard .progress-bar-failed {
background-color: #e1282b;
}
.build-dashboard .progress-bar-unfinished {
background-color: #2891ff;
}
.table thead {
background-image: linear-gradient(to bottom, transparent 0%, rgba(48,75,94,0.2525))!important;
}
.footer {
background-color: #dcd7d740;
}
/* openQA 5's bootstrap sets .navbar-brand>img{padding-top:0}, which makes the
logo taller and top-aligned. Restore symmetric padding so the navbar logo
matches the openqa.almalinux.org (openQA 4.6) rendering. */
.navbar-brand > img {
padding: 8px;
}
</style>

View File

@ -0,0 +1,7 @@
# AlmaLinux openQA web UI branding.
# Selects the branding template set shipped in
# /usr/share/openqa/templates/webapi/branding/AlmaLinux/.
# Drop-in override: to disable, set 'branding = plain' (or openSUSE) in a
# higher-numbered file under /etc/openqa/openqa.ini.d/.
[global]
branding = AlmaLinux

View File

@ -147,6 +147,17 @@ Source4: 23-fedora-messaging.t
# but we need to change the groups so we have our own versions here
Source5: geekotest.conf
Source6: openQA-worker.conf
# AlmaLinux web UI branding: logo asset served at /images/almalinux.svg
# (dropped into assets/ in %%prep) plus our branding template set. See the
# branding-layout patch below and 'branding = AlmaLinux' in openqa.ini.
Source7: almalinux.svg
Source8: branding-AlmaLinux-docbox.html.ep
Source9: branding-AlmaLinux-sponsorbox.html.ep
Source10: branding-AlmaLinux-style.html.ep
# openqa.ini.d drop-in that selects the AlmaLinux branding by default
Source11: openqa-branding.ini
# AlmaLinux issue-reporting: links failing jobs to bugs.almalinux.org
Source12: branding-AlmaLinux-external_reporting.html.ep
# https://github.com/os-autoinst/openQA/pull/7504
# Fix 16-tests_dependencies.t when selenium is not present
Patch: 0001-t-Skip-earlier-in-tests_dependencies.t.patch
@ -158,6 +169,10 @@ Patch: 0001-fix-Support-invent.kde.org-and-work_items-in-bug-URL.patch
# on the fake worker packages in t/24-worker-jobs.t (EL9 Perl 5.32 warns that
# sub signatures are experimental).
Patch: 0001-EL9-sqlite-upsert-and-perl532-signatures.patch
# AlmaLinux: rebrand the web UI - swap the navbar logo for the AlmaLinux
# mark and pull our branding stylesheet into the page head. The matching
# branding templates and logo asset are installed from SOURCE7-10 in %%prep.
Patch: 0001-EL9-AlmaLinux-branding-layout.patch
BuildRequires: make
BuildRequires: %{python_scripts_requires}
@ -455,6 +470,17 @@ rm -f lib/OpenQA/WebAPI/Plugin/MCP.pm
rm -f t/api/17-mcp.t
# add the fedora-messaging publishing plugin test to the sources
cp %{SOURCE4} t/
# AlmaLinux branding: drop our branding template set and logo into the
# source tree. 'make install' ships templates/ and assets/ wholesale, so
# these get picked up by the existing %%{_datadir}/openqa/{templates,assets}
# file globs. The branding-layout patch wires them into the page; setting
# 'branding = AlmaLinux' in openqa.ini activates them.
install -d templates/webapi/branding/AlmaLinux
install -p -m 0644 %{SOURCE8} templates/webapi/branding/AlmaLinux/docbox.html.ep
install -p -m 0644 %{SOURCE9} templates/webapi/branding/AlmaLinux/sponsorbox.html.ep
install -p -m 0644 %{SOURCE10} templates/webapi/branding/AlmaLinux/style.html.ep
install -p -m 0644 %{SOURCE12} templates/webapi/branding/AlmaLinux/external_reporting.html.ep
install -p -m 0644 %{SOURCE7} assets/images/almalinux.svg
%build
@ -495,6 +521,10 @@ install -m 755 contrib/munin/utils/munin-mail %{buildroot}/%{_datadir}/openqa/sc
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/geekotest.conf
install -p -D -m 0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/openQA-worker.conf
# AlmaLinux: enable the AlmaLinux branding by default via an openqa.ini.d
# drop-in (admins can override in a higher-numbered file)
install -p -D -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/openqa/openqa.ini.d/00-almalinux-branding.ini
cd %{buildroot}
grep -rl %{_bindir}/env . | while read file; do
sed -e 's,%{_bindir}/env perl,%{_bindir}/perl,' -i $file
@ -605,6 +635,7 @@ fi
%ghost %config(noreplace) %attr(0640,geekotest,root) %{_sysconfdir}/openqa/database.ini
%dir %{_sysconfdir}/openqa
%dir %{_sysconfdir}/openqa/openqa.ini.d
%config(noreplace) %{_sysconfdir}/openqa/openqa.ini.d/00-almalinux-branding.ini
%dir %{_sysconfdir}/openqa/database.ini.d
%{_datadir}/doc/openqa/examples/openqa.ini
%{_datadir}/doc/openqa/examples/database.ini
@ -875,6 +906,9 @@ fi
- Carry Fedora backports: skip tests_dependencies.t earlier and support
invent.kde.org/work_items in bug URLs
- Pairs with os-autoinst 5 (the worker no longer caps os-autoinst < 5)
- Add AlmaLinux web UI branding: navbar logo, sponsorbox, stylesheet and
bugs.almalinux.org issue-reporting, enabled by default via an openqa.ini.d
drop-in (00-almalinux-branding.ini)
* Thu Jun 18 2026 Adam Williamson <awilliam@redhat.com> - 5^20260604git6376095-3
- Fix a couple of incorrect -devel package deps