blob: e26259b6bad4dfd5d1da7a9e16b3b5e84377e742 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<header class="page-header">
<div class="page-title">
<span class="h3">{{t 'compare'}}</span>
</div>
</header>
{{#notEmpty profiles}}
<form class="spacer-bottom" id="quality-profile-comparison-form">
<label class="text-middle" for="quality-profile-comparison-with-key">{{t 'with'}}</label>
<select id="quality-profile-comparison-with-key">
{{#each profiles}}
<option value="{{key}}" {{#eq key ../comparedWith}}selected{{/eq}}>{{name}}</option>
{{/each}}
</select>
<button class="text-middle" id="quality-profile-comparison-form-submit">{{t 'compare'}}</button>
</form>
{{else}}
<div class="alert alert-info">{{t 'quality_profiles.no_profiles_for_comparison'}}</div>
{{/notEmpty}}
{{#notNull comparison}}
<table class="width-100 data zebra">
{{#notEmpty comparison.inLeft}}
<tr>
<td class="width-50"><h6>{{tp 'quality_profiles.x_rules_only_in' comparison.inLeftSize}} {{comparison.left.name}}</h6></td>
<td class="width-50"></td>
</tr>
{{#each comparison.inLeft}}
<tr class="js-comparison-in-left">
<td class="width-50">{{severityIcon severity}} <a href="{{rulePermalink key}}">{{name}}</a></td>
<td class="width-50"></td>
</tr>
{{/each}}
{{/notEmpty}}
{{#notEmpty comparison.inRight}}
<tr>
<td class="width-50"></td>
<td class="width-50"><h6>{{tp 'quality_profiles.x_rules_only_in' comparison.inRightSize}} {{comparison.right.name}}</h6></td>
</tr>
{{#each comparison.inRight}}
<tr class="js-comparison-in-right">
<td class="width-50"></td>
<td class="width-50">{{severityIcon severity}} <a href="{{rulePermalink key}}">{{name}}</a></td>
</tr>
{{/each}}
{{/notEmpty}}
{{#notEmpty comparison.modified}}
<tr>
<td class="text-center width-50" colspan="2">
<h6>{{tp 'quality_profiles.x_rules_have_different_configuration' comparison.modifiedSize}}</h6>
</td>
</tr>
<tr>
<td class="width-50"><h6>{{comparison.left.name}}</h6></td>
<td class="width-50"><h6>{{comparison.right.name}}</h6></td>
</tr>
{{#each comparison.modified}}
<tr class="js-comparison-modified">
<td class="width-50">
<p>{{severityIcon left.severity}} <a href="{{rulePermalink key}}">{{name}}</a></p>
{{#notNull left.params}}
<ul>
{{#each left.params}}
<li class="spacer-top"><code>{{@key}}: {{this}}</code></li>
{{/each}}
</ul>
{{/notNull}}
</td>
<td class="width-50">
<p>{{severityIcon right.severity}} <a href="{{rulePermalink key}}">{{name}}</a></p>
{{#notNull right.params}}
<ul>
{{#each right.params}}
<li class="spacer-top"><code>{{@key}}: {{this}}</code></li>
{{/each}}
</ul>
{{/notNull}}
</td>
</tr>
{{/each}}
{{/notEmpty}}
</table>
<p class="spacer-top text-center">
<a class="js-hide-comparison" href="#">{{t 'hide'}}</a>
</p>
{{/notNull}}
|