--- a/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl Thu Mar 04 15:10:37 2010 +0200
+++ b/buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl Tue Apr 27 08:33:08 2010 +0300
@@ -25,27 +25,28 @@
<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
"${dbPath}") >
- <#assign convertedLogPath = "${logpath}"?replace("\\","/") >
- <#assign logfile = table_info['jpasingle']['select l from LogFile l where LOWER(l.path) like \'%${convertedLogPath?lower_case}\''][0]>
- <faults>
- <total severity="error">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId=${logfile.id} and p.priority like \'%ERROR%\''][0]}</total>
- <total severity="warning">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId=${logfile.id} and UPPER(p.priority) like \'%WARNING%\''][0]}</total>
- <total severity="warning_rvct_other">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId=${logfile.id} and UPPER(p.priority) like \'%WARNING%\''][0]}</total>
+ <faults>
+ <total severity="error">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%ERROR%\''][0]
+ + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]}</total>
+ <total severity="warning">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%WARNING%\''][0]}</total>
+ <total severity="warning_rvct_other">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%WARNING%\''][0]}</total>
<!-- todo update to calculate the correct value -->
- <total severity="warning_rvct_bad">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId = ${logfile.id} and UPPER(p.priority) like \'%REMARK%\''][0]}</total>
- <#list table_info['jpa']['select c from Component c where c.logPathID=${logfile.id} ORDER BY c.component'] as component>
+ <total severity="warning_rvct_bad">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p JOIN m.logFile as l where LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and p.priority like \'%REMARK%\''][0]}</total>
+ <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component>
<component>
- <name>${component.component}</name>
- <total severity="error">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where UPPER(p.priority) like \'%ERROR%\' and m.componentId = ${component.id}'][0]}</total>
- <total severity="warning">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where UPPER(p.priority) like \'%WARNING%\' and m.componentId = ${component.id}'][0]}</total>
- <total severity="critical">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where UPPER(p.priority) like \'%REMARK%\' and m.componentId = ${component.id}'][0]}</total>
+ <name>${component}</name>
+ <total severity="error">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%ERROR%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]
+ + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]}</total>
+ <total severity="warning">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%WARNING%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]}</total>
+ <total severity="critical">${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%REMARK%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]}</total>
</component>
</#list>
</faults>
<components>
- <#list table_info['jpa']['select c from Component c where c.logPathID=${logfile.id}'] as component>
+
+ <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component>
<!-- all components -->
- <component>${component.component}</component>
+ <component>${component}</component>
</#list>
</components>
<#include "diamonds_footer.ftl">
\ No newline at end of file