|
13 | 13 | :root { |
14 | 14 | --altinity-background: #000D45; |
15 | 15 | --altinity-accent: #189DCF; |
16 | | - --altinity-highlight: #FFC600; |
| 16 | + --altinity-link-hover: #FFC600; |
17 | 17 | --altinity-gray: #6c757d; |
18 | 18 | --altinity-light-gray: #f8f9fa; |
19 | 19 | --altinity-white: #ffffff; |
| 20 | + --altinity-hover: color-mix(in srgb, var(--altinity-accent) 12%, var(--altinity-white)); |
20 | 21 | } |
21 | 22 |
|
22 | 23 | /* Body and heading fonts */ |
|
45 | 46 |
|
46 | 47 | /* General table styling */ |
47 | 48 | table { |
48 | | - min-width: min(900px, 98vw); |
| 49 | + min-width: min(900px, 100%); |
49 | 50 | margin: 1rem 0; |
50 | 51 | border-collapse: collapse; |
51 | 52 | background-color: var(--altinity-white); |
|
107 | 108 |
|
108 | 109 | /* Table body row styling */ |
109 | 110 | tr:hover { |
110 | | - background-color: var(--altinity-light-gray); |
| 111 | + background-color: var(--altinity-hover); |
111 | 112 | } |
112 | 113 |
|
113 | 114 | /* Table cell styling */ |
|
123 | 124 | } |
124 | 125 |
|
125 | 126 | a:hover { |
126 | | - color: var(--altinity-highlight); |
| 127 | + color: var(--altinity-link-hover); |
127 | 128 | text-decoration: underline; |
128 | 129 | } |
| 130 | +
|
| 131 | + /* Tab navigation: wrapping strip; each button is an open-bottom tab shape */ |
| 132 | + .tab { |
| 133 | + display: flex; |
| 134 | + flex-wrap: wrap; |
| 135 | + gap: 0.4rem; |
| 136 | + padding: 0.4rem; |
| 137 | + border-radius: 0.75rem; |
| 138 | + width: fit-content; |
| 139 | + max-width: 100%; |
| 140 | + margin: 1.5rem 0; |
| 141 | + background: var(--altinity-white); |
| 142 | + } |
| 143 | +
|
| 144 | + .tab button.tablinks { |
| 145 | + appearance: none; |
| 146 | + box-sizing: border-box; |
| 147 | + border: 1px solid var(--altinity-accent); |
| 148 | + border-bottom: 0; |
| 149 | + border-radius: 0.5rem 0.5rem 0 0; |
| 150 | + background: var(--altinity-white); |
| 151 | + padding: 0.55rem 0.95rem; |
| 152 | + font: inherit; |
| 153 | + cursor: pointer; |
| 154 | + white-space: nowrap; |
| 155 | + color: var(--altinity-background); |
| 156 | + transition: background 0.12s, color 0.12s; |
| 157 | + } |
| 158 | +
|
| 159 | + .tab button.tablinks:hover { |
| 160 | + background: var(--altinity-hover); |
| 161 | + } |
| 162 | +
|
| 163 | + .tab button.tablinks.active { |
| 164 | + background: var(--altinity-hover); |
| 165 | + box-shadow: inset 0 2px 0 var(--altinity-accent); |
| 166 | + color: var(--altinity-accent); |
| 167 | + font-weight: 600; |
| 168 | + } |
| 169 | +
|
| 170 | + .tabcontent { |
| 171 | + display: none; |
| 172 | + padding: 0; |
| 173 | + overflow-x: auto; |
| 174 | + animation: fadeEffect 0.3s; |
| 175 | + } |
| 176 | +
|
| 177 | + .tabcontent table { |
| 178 | + min-width: 0; |
| 179 | + } |
| 180 | +
|
| 181 | + .tabcontent > *:first-child { |
| 182 | + margin-top: 0; |
| 183 | + } |
| 184 | +
|
| 185 | + .tabcontent.active { |
| 186 | + display: block; |
| 187 | + } |
| 188 | +
|
| 189 | + @keyframes fadeEffect { |
| 190 | + from { opacity: 0; } |
| 191 | + to { opacity: 1; } |
| 192 | + } |
129 | 193 | </style> |
130 | 194 | <title>{{ title }}</title> |
131 | 195 | <link rel="icon" type="image/svg+xml" |
|
166 | 230 | {% if is_preview %} |
167 | 231 | <p style="font-weight: bold;color: red;">This is a preview. The workflow is not yet finished.</p> |
168 | 232 | {% endif %} |
169 | | - <h2>Table of Contents</h2> |
170 | | - <ul> |
171 | | - {%- if pr_number != 0 %}<li><a href="#new-fails-pr">New Fails in PR</a> ({{ counts.pr_new_fails }})</li>{% endif %} |
172 | | - <li><a href="#ci-jobs-status">CI Jobs Status</a> ({{ counts.jobs_status }})</li> |
173 | | - <li><a href="#checks-errors">Checks Errors</a> ({{ counts.checks_errors }})</li> |
174 | | - <li><a href="#checks-fails">Checks New Fails</a> ({{ counts.checks_new_fails }})</li> |
175 | | - <li><a href="#regression-fails">Regression New Fails</a> ({{ counts.regression_new_fails }})</li> |
176 | | - <li><a href="#docker-images-cves">Docker Images CVEs</a> ({{ counts.cves }})</li> |
177 | | - <li><a href="#checks-known-fails">Checks Known Fails</a> ({{ counts.checks_known_fails }})</li> |
178 | | - </ul> |
179 | | - |
180 | | - {%- if pr_number != 0 -%} |
181 | | - <h2 id="new-fails-pr">New Fails in PR</h2> |
182 | | - <p> Compared with base sha {{ base_sha }} </p> |
183 | | - {{ new_fails_html }} |
| 233 | + <div class="tab"> |
| 234 | + {%- if pr_number == 0 %}<button class="tablinks" onclick="openTab(event, 'prs-in-release')">PRs in Release ({{ counts.prs_in_release }})</button>{% endif %} |
| 235 | + {%- if pr_number != 0 %}<button class="tablinks" onclick="openTab(event, 'new-fails-pr')">New Fails in PR ({{ counts.pr_new_fails }})</button>{% endif %} |
| 236 | + <button class="tablinks" onclick="openTab(event, 'ci-jobs-status')">CI Jobs Status ({{ counts.jobs_status }})</button> |
| 237 | + <button class="tablinks" onclick="openTab(event, 'checks-errors')">Checks Errors ({{ counts.checks_errors }})</button> |
| 238 | + <button class="tablinks" onclick="openTab(event, 'checks-fails')">Checks New Fails ({{ counts.checks_new_fails }})</button> |
| 239 | + <button class="tablinks" onclick="openTab(event, 'regression-fails')">Regression New Fails ({{ counts.regression_new_fails }})</button> |
| 240 | + <button class="tablinks" onclick="openTab(event, 'docker-images-cves')">Docker Images CVEs ({{ counts.cves }})</button> |
| 241 | + <button class="tablinks" onclick="openTab(event, 'checks-known-fails')">Checks Known Fails ({{ counts.checks_known_fails }})</button> |
| 242 | + </div> |
| 243 | + |
| 244 | + {%- if pr_number == 0 %} |
| 245 | + <div id="prs-in-release" class="tabcontent"> |
| 246 | + {{ prs_in_release_html }} |
| 247 | + </div> |
184 | 248 | {%- endif %} |
185 | 249 |
|
186 | | - <h2 id="ci-jobs-status">CI Jobs Status</h2> |
187 | | - {{ ci_jobs_status_html }} |
| 250 | + {%- if pr_number != 0 %} |
| 251 | + <div id="new-fails-pr" class="tabcontent"> |
| 252 | + <p>Compared with base sha {{ base_sha }}</p> |
| 253 | + {{ new_fails_html }} |
| 254 | + </div> |
| 255 | + {%- endif %} |
| 256 | + |
| 257 | + <div id="ci-jobs-status" class="tabcontent"> |
| 258 | + {{ ci_jobs_status_html }} |
| 259 | + </div> |
188 | 260 |
|
189 | | - <h2 id="checks-errors">Checks Errors</h2> |
190 | | - {{ checks_errors_html }} |
| 261 | + <div id="checks-errors" class="tabcontent"> |
| 262 | + {{ checks_errors_html }} |
| 263 | + </div> |
191 | 264 |
|
192 | | - <h2 id="checks-fails">Checks New Fails</h2> |
193 | | - {{ checks_fails_html }} |
| 265 | + <div id="checks-fails" class="tabcontent"> |
| 266 | + {{ checks_fails_html }} |
| 267 | + </div> |
194 | 268 |
|
195 | | - <h2 id="regression-fails">Regression New Fails</h2> |
196 | | - {{ regression_fails_html }} |
| 269 | + <div id="regression-fails" class="tabcontent"> |
| 270 | + {{ regression_fails_html }} |
| 271 | + </div> |
197 | 272 |
|
198 | | - <h2 id="docker-images-cves">Docker Images CVEs</h2> |
199 | | - {{ docker_images_cves_html }} |
| 273 | + <div id="docker-images-cves" class="tabcontent"> |
| 274 | + {{ docker_images_cves_html }} |
| 275 | + </div> |
200 | 276 |
|
201 | | - <h2 id="checks-known-fails">Checks Known Fails</h2> |
202 | | - <p> |
203 | | - Fail reason conventions:<br/> |
204 | | - KNOWN - Accepted fail and fix is not planned<br/> |
205 | | - INVESTIGATE - We don't know why it fails<br/> |
206 | | - NEEDSFIX - Investigation done and a fix is needed to make it pass<br/> |
207 | | - </p> |
208 | | - {{ checks_known_fails_html }} |
| 277 | + <div id="checks-known-fails" class="tabcontent"> |
| 278 | + <p> |
| 279 | + Fail reason conventions:<br/> |
| 280 | + KNOWN - Accepted fail and fix is not planned<br/> |
| 281 | + INVESTIGATE - We don't know why it fails<br/> |
| 282 | + NEEDSFIX - Investigation done and a fix is needed to make it pass<br/> |
| 283 | + </p> |
| 284 | + {{ checks_known_fails_html }} |
| 285 | + </div> |
| 286 | + |
| 287 | + <script> |
| 288 | + function openTab(evt, tabId) { |
| 289 | + var i, tabcontent, tablinks; |
| 290 | + tabcontent = document.getElementsByClassName('tabcontent'); |
| 291 | + for (i = 0; i < tabcontent.length; i++) { |
| 292 | + tabcontent[i].classList.remove('active'); |
| 293 | + } |
| 294 | + tablinks = document.getElementsByClassName('tablinks'); |
| 295 | + for (i = 0; i < tablinks.length; i++) { |
| 296 | + tablinks[i].classList.remove('active'); |
| 297 | + } |
| 298 | + document.getElementById(tabId).classList.add('active'); |
| 299 | + evt.currentTarget.classList.add('active'); |
| 300 | + if (evt.isTrusted) history.replaceState(null, '', '#' + tabId); |
| 301 | + } |
| 302 | + // Open the tab named in the URL hash, or fall back to CI Jobs Status |
| 303 | + var hash = window.location.hash.slice(1); |
| 304 | + var startTab = (hash && document.querySelector('.tab button[onclick*="' + hash + '"]')) |
| 305 | + || document.querySelector('.tab button[onclick*="ci-jobs-status"]'); |
| 306 | + if (startTab) startTab.click(); |
| 307 | + </script> |
209 | 308 |
|
210 | 309 | <script> |
211 | 310 | document.addEventListener('click', function (e) { |
|
0 commit comments