diff -r c7c26511138f -r 7c4a911dc066 buildframework/helium/sf/java/metadata/src/templates/scan2.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/scan2.html.ftl Wed Jun 16 16:51:40 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -<#-- -============================================================================ -Name : scan2.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - -<#macro print_component_summary component href_c_id > -<#assign href_id = 0> -<#assign component_time_list = table_info['jpasingle']['select t.componentTime from ComponentTime t where t.componentId =${component.id}']> - -<#if component_time_list[0]?? > - <#assign time = component_time_list[0]?number> -<#else> - <#assign time = 0> - - -<#assign hours = (time /(60 * 60))?floor> -<#assign minutes_secs = (time % (60 * 60))?floor> -<#assign minutes = (minutes_secs / 60)?floor> -<#assign seconds = (minutes_secs % 60)?floor> - ${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] > - <#if count > 0> - <#assign color = color_list['${priority}']> - ${count} - <#else> - ${count} - - <#assign href_id = href_id + 1> - - - - -<#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] > -<#if count?? && count?number > 0> -<#if "${component.component}" != "general"> -

${component.component}(${count})

- <#else> -

Uncategorized(${count})

- - -<#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 > -${logfile}:${entry.lineNumber}>${entry.text}
- - - -<#macro add_severity_count severity, color, count> - <#if count > 0> -${count} - <#else> - ${count} - - - -<#-- end of macros code starts here --> - - -<#if (doc)??> - <#assign logfile = "${doc.sbsinfo.logfile.@name}" > - <#assign time = "${doc.sbsinfo.duration.@time}" > - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', - "${dbPath}") > -<#-- overall summary --> -<#assign logpath_id_list = table_info['jpasingle']['select l.id from LogFile l where l.path like \'%${logfile}\''] > -<#if logpath_id_list[0]?? > -<#assign logpath_id = logpath_id_list[0] > - - -${logfile} - -

Overall

- - - - - - - - - - - -<#-- 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> - - -<#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] /> - - -
 TimeErrorsWarningsCriticalMigration NotesInfo
Total${time}
-<#-- Summary for each component --> -

${logfile}

-

By Component

- - - - - - - - - - - -<#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}']> -<#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> - -<#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_component_summary component=componentEntry href_c_id="${c_id}"/> -<#assign c_id = c_id + 1> - - -
ComponentTimeErrorsWarningsCriticalsNotesInfo
- -<#-- 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]> -<#if p_count > 0> -

${p_id} Details By Component

- -<#assign href_cid = 0> -<#if general_component??> - <@print_list_text priority="${p_id}" component=general_component href_id="${p_id}${href_cid}" /> - <#assign href_cid = href_cid + 1> - -<#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}" /> - <#assign href_cid = href_cid + 1> - - - - - \ No newline at end of file