|
31 | 31 | <td><%- readme_link("Repository") %></td> |
32 | 32 | <td> |
33 | 33 | <select id="select_repo"> |
34 | | - <% for repo in repos.iter() { %> |
35 | | - <option value=<%= repo %> <%- if &args.repo == repo { "selected" } else { "" } %>><%= repo %></option> |
| 34 | + <% for repo in self.repos.iter() { %> |
| 35 | + <option value=<%= repo %> <%- if &self.args.repo == repo { "selected" } else { "" } %>><%= repo %></option> |
36 | 36 | <% } %> |
37 | 37 | </select> |
38 | 38 | </td> |
39 | 39 | </tr> |
40 | 40 | <tr> |
41 | 41 | <td>Old Commit/Branch</td> |
42 | | - <td><input id="input_old" type="text" value="<%= args.old %>"></td> |
| 42 | + <td><input id="input_old" type="text" value="<%= self.args.old %>"></td> |
43 | 43 | </tr> |
44 | 44 | <tr> |
45 | 45 | <td>New Commit/Branch</td> |
46 | | - <td><input id="input_new" type="text" value="<%= args.new %>"></td> |
| 46 | + <td><input id="input_new" type="text" value="<%= self.args.new %>"></td> |
47 | 47 | </tr> |
48 | 48 | <tr> |
49 | 49 | <td><%- readme_link("Path Pattern") %></td> |
50 | | - <td><input id="input_path_pattern" type="text" value="<%= args.path_pattern %>"></td> |
| 50 | + <td><input id="input_path_pattern" type="text" value="<%= self.args.path_pattern %>"></td> |
51 | 51 | </tr> |
52 | 52 | <tr> |
53 | 53 | <td><%- readme_link("Pallet") %></td> |
54 | | - <td><input id="input_pallet" type="text" value="<%= args.pallet.clone().unwrap_or_else(|| ".*".into()) %>"></td> |
| 54 | + <td><input id="input_pallet" type="text" value="<%= self.args.pallet.clone().unwrap_or_else(|| ".*".into()) %>"></td> |
55 | 55 | </tr> |
56 | 56 | <tr> |
57 | 57 | <td><%- readme_link("Extrinsic") %></td> |
58 | | - <td><input id="input_extrinsic" type="text" value="<%= args.extrinsic.clone().unwrap_or_else(|| ".*".into()) %>"></td> |
| 58 | + <td><input id="input_extrinsic" type="text" value="<%= self.args.extrinsic.clone().unwrap_or_else(|| ".*".into()) %>"></td> |
59 | 59 | </tr> |
60 | 60 | <tr> |
61 | 61 | <td><%- readme_link("Rel Threshold") %></td> |
62 | 62 | <td> |
63 | 63 | <div class="input-group"> |
64 | | - <input id="input_threshold" type="number" class="form-control" value="<%= args.threshold %>"> |
| 64 | + <input id="input_threshold" type="number" class="form-control" value="<%= self.args.threshold %>"> |
65 | 65 | <div class="input-group-append"> |
66 | 66 | <span class="input-group-text">%</span> |
67 | 67 | </div> |
|
73 | 73 | <td> |
74 | 74 | <select id="select_unit"> |
75 | 75 | <% for (val, repr) in subweight_core::Dimension::reflect().iter() { %> |
76 | | - <option value="<%= repr %>" <%- if &args.unit == val { "selected" } else { "" } %>><%= repr %></option> |
| 76 | + <option value="<%= repr %>" <%- if &self.args.unit == val { "selected" } else { "" } %>><%= repr %></option> |
77 | 77 | <% } %> |
78 | 78 | </select> |
79 | 79 | </td> |
|
84 | 84 | <td> |
85 | 85 | <select id="select_method"> |
86 | 86 | <% for (val, repr) in subweight_core::CompareMethod::reflect().iter() { %> |
87 | | - <option value="<%= repr %>" <%- if &args.method == val { "selected" } else { "" } %>><%= repr %></option> |
| 87 | + <option value="<%= repr %>" <%- if &self.args.method == val { "selected" } else { "" } %>><%= repr %></option> |
88 | 88 | <% } %> |
89 | 89 | </select> |
90 | 90 | </td> |
91 | 91 | </tr> |
92 | 92 | <tr> |
93 | 93 | <td><%- readme_link("Ignore Errors") %></td> |
94 | | - <td><input id="checkbox_ignore_errors" type="checkbox" <%- if args.ignore_errors { "checked" } else { "" } %>></td> |
| 94 | + <td><input id="checkbox_ignore_errors" type="checkbox" <%- if self.args.ignore_errors { "checked" } else { "" } %>></td> |
95 | 95 | </tr> |
96 | 96 | <tr> |
97 | 97 | <td><%- readme_link("Git Pull") %></td> |
98 | | - <td><input id="checkbox_git_pull" type="checkbox" <%- if args.git_pull.unwrap_or(true) { "checked" } else { "" } %>></td> |
| 98 | + <td><input id="checkbox_git_pull" type="checkbox" <%- if self.args.git_pull.unwrap_or(true) { "checked" } else { "" } %>></td> |
99 | 99 | </tr> |
100 | 100 | <tr> |
101 | 101 | <td><%- readme_link("Cache") %> hit</td> |
102 | | - <td><%= if was_cached { "Yes" } else { "No" } %></td> |
| 102 | + <td><%= if self.was_cached { "Yes" } else { "No" } %></td> |
103 | 103 | </tr> |
104 | 104 | </tbody> |
105 | 105 | </table> |
106 | 106 | </br> |
107 | 107 |
|
108 | | - <% let errors = diff.iter().filter_map(|c| c.error()).collect::<Vec<_>>(); if !errors.is_empty() { %> |
| 108 | + <% let errors = self.diff.iter().filter_map(|c| c.error()).collect::<Vec<_>>(); if !errors.is_empty() { %> |
109 | 109 | <p> |
110 | 110 | <button class="btn btn-danger" type="button" data-bs-toggle="collapse" data-bs-target="#collapseErrors" aria-expanded="false" aria-controls="collapseErrors"> |
111 | 111 | <%- errors.len() %> errors generated |
|
120 | 120 | </div> |
121 | 121 | <% } %> |
122 | 122 |
|
123 | | - <% let warnings = diff.iter().filter_map(|c| c.warning()).collect::<Vec<_>>(); if !warnings.is_empty() { %> |
| 123 | + <% let warnings = self.diff.iter().filter_map(|c| c.warning()).collect::<Vec<_>>(); if !warnings.is_empty() { %> |
124 | 124 | <p> |
125 | 125 | <button class="btn btn-warning" type="button" data-bs-toggle="collapse" data-bs-target="#collapseWarns" aria-expanded="false" aria-controls="collapseWarns"> |
126 | 126 | <%- warnings.len() %> warnings generated |
|
141 | 141 | <th>File</th> |
142 | 142 | <th>Extrinsic</th> |
143 | 143 |
|
144 | | - <th>Old [<%= format!("{:?}", args.unit) %>]</th> |
145 | | - <th>New [<%= format!("{:?}", args.unit) %>]</th> |
| 144 | + <th>Old [<%= format!("{:?}", self.args.unit) %>]</th> |
| 145 | + <th>New [<%= format!("{:?}", self.args.unit) %>]</th> |
146 | 146 | <th>Rel. Change</th> |
147 | 147 | <th>Abs. Change</th> |
148 | 148 |
|
|
152 | 152 | </tr> |
153 | 153 | </thead> |
154 | 154 | <tbody> |
155 | | - <% for (info, change) in diff.iter().filter_map(|c| c.term().map(|t| (c, t))) { %> |
| 155 | + <% for (info, change) in self.diff.iter().filter_map(|c| c.term().map(|t| (c, t))) { %> |
156 | 156 | <tr id=<%- format!("\"{}.{}\"", &info.file, &info.name) %>> |
157 | 157 | <td> |
158 | 158 | <%= info.file %> |
|
169 | 169 | </td> |
170 | 170 |
|
171 | 171 | <td data-order='<%- change.old_v.unwrap_or_default() %>'> |
172 | | - <%= change.old_v.map(|t| args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %> |
| 172 | + <%= change.old_v.map(|t| self.args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %> |
173 | 173 | </td> |
174 | 174 | <td data-order='<%- change.new_v.unwrap_or_default() %>'> |
175 | | - <%= change.new_v.map(|t| args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %> |
| 175 | + <%= change.new_v.map(|t| self.args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %> |
176 | 176 | </td> |
177 | 177 | <td data-order='<%- order_percent(change) %>'> |
178 | 178 | <%- html_color_percent(change.percent, change.change) %> |
179 | 179 | </td> |
180 | 180 | <td data-order='<%- order_abs(change) %>'> |
181 | | - <%- html_color_abs(change, args.unit) %> |
| 181 | + <%- html_color_abs(change, self.args.unit) %> |
182 | 182 | </td> |
183 | 183 |
|
184 | 184 | <td> |
185 | | - <%- change.old.as_ref().map(|t| format!("{} {}", code_link(&args.repo, &organization, &info.name, &info.file, &args.old), t)).unwrap_or_else(|| "-".into()) %> |
| 185 | + <%- change.old.as_ref().map(|t| format!("{} {}", code_link(&self.args.repo, &self.organization, &info.name, &info.file, &self.args.old), t)).unwrap_or_else(|| "-".into()) %> |
186 | 186 | </td> |
187 | 187 | <td> |
188 | | - <%- change.new.as_ref().map(|t| format!("{} {}", code_link(&args.repo, &organization, &info.name, &info.file, &args.new), t)).unwrap_or_else(|| "-".into()) %> |
| 188 | + <%- change.new.as_ref().map(|t| format!("{} {}", code_link(&self.args.repo, &self.organization, &info.name, &info.file, &self.args.new), t)).unwrap_or_else(|| "-".into()) %> |
189 | 189 | </td> |
190 | 190 | <td> |
191 | 191 | <%= format!("{}", &change.scope) %> |
|
0 commit comments