| 5018 |
dpurdie |
1 |
<%
|
|
|
2 |
'------------ Variable Definition -------------
|
|
|
3 |
Dim biQry
|
|
|
4 |
Dim utQry
|
|
|
5 |
Dim rsQry
|
|
|
6 |
'------------ Constants Declaration -----------
|
|
|
7 |
'------------ Variable Init -------------------
|
|
|
8 |
'----------------------------------------------
|
|
|
9 |
' Get a set of Build Instances for the current package
|
|
|
10 |
' Populates biQry
|
|
|
11 |
Sub getBuildInstances
|
|
|
12 |
Dim query
|
|
|
13 |
query = _
|
| 7260 |
dpurdie |
14 |
"select bi.BUILD_ID, bi.PV_ID, bi.RTAG_ID,pv.pkg_id, bi.build_ref," &_
|
| 6873 |
dpurdie |
15 |
" SUBSTR(NVL(pj.PROJ_NAME,'-Deleted-'), 0, 60) as PROJ_NAME, " &_
|
| 5018 |
dpurdie |
16 |
" pj.PROJ_ID, " &_
|
| 6873 |
dpurdie |
17 |
" SUBSTR(NVL(rt.RTAG_NAME,'-Deleted-'), 0, 60) as RTAG_NAME, " &_
|
| 5018 |
dpurdie |
18 |
" TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMP, " &_
|
| 7162 |
dpurdie |
19 |
" DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'T', 'Test', 'P', 'Restored', 'F', 'ForcedRipple', 'Unknown') as REASON," &_
|
| 5018 |
dpurdie |
20 |
" DECODE(bi.state, 'B', 'Buiding', 'C', 'Complete', 'E', 'Error', 'S', 'SysErr', 'Unknown') as STATE" &_
|
|
|
21 |
" from BUILD_INSTANCES bi, " &_
|
|
|
22 |
" projects pj, " &_
|
|
|
23 |
" RELEASE_TAGS rt, " &_
|
|
|
24 |
" packages p, " &_
|
|
|
25 |
" PACKAGE_VERSIONS pv" &_
|
|
|
26 |
" where bi.PV_ID = pv.pv_id " &_
|
|
|
27 |
" and pv.PKG_ID = p.PKG_ID" &_
|
| 6873 |
dpurdie |
28 |
" and bi.RTAG_ID = rt.RTAG_ID(+)" &_
|
|
|
29 |
" and rt.proj_id = pj.proj_id(+)" &_
|
| 5018 |
dpurdie |
30 |
" and bi.PV_ID = :PV_ID" &_
|
|
|
31 |
" order by bi.BUILD_ID desc"
|
|
|
32 |
|
|
|
33 |
Set biQry = nothing
|
|
|
34 |
|
|
|
35 |
OraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
36 |
Set biQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
37 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
38 |
End Sub
|
|
|
39 |
|
|
|
40 |
' Get a set of test results for a specified build instance
|
|
|
41 |
' Populates utQry
|
|
|
42 |
Sub getTestResults(nBuildId)
|
|
|
43 |
Dim query
|
|
|
44 |
query = _
|
|
|
45 |
"select * from " &_
|
|
|
46 |
" TEST_RUN tr" &_
|
|
|
47 |
" where tr.BUILD_ID = :BUILD_ID" &_
|
|
|
48 |
" order by PLATFORM desc,TYPE desc"
|
|
|
49 |
|
|
|
50 |
Set utQry = nothing
|
|
|
51 |
|
|
|
52 |
OraDatabase.Parameters.Add "BUILD_ID", nBuildId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
53 |
Set utQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
54 |
OraDatabase.Parameters.Remove "BUILD_ID"
|
|
|
55 |
End Sub
|
| 7260 |
dpurdie |
56 |
'----------------------------------------------
|
| 7277 |
dpurdie |
57 |
Sub BuildJsButtonHref (bState, sClass, sTitle, sImageClass, shref)%>
|
| 7260 |
dpurdie |
58 |
<%If bState Then%>
|
| 7277 |
dpurdie |
59 |
<span class='<%=sClass & " " & sImageClass%>' title='<%=sTitle%>' href="<%=shref%>"></span>
|
| 7260 |
dpurdie |
60 |
<%Else%>
|
| 7277 |
dpurdie |
61 |
<span class='abtnItemDis <%=sImageClass%> lessOpacity' title='<%=sTitle%>'></span>
|
| 7260 |
dpurdie |
62 |
<%End If%>
|
|
|
63 |
<%End Sub
|
| 5018 |
dpurdie |
64 |
|
|
|
65 |
%>
|
| 5085 |
dpurdie |
66 |
<!--#include file="_jquery_includes.asp"-->
|
| 5018 |
dpurdie |
67 |
<script type="text/javascript" charset="utf-8">
|
|
|
68 |
function toggleTest(id)
|
|
|
69 |
{
|
| 6372 |
dpurdie |
70 |
$( "#testResults_" + id ).toggleClass('display-table display-none');
|
|
|
71 |
$( "#testResultsH_" + id ).toggleClass('display-table display-none');
|
|
|
72 |
$( "#testImageMin_" + id ).toggleClass('display-inline display-none');
|
|
|
73 |
$( "#testImageMax_" + id ).toggleClass('display-inline display-none');
|
| 5018 |
dpurdie |
74 |
}
|
|
|
75 |
|
|
|
76 |
</script>
|
|
|
77 |
|
| 6790 |
dpurdie |
78 |
<table class="full_table stdGrey">
|
|
|
79 |
<thead>
|
|
|
80 |
<tr>
|
|
|
81 |
<th nowrap">Project </th>
|
|
|
82 |
<th nowrap">Release </th>
|
|
|
83 |
<th nowrap">Time </th>
|
|
|
84 |
<th nowrap">Reason </th>
|
|
|
85 |
<th nowrap">Result </th>
|
|
|
86 |
</tr>
|
|
|
87 |
</thead>
|
| 5018 |
dpurdie |
88 |
<%
|
|
|
89 |
Call getBuildInstances
|
|
|
90 |
%>
|
|
|
91 |
<%If biQry.RecordCount < 1 Then%>
|
| 6790 |
dpurdie |
92 |
<tr>
|
| 5018 |
dpurdie |
93 |
<td nowrap> </td>
|
|
|
94 |
<td nowrap> </td>
|
|
|
95 |
<td nowrap> </td>
|
|
|
96 |
<td nowrap> </td>
|
|
|
97 |
<td nowrap> </td>
|
|
|
98 |
</tr>
|
|
|
99 |
<%End If%>
|
|
|
100 |
<%
|
| 6372 |
dpurdie |
101 |
Dim displayClass : displayClass = "display-table"
|
|
|
102 |
Dim displayClassI : displayClassI = "display-inline"
|
|
|
103 |
Dim displayClass1 : displayClass1 = "display-none"
|
|
|
104 |
Dim displayClassI1 : displayClassI1 = "display-none"
|
| 5018 |
dpurdie |
105 |
While ((NOT biQry.BOF) AND (NOT biQry.EOF))
|
|
|
106 |
%>
|
| 6790 |
dpurdie |
107 |
<tr>
|
| 7260 |
dpurdie |
108 |
<td nowrap>
|
| 7277 |
dpurdie |
109 |
<%BuildJsButtonHref biQry("build_ref") <> "", "vixIframeDialog", "Associated Log Files", "logIcon", "_iframe_build_logs.asp?rtag_id="&biQry("RTAG_ID")&"&build_ref="&biQry("build_ref")%>
|
| 7260 |
dpurdie |
110 |
<%=biQry("proj_name")%>
|
|
|
111 |
</td>
|
| 5018 |
dpurdie |
112 |
<td nowrap><%=biQry("rtag_name")%></td>
|
|
|
113 |
<td nowrap><%=biQry("timestamp")%></td>
|
|
|
114 |
<td nowrap><%=biQry("reason")%></td>
|
|
|
115 |
<td nowrap><%=biQry("state")%></td>
|
|
|
116 |
</tr>
|
|
|
117 |
<tr>
|
| 6676 |
dpurdie |
118 |
<!-- Display the Unit Test Results <%=biQry("BUILD_ID")%>-->
|
| 5018 |
dpurdie |
119 |
<td colspan="4" >
|
|
|
120 |
<%Call getTestResults(biQry("BUILD_ID"))%>
|
|
|
121 |
<table class="full_table">
|
|
|
122 |
<tr>
|
| 6827 |
dpurdie |
123 |
<td valign="top" width="1%" class="form_field_hdrgap" nowrap onclick='toggleTest(<%=biQry("BUILD_ID")%>);'>
|
| 6790 |
dpurdie |
124 |
<img title='Hide Test Results' id='testImageMin_<%=biQry("BUILD_ID")%>' src="images/btn_min.gif" class='<%=displayClassI%>'>
|
|
|
125 |
<img title='Show Test Results' id='testImageMax_<%=biQry("BUILD_ID")%>' src="images/btn_max.gif" class='<%=displayClassI1%>'>
|
| 6827 |
dpurdie |
126 |
</td>
|
| 6790 |
dpurdie |
127 |
<td>
|
|
|
128 |
<table class="full_table <%=displayClass1%>" id='testResultsH_<%=biQry("BUILD_ID")%>'>
|
|
|
129 |
<tr class="form_item_grey" >
|
|
|
130 |
<%If utQry.RecordCount < 1 Then %>
|
|
|
131 |
<td nowrap>No Test Results found</td>
|
|
|
132 |
<%Else%>
|
|
|
133 |
<td nowrap >Tests : <%=utQry.RecordCount%></td>
|
|
|
134 |
<%End If%>
|
|
|
135 |
</tr>
|
|
|
136 |
</table>
|
|
|
137 |
<table class="full_table <%=displayClass%> stdGrey" id='testResults_<%=biQry("BUILD_ID")%>'>
|
|
|
138 |
<%If utQry.RecordCount < 1 Then %>
|
|
|
139 |
<tr>
|
|
|
140 |
<td nowrap>No Test Results found</td>
|
|
|
141 |
</tr>
|
|
|
142 |
<%Else%>
|
|
|
143 |
<thead>
|
|
|
144 |
<tr>
|
|
|
145 |
<th width="1%" nowrap">Platform </th>
|
|
|
146 |
<th width="1%" nowrap">Type </th>
|
|
|
147 |
<th width="95%" nowrap">Test Name </th>
|
|
|
148 |
<th width="1%" nowrap">Duration </th>
|
|
|
149 |
<th width="1%" nowrap">Outcome </th>
|
|
|
150 |
</tr>
|
|
|
151 |
</thead>
|
|
|
152 |
<%End If%>
|
|
|
153 |
<%While ((NOT utQry.BOF) AND (NOT utQry.EOF))%>
|
|
|
154 |
<tr >
|
|
|
155 |
<td nowrap><%=utQry("platform")%></td>
|
|
|
156 |
<td nowrap><%=utQry("type")%></td>
|
|
|
157 |
<td nowrap><%=utQry("test_name")%></td>
|
|
|
158 |
<td nowrap><%=utQry("time_taken")%></td>
|
|
|
159 |
<td nowrap><%=utQry("test_outcome")%></td>
|
|
|
160 |
</tr>
|
|
|
161 |
<%
|
|
|
162 |
<!-- Set to hide all but the first element -->
|
|
|
163 |
utQry.MoveNext
|
|
|
164 |
WEnd
|
|
|
165 |
utQry.Close
|
|
|
166 |
Set utQry = nothing
|
|
|
167 |
%>
|
|
|
168 |
</table>
|
|
|
169 |
</td>
|
| 5018 |
dpurdie |
170 |
</tr>
|
|
|
171 |
</table>
|
|
|
172 |
</td>
|
|
|
173 |
<!-- End Display the Unit Test Results -->
|
|
|
174 |
</tr>
|
|
|
175 |
<%
|
| 6372 |
dpurdie |
176 |
displayClass = "display-none"
|
|
|
177 |
displayClass1 = "display-table"
|
|
|
178 |
displayClassI = "display-none"
|
|
|
179 |
displayClassI1 = "display-inline"
|
| 5018 |
dpurdie |
180 |
biQry.MoveNext
|
|
|
181 |
WEnd
|
|
|
182 |
biQry.Close
|
|
|
183 |
Set biQry = nothing
|
|
|
184 |
%>
|
|
|
185 |
</table>
|
|
|
186 |
|