buildframework/helium/tools/common/templates/log/scan2_text.html.ftl
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
child 217 0f5e3a7fb6af
permissions -rw-r--r--
helium_7.0-r14027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
<#--
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
============================================================================ 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
Name        : bmd.macros.xml.ftl 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
Part of     : Helium 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
Description:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
============================================================================
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
    -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
<#macro print_component_summary component href_c_id>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
<#if component_table?keys?seq_contains("${component}")>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
<#if component_table["${component}"] != "general">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
<tr><td>${component_table['${component}']}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
<#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
<tr><td>UnCategorized</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
<#assign href_id = 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
<#assign time_tbl = table_info['select time from componenttime where cid = \'${component}\' ']>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
<#if time_tbl?size &gt; 0 && time_tbl[0]?keys?seq_contains("time") >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
    <#assign time = time_tbl[0]["time"]?number/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
<#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
    <#assign time = 0/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
<#assign hours = (time /(60 * 60))?floor>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
<#assign minutes_secs = (time % (60 * 60))?floor>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
<#assign minutes = (minutes_secs / 60)?floor>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
<#assign seconds = (minutes_secs % 60)?floor>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
<td align="center">${hours?string("00")}:${minutes?string("00")}:${seconds?string("00")}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
<#list priority_ids as priority>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
    <#assign count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority      where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\') and component_id = \'${component}\' '][0]['COUNT'] >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
    <#if count &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
        <#assign color = color_list['${priority}']>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
        <td align="center" bgcolor="${color}"><a href="#section${href_c_id}${href_id}">${count}</a></td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
    <#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
        <td align="center">${count}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
    </#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
    <#assign href_id = href_id + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
</#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    56
    </tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
</#macro>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
<#macro print_list_text priority component href_id>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
<#assign count = table_info['select count(data) as COUNT from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
<#if count &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
<#if component_table?keys?seq_contains("${component}")>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
    <#if component_table["${component}"] != "general">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
        <h3><a name="section${href_id}">${component_table['${component}']}(${count})</a></h3>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
    <#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
        <h3><a name="section${href_id}">Uncategorized(${count})</a></h3>    
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    67
    </#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
    <#list table_info['select * from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\')'] as recordentry >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
    ${logfile}:${recordentry['line_number']}>${recordentry['data']}<br />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
    </#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
</#macro>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    75
<#macro add_severity_count severity, color, count>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    76
<#assign additional_count = count>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    77
<#if severity == 'error'>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    78
    <#assign additional_count = count + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    79
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    80
    <#if additional_count &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    81
        <#if severity == 'error'>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    82
<td width="12%%" align="center" bgcolor="${color}">${additional_count}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    83
        <#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    84
<td align="center" bgcolor="${color}">${count}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    85
        </#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    86
    <#else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    87
    <td align="center">${count}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    88
    </#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    89
</#macro>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    90
<#if (doc)??>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    91
    <#assign logfile = "${doc.sbsinfo.logfile.@name}" >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    92
    <#assign time = "${doc.sbsinfo.duration.@time}" >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    93
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    94
    <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader',
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    95
        "${dbPath}") >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    96
<#-- overall summary -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    97
<#assign component_table = table_info['select id, component from component where logpath_id in (select id from logfiles where path like \'%${logfile}%\') ORDER BY component'] >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    98
<#assign general_id = table_info['select id from component where logpath_id in (select id from logfiles where path like \'%${logfile}%\') and component like \'%general%\''] >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    99
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   100
<html>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   101
<head><title>${logfile}</title></head>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   102
<body>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   103
<h2 STYLE="background-color :#FF0000">Generated using Text Parser instead of XML Parser because of Invalid XML output from Raptor</h2>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   104
<h2>Overall</h2>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   105
<table border="1" cellpadding="0" cellspacing="0" width="100%%">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   106
<tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   107
    <th width="22%%">&nbsp;</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   108
    <th width="11%%">Time</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   109
    <th width="11%%">Errors</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   110
    <th width="11%%">Warnings</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   111
    <th width="11%%">Critical</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   112
    <th width="23%%">Migration Notes</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   113
    <th width="11%%">Info</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   114
</tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   115
<tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   116
<td width="22%%">Total</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   117
<td width="12%%" align="center">${time}</td>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   118
<#assign color_list={'error': 'FF0000', 'warning': 'FFF000', 'critical': 'FF7000', 'remark': '0000FF', 'info': 'FFFFFF'}>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   119
<#assign priority_ids = color_list?keys>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   120
<#list priority_ids as priority>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   121
    <@add_severity_count severity='${priority}' 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   122
        count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] color=color_list['${priority}'] />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   123
</#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   124
</tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   125
</table>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   126
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   127
<#-- Summary for each component -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   128
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   129
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   130
<h1>${logfile}</h1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   131
<h2>By Component</h2>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   132
    <table border="1" cellpadding="0" cellspacing="0" width="100%%">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   133
        <tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   134
            <th width="50%%">Component</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   135
            <th width="9%%">Time</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   136
            <th width="9%%">Errors</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   137
            <th width="9%%">Warnings</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   138
            <th width="9%%">Criticals</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   139
            <th width="9%%">Notes</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   140
            <th width="9%%">Info</th>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   141
        </tr>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   142
<#assign c_id = 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   143
<#if general_id?size &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   144
<@print_component_summary component="${general_id[0][\"id\"]}" href_c_id="${c_id}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   145
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   146
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   147
<#assign component_ids = component_table?keys>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   148
<#list component_ids as component>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   149
<#if component_table["${component}"] != "general">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   150
    <@print_component_summary component="${component}" href_c_id="${c_id}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   151
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   152
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   153
<#assign c_id = c_id + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   154
</#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   155
</table>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   156
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   157
<#-- Individual components status -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   158
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   159
<#assign href_pid = 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   160
<#list priority_ids as p_id>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   161
<#assign p_count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'${p_id}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] >
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   162
<#if p_count &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   163
    <h3><a>${p_id} Details By Component</a></h3>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   164
</#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   165
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   166
<#assign href_cid = 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   167
<#if general_id?size &gt; 0>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   168
    <@print_list_text priority="${p_id}" component="${general_id[0][\"id\"]}" href_id="${href_cid}${href_pid}" /> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   169
    <#assign href_cid = href_cid + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   170
</#if>    
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   171
<#list component_ids as component>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   172
    <#if component_table["${component}"] != "general">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   173
        <@print_list_text priority="${p_id}" component="${component}" href_id="${href_cid}${href_pid}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   174
        <#assign href_cid = href_cid + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   175
    </#if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   176
</#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   177
<#assign href_pid = href_pid + 1>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   178
</#list>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   179
</body>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   180
</html>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   181
</#if>