18 Description: |
18 Description: |
19 |
19 |
20 ============================================================================ |
20 ============================================================================ |
21 --> |
21 --> |
22 |
22 |
|
23 <#macro print_component_summary component href_c_id> |
|
24 <#if component_table?keys?seq_contains("${component}")> |
|
25 <#if component_table["${component}"] != "general"> |
|
26 <tr><td>${component_table['${component}']}</td> |
|
27 <#else> |
|
28 <tr><td>UnCategorized</td> |
|
29 </#if> |
|
30 </#if> |
|
31 <#assign href_id = 0> |
|
32 <#assign time_tbl = table_info['select time from componenttime where cid = \'${component}\' ']> |
|
33 |
|
34 <#if time_tbl?size > 0 && time_tbl[0]?keys?seq_contains("time") > |
|
35 <#assign time = time_tbl[0]["time"]?number/> |
|
36 <#else> |
|
37 <#assign time = 0/> |
|
38 </#if> |
|
39 |
|
40 <#assign hours = (time /(60 * 60))?floor> |
|
41 <#assign minutes_secs = (time % (60 * 60))?floor> |
|
42 <#assign minutes = (minutes_secs / 60)?floor> |
|
43 <#assign seconds = (minutes_secs % 60)?floor> |
|
44 |
|
45 <td align="center">${hours?string("00")}:${minutes?string("00")}:${seconds?string("00")}</td> |
|
46 <#list priority_ids as priority> |
|
47 <#assign count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\') and component_id = \'${component}\' '][0]['COUNT'] > |
|
48 <#if count > 0> |
|
49 <#assign color = color_list['${priority}']> |
|
50 <td align="center" bgcolor="${color}"><a href="#section${href_c_id}${href_id}">${count}</a></td> |
|
51 <#else> |
|
52 <td align="center">${count}</td> |
|
53 </#if> |
|
54 <#assign href_id = href_id + 1> |
|
55 </#list> |
|
56 </tr> |
|
57 </#macro> |
|
58 |
|
59 <#macro print_list_text priority component href_id> |
|
60 <#assign count = table_info['select count(data) as COUNT from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] > |
|
61 <#if count > 0> |
|
62 <#if component_table?keys?seq_contains("${component}")> |
|
63 <#if component_table["${component}"] != "general"> |
|
64 <h3><a name="section${href_id}">${component_table['${component}']}(${count})</a></h3> |
|
65 <#else> |
|
66 <h3><a name="section${href_id}">Uncategorized(${count})</a></h3> |
|
67 </#if> |
|
68 </#if> |
|
69 <#list table_info['select * from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\')'] as recordentry > |
|
70 ${logfile}:${recordentry['line_number']}>${recordentry['data']}<br /> |
|
71 </#list> |
|
72 </#if> |
|
73 </#macro> |
|
74 |
23 <#macro add_severity_count severity, color, count> |
75 <#macro add_severity_count severity, color, count> |
24 <#if count > 0> |
76 <#if count > 0> |
25 <#if severity == 'error'> |
77 <#if severity == 'error'> |
26 <td width="12%%" align="center" bgcolor="${color}">${count}</td> |
78 <td width="12%%" align="center" bgcolor="${color}">${count}</td> |
27 <#else> |
79 <#else> |
36 <#assign time = "${doc.sbsinfo.duration.@time}" > |
88 <#assign time = "${doc.sbsinfo.duration.@time}" > |
37 |
89 |
38 <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', |
90 <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', |
39 "${dbPath}") > |
91 "${dbPath}") > |
40 <#-- overall summary --> |
92 <#-- overall summary --> |
41 <#assign component_table = table_info['select id, component from component where logpath_id in (select id from logfiles where path like \'%${logfile}%\')'] > |
93 <#assign component_table = table_info['select id, component from component where logpath_id in (select id from logfiles where path like \'%${logfile}%\') ORDER BY component'] > |
|
94 <#assign general_id = table_info['select id from component where logpath_id in (select id from logfiles where path like \'%${logfile}%\') and component like \'%general%\''] > |
|
95 |
42 <html> |
96 <html> |
43 <head><title>${logfile}</title></head> |
97 <head><title>${logfile}</title></head> |
44 <body> |
98 <body> |
45 <h2>Overall</h2> |
99 <h2>Overall</h2> |
46 <table border="1" cellpadding="0" cellspacing="0" width="100%%"> |
100 <table border="1" cellpadding="0" cellspacing="0" width="100%%"> |
70 <h1>${logfile}</h1> |
124 <h1>${logfile}</h1> |
71 <h2>By Component</h2> |
125 <h2>By Component</h2> |
72 <table border="1" cellpadding="0" cellspacing="0" width="100%%"> |
126 <table border="1" cellpadding="0" cellspacing="0" width="100%%"> |
73 <tr> |
127 <tr> |
74 <th width="50%%">Component</th> |
128 <th width="50%%">Component</th> |
75 <th width="10%%">Errors</th> |
129 <th width="9%%">Time</th> |
76 <th width="10%%">Warnings</th> |
130 <th width="9%%">Errors</th> |
77 <th width="10%%">Criticals</th> |
131 <th width="9%%">Warnings</th> |
78 <th width="10%%">Notes</th> |
132 <th width="9%%">Criticals</th> |
79 <th width="10%%">Info</th> |
133 <th width="9%%">Notes</th> |
|
134 <th width="9%%">Info</th> |
80 </tr> |
135 </tr> |
|
136 <#assign c_id = 0> |
|
137 <#if general_id?size > 0> |
|
138 <@print_component_summary component="${general_id[0][\"id\"]}" href_c_id="${c_id}"/> |
|
139 </#if> |
|
140 |
81 <#assign component_ids = component_table?keys> |
141 <#assign component_ids = component_table?keys> |
82 <#assign href_id = 0> |
|
83 <#list component_ids as component> |
142 <#list component_ids as component> |
84 <tr><td>${component_table['${component}']}</td> |
143 <#if component_table["${component}"] != "general"> |
85 <#list priority_ids as priority> |
144 <@print_component_summary component="${component}" href_c_id="${c_id}" /> |
86 <#assign count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'${priority}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\') and component_id = \'${component}\' '][0]['COUNT'] > |
145 </#if> |
87 <#if count > 0> |
146 |
88 <td align="center" bgcolor="${color_list['${priority}']}"><a href="#section${href_id}">${count}</a></td> |
147 <#assign c_id = c_id + 1> |
89 <#assign href_id = href_id + 1> |
|
90 <#else> |
|
91 <td align="center">${count}</td> |
|
92 </#if> |
|
93 </#list> |
|
94 </tr> |
|
95 </#list> |
148 </#list> |
96 </table> |
149 </table> |
97 |
150 |
98 <#-- Individual components status --> |
151 <#-- Individual components status --> |
99 |
152 |
100 <#assign component_ids = component_table?keys> |
153 <#assign href_pid = 0> |
101 <#assign href_id = 0> |
154 <#list priority_ids as p_id> |
|
155 <#assign p_count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'${p_id}\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] > |
|
156 <#if p_count > 0> |
|
157 <h3><a>${p_id} Details By Component</a></h3> |
|
158 </#if> |
|
159 |
|
160 <#assign href_cid = 0> |
|
161 <#if general_id?size > 0> |
|
162 <@print_list_text priority="${p_id}" component="${general_id[0][\"id\"]}" href_id="${href_cid}${href_pid}" /> |
|
163 <#assign href_cid = href_cid + 1> |
|
164 </#if> |
102 <#list component_ids as component> |
165 <#list component_ids as component> |
103 <#assign displayComponentHeader= 0 > |
166 <#if component_table["${component}"] != "general"> |
104 <#list priority_ids as priority> |
167 <@print_list_text priority="${p_id}" component="${component}" href_id="${href_cid}${href_pid}" /> |
105 <#assign displayPriorityHeader= 0 > |
168 <#assign href_cid = href_cid + 1> |
106 <#assign count = table_info['select count(data) as COUNT from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\')'][0]['COUNT'] > |
169 </#if> |
107 <#if count > 0> |
|
108 <h3><a name="section${href_id}">${priority} for ${component_table['${component}']}</a></h3> |
|
109 <#assign href_id = href_id + 1> |
|
110 <table border="1" cellpadding="0" cellspacing="0" width="100%%"> |
|
111 <tr> |
|
112 <th width="85%%">Text</th> |
|
113 <th width="15%%">Line Number</th> |
|
114 </tr> |
|
115 <#list table_info['select * from metadata where component_id=\'${component}\' and priority_id in (select id from priority where priority like \'${priority}\')'] as recordentry > |
|
116 <tr><td>${recordentry['data']}</td><td>${recordentry['line_number']}</td></tr> |
|
117 </#list> |
|
118 </table> |
|
119 </#if> |
|
120 </#list> |
170 </#list> |
|
171 <#assign href_pid = href_pid + 1> |
121 </#list> |
172 </#list> |
122 </body> |
173 </body> |
123 </html> |
174 </html> |
124 </#if> |
175 </#if> |