Rev 5085 | Rev 6372 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%'------------ Variable Definition -------------Dim biQryDim utQryDim rsQry'------------ Constants Declaration -----------'------------ Variable Init -------------------'----------------------------------------------' Get a set of Build Instances for the current package' Populates biQrySub getBuildInstancesDim queryquery = _"select bi.BUILD_ID, bi.PV_ID, bi.RTAG_ID,pv.pkg_id," &_" SUBSTR(pj.PROJ_NAME, 0, 60) as PROJ_NAME, " &_" pj.PROJ_ID, " &_" SUBSTR(rt.RTAG_NAME, 0, 60) as RTAG_NAME, " &_" TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMP, " &_" DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'T', 'Test', 'P', 'Restored', 'Unknown') as REASON," &_" DECODE(bi.state, 'B', 'Buiding', 'C', 'Complete', 'E', 'Error', 'S', 'SysErr', 'Unknown') as STATE" &_" from BUILD_INSTANCES bi, " &_" projects pj, " &_" RELEASE_TAGS rt, " &_" packages p, " &_" PACKAGE_VERSIONS pv" &_" where bi.PV_ID = pv.pv_id " &_" and pv.PKG_ID = p.PKG_ID" &_" and bi.RTAG_ID = rt.RTAG_ID" &_" and rt.proj_id = pj.proj_id" &_" and bi.PV_ID = :PV_ID" &_" order by bi.BUILD_ID desc"Set biQry = nothingOraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBERSet biQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )OraDatabase.Parameters.Remove "PV_ID"End Sub' Get a set of test results for a specified build instance' Populates utQrySub getTestResults(nBuildId)Dim queryquery = _"select * from " &_" TEST_RUN tr" &_" where tr.BUILD_ID = :BUILD_ID" &_" order by PLATFORM desc,TYPE desc"Set utQry = nothingOraDatabase.Parameters.Add "BUILD_ID", nBuildId, ORAPARM_INPUT, ORATYPE_NUMBERSet utQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )OraDatabase.Parameters.Remove "BUILD_ID"End Sub%><!--#include file="_jquery_includes.asp"--><script type="text/javascript" charset="utf-8">function toggleTest(id){$( "#testResults_" + id ).toggle();$( "#testResultsH_" + id ).toggle();$( "#testImageMin_" + id ).toggle();$( "#testImageMax_" + id ).toggle();}</script><table class="full_table"><tr class="form_field_hdr"><td nowrap">Project </td><td nowrap">Release </td><td nowrap">Time </td><td nowrap">Reason </td><td nowrap">Result </td></tr><%Call getBuildInstances%><%If biQry.RecordCount < 1 Then%><tr class="form_item_grey" ><td nowrap> </td><td nowrap> </td><td nowrap> </td><td nowrap> </td><td nowrap> </td></tr><%End If%><%Dim displayStyle : displayStyle = "style='display:inline'"Dim displayStyle1 : displayStyle1 = "style='display:none'"While ((NOT biQry.BOF) AND (NOT biQry.EOF))%><tr class="form_item_grey" ><td nowrap><%=biQry("proj_name")%></td><td nowrap><%=biQry("rtag_name")%></td><td nowrap><%=biQry("timestamp")%></td><td nowrap><%=biQry("reason")%></td><td nowrap><%=biQry("state")%></td></tr><tr><!-- Display the Unit Test Results --><td colspan="4" ><%Call getTestResults(biQry("BUILD_ID"))%><table class="full_table"><tr><td valign="top" width="1%" class="form_field_hdrgap" nowrap> <a href='javascript:;' onclick='toggleTest(<%=biQry("BUILD_ID")%>);'><img title='Hide Test Results' id='testImageMin_<%=biQry("BUILD_ID")%>' src="images/btn_min.gif" <%=displayStyle%>><img title='Show Test Results' id='testImageMax_<%=biQry("BUILD_ID")%>' src="images/btn_max.gif" <%=displayStyle1%> ></a><td><table class="full_table" id='testResultsH_<%=biQry("BUILD_ID")%>' <%=displayStyle1%>><tr class="form_item_grey" ><%If utQry.RecordCount < 1 Then %><td nowrap>No Test Results found</td><%Else%><td nowrap >Tests : <%=utQry.RecordCount%></td><%End If%></tr></table><table class="full_table" id='testResults_<%=biQry("BUILD_ID")%>' <%=displayStyle%>><%If utQry.RecordCount < 1 Then %><tr class="form_item_grey" ><td nowrap>No Test Results found</td></tr><%Else%><tr class="form_field_hdr"><td width="1%" nowrap">Platform </td><td width="1%" nowrap">Type </td><td width="95%" nowrap">Test Name </td><td width="1%" nowrap">Duration </td><td width="1%" nowrap">Outcome </td></tr><%End If%><%While ((NOT utQry.BOF) AND (NOT utQry.EOF))%><tr class="form_item_grey" ><td nowrap><%=utQry("platform")%></td><td nowrap><%=utQry("type")%></td><td nowrap><%=utQry("test_name")%></td><td nowrap><%=utQry("time_taken")%></td><td nowrap><%=utQry("test_outcome")%></td></tr><%<!-- Set to hide all but the first element -->utQry.MoveNextWEndutQry.CloseSet utQry = nothing%></table></tr></table></td><!-- End Display the Unit Test Results --></tr><%displayStyle = "style='display:none'"displayStyle1 = "style='display:inline'"biQry.MoveNextWEndbiQry.CloseSet biQry = nothing%></table>