1 <#-- |
|
2 ============================================================================ |
|
3 Name : macro.ftl |
|
4 Part of : Helium |
|
5 |
|
6 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
7 All rights reserved. |
|
8 This component and the accompanying materials are made available |
|
9 under the terms of the License "Eclipse Public License v1.0" |
|
10 which accompanies this distribution, and is available |
|
11 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
12 |
|
13 Initial Contributors: |
|
14 Nokia Corporation - initial contribution. |
|
15 |
|
16 Contributors: |
|
17 |
|
18 Description: |
|
19 |
|
20 ============================================================================ |
|
21 --> |
|
22 <#setting number_format="0"> |
|
23 |
|
24 <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', |
|
25 "${dbPath}") > |
|
26 <#assign priority_table = table_info['select * from priority'] > |
|
27 <#assign logpath_table = table_info['select * from logfiles'] > |
|
28 <#assign priority_ids = priority_table?keys> |
|
29 <#assign logpath_id = logpath_table?keys> |
|
30 <#assign components = table_info['select component from component where logPath_id=(select id from logfiles where path=\'${logpath}\')'] > |
|
31 <faults> |
|
32 <total severity="error">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
33 <total severity="warning">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
34 <total severity="warning_rvct_other">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
35 <!-- todo update to calculate the correct value --> |
|
36 <total severity="warning_rvct_bad">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\')'][0]['COUNT']}</total> |
|
37 <#list components as component> |
|
38 <component> |
|
39 <name>${component['component']}</name> |
|
40 <total severity="error">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
41 <total severity="warning">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
42 <total severity="critical">${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']}</total> |
|
43 </component> |
|
44 </#list> |
|
45 </faults> |
|
46 <components> |
|
47 <#list components as component> |
|
48 <!-- all components --> |
|
49 <component>${component['component']}</component> |
|
50 </#list> |
|
51 </components> |
|
52 <#assign schema_version=10/> |
|