]> begriffs open source - cmsis-freertos/blob - Test/litani/templates/outcome_table.jinja.html
Update README.md - branch main is now the base branch
[cmsis-freertos] / Test / litani / templates / outcome_table.jinja.html
1 {#-
2  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  #
4  # Licensed under the Apache License, Version 2.0 (the "License").
5  # You may not use this file except in compliance with the License.
6  # A copy of the License is located at
7  #
8  #     http://www.apache.org/licenses/LICENSE-2.0
9  #
10  # or in the "license" file accompanying this file. This file is
11  # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12  # ANY KIND, either express or implied. See the License for the specific
13  # language governing permissions and limitations under the License.
14 -#}
15  <!DOCTYPE html>
16 <html lang="en">
17 <head>
18   <meta charset="utf-8">
19   <meta name="viewport" content="width=device-width, initial-scale=1.0">
20   <title>
21     Outcome table
22   </title>
23 <style>
24 #title{
25   background-color: #ec407a;
26   color: white;
27   padding: 2em;
28 }
29 h1 {
30   margin-bottom: 0em;
31 }
32 #subtitle {
33   font-variant: small-caps;
34   text-transform: lowercase;
35   letter-spacing: 0.2em;
36 }
37 #content {
38   max-width: 800px;
39   margin-left: auto;
40   margin-right: auto;
41   padding-top: 2em;
42   padding-bottom: 2em;
43   color: #263238;
44   font-family: Helvetica, sans-serif;
45 }
46 p {
47   margin: 0;
48 }
49 #outcome-table {
50   margin-top: 4em;
51   display: grid;
52   grid-template-columns: 6em 4em auto;
53   align-items: center;
54 }
55
56 .comment {
57   padding: 0.5em;
58 }
59
60 .action {
61   height: 3em;
62   width: 3em;
63   border-radius: 5px;
64   border: 1px solid #4b636e;
65   margin: 0.5em;
66 }
67
68 .fail_ignored {
69   background-color: #ff9800;
70 }
71
72 .fail {
73   background-color: #f44336;
74 }
75
76 .success {
77   background-color: #3f51b5;
78 }
79
80 .outcome {
81   justify-self: center;
82 }
83 .small-large,  .half-split{
84   justify-self: center;
85   display: flow;
86   flex-direction: column;
87   text-align: center;
88 }
89 .small-large .top {
90   text-transform: lowercase;
91   font-variant: small-caps;
92   font-size: small;
93   margin-bottom: 0.2em;
94   margin-top: 0.5em;
95 }
96 .small-large .bottom {
97   font-size: xx-large;
98 }
99 .half-split .top {
100   text-transform: lowercase;
101   font-variant: small-caps;
102   margin-bottom: 0.2em;
103   margin-top: 0.5em;
104 }
105 .half-split .bottom {
106   text-transform: lowercase;
107   font-variant: small-caps;
108 }
109
110 @media (max-width: 640px){
111   .pipeline-progress {
112     width: 10em;
113   }
114   #build-title:after  { content: 'B'; visibility: visible; margin-left: -1.5em}
115   #test-title:after   { content: 'T'; visibility: visible; margin-left: -2.5em}
116   #report-title:after { content: 'R'; visibility: visible; margin-left: -3.5em}
117   #build-title        { visibility: hidden; }
118   #test-title         { visibility: hidden; }
119   #report-title       { visibility: hidden; }
120 }
121 @media (prefers-color-scheme: dark){
122   .status-icon-in-progress { fill: #ddd; }
123   .status-icon-in-progress circle { stroke: #ddd; }
124
125   .pipeline-header {
126     color: #eceff1;
127   }
128   .pipeline-row {
129     color: #eceff1;
130     background-color: #37474f;
131   }
132   body {
133     color: #babdbe;
134     background-color: #263238;
135   }
136   p {
137     color: #babdbe;
138   }
139   #subtitle {
140     color: #fff;
141   }
142   .action {
143     border: 1px solid #cfd8dc;
144   }
145   #table-comment {
146     margin-top: 4em;
147   }
148
149 }
150 </style>
151 </head>
152 <body>
153 <div id="content">
154
155   <div id="title">
156     <h1>
157       Outcome Table
158     </h1>
159     <p id="subtitle">
160       Litani CI Dashboard
161     </p>
162   </div><!-- id="title" -->
163
164   {% if "comment" in table %}
165   <p id="table-comment">
166   {{ table["comment"] }}
167   </p><!-- id="table-comment"-->
168   {% endif %}{# "comment" in table #}
169
170   <div id="outcome-table">
171
172     {% for outcome in table["outcomes"] %}
173     <div class="outcome">
174
175       {% if outcome["type"] == "return-code" %}
176       <div class="small-large">
177         <div class="top">
178           <p>return code</p>
179         </div>
180         <div class="bottom">
181           <p>{{ outcome["value"] }}</p>
182         </div>
183       </div>
184
185       {% elif outcome["type"] == "timeout" %}
186       <div class="half-split">
187         <div class="top">
188           <p>time</p>
189         </div>
190         <div class="bottom">
191           <p>out</p>
192         </div>
193       </div>
194
195       {% elif outcome["type"] == "wildcard" %}
196       <div class="half-split">
197         <div class="top">
198           <p>everything</p>
199         </div>
200         <div class="bottom">
201           <p>else</p>
202         </div>
203       </div>
204       {% endif %}{# outcome["type"] == "return-code" #}
205     </div><!-- class="outcome" -->
206
207     <div class="action {{ outcome["action"] }}">
208     </div>
209
210     <div class="comment">
211       {% if "comment" in outcome %}
212       <p>{{ outcome["comment"] }}</p>
213       {% endif %}{# "comment" in outcome #}
214     </div>
215
216     {% endfor %}{# outcome in table["outcomes"] #}
217
218   </div><!-- id="outcome-table" -->
219
220
221 </div><!-- id="content" -->
222 </body>
223 </html>