blob: d1b71bb2aa7145cff91062b860c4b30a7d1d16bf [file] [log] [blame]
Alex41485522019-04-12 17:26:18 -05001<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Cloud Package versions check</title>
6 {% include 'common_styles.j2' %}
7 {% include 'common_scripts.j2' %}
8 <style>
9 td.repo {width: 3em; text-align: center; font-size: 0.7em; color: #113b11; font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;}
10 td.component, td.app, td.package_name {
11 font-size: 0.75em;
12 text-align: center;
13 color: #113b11;
14 font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
15 }
16
17 td.repo {column-width: 50px;}
18 td.component {column-width: 130px;}
19 td.app {column-width: 80px;}
20 td.package_name {column-width: 200px; padding-left: 10px; text-align: left;}
21 td.node_name {column-width: 210px;}
22 td.installed {column-width: 16%;}
23 td.status_container {column-width: 200px;}
24 td.candidate {column-width: 16%;}
25 td.release {column-width: 13%;}
26
27 .status_container {
28 display: inline-block;
29 }
30
31 .status {
32 display: block;
33 float: left;
34 width: 80px;
35 padding: 1px;
36 padding-left: 5px;
37 padding-right: 5px;
38 color: white;
39 background-color: #113b11;
40 text-align: center;
41 }
42 .action {
43 display: block;
44 float: left;
45 width: 120px;
46 padding: 1px;
47 padding-left: 5px;
48 padding-right: 5px;
49 color: gray;
50 background-color: #d4dad9;
51 text-align: center;
52 }
53
54 .status_container .ok {
55 color: white;
56 background-color: #113b11;
57 }
58 .status_container .error {
59 color: white;
60 background-color: darkred;
61 }
62 .status_container .upgraded {
63 color: azure;
64 background-color: green;
65 }
66 .status_container .downgraded {
67 color: white;
68 background-color: darkolivegreen;
69 }
70
71 .status_container .needs_repo {
72 color: black;
73 background-color: #50aacc;
74 }
75
76 .status_container .needs_up {
77 color: black;
78 background-color: #aaccaa;
79 }
80
81 .status_container .needs_down {
82 color: black;
83 background-color: #ffcc48;
84 }
85
86 .status_container .possible {
87 color: gray;
88 background-color: #d4dad9;
89 }
90
91
92
93 .version {text-align: left; padding: 2px}
94 .v_epoch, .v_upstream, .v_debian, .colon, .dash {
95 color: darkslategray;
96 float: left;
97 display: block;
98 }
99
100 .ok {color: darkslategray;}
101 .error {color: white; background-color: darkred;}
102 .upgraded {color: whitesmoke; background-color: darkslategray;}
103 .downgraded {color: red;}
104
105 .smallgreytext {float: right; font-size: 0.5em; color: gray;}
106
107 /* Table specific */
108 .nodes tr:nth-child(even) {
109 background-color: #fff;
110 }
111 .nodes tr:nth-child(odd) {
112 background-color: #d4dad9;
113
114 }
115 </style>
116</head>
117<body onload="init()">
118
119<div class="header">
120 <div class="label">OpenStack release:</div>
121 <div class="text">{{ openstack_release }}</div>
122 <div class="label">MCP Version:</div>
123 <div class="text">{{ mcp_release }}</div>
124 <div class="label date">generated on: {{ gen_date }}</div>
125</div>
126
127<div class="bar">
128 <button class="bar-item" onclick="openBar(event, 'mirantis')">Mirantis</button>
129 <button class="bar-item" onclick="openBar(event, 'system')">System</button>
130 <button class="bar-item" onclick="openBar(event, 'other')">Other</button>
131 <button class="bar-item" onclick="openBar(event, 'unlisted')">Unlisted</button>
132 <button class="bar-item" onclick="openBar(event, 'legend')">Legend</button>
133</div>
134
135{% macro prettify_version(v) %}
136 <div class="version">
137 {% if v.epoch %}
138 <div class="v_epoch {{ v.epoch_status | make_status_class }}">{{ v.epoch }}</div>
139 <div class="colon">:</div>
140 {% endif %}
141 <div class="v_upstream {{ v.upstream_status | make_status_class }}">{{ v.upstream }}{{ v.upstream_rev }}</div>
142 {% if v.debian %}
143 <div class="dash">-</div>
144 <div class="v_debian {{ v.debian_status | make_status_class }}">{{ v.debian }}{{ v.debian_rev }}</div>
145 {% endif %}
146 {{ caller() }}
147 </div>
148{% endmacro %}
149
150{% macro render_package(pkg_name, dat, status_shown, action_shown, id_label) %}
151 <tr onclick="toggleClassByID('{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}')" id="{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}_button">
152 <td class="repo">{{ dat['desc']['repo'] }}</td>
153 <td class="component">{{ dat['desc']['component'] }}</td>
154 <td class="app">{{ dat['desc']['app'] }}</td>
155 <td class="package_name">{{ pkg_name }}</td>
156 <td class="status_container" colspan="3">
157 <div class="status {{ status_shown | make_status_class }}">{{ status_shown | make_status_label }}</div>
158 {% if action_shown | make_action_label %}
159 <div class="action {{ action_shown | make_action_class }}">{{ action_shown | make_action_label }}</div>
160 {% endif %}
161 </td>
162 </tr>
163 <tr class="collapsable" id="{{ id_label }}_{{ pkg_name }}_{{ status_shown }}_{{ action_shown }}"><td colspan="7">
164 <table class="nodes"><tbody>
165 {% for status in dat['results'].keys() | sort(reverse=true) %}
166 {% for action in dat['results'][status].keys() | sort(reverse=true) %}
167 {% set counter = 1 + loop.index0 %}
168 {% for node in dat['results'][status][action].keys() | sort %}
169 {% set n_counter = 1 + loop.index0 %}
170 {% set nd = dat['results'][status][action][node] %}
171 <tr>
172 <td class="repo">{{ n_counter }}</td>
173 <td class="node_name">{{ node }}</td>
174 <td class="status_container">
175 <div class="status {{ status | make_status_class }}">{{ status | make_status_label }}</div>
176 {% if action | make_action_label %}
177 <div class="action {{ action | make_action_class }}">{{ action | make_action_label }}</div>
178 {% endif %}
179 </td>
180 <td class="installed">
181 <div class="tooltip">
182 {% call prettify_version(nd['i']) %}
183 <pre class="tooltiptext">{{ nd['raw'] | linebreaks }}</pre>
184 {% endcall %}
185 </div>
186 </td>
187 <td class="candidate">{{ nd['c'].version }}</td>
188 <td class="release">{{ dat['r'].version }}</td>
189 </tr>
190 {% endfor %}
191 {% endfor %}
192 {% endfor %}
193 </tbody></table>
194 </td></tr>
195 {{ caller() }}
196{% endmacro %}
197
198{% macro package_table(pkg_dict, id_label) %}
199<div id="{{ id_label }}" class="barcontent">
200 <h5>{{ caller() }}</h5>
201 <table class="pkgversions">
202 <tbody>
203 <tr>
204 <td class="table_header" width="50px">repo</td>
205 <td class="table_header" width="130px">Component</td>
206 <td class="table_header" width="80px">App</td>
207 <td class="table_header" width="200px">Package name</td>
208 <td class="table_header">Installed</td>
209 <td class="table_header">Candidate</td>
210 <td class="table_header">Release</td>
211 </tr>
212 <!-- Print errors -->
213 <tr><td colspan="7">Errors ({{ errors[id_label] }})</td></tr>
214 {% for pkg_name in pkg_dict | get_sorted_keys %}
215 {% set dat = pkg_dict[pkg_name] %}
216 {% if status_err in dat['results'] %}
217 {% set action_to_show = dat['results'][status_err].keys() | get_max %}
218 {% call render_package(pkg_name, dat, status_err, action_to_show, id_label) %}
219 {% endcall %}
220 {% endif%}
221 {% endfor %}
222 {% if not errors[id_label] %}
223 <tr><td class="note" colspan="7">no errors found </td></tr>
224 {% endif %}
225
226 <!-- Print downgrades -->
227 <tr><td colspan="7">Downgrades ({{ downgrades[id_label] }})</td></tr>
228 {% for pkg_name in pkg_dict | get_sorted_keys %}
229 {% set dat = pkg_dict[pkg_name] %}
230 {% if status_down in dat['results'] %}
231 {% set action_to_show = dat['results'][status_down].keys() | get_max %}
232 {% call render_package(pkg_name, dat, status_down, action_to_show, id_label) %}
233 {% endcall %}
234 {% endif %}
235 {% endfor %}
236 {% if not downgrades[id_label] %}
237 <tr><td class="note" colspan="7">no downgrades found</td></tr>
238 {% endif %}
239
240 <!-- Print all other -->
241 <tr><td colspan="7">All others</td></tr>
242 {% for pkg_name in pkg_dict | get_sorted_keys %}
243 {% set dat = pkg_dict[pkg_name] %}
244 {% set status_to_show = dat['results'].keys() | get_max %}
245 {% set action_to_show = dat['results'][status_to_show].keys() | get_max %}
246 {% if status_err != status_to_show and status_down != status_to_show %}
247 {% call render_package(pkg_name, dat, status_to_show, action_to_show, id_label) %}
248 {% endcall %}
249 {% endif %}
250 {% endfor %}
251 </tbody>
252 </table>
253</div>
254{%- endmacro %}
255
256<!-- Mirantis packages which version is critical for functionality -->
257{% call package_table(critical, "mirantis") %}
258 Packages maintained and updated by Mirantis
259{% endcall %}
260
261<!-- System labeled packages-->
262{% call package_table(system, "system") %}
263 System packages which versions are critical to proper cloud function
264{%- endcall %}
265
266<!-- Other packages -->
267{% call package_table(other, "other") %}
268 Packages with no description or not critical
269{%- endcall %}
270
271{% call package_table(unlisted, "unlisted") %}
272 Packages that are not listed in version map. I.e. unexpected on the environment
273{%- endcall %}
274
275<!-- Legend -->
276<div id="legend" class="barcontent">
277 <h5>Legend: status and action explanation and possible combinations</h5>
278 <table class="pkgversions">
279 <tbody>
280 <tr><td colspan="7">Version status desctiptions</td></tr>
281 <tr>
282 <td class="status_container"><div class="status {{ cs.ok | make_status_class }}">{{ cs.ok | make_status_label }}</div></td>
283 <td>Installed and Candidate epoch:upstream version mach</td>
284 </tr>
285 <tr>
286 <td class="status_container"><div class="status {{ cs.up | make_status_class }}">{{ cs.up | make_status_label }}</div></td>
287 <td>Installed version is newer that the one found in Repo (i.e. candidate) or Release notes recordset</td>
288 </tr>
289 <tr>
290 <td class="status_container"><div class="status {{ cs.down | make_status_class }}">{{ cs.down | make_status_label }}</div></td>
291 <td>Installed version is older that the one found in Repo (i.e. candidate) or Release notes recordset</td>
292 </tr>
293 <tr>
294 <td class="status_container"><div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div></td>
295 <td>Installed version conflicts with a combination of Candidate and Release notes versions</td>
296 </tr>
297 <tr><td colspan="7">Action descriptions</td></tr>
298 <tr>
299 <td class="status_container"><div class="action {{ ca.na | make_action_class }}">{{ ca.na | make_action_label }} (no action)</div></td>
300 <td>No action suggested</td>
301 </tr>
302 <tr>
303 <td class="status_container"><div class="action {{ ca.up | make_action_class }}">{{ ca.up | make_action_label }}</div></td>
304 <td>There is an upgrade possible for the package. But it is not strictly required action.</td>
305 </tr>
306 <tr>
307 <td class="status_container"><div class="action {{ ca.need_up | make_action_class }}">{{ ca.need_up | make_action_label }}</div></td>
308 <td>Package should be upgraded to match version either in repo or in Release notes</td>
309 </tr>
310 <tr>
311 <td class="status_container"><div class="action {{ ca.need_down | make_action_class }}">{{ ca.need_down | make_action_label }}</div></td>
312 <td>Package should be downgraded to match version either in repo or in Release notes</td>
313 </tr>
314 <tr>
315 <td class="status_container"><div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div></td>
316 <td>Repo that is configured on the target node contains invalid version and should be updated</td>
317 </tr>
318 <tr><td colspan="7">Versions status and Action combinations</td></tr>
319 <tr>
320 <td class="status_container">
321 <div class="status {{ cs.err | make_status_class }}">{{ cs.err | make_status_label }}</div>
322 <div class="action {{ ca.repo | make_action_class }}">{{ ca.repo | make_action_label }}</div>
323 </td>
324 </tr>
325 </tbody></table>
326</div>
327</body>
328</html>