buildframework/helium/tools/common/templates/diamonds/faults_metadata_orm.ftl
author wbernard
Thu, 04 Mar 2010 15:10:37 +0200
changeset 217 0f5e3a7fb6af
child 587 85df38eb4012
permissions -rw-r--r--
helium_8.0-r15308
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     1
<#--
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     2
============================================================================ 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     3
Name        : macro.ftl 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     4
Part of     : Helium 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     5
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     6
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     7
All rights reserved.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     8
This component and the accompanying materials are made available
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     9
under the terms of the License "Eclipse Public License v1.0"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    10
which accompanies this distribution, and is available
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    11
at the URL "http://www.eclipse.org/legal/epl-v10.html".
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    12
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    13
Initial Contributors:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    14
Nokia Corporation - initial contribution.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    15
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    16
Contributors:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    17
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    18
Description:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    19
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    20
============================================================================
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    21
-->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    22
<#include "diamonds_header.ftl"> 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    23
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    24
<#setting number_format="0">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    25
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    26
    <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader',
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    27
        "${dbPath}") >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    28
    <#assign convertedLogPath = "${logpath}"?replace("\\","/") >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    29
    <#assign logfile =  table_info['jpasingle']['select l from LogFile l where LOWER(l.path) like \'%${convertedLogPath?lower_case}\''][0]>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    30
   <faults>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    31
        <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    32
        <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    33
        <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    34
        <!-- todo update to calculate the correct value -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    35
        <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    36
    <#list table_info['jpa']['select c from Component c where c.logPathID=${logfile.id} ORDER BY c.component'] as component>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    37
        <component>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    38
            <name>${component.component}</name>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    39
            <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    40
            <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    41
            <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>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    42
        </component>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    43
    </#list>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    44
    </faults>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    45
    <components>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    46
    <#list table_info['jpa']['select c from Component c where c.logPathID=${logfile.id}'] as component>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    47
    <!-- all components -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    48
        <component>${component.component}</component>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    49
    </#list>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    50
    </components>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    51
<#include "diamonds_footer.ftl">