configurationengine/source/scripts/gen_report_template.html
changeset 0 2e8eeb919028
child 3 e7e0ae78773e
equal deleted inserted replaced
-1:000000000000 0:2e8eeb919028
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
       
     2 <html lang="en">
       
     3 <head>
       
     4     <title>ConE generation report</title>
       
     5     <style type="text/css">
       
     6         body {
       
     7             font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;
       
     8             font-size: 0.8em;
       
     9             color: #0055B7;
       
    10         }
       
    11 
       
    12         .red{
       
    13             color: Red;
       
    14         }
       
    15         
       
    16         h1 {
       
    17             padding: 30px 0 0 0;
       
    18             margin: 0;
       
    19             text-align: left;
       
    20         }
       
    21 
       
    22         #date {
       
    23             text-align: center;
       
    24         }
       
    25 
       
    26         hr {
       
    27             height: 1px;
       
    28             background-color: cccccc;
       
    29             color: #cccccc;
       
    30         }
       
    31 
       
    32         h2 h3 {
       
    33             padding: 10px 0 10px 0;
       
    34             margin: 0;
       
    35         }
       
    36 
       
    37         table.report {
       
    38             width: 100%;
       
    39             border: 1px solid #e0dfe3;
       
    40             border-collapse: collapse;
       
    41             color: #333333;
       
    42         }
       
    43 
       
    44         table.report th {
       
    45             text-align: left;
       
    46             padding: 5px;
       
    47             background-color: #f9fafd;
       
    48             color: #595a5f;
       
    49             border-bottom: 1px #999999 solid;
       
    50         }
       
    51 
       
    52         table.report th.featureName {
       
    53             background-color: #f2f2f3;
       
    54             font: #595a5f Tahoma, Verdana, Arial bold;
       
    55             font-size: 1.1em;
       
    56             border-top: 3px #9d9da1;
       
    57             border-top-style: double;
       
    58             border-bottom: 3px #9d9da1;
       
    59             border-bottom-style: double;
       
    60         }
       
    61 
       
    62         table.report th.header {
       
    63             background-color: #f9fafd;
       
    64             font: #595a5f Tahoma, Verdana, Arial bold;
       
    65             font-size: 0.8em;
       
    66             border-top: 1px #9d9da1;
       
    67             border-bottom: 1px #9d9da1;
       
    68         }
       
    69 
       
    70         table.report td {
       
    71             word-wrap: break-word;
       
    72             border: 1px #EBEBEB;
       
    73             padding: 5px;
       
    74             border-style: solid; 
       
    75             vertical-align: top;
       
    76             font: Tahoma, Verdana, Arial;
       
    77             _font-size: 0.8em;
       
    78         }
       
    79 
       
    80         table.summary {
       
    81             border: 1px solid #e0dfe3;
       
    82             border-collapse: collapse;
       
    83             color: #333333;
       
    84         }
       
    85 
       
    86         table.summary th {
       
    87             text-align: left;
       
    88             padding: 5px;
       
    89             background-color: #f9fafd;
       
    90             color: #595a5f;
       
    91             border-bottom: 1px #999999 solid;
       
    92         }
       
    93 
       
    94         table.summary th.featureName {
       
    95             background-color: #f2f2f3;
       
    96             font: #595a5f Tahoma, Verdana, Arial bold;
       
    97             font-size: 1.1em;
       
    98             border-top: 3px #9d9da1;
       
    99             border-top-style: double;
       
   100             border-bottom: 3px #9d9da1;
       
   101             border-bottom-style: double;
       
   102         }
       
   103 
       
   104         table.summary td {
       
   105             word-wrap: break-word;
       
   106             border: 1px #EBEBEB;
       
   107             padding: 5px;
       
   108             border-style: solid; 
       
   109             vertical-align: top;
       
   110             font: Tahoma, Verdana, Arial;
       
   111             _font-size: 0.8em;
       
   112         }
       
   113 
       
   114         .currentValue {
       
   115             background-color: #e8f2fe;
       
   116         }
       
   117     </style>
       
   118 </head>
       
   119 <body>
       
   120 
       
   121     <h1>Generation summary:</h1>
       
   122     <table class="summary">
       
   123      <tr>
       
   124         <th class="featureName" colspan="2">Statistics</th>
       
   125      </tr>
       
   126      <tr>
       
   127         <td>Refs in files</td>
       
   128         <td>{{ rep_data.nbr_of_refs }}</td>
       
   129     </tr>
       
   130     <tr>
       
   131         <td>Refs with no implementation</td>
       
   132         <td>{{ rep_data.nbr_of_refs_noimpl }}</td>
       
   133     </tr>
       
   134     <tr>
       
   135         <th class="featureName" colspan="2">Details</th>
       
   136      </tr>
       
   137     <tr>
       
   138         <td>Report generated</td>
       
   139         <td>{{ rep_data.generation_time }}</td>
       
   140     </tr>
       
   141     <tr>
       
   142         <td>Generation duration</td>
       
   143         <td>{{ rep_data.duration }}</td>
       
   144     </tr>
       
   145     <tr>
       
   146         <td>Generation log</td>
       
   147         <td><a href="file:{{ rep_data.cwd|pathname_to_url }}/cone.log">cone.log</a></td>
       
   148     </tr>
       
   149     <tr>
       
   150         <th class="featureName" colspan="2">Generation options</th>
       
   151     </tr>
       
   152     <tr>
       
   153         <td align="left">Layers</td>
       
   154         <td align="left">{{ rep_data.options.layers }}</td>
       
   155     </tr>
       
   156     <tr>
       
   157         <td align="left">Added</td>
       
   158         <td align="left">{{ rep_data.options.added }}</td>
       
   159     </tr>
       
   160     <tr>
       
   161         <td align="left">Dryrun</td>
       
   162         <td align="left">{{ rep_data.options.dryrun }}</td>
       
   163     </tr>
       
   164     <tr>
       
   165         <td align="left">Verbose</td>
       
   166         <td align="left">{{ rep_data.options.verbose }}</td>
       
   167     </tr>
       
   168     <tr>
       
   169         <td align="left">Overrides</td>
       
   170         <td align="left">{{ rep_data.options.overrides }}</td>
       
   171     </tr>
       
   172     <tr>
       
   173         <td align="left">Project</td>
       
   174         <td align="left">{{ rep_data.options.project }}</td>
       
   175     </tr>
       
   176         <tr>
       
   177         <td align="left">Report</td>
       
   178         <td align="left">{{ rep_data.options.report }}</td>
       
   179     </tr>
       
   180     <tr>
       
   181         <td align="left">Impls</td>
       
   182         <td align="left">{{ rep_data.options.impls }}</td>
       
   183     </tr>
       
   184     <tr>
       
   185         <td align="left">Output</td>
       
   186         <td align="left">{{ rep_data.options.output }}</td>
       
   187     </tr>
       
   188     <tr>
       
   189         <td align="left">Configuration</td>
       
   190         <td align="left">{{ rep_data.options.configuration }}</td>
       
   191     </tr>
       
   192     <tr>
       
   193         <td align="left">Working directory</td>
       
   194         <td align="left">{{ rep_data.cwd }}</td>
       
   195     </tr>
       
   196     </table>
       
   197     
       
   198     <h1>Rule execution results:</h1><br>
       
   199     
       
   200     <table class="report">
       
   201         <tr>
       
   202             <th class="featureName">File</th>
       
   203             <th class="featureName">Rule No.</th>
       
   204             <th class="featureName">Input refs</th>
       
   205             <th class="featureName">Affected refs</th>
       
   206         </tr>
       
   207         
       
   208         {% for result in rep_data.rule_exec_results %}
       
   209         {#- Report only rule executions that affected something #}
       
   210         {%- if result.affected_refs|length > 0 %}
       
   211         <tr>
       
   212             <a name="rule:{{result.source}}:{{result.index}}"/>
       
   213             <td><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ result.source|pathname_to_url }}">{{ result.source }}</a></td>
       
   214             <td>{{result.index}}</td>
       
   215             <td>
       
   216             {%- for ref in result.input_refs -%}
       
   217                 {{ref}}<br/>
       
   218             {% endfor %}
       
   219             </td>
       
   220             <td>
       
   221             {%- for ref in result.affected_refs -%}
       
   222                 {{ref}}<br/>
       
   223             {% endfor %}
       
   224             </td>
       
   225         </tr>
       
   226         {% endif -%}
       
   227         {% endfor %}
       
   228         
       
   229     </table>
       
   230     
       
   231     
       
   232     <h1>Output files:</h1><br>
       
   233     
       
   234     <table class="report">
       
   235     <tr>
       
   236         <th class="featureName">API</th>
       
   237         <th class="featureName">Data</th>
       
   238         <th class="featureName">Impl. file</th>
       
   239         <th class="featureName">Impl. type</th>
       
   240         <th class="featureName">Generated for</th>
       
   241         <th class="featureName">Output files</th>
       
   242     </tr>
       
   243     {% for feat in rep_data.lines %}
       
   244     
       
   245         <tr>
       
   246             <td align="left" rowspan={{ feat.nbr_impls }}>
       
   247                 {% if feat.is_temp_feature -%}
       
   248                 <b><i>{{ feat.ref }}</i></b><br>
       
   249                 {%- else -%}
       
   250                 <b>{{ feat.ref }}</b><br>
       
   251                 {%- endif %}
       
   252                 <b>Name: </b>{{ feat.feat_name }}<br>
       
   253                 <b>Type: </b>{{ feat.feat_type }}<br>
       
   254                 <b>ConfML: </b><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ feat.config_path|pathname_to_url }}">{{ feat.config_path }}</a>
       
   255             </td>
       
   256             <td align="left" rowspan={{ feat.nbr_impls }}>
       
   257             <table class="report">
       
   258             
       
   259             {% for data in feat.datas %}
       
   260                 {% if loop.first %}
       
   261                     <tr>
       
   262                         <th class="th.header">Layer</th>
       
   263                         <th class="th.header">Value</th>
       
   264                     </tr>
       
   265                     <tr>
       
   266                         <td><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ data.layer|pathname_to_url }}">{{ data.layer }}</a></td>
       
   267                         <td>{{ data.value|e|xml_charref_replace }}</td>
       
   268                     </tr>
       
   269                 {% else %}
       
   270                     <tr>
       
   271                         <td><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ data.layer|pathname_to_url }}">{{ data.layer }}</a></td>
       
   272                         <td>{{ data.value|e|xml_charref_replace  }}</td>
       
   273                     </tr>
       
   274                 {% endif %}
       
   275             {% endfor %}
       
   276             </table>
       
   277 
       
   278             <table class="report">
       
   279                 {% for data in feat.seq_data %}
       
   280                     {% if loop.first %}
       
   281                         <tr>
       
   282                             <th class="th.header">Setting</th>
       
   283                             <th class="th.header">Value</th>
       
   284                         </tr>
       
   285                         <tr>
       
   286                             <td><b>{{ data[0]|e|xml_charref_replace }}</b></td>
       
   287                             <td>
       
   288                                 {% for value in data[1] %}
       
   289                                     {{ value|e|xml_charref_replace }}<br>
       
   290                                 {% endfor %}
       
   291                             </td>
       
   292                         </tr>
       
   293                     {% else %}
       
   294                         <tr>
       
   295                             <td><b>{{ data[0]|e|xml_charref_replace }}</b></td>
       
   296                             <td>
       
   297                                 {% for value in data[1] %}
       
   298                                     {{ value|e|xml_charref_replace }}<br>
       
   299                                 {% endfor %}
       
   300                             </td>
       
   301                         </tr>
       
   302                     {% endif %}
       
   303                 {% endfor %}
       
   304             </table>
       
   305             
       
   306             {% for impl in feat.impls %}
       
   307                 {% if loop.first %}
       
   308                     <td align="left">
       
   309                         <a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ impl.name|pathname_to_url }}">{{ impl.name }}</a>
       
   310                     </td>
       
   311                     <td align="left">
       
   312                         {{ impl.type }}
       
   313                     </td>
       
   314                     <td align="left">
       
   315                         {{ ', '.join(impl.generation_runs) }}
       
   316                     </td>
       
   317                     <td align="left">
       
   318                         {% for output in impl.outputfiles -%}
       
   319                             {% if output.exists %}
       
   320                                 <a href="file:{{ output.abs_filename|pathname_to_url }}">{{ output.filename }}</a><br>
       
   321                             {% else %}
       
   322                                 <span class="red">{{ output.filename }}</span><br>
       
   323                             {% endif %}
       
   324                         {%- endfor %}
       
   325                     </td>
       
   326                 {% else %}
       
   327                     <tr>
       
   328                     <td align="left">
       
   329                         <a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ impl.name|pathname_to_url }}">{{ impl.name }}</a>
       
   330                     </td>
       
   331                     <td align="left">
       
   332                         {{ impl.type }}
       
   333                     </td>
       
   334                     <td align="left">
       
   335                         {{ ', '.join(impl.generation_runs) }}
       
   336                     </td>
       
   337                     <td align="left">
       
   338                         {% for output in impl.outputfiles %}
       
   339                             {% if output.exists %}
       
   340                                 <a href="file:{{ output.abs_filename|pathname_to_url }}">{{ output.filename }}</a><br>
       
   341                             {% else %}
       
   342                                 <span class="red">{{ output.filename }}</span><br>
       
   343                             {% endif %}
       
   344                         {% endfor %}
       
   345                     </td>
       
   346                     </tr>
       
   347                 {% endif %}
       
   348                 
       
   349             {% endfor %}
       
   350         </tr>
       
   351     {% endfor %}    
       
   352     </table>
       
   353 
       
   354     <h1>Refs with no implementation:</h1><br>
       
   355     
       
   356     <table class="report">
       
   357     <tr>
       
   358         <th class="featureName">API</th>
       
   359         <th class="featureName">Data</th>
       
   360     </tr>
       
   361     {% for feat in rep_data.ref_noimpl %}
       
   362         <tr>
       
   363             <td align="left" >
       
   364                 {% if feat.is_temp_feature -%}
       
   365                 <b><i>{{ feat.ref }}</i></b><br>
       
   366                 {%- else -%}
       
   367                 <b>{{ feat.ref }}</b><br>
       
   368                 {%- endif %}
       
   369                 <b>Name: </b>{{ feat.feat_name|e|xml_charref_replace }}<br>
       
   370                 <b>Type: </b>{{ feat.feat_type|e|xml_charref_replace }}<br>
       
   371                 <b>ConfML: </b><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ feat.config_path|pathname_to_url }}">{{ feat.config_path }}</a>
       
   372             </td>
       
   373             <td align="left">
       
   374             <table class="report">
       
   375             
       
   376             {% for data in feat.datas %}
       
   377                 {% if loop.first %}
       
   378                     <tr>
       
   379                         <th class="th.header">Layer</th>
       
   380                         <th class="th.header">Value</th>
       
   381                     </tr>
       
   382                     <tr>
       
   383                         <td><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ data.layer|pathname_to_url }}">{{ data.layer }}</a></td>
       
   384                         <td>{{ data.value|e|xml_charref_replace }}</td>
       
   385                     </tr>
       
   386                 {% else %}
       
   387                     <tr>
       
   388                         <td><a href="file:{{ rep_data.project_dir|pathname_to_url }}/{{ data.layer|pathname_to_url }}">{{ data.layer }}</a></td>
       
   389                         <td>{{ data.value|e|xml_charref_replace }}</td>
       
   390                     </tr>
       
   391                 {% endif %}
       
   392             {% endfor %}
       
   393             </table>
       
   394             
       
   395             <table class="report">
       
   396                 {% for data in feat.seq_data %}
       
   397                     {% if loop.first %}
       
   398                         <tr>
       
   399                             <th class="th.header">Setting</th>
       
   400                             <th class="th.header">Value</th>
       
   401                         </tr>
       
   402                         <tr>
       
   403                             <td><b>{{ data[0] }}</b></td>
       
   404                             <td>
       
   405                                 {% for value in data[1] %}
       
   406                                     {{ value|e|xml_charref_replace }}<br>
       
   407                                 {% endfor %}
       
   408                             </td>
       
   409                         </tr>
       
   410                     {% else %}
       
   411                         <tr>
       
   412                             <td><b>{{ data[0] }}</b></td>
       
   413                             <td>
       
   414                                 {% for value in data[1] %}
       
   415                                     {{ value|e|xml_charref_replace }}<br>
       
   416                                 {% endfor %}
       
   417                             </td>
       
   418                         </tr>
       
   419                     {% endif %}
       
   420                 {% endfor %}
       
   421             </table>
       
   422         </tr>
       
   423     {% endfor %}    
       
   424     </table>
       
   425     <h1>Not generated output files:</h1><br>
       
   426     
       
   427     <table class="report">
       
   428     <tr>
       
   429         <th class="featureName">Output file</th>
       
   430     </tr>
       
   431     {% for file in rep_data.missing_output_files %}
       
   432         <tr>
       
   433             <td align="left" >
       
   434                 {{ file.filename }}
       
   435             </td>
       
   436     {% endfor %}
       
   437     </table>
       
   438     
       
   439 </body>
       
   440 </html>