buildframework/helium/sf/java/metadata/src/templates/summary.html.ftl
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 629 541af5ee3ed9
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     1 <#--
       
     2 ============================================================================ 
       
     3 Name        : summary.html.ftl 
       
     4 Part of     : Helium 
       
     5 
       
     6 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     7 All rights reserved.
       
     8 This component and the accompanying materials are made available
       
     9 under the terms of the License "Eclipse Public License v1.0"
       
    10 which accompanies this distribution, and is available
       
    11 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    12 
       
    13 Initial Contributors:
       
    14 Nokia Corporation - initial contribution.
       
    15 
       
    16 Contributors:
       
    17 
       
    18 Description:
       
    19 
       
    20 ============================================================================
       
    21 --> 
       
    22 <?xml version="1.0" encoding="utf-8"?>
       
    23 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
    24 <html>
       
    25 
       
    26 
       
    27 <#include "/@macro/logger.ftl"/>
       
    28 
       
    29     <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
       
    30         "${dbPath}") >
       
    31 
       
    32 <head>
       
    33     <title>
       
    34 <#if loginfo?? >
       
    35 <#assign mykey=loginfo.info.id>
       
    36 <#if (conv[mykey])?exists>
       
    37 ${loginfo.info.id}
       
    38 </#if>
       
    39 build summary</title>
       
    40     <@helium_logger_html_head/>
       
    41 </head>
       
    42 </#if>
       
    43 <body>
       
    44 
       
    45 
       
    46 <!--
       
    47     Processing the Helium log summary.
       
    48 -->
       
    49 <#macro logentry text, severity>
       
    50     <#assign conv={"error": "error", "warning": "warning"}>
       
    51     <#if (conv['${severity}'])?exists>
       
    52         <@helium_logger_print type="${conv[\"${severity}\"]}">${text}</@helium_logger_print>
       
    53     <#else>
       
    54         <@helium_logger_print type="">${text}</@helium_logger_print>
       
    55     </#if>
       
    56 </#macro>
       
    57 
       
    58 <#macro logfile_severity logname, priority, count, helium_node_id>
       
    59     <@helium_message_box nodeid="${helium_node_id}" type="${priority}"  count="${count}"?number />
       
    60 </#macro>
       
    61 
       
    62 
       
    63 <#macro logfile_entry_detail text, priority, helium_node_id>
       
    64     <@logentry "${text}", "${priority?lower_case}" />
       
    65 </#macro>
       
    66 
       
    67 <!-- Call the macros to render the log contents. -->
       
    68 <#assign mykey=loginfo>
       
    69 <#if (conv[mykey])?exists>
       
    70 <@helium_logger_header title="${loginfo.info.id} build"/>
       
    71 
       
    72 <@helium_logger_content title="Build overview">
       
    73     Time started: ${loginfo.info.startTime}<br/>
       
    74     Build machine: ${loginfo.info.machine}<br/>
       
    75     Is published?: ${loginfo.info.publish.status}<br/>
       
    76     <#if loginfo.info.publish.status?string == true?string>
       
    77         Published location: ${loginfo.info.publish.location}</br>
       
    78     </#if>
       
    79 </@helium_logger_content>
       
    80 </#if>
       
    81 
       
    82 <@helium_logger_content title="Errors and warnings details">
       
    83 <#list table_info['jpa']['select l from LogFile l'] as logentry>
       
    84     <#assign helium_node_id = helium_node_id + 1>
       
    85     <#-- -->
       
    86     <@helium_logger_node_head nodeid="${helium_node_id}" title="${logentry.path}">
       
    87         <#list table_info['jpa']['select p from Priority p where p.priority not like \'%DEFAULT%\''] as priority>
       
    88         <#assign count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId = ${priority.id} and m.logPathId=${logentry.id}'][0]>
       
    89             <@logfile_severity "${logentry.path}", "${priority.priority?lower_case}", 
       
    90                 "${count}", 
       
    91                 "${helium_node_id}" />
       
    92         </#list>
       
    93     </@helium_logger_node_head>
       
    94     <@helium_logger_node_content nodeid="${helium_node_id}">
       
    95         <#list table_info['jpa']['select c from Component c where c.logPathID=${logentry.id}'] as component>
       
    96             <#assign helium_node_id = helium_node_id + 1>
       
    97             <@helium_logger_node_head nodeid="${helium_node_id}" title="${component.component}">
       
    98                 <#list table_info['jpa']['select p from Priority p where p.priority not like \'%DEFAULT%\''] as priority>
       
    99                     <@logfile_severity "${component.id}", "${priority.priority}", 
       
   100                             table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId=${priority.id} and m.componentId = ${component.id}'][0], 
       
   101                             "${helium_node_id}" />
       
   102                 </#list>
       
   103             </@helium_logger_node_head>
       
   104             <@helium_logger_node_content nodeid="${helium_node_id}">
       
   105                 <#list table_info['jpa']['select p from Priority p'] as priority>
       
   106                 <#list table_info['native:com.nokia.helium.jpa.entity.metadata.MetadataEntry']['select * from metadataentry where metadataentry.component_id=${component.id} and metadataentry.priority_id = ${priority.id}'] as entry >
       
   107                     <#if entry.text??>
       
   108                     <#-- <#if sublog?node_name == "logfile"> --> 
       
   109                         <@logfile_entry_detail "${entry.text}", "${priority.priority}", "${helium_node_id}" />
       
   110                     </#if>
       
   111                     <#-- <#elseif sublog?node_name == "log">
       
   112                         <@antlognode sublog/>
       
   113                     </#if> -->
       
   114                 </#list>
       
   115             </#list>
       
   116             </@helium_logger_node_content>
       
   117         </#list>
       
   118     </@helium_logger_node_content>
       
   119 </#list>
       
   120 </@helium_logger_content>
       
   121 </body>
       
   122 </html>