diff -r c7c26511138f -r 7c4a911dc066 buildframework/helium/tools/common/templates/log/scan2_text_orm.html.ftl
--- a/buildframework/helium/tools/common/templates/log/scan2_text_orm.html.ftl Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/tools/common/templates/log/scan2_text_orm.html.ftl Fri Aug 13 14:59:05 2010 +0300
@@ -37,11 +37,11 @@
${component.component} |
<#--write each of the component tables information -->
${hours?string("00")}:${minutes?string("00")}:${seconds?string("00")} |
-<#list color_list?keys as priority>
- <#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%${priority?upper_case}%\' and c.id=${component.id}'][0] >
+<#list color_list?keys as severity>
+ <#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.severity as p JOIN m.component as c where p.severity=\'${severity?upper_case}\' and c.id=${component.id}'][0] >
<#if count > 0>
- <#assign color = color_list['${priority}']>
- ${count} |
+ <#assign color = color_list['${severity}']>
+ ${count} |
<#else>
${count} |
#if>
@@ -50,8 +50,8 @@
#macro>
-<#macro print_list_text priority component href_id>
-<#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%${priority?upper_case}%\' and c.id=${component.id}'][0] >
+<#macro print_list_text severity component href_id>
+<#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.severity as p JOIN m.component as c where p.severity=\'${severity?upper_case}\' and c.id=${component.id}'][0] >
<#if count?? && count?number > 0>
<#if "${component.component}" != "general">
@@ -59,7 +59,7 @@
#if>
#if>
-<#list table_info['native:com.nokia.helium.jpa.entity.metadata.MetadataEntry']['select * from metadataentry INNER JOIN component ON component.component_id=metadataentry.component_id INNER JOIN priority ON priority.priority_id=metadataentry.priority_id where component.component_id=${component.id} and UPPER(priority.priority) like \'%${priority?upper_case}%\''] as entry >
+<#list table_info['native:com.nokia.helium.jpa.entity.metadata.MetadataEntry']['select * from metadataentry INNER JOIN component ON component.component_id=metadataentry.component_id INNER JOIN severity ON severity.severity_id=metadataentry.severity_id where component.component_id=${component.id} and severity.severity=\'${severity?upper_case}\''] as entry >
${logfile}:${entry.lineNumber}>${entry.text}
#list>
#macro>
@@ -90,7 +90,7 @@
<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
"${dbPath}") >
<#-- overall summary -->
-<#assign logpath = table_info['jpasingle']['select l from LogFile l where LOWER(l.path) like \'%${logfile?lower_case}\''][0] >
+<#assign logfile = table_info['jpasingle']['select l from LogFile l where LOWER(l.path) like \'${logfile?lower_case}\''][0] >
${logfile}
@@ -110,12 +110,12 @@
<#-- need to create variables for the items tobe displayed in the comment title Overall_Total
doing this the long winded way because I could not find a way to add items to a hash in a loop -->
<#assign color_list={'error': 'FF0000', 'warning': 'FFF000', 'critical': 'FF7000', 'remark': 'FFCCFF', 'info': 'FFFFFF'}>
-<#assign priority_ids = color_list?keys>
+<#assign severity_ids = color_list?keys>
Total |
${time} |
-<#list priority_ids as priority>
- <@add_severity_count severity='${priority}' color=color_list['${priority}']
- count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority p where m.logPathId=${logpath.id} and UPPER(p.priority) like \'%${priority?upper_case}%\''][0] />
+<#list severity_ids as severity>
+ <@add_severity_count severity='${severity}' color=color_list['${severity}']
+ count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.severity p where m.logFileId=${logfile.id} and p.severity=\'${severity?upper_case}\''][0] />
#list>
@@ -137,31 +137,31 @@
<#assign c_id = 0>
-<#assign general_component_list = table_info['jpasingle']['select c from Component c where LOWER(c.component) like \'%general%\' and c.logPathID=${logpath.id}']>
+<#assign general_component_list = table_info['jpasingle']['select c from Component c where LOWER(c.component) like \'%general%\' and c.logFileId=${logfile.id}']>
<#if general_component_list[0]?? >
<#assign general_component = general_component_list[0] >
<@print_component_summary component=general_component href_c_id="${c_id}"/>
<#assign c_id = c_id + 1>
#if>
-<#list table_info['jpa']['select c from Component c where c.logPathID=${logpath.id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry>
+<#list table_info['jpa']['select c from Component c where c.logFileId=${logfile.id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry>
<@print_component_summary component=componentEntry href_c_id="${c_id}"/>
<#assign c_id = c_id + 1>
#list>
<#-- Individual components status -->
-<#list priority_ids as p_id>
-<#assign p_count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId=${logpath.id} and UPPER(p.priority) like \'%${p_id?upper_case}%\''][0]>
+<#list severity_ids as p_id>
+<#assign p_count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.severity as p where m.logFileId=${logfile.id} and p.severity=\'${p_id?upper_case}\''][0]>
<#if p_count > 0>
#if>
<#assign href_cid = 0>
<#if general_component??>
- <@print_list_text priority="${p_id}" component=general_component href_id="${p_id}${href_cid}" />
+ <@print_list_text severity="${p_id}" component=general_component href_id="${p_id}${href_cid}" />
<#assign href_cid = href_cid + 1>
#if>
-<#list table_info['jpa']['select c from Component c where c.logPathID=${logpath.id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry>
- <@print_list_text priority="${p_id}" component=componentEntry href_id="${p_id}${href_cid}" />
+<#list table_info['jpa']['select c from Component c where c.logFileId=${logfile.id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry>
+ <@print_list_text severity="${p_id}" component=componentEntry href_id="${p_id}${href_cid}" />
<#assign href_cid = href_cid + 1>
#list>
#list>