blob: 81cb2aedf2d4a6cf7dcd051e7d4bec5c1bde2005 [file] [log] [blame]
Alex Savatieievd48994d2018-12-13 12:13:00 +01001<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Model Tree Changes</title>
6 <style>
7 body {
8 font-family: Verdana, Geneva, Tahoma, sans-serif;
9 font-size: 90% !important;
10 }
11 .dot_green {
12 float: left;
13 color: green;
14 margin-right: 0.5em;
15 margin-top: 0.2em;
16 }
17 .dot_red {
18 float: left;
19 color: red;
20 margin-right: 0.5em;
21 margin-top: 0.2em;
22 }
23 .dot_empty {
24 float: left;
25 color: darkgray;
26 margin-right: 0.5em;
27 margin-top: 0.2em;
28 }
29 /* Style the tab */
30 .tab {
31 float: left;
32 width: 130px;
33 border: 1px solid #fff;
34 background-color: #efe;
35 }
36
37 /* Style the buttons that are used to open the tab content */
38 .tab button {
39 display: block;
40 background-color: inherit;
41 color: Black;
42 border: none;
43 outline: none;
44 font-family: "Lucida Console", Monaco, monospace;
45 text-align: left;
46 cursor: pointer;
47 transition: 0.3s;
48 font-size: 1.3em;
49 width: 100%;
50 padding: 1px;
51 margin: 1px;
52 }
53
54 button > div.node_name {
55 float: left;
56 font-size: 1.3em;
57 }
58
59 .smallgreytext {
60 float: right;
61 font-size: 0.7em;
62 color: gray;
63 }
64
65 /* Change background color of buttons on hover */
66 .tab button:hover {
67 background-color: #7b7;
68 }
69
70 /* Create an active/current "tab button" class */
71 .tab button.active {
72 background-color: #8c8;
73 color: white;
74 }
75
76 /* Style the tab content */
77 .tabcontent {
78 display: none;
79 position: absolute;
80 font-size: 1em;
81 padding: 0.5em;
82 right: -10%;
83 top: 0%;
84 transform: translateX(-12%);
85 width: calc(100% - 170px);
86 overflow-x: scroll;
87 overflow-wrap: break-word;
88 }
89
90 table {
91 border: 0 hidden;
92 width: 100%;
93 }
94 tr:nth-child(even) {
95 background-color: #fff;
96 }
97 tr:nth-child(odd) {
98 background-color: #ddd;
99 }
100 .Header {
101 background-color: #bbb;
102 color: Black;
103 width: 30%;
104 text-align: center;
105 }
Alex Savatieiev36b938d2019-01-21 11:01:18 +0100106 .param {
107 font-size: 0.8em;
108 color: #555;
109 padding-left: 50px;
110 padding-right: 10px;
111 }
112 .class_file {
113 font-size: 0.8em;
114 font-weight: bold;
115 min-width: 300px;
116 text-align: left;
117 color: black;
118 }
119
Alex Savatieievd48994d2018-12-13 12:13:00 +0100120 .pkgName {
121 font-size: 1em;
122 padding-left: 10px;
123 }
124
125 .version {
Alex Savatieiev36b938d2019-01-21 11:01:18 +0100126 font-size: 0.8em;
Alex Savatieievd48994d2018-12-13 12:13:00 +0100127 text-align: left;
128 }
129
130 .differ {
131 background-color: #eaa;
132 }
133 /* Tooltip container */
134 .tooltip {
135 position: relative;
136 display: inline-block;
137 border-bottom: 1px dotted black;
138 }
139
140 .tooltip .tooltiptext {
141 visibility: hidden;
142 background-color: black;
143 font-family: "Lucida Console", Monaco, monospace;
144 font-size: 0.5em;
145 width: auto;
146 color: #fff;
147 border-radius: 6px;
148 padding: 5px 5px;
149
150 /* Position the tooltip */
151 position: absolute;
152 z-index: 1;
153 }
154
155 .tooltip:hover .tooltiptext {
156 visibility: visible;
157 }
158
159 </style>
160 <script language="JavaScript">
161 function init() {
162 // Declare all variables
163 var i, tabcontent, tablinks;
164
165 // Get all elements with class="tabcontent" and hide them
166 tabcontent = document.getElementsByClassName("tabcontent");
167 for (i = 1; i < tabcontent.length; i++) {
168 tabcontent[i].style.display = "none";
169 }
170 tabcontent[0].style.display = "block";
171
172 // Get all elements with class="tablinks" and remove the class "active"
173 tablinks = document.getElementsByClassName("tablinks");
174 for (i = 1; i < tablinks.length; i++) {
175 tablinks[i].className = tablinks[i].className.replace(" active", "");
176 }
177 tablinks[0].className += " active";
178
179 }
180 function openTab(evt, tabName) {
181 // Declare all variables
182 var i, tabcontent, tablinks;
183
184 // Get all elements with class="tabcontent" and hide them
185 tabcontent = document.getElementsByClassName("tabcontent");
186 for (i = 0; i < tabcontent.length; i++) {
187 tabcontent[i].style.display = "none";
188 }
189
190 // Get all elements with class="tablinks" and remove the class "active"
191 tablinks = document.getElementsByClassName("tablinks");
192 for (i = 0; i < tablinks.length; i++) {
193 tablinks[i].className = tablinks[i].className.replace(" active", "");
194 }
195
196 // Show the current tab, and add an "active" class to the link that opened the tab
197 document.getElementById(tabName).style.display = "block";
198 evt.currentTarget.className += " active";
199 }
200 </script>
201</head>
202<body onload="init()">
203<div class="tab">
204 <button class="tablinks" onclick="openTab(event, 'mdl_changes')">
205 <div class="node_name">Model changes</div>
206 <div class="smallgreytext">({{ counters['mdl_diff'] }})</div>
207 </button>
208</div>
209<div id="mdl_changes" class="tabcontent">
210 <table class="pkgversions">
211 <tbody>
212 <tr>
Alex Savatieiev36b938d2019-01-21 11:01:18 +0100213 <td class="Header">Reclass path</td>
214 <td class="Header">{{ names[0] }}</td>
215 <td class="Header">{{ names[1] }}</td>
Alex Savatieievd48994d2018-12-13 12:13:00 +0100216 </tr>
Alex Savatieiev36b938d2019-01-21 11:01:18 +0100217 <tr><td colspan=3>Changes found in the model</td></tr>
218 {% for diff in diffs.keys() | sort %}
219 <tr>
220 <td class="pkgName">
221 <div class="class_file">{{ diffs[diff]["class_file"] }}</div>
222 <div class="param">{{ diffs[diff]["param"] }}</div>
223 </td>
224 <td class="version">
225 <div class="tooltip">{{ diffs[diff]["str_short"][0] | linebreaks }}
226 <pre class="tooltiptext">{{ diffs[diff]["str_values"][0] | linebreaks }}</pre>
Alex Savatieievd48994d2018-12-13 12:13:00 +0100227 </div>
228 </td>
Alex Savatieiev36b938d2019-01-21 11:01:18 +0100229 <td class="version">
230 <div class="tooltip">{{ diffs[diff]["str_short"][1] | linebreaks }}
231 <pre class="tooltiptext">{{ diffs[diff]["str_values"][1] | linebreaks }}</pre>
232 </td>
233 </tr>
234 {% endfor %}
Alex Savatieievd48994d2018-12-13 12:13:00 +0100235 </tbody>
236 </table>
237</div>
238</body>
239</html>