|
1 {% extends "cone_base.html" %} |
|
2 {% block title %}Compare data{% endblock %} |
|
3 {% block content %} |
|
4 |
|
5 <h1>CRML Data Compatibility Report</h1><br> |
|
6 |
|
7 <table class="report"> |
|
8 <tr> |
|
9 <td>Source:</td> |
|
10 <td>{{ data.sourcedata.name }}</td> |
|
11 </tr> |
|
12 <tr> |
|
13 <td>Target:</td> |
|
14 <td>{{ data.targetdata.name }}</td> |
|
15 </tr> |
|
16 </table> |
|
17 |
|
18 <br/> |
|
19 |
|
20 <h2>Modified keys/files:</h2> |
|
21 |
|
22 <table class="report"> |
|
23 <tr> |
|
24 <th>File</th> |
|
25 <th>Repository UID</th> |
|
26 <th>Repository name</th> |
|
27 <th>Key UID</th> |
|
28 <th>Key name</th> |
|
29 <th>Changed value</th> |
|
30 <th>Old value</th> |
|
31 <th>New value</th> |
|
32 </tr> |
|
33 |
|
34 {% for row in data.impl_data.flat.modified|sort -%} |
|
35 {#- Only report CRML changes (but ignore changes to key names, they don't matter for DC) -#} |
|
36 {%- if row.impl_type == 'crml' and row.value_id != 'name' -%} |
|
37 {# Ignore changes to read-only keys. However, if a key's read-only attribute is changed, that is reported. -#} |
|
38 {%- if 'target_key' not in row.data or row.data.target_key.read_only == false or row.data.source_key.read_only != row.data.target_key.read_only -%} |
|
39 |
|
40 {%- if 'target_key' in row.data -%} |
|
41 {% set key_name = row.data.target_key.name or row.data.source_key.name -%} |
|
42 {% else -%} |
|
43 {% set key_name = '' -%} |
|
44 {% endif -%} |
|
45 {%- set repo_name = row.data.target_repo.uid_name or row.data.source_repo.uid_name -%} |
|
46 {%- if repo_name == none -%}{%- set repo_name = '' -%}{%- endif -%} |
|
47 |
|
48 <tr> |
|
49 <td>{{ row.file }}</td> |
|
50 <td>{{ row.id }}</td> |
|
51 <td>{{ repo_name }}</td> |
|
52 <td>{{ row.sub_id }}</td> |
|
53 <td>{{ key_name }}</td> |
|
54 <td>{{ row.value_id }}</td> |
|
55 <td>{{ row.source_value }}</td> |
|
56 <td>{{ row.target_value }}</td> |
|
57 </tr> |
|
58 {% endif -%} |
|
59 |
|
60 {% endif -%} |
|
61 {% endfor %} |
|
62 </table> |
|
63 |
|
64 |
|
65 <h2>Added keys/files:</h2> |
|
66 |
|
67 <table class="report"> |
|
68 <tr> |
|
69 <th>File</th> |
|
70 <th>Repository UID</th> |
|
71 <th>Repository name</th> |
|
72 <th>Key UID</th> |
|
73 <th>Key name</th> |
|
74 </tr> |
|
75 |
|
76 {% for row in data.impl_data.flat.only_in_target|sort -%} |
|
77 {%- if row.impl_type == 'crml' and ('key' not in row.data or row.data.key.read_only == false) -%} |
|
78 {%- if row.data != none and 'key' in row.data -%} |
|
79 {%- set key_name = row.data.key.name -%} |
|
80 {%- else -%} |
|
81 {%- set key_name = '' -%} |
|
82 {%- endif -%} |
|
83 {%- set repo_name = row.data.repo.uid_name or '' -%} |
|
84 |
|
85 <tr> |
|
86 <td>{{ row.file }}</td> |
|
87 <td>{{ row.id or '' }}</td> |
|
88 <td>{{ repo_name }}</td> |
|
89 <td>{{ row.sub_id or '' }}</td> |
|
90 <td>{{ key_name }}</td> |
|
91 </tr> |
|
92 {% endif -%} |
|
93 {% endfor %} |
|
94 </table> |
|
95 |
|
96 |
|
97 <h2>Removed keys/files:</h2> |
|
98 |
|
99 <table class="report"> |
|
100 <tr> |
|
101 <th>File</th> |
|
102 <th>Repository UID</th> |
|
103 <th>Repository name</th> |
|
104 <th>Key UID</th> |
|
105 <th>Key name</th> |
|
106 </tr> |
|
107 |
|
108 {% for row in data.impl_data.flat.only_in_source|sort -%} |
|
109 {%- if row.impl_type == 'crml' and ('key' not in row.data or row.data.key.read_only == false) -%} |
|
110 {%- if row.data != none and 'key' in row.data -%} |
|
111 {%- set key_name = row.data.key.name -%} |
|
112 {%- else -%} |
|
113 {%- set key_name = '' -%} |
|
114 {%- endif -%} |
|
115 {%- set repo_name = row.data.repo.uid_name or '' -%} |
|
116 |
|
117 <tr> |
|
118 <td>{{ row.file }}</td> |
|
119 <td>{{ row.id or '' }}</td> |
|
120 <td>{{ repo_name }}</td> |
|
121 <td>{{ row.sub_id or '' }}</td> |
|
122 <td>{{ key_name }}</td> |
|
123 </tr> |
|
124 {% endif -%} |
|
125 {% endfor %} |
|
126 </table> |
|
127 |
|
128 |
|
129 <h2>Duplicate repositories:</h2> |
|
130 |
|
131 <table class="report"> |
|
132 <tr> |
|
133 <th>Repository UID</th> |
|
134 <th>Files in source</th> |
|
135 <th>Files in target</th> |
|
136 </tr> |
|
137 |
|
138 {% for row in data.impl_data.flat.duplicate|sort -%} |
|
139 {%- if row.impl_type == 'crml' -%} |
|
140 <tr> |
|
141 <td>{{ row.id }}</td> |
|
142 <td> |
|
143 {% for file in row.files_in_source %}{{ file }}<br/>{% endfor %} |
|
144 </td> |
|
145 <td> |
|
146 {% for file in row.files_in_target %}{{ file }}<br/>{% endfor %} |
|
147 </td> |
|
148 </tr> |
|
149 {% endif -%} |
|
150 {% endfor %} |
|
151 </table> |
|
152 {% endblock %} |