|
1 {% extends "cone_base.html" %} |
|
2 {% block title %}Compare API{% endblock %} |
|
3 {% block content %} |
|
4 <h1>Configuration API compare</h1><br> |
|
5 {% set columns = { |
|
6 'type':'Type', |
|
7 'options':'Option', |
|
8 } %} |
|
9 |
|
10 <table class="report" id="report_data"> |
|
11 <tr> |
|
12 <th class="featureName">Reference</th> |
|
13 <th class="featureName">Source confml</th> |
|
14 <th class="featureName">Target confml</th> |
|
15 <th class="featureName">Source element</th> |
|
16 <th class="featureName">Problem</th> |
|
17 <th class="featureName">Target element</th> |
|
18 </tr> |
|
19 {#- ----------------------------------------- -#} |
|
20 {#- Report features that are only on one side -#} |
|
21 {#- ----------------------------------------- -#} |
|
22 |
|
23 {%- for fqr in data.sourcedata.features -%} |
|
24 {%- if fqr not in data.targetdata.features -%} |
|
25 <!-- report all rows that are missing from target --> |
|
26 <tr> |
|
27 <td bgcolor="pink">Missing {{fqr}}</td> |
|
28 <td><a href="{{ data.sourcedata.features[fqr].get_configuration_path() }}">{{ data.sourcedata.features[fqr].get_configuration_path() }}</a></td> |
|
29 <td> </td> |
|
30 <td> </td> |
|
31 <td bgcolor="gainsboro">Missing feature</td> |
|
32 <td> </td> |
|
33 </tr> |
|
34 {% endif -%} |
|
35 {%- endfor -%} |
|
36 |
|
37 {#- --------------------------------#} |
|
38 {#- Report differences in features -#} |
|
39 {#- --------------------------------#} |
|
40 {%- for fqr in data.sourcedata.features -%} |
|
41 {%- if fqr in data.targetdata.features and not data.sourcedata.features[fqr]._compare(data.targetdata.features[fqr], columns.keys()) -%} |
|
42 {%- if data.sourcedata.features[fqr]['type'] == 'int' and |
|
43 data.targetdata.features[fqr]['type'] == None %} |
|
44 {% else %} |
|
45 <!-- report all rows that have some column different --> |
|
46 <tr> |
|
47 <td>Difference with {{fqr}}</td> |
|
48 <td><a href="{{ data.sourcedata.features[fqr].get_configuration_path() }}">{{ data.sourcedata.features[fqr].get_configuration_path() }}</a></td> |
|
49 <td><a href="{{ data.targetdata.features[fqr].get_configuration_path() }}">{{ data.targetdata.features[fqr].get_configuration_path() }}</a></td> |
|
50 {%- if data.sourcedata.features[fqr]['type'] != data.targetdata.features[fqr]['type'] %} |
|
51 <td bgcolor="gainsboro">{{data.sourcedata.features[fqr]['type']}}</td> |
|
52 <td bgcolor="gainsboro">Type difference</td> |
|
53 <td bgcolor="gainsboro">{{data.targetdata.features[fqr]['type']}}</td> |
|
54 {% elif data.sourcedata.features[fqr]['options'] != data.targetdata.features[fqr]['options'] %} |
|
55 <td bgcolor="gainsboro">{% for option in data.sourcedata.features[fqr]['options'].values() -%} |
|
56 Option {%- if option.map %} map=option.map{% else %} name={{ option.name }}, value={{ option.value}}{% endif %}<br> |
|
57 {%- endfor %}</td> |
|
58 <td bgcolor="gainsboro">Options difference</td> |
|
59 <td bgcolor="gainsboro">{% for option in data.targetdata.features[fqr]['options'].values() -%} |
|
60 Option {%- if option.map %} map=option.map{% else %} name={{ option.name }}, value={{ option.value}}{% endif %}<br> |
|
61 {%- endfor %}</td> |
|
62 {% else %} |
|
63 <td> </td> |
|
64 {%- endif -%} |
|
65 </tr> |
|
66 {%- endif -%} |
|
67 {% endif -%} |
|
68 {%- endfor -%} |
|
69 |
|
70 </table> |
|
71 <script language="javascript" type="text/javascript"> |
|
72 //<![CDATA[ |
|
73 setFilterGrid("report_data"); |
|
74 //]]> |
|
75 </script> |
|
76 {% endblock %} |