buildframework/helium/tools/common/templates/log/summary_metadata_orm.html.ftl
changeset 628 7c4a911dc066
parent 587 85df38eb4012
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    53     <#else>
    53     <#else>
    54         <@helium_logger_print type="">${text}</@helium_logger_print>
    54         <@helium_logger_print type="">${text}</@helium_logger_print>
    55     </#if>
    55     </#if>
    56 </#macro>
    56 </#macro>
    57 
    57 
    58 <#macro logfile_severity logname, priority, count, helium_node_id>
    58 <#macro logfile_severity logname, severity, count, helium_node_id>
    59     <@helium_message_box nodeid="${helium_node_id}" type="${priority}"  count="${count}"?number />
    59     <@helium_message_box nodeid="${helium_node_id}" type="${severity}" count="${count}"?number />
    60 </#macro>
    60 </#macro>
    61 
    61 
    62 
    62 
    63 <#macro logfile_entry_detail text, priority, helium_node_id>
    63 <#macro logfile_entry_detail text, severity, helium_node_id>
    64     <@logentry "${text}", "${priority?lower_case}" />
    64     <@logentry "${text}", "${severity?lower_case}" />
    65 </#macro>
    65 </#macro>
    66 
    66 
    67 <!-- Call the macros to render the log contents. -->
    67 <!-- Call the macros to render the log contents. -->
    68 <#assign mykey=loginfo>
    68 <#assign mykey=loginfo>
    69 <#if (conv[mykey])?exists>
    69 <#if (conv[mykey])?exists>
    82 <@helium_logger_content title="Errors and warnings details">
    82 <@helium_logger_content title="Errors and warnings details">
    83 <#list table_info['jpa']['select l from LogFile l'] as logentry>
    83 <#list table_info['jpa']['select l from LogFile l'] as logentry>
    84     <#assign helium_node_id = helium_node_id + 1>
    84     <#assign helium_node_id = helium_node_id + 1>
    85     <#-- -->
    85     <#-- -->
    86     <@helium_logger_node_head nodeid="${helium_node_id}" title="${logentry.path}">
    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>
    87         <#list table_info['jpa']['select p from Severity p where p.severity not like \'INFO\''] as severity>
    88         <#assign missing_count=0/>
    88         <#assign count=table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.severityId=${severity.id} and m.logFileId=${logentry.id}'][0]>
    89         <#if priority.priority == "ERROR">
    89             <@logfile_severity "${logentry.path}", "${severity.severity?lower_case}", 
    90             <#assign missing_count=table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where l.id=${logentry.id} and l.path not like \'%_clean_%compile.log\' and w.missing=1'][0]/>
       
    91         </#if>        
       
    92         <#assign count = missing_count + table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId = ${priority.id} and m.logPathId=${logentry.id}'][0]>
       
    93             <@logfile_severity "${logentry.path}", "${priority.priority?lower_case}", 
       
    94                 "${count}", 
    90                 "${count}", 
    95                 "${helium_node_id}" />
    91                 "${helium_node_id}" />
    96         </#list>
    92         </#list>
    97     </@helium_logger_node_head>
    93     </@helium_logger_node_head>
    98     <@helium_logger_node_content nodeid="${helium_node_id}">
    94     <@helium_logger_node_content nodeid="${helium_node_id}">
    99         <#list table_info['jpa']['select c from Component c where c.logPathID=${logentry.id}'] as component>
    95         <#list table_info['jpa']['select c from Component c where c.logFileId=${logentry.id}'] as component>
   100             <#assign helium_node_id = helium_node_id + 1>
    96             <#assign helium_node_id = helium_node_id + 1>
   101             <@helium_logger_node_head nodeid="${helium_node_id}" title="${component.component}">
    97             <@helium_logger_node_head nodeid="${helium_node_id}" title="${component.component}">
   102                 <#list table_info['jpa']['select p from Priority p where p.priority not like \'%DEFAULT%\''] as priority>
    98                 <#list table_info['jpa']['select p from Severity p where p.severity not like \'INFO\''] as severity>
   103                     <#assign missing_count=0/>
    99                     <@logfile_severity "${component.id}", "${severity.severity?lower_case}", 
   104                     <#if priority.priority == "ERROR">
   100                             table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.severityId=${severity.id} and m.componentId=${component.id}'][0], 
   105                         <#assign missing_count=table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.id=${component.id} and l.path not like \'%_clean_%compile.log\' and w.missing=1'][0]/>
       
   106                     </#if>
       
   107                     <@logfile_severity "${component.id}", "${priority.priority?lower_case}", 
       
   108                             table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId=${priority.id} and m.componentId = ${component.id}'][0] + missing_count, 
       
   109                             "${helium_node_id}" />
   101                             "${helium_node_id}" />
   110                 </#list>
   102                 </#list>
   111             </@helium_logger_node_head>
   103             </@helium_logger_node_head>
   112             <@helium_logger_node_content nodeid="${helium_node_id}">
   104             <@helium_logger_node_content nodeid="${helium_node_id}">
   113                 <#list table_info['jpa']['select p from Priority p'] as priority>
   105                 <#list table_info['jpa']['select p from Severity p'] as severity>
   114                 <#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 >
   106                 <#list table_info['jpa']['select m from MetadataEntry m where m.componentId=${component.id} and m.severityId=${severity.id}'] as entry>
   115                     <#if entry.text??>
   107                     <#if entry.text??>
   116                     <#-- <#if sublog?node_name == "logfile"> --> 
   108                         <@logfile_entry_detail "${entry.text}", "${severity.severity?lower_case}", "${helium_node_id}" />
   117                         <@logfile_entry_detail "${entry.text}", "${priority.priority}", "${helium_node_id}" />
       
   118                     </#if>
   109                     </#if>
   119                     <#-- <#elseif sublog?node_name == "log">
       
   120                         <@antlognode sublog/>
       
   121                     </#if> -->
       
   122                 </#list>
   110                 </#list>
   123             </#list>
       
   124             <#list table_info['jpa']['select distinct w FROM WhatLogEntry w join  w.component as c JOIN c.logFile as l where c.id=${component.id} and l.path not like \'%_clean_%compile.log\' AND w.missing=1'] as entry>
       
   125                 <@logfile_entry_detail "MISSING: ${entry.member}", "ERROR", "${helium_node_id}" />
       
   126             </#list>
   111             </#list>
   127             </@helium_logger_node_content>
   112             </@helium_logger_node_content>
   128         </#list>
   113         </#list>
   129     </@helium_logger_node_content>
   114     </@helium_logger_node_content>
   130 </#list>
   115 </#list>