Subversion Repositories DevTools

Rev

Rev 5635 | Rev 6048 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<% @LANGUAGE = VBScript %>
<%
'=====================================================
'
'  Build Status and Plan Information
'
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0  ' always load the page, dont store
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_form_window_common.asp"-->
<!--#include file="_action_buttons.asp"-->
<!--#include file="class/classActionButtonControl.asp"-->
<!--#include file="common/daemon_instructions.asp"-->
<%
'------------ ACCESS CONTROL ------------------
'Let users view the build status without being logged in, but as soon as they try and 
'submit the form, check their login status.
If Request("action") <> "" AND NOT objAccessControl.UserLogedIn Then%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_project.asp"-->
<%End If%>
<!--#include file="_access_control_general.asp"-->
<% '------------ Scripts -------------------------- %>
<%
'------------ Variable Definition -------------
Dim objSortHelper
Dim rsQry
Dim parRtagId
Dim query_string
Dim rcon_id
Dim rsQry2
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parRtagId = Request("rtag_id")
objPMod.PersistInQryString("rtag_id")

'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Function PrettyDelta( delta, daemonState,pkgId )
    Dim style
    style = ""

    If (delta > 600) AND (IsNull(pkgId) OR pkgId = "") Then
      style = "style=color:Red"
      If (delta > 86400 ) Then
        Dim bdate, dd,mm,yy
        bdate = DateAdd("s", - delta,Now())
        dd = Day(bdate)
        mm = MonthName(Month(bdate),1)
        yy = Year( bdate)
        delta = dd & "-" & mm & "-" & yy
        If ( daemonState >= 2 ) Then
            style = ""
        End If
      ElseIf ( delta > 60*60 ) Then
        'Dim bdate, hh, mins, ss
        bdate = DateAdd("s", - delta,Now())
        delta = TimeValue( bdate)
        'delta = hh & ":" & mins & ":" & ss
      End If
    End If

    If style <> "" Then
        delta = "<span " & style & ">" & delta & "</span>"
    End If
    PrettyDelta = delta
End Function
'--------------------------------------------------------------------------------------------------------------------------
Function Get_Daemon_Mode( cMode )

   If cMode = "S" Then
      Get_Daemon_Mode = "Slave"
   ElseIf cMode = "M" Then
      Get_Daemon_Mode = "Master"
   End If

End Function
'--------------------------------------------------------------------------------------------------------------------------
Function Get_Run_Level( nLevel, indefinitePause, astate)

   If indefinitePause Then
      Get_Run_Level = "<span class='err_alert'>Stopped</span>"
   ElseIf astate = 1 Then      ' if build daemon paused
      Get_Run_Level = "Paused"
   ElseIf astate = 2 Then      ' if build daemon disabled
      Get_Run_Level = "Disabled"
   ElseIf astate = 0 Then     ' if build daemon enabled
      If nLevel = 1 Then
         Get_Run_Level = "Cannot Continue"
      ElseIf nLevel = 2 Then
         Get_Run_Level = "Paused"
      ElseIf nLevel = 3 Then
         Get_Run_Level = "Building"
      ElseIf nLevel = 4 Then
         Get_Run_Level = "Idle"
      ElseIf nLevel = 5 Then
         Get_Run_Level = "Waiting"
      ElseIf nLevel = 6 Then
         Get_Run_Level = "Publishing"
      Else
         Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
      End If
   End If

End Function

'--------------------------------------------------------------------------------------------------------------------------
Function Get_Package_Name( sPackageName,nRtagId,nPkgPvid )

  If IsNull(sPackageName) Then
    Get_Package_Name = "None"
  ElseIf IsNull(nPkgPvid) or nPkgPvid <= 0 Then
    Get_Package_Name = sPackageName
  Else
    Get_Package_Name = "<a class=""txt_linked"" href=""dependencies.asp?pv_id=" +  nPkgPvid + "&rtag_id=" + nRtagId + """>" + sPackageName + "</a>"
  End If

End Function
'--------------------------------------------------------------------------------------------------------------------------
Function GetLastBuildAge( rtagid)
   Dim  query_string, rsQry
       query_string = "SELECT TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) as delta," &_
                      "       TO_CHAR(rl.LAST_BUILD, 'DD-Mon-YYYY') as last_build," &_
                      "       TO_CHAR(rl.LAST_BUILD, 'HH:MI:SS PM') as last_build_hours," &_
                      "       TRUNC (SYSDATE - rl.LAST_BUILD) as last_build_days" &_
                      " FROM RELEASE_CONFIG rc, RUN_LEVEL rl, BUILD_MACHINE_CONFIG bm " &_
                      " WHERE rc.RTAG_ID =" &rtagid &_
                      "   AND rc.bmcon_id is not null" &_
                      "   AND rl.RCON_ID = rc.RCON_ID" &_
                      "   AND rc.bmcon_id = bm.bmcon_id(+)"

        Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
            Dim delta, last_build, last_build_time, last_build_days
            If IsNull(rsQry("delta")) Then
                delta = 0
            Else
                delta = CLng(rsQry("delta"))
            End If
            last_build = rsQry("last_build")
            last_build_time = rsQry("last_build_hours")
            last_build_days = rsQry("last_build_days")
            If delta < (60*60*24) Then
                GetLastBuildAge = last_build_time  
            Else     
                GetLastBuildAge = last_build
            End If
        End If
        rsQry.Close()
        Set rsQry = nothing

End Function

'--------------------------------------------------------------------------------------------------------------------------
Function GetModifiedSeqNo( rtagid)
   Dim  query_string, rsQry
       query_string = "SELECT SEQNUM FROM RELEASE_MODIFIED WHERE RTAG_ID = " & rtagid

        Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
            GetModifiedSeqNo = rsQry("SEQNUM")
        Else
            GetModifiedSeqNo = "-"
        End If
        rsQry.Close()
        Set rsQry = nothing

End Function
'--------------------------------------------------------------------------------------------------------------------------
'------------ RUN BEFORE PAGE RENDER ----------
%>
<html>
   <head>
      <title>Release Manager</title>
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
      <script language="JavaScript" src="images/common.js"></script>
      <!--#include file="_jquery_includes.asp"-->
      <!-- TIPS -->
      <script type="text/javascript" src="scripts/json2.js"></script>
      <script language="JavaScript" src="images/tipster.js"></script>
      <script language="JavaScript" src="images/_help_tips.js"></script>
      <script language="JavaScript" type="text/JavaScript">
      formTips.tips.h_buildplan       = stdTip(300, 'Build Plan', 'The build plan is a guess as to the order in which packages will be built.' +
                                                                  '<p>It will be recalculated before each build.' + 
                                                                  '<p>The plan includes test builds, new builds and resultant ripples.' 
                                                                  );
      formTips.tips.h_buildDuration    = stdTip(300, 'Planned Duration', 'The build duration (seconds) of the last build of this package - if known.' +
                                                                  '<p>This is used as a guess as to the duration of the planned build.' 
                                                                  );
      formTips.tips.h_buildEnd         = stdTip(300, 'Planned Completion', 'An educated guess as to the build completion time of the package.' +
                                                                  '<p>It is based on the start time of the current build and the durations of each preceeding builds.' + 
                                                                  '<p>If the duration of a build is not known then a time of 300 seconds will be assumed.' +
                                                                  ' It also assumes 20 seconds to plan the next build.'
                                                                  );
      formTips.tips.h_lastchange       = stdTip(300, 'Last Change', 'This is an indication of the time since the daemon interogated the database.' +
                                                                  '<p>Short times will be shown as seconds. Longer times will be shown as a time within ' + 
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
                                                                  );
                                                                  
      </script>
      <!-- DROPDOWN MENUS -->
      <!--#include file="_menu_def.asp"-->
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
   </head>
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
      <!-- MENU LAYERS -------------------------------------->
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
      <!-- TIPS LAYERS -------------------------------------->
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
      <!----------------------------------------------------->
      <!-- HEADER -->
      <!--#include file="_header.asp"-->
      <!-- BODY ---->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
               <table width="10" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                     <td width="1%"></td>
                     <td width="100%">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                           <tr>
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
                                 <p>DAEMON STATUS INFORMATION</p>
                              </td>
                              <td  valign="bottom" class="body_rowg">
                                Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
                              </td>
                              <td align="right" valign="bottom">
                                <a class="txt_linked" href="<%=scriptName%>?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a></td>
                              </td>
                           </tr>
                        </table>
                     </td>
                     <td width="1%"></td>
                  </tr>
                  <tr>
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
                  </tr>
                  <tr>
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
                     <td bgcolor="#FFFFFF" valign="top">
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                        <!--#include file="messages/_msg_inline.asp"-->
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                        <br>
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
                           <%
                           Dim indefinitelyPaused
                           indefinitelyPaused = FALSE
                           ' Insert a warning into the page if the build daemons are indefintely paused.
                           query_string = " select * from run_level_schedule rls where rls.indefinite_pause = 'P'"

                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
                           If rsQry.RecordCount > 0 Then
                              indefinitelyPaused = TRUE %>
                              <tr>
                                 <span class='err_alert'>
                                    <font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
                                 </span>
                              </tr>
                           <%End If

                           rsQry.Close()
                           Set rsQry = nothing
                           %>
                           <td width="9%" valign="top"></td>
                           <tr>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Machine Type</td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<%=Quick_Help("h_lastchange")%></td>
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Control State</td>
                           </tr>
                           <%
                           ' Get the number of release configurations for this RTAG_ID, and iterate through them
                           query_string = " select * from release_config rc, gbe_machtype gm, build_machine_config bm"&_
                                          "  where rc.rtag_id = "& parRtagId &_
                                          "    and gm.gbe_id = rc.gbe_id"&_
                                          "    and rc.bmcon_id=bm.bmcon_id(+)" &_
                                          "  order by bm.display_name, rc.rcon_id"

                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )

                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                              rcon_id = rsQry("rcon_id")

                              Dim pkgName
                              Dim pkgPvid
                              Dim currentRunLevel
                              Dim daemonState
                              Dim delta
                              Dim pkgId

                              ' For this release configuration, get its entry from the run_level table. This table may not
                              ' have an entry so we must handle that outcome too.
                              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
                                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
                                             "   from run_level rl"&_
                                             "  where rl.rcon_id = "& rcon_id

                              Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )

                              currentRunLevel = -1
                              pkgId = Null
                              pkgName = NULL
                              pkgPvid = NULL
                              daemonState = 0
                              delta = NULL

                              If (rsQry2.RecordCount > 0) Then
                                ' Get the run level from the run_level table
                                currentRunLevel = rsQry2("current_run_level")
                                pkgId = rsQry2("current_pkg_id_being_built")

                                daemonState = rsQry2("pause")
                                If IsNull(daemonState) Then daemonState = 0
                                If daemonState = "2" Then pkgId = Null

                                delta = rsQry2("delta")
                              End If

                              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
                              ' package name from the packages table
                              Dim rsQry3
                              If NOT IsNull(pkgId) Then
                                 query_string = " select pkg_name,rl.current_pv_id from run_level rl, packages pk"&_
                                                "  where rl.rcon_id = "& rcon_id &_
                                                "   and  rl.current_pkg_id_being_built = pk.pkg_id"

                                 Set rsQry3 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
                                 If (rsQry3.RecordCount > 0) Then
                                    pkgName = rsQry3("pkg_name")
                                    pkgPvid = rsQry3("current_pv_id")
                                 End If
                                 rsQry3.Close()
                                 Set rsQry3 = nothing
                              End If

                              ' --- Now render HTML for this release configuration ---
                              %>
                              <tr>
                                 <td colspan="7" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                              </tr>
                              <tr>
                                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused,daemonState)%></td>
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid)%></td>
                                 <td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
                                 <td nowrap class="body_rowg">
                                    <%
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
                                       If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
                                          If daemonState = 0 Then
                                             Call Action_Buttons ( "Daemon Pause" )
                                          ElseIf daemonState = 1 Then
                                             Call Action_Buttons ( "Daemon Resume" )
                                          ElseIf daemonState = 2 Then
                                             Call Action_Buttons ( "Daemon Start" )
                                          Else
                                             Call Action_Buttons ( "Daemon Resume" )
                                          End If
                                       Else
                                          If daemonState = 0 Then
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
                                          ElseIf daemonState = 1 Then
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
                                          ElseIf daemonState = 2 Then
                                             Call Action_Buttons ( "Daemon Start Disabled" )
                                          Else
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
                                          End If
                                       End If
                                    Else
                                       %>Unavailable<%
                                    End If
                                    %>
                                 </td>
                              </tr>
                              <%
                              rsQry2.Close()
                              Set rsQry2 = nothing
                              rsQry.MoveNext
                           Loop
                           %>
                           <tr>
                             <td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col"></td>
                             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
                             <%
                               If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused  Then
                                 If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
                                   Call Action_Buttons ( "Daemon Control All" )
                                 Else 
                                   Call Action_Buttons ( "Daemon Control All Disabled" )
                                 End If
                               Else
                                 %>&nbsp<%
                               End If
                             %>
                             </td>
                           </tr>
                           <%
                             rsQry.Close()
                             Set rsQry = nothing
                           %>
                        </table>
                     </td>
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
                  </tr>
                  <tr>
                     <input type="hidden" name="action" value="true">
                     <%=objPMod.ComposeHiddenTags()%>
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
                     <td background="images/lbox_bg_blue.gif"></td>
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
                  </tr>
               </table>

               <!-- Planned Builds Display -->
               <%
               Set rsQry = OraDatabase.DbCreateDynaset( "SELECT TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) as delta, rl.LAST_BUILD as BuildStart, rl.current_pv_id, SYSDATE" &_
                                                        " FROM release_config rc,  run_level rl " &_
                                                        " WHERE rc.rtag_id   = " & parRtagId &_
                                                        " AND rc.daemon_mode = 'M' AND rl.rcon_id = rc.rcon_id", ORADYN_DEFAULT )
               Dim BuildStart
               Dim BuildDelta
               Dim BuildPvId
               Dim BuildNow
               If (rsQry.RecordCount > 0) Then
                    BuildStart = rsQry("BuildStart")
                    BuildDelta = rsQry("delta")
                    BuildPvId  = rsQry("current_pv_id")
                    BuildNow  = rsQry("SYSDATE")
               End If
               rsQry.Close()
               Set rsQry = nothing
               %>
               <table width="10" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                     <td width="1%"></td>
                     <td width="100%">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                           <tr>
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
                                 <p>DAEMON BUILD PLAN<%=Quick_Help("h_buildplan")%></p>
                              </td>
                              <td  valign="bottom" class="body_rowg">
                                Now: <%=DisplayShortDateTimeSecs(BuildNow)%>
                              </td>
                              <td align="right" valign="bottom"></td>
                           </tr>
                        </table>
                     </td>
                     <td width="1%"></td>
                  </tr>
                  <tr>
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
                  </tr>
                  <tr>
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" ></td>
                     <td bgcolor="#FFFFFF" valign="top">
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
                           <tr>
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Duration<%=Quick_Help("h_buildDuration")%></td>
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Build Completion<%=Quick_Help("h_buildEnd")%></td>
                           </tr>
                           <%
                           Dim PkgVersion, buildDuration, durationDisplay, durationText, completionText
                           Set rsQry = OraDatabase.DbCreateDynaset( "SELECT p.PKG_NAME," &_
                                                                    "  pv.PKG_VERSION, pv.BUILD_TIME," &_
                                                                    "  bp.PV_ID" &_
                                                                    " FROM build_plan bp," &_
                                                                    "  packages p," &_
                                                                    "  package_versions pv" &_
                                                                    " WHERE bp.PV_ID = pv.pv_id" &_
                                                                    " AND RTAG_ID = " & parRtagId &_
                                                                    " AND pv.PKG_ID  = p.pkg_id" &_
                                                                    " ORDER BY build_order" , ORADYN_DEFAULT )
                           While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                               completionText = ""
                               buildDuration = rsQry("BUILD_TIME")
                               durationDisplay = buildDuration

                               ' If the current package build it taking longer than expected , then bump the build times
                               ' and allow another 30 seconds.
                               If BuildPvId = rsQry("PV_ID") Then
                                   completionText = "&nbsp;<"
                                   durationDisplay = durationDisplay & " ["& BuildDelta &"]"
                                   If BuildDelta > buildDuration Then
                                        buildDuration = BuildDelta + 30
                                        completionText = "&nbsp;+"
                                   End If
                               End If

                               ' If the duration is not known - guess at 300 sconds
                               durationText = ""
                               If ISNULL(buildDuration)  OR buildDuration = 0 Then
                                    buildDuration = 300
                                    durationText = "&nbsp;~"
                              End If

                              BuildStart = DateAdd("s", buildDuration, BuildStart)
                              %>
                              <tr>

                                 <td align="left" valign="top" class="body_txt">
                                    <%=Get_Package_Name(rsQry("PKG_NAME"), parRtagId, rsQry("PV_ID"))%>
                                 </td>
                                 <td align="left" valign="top" class="body_txt">
                                    <%=rsQry("PKG_VERSION")%>
                                 </td>
                                 <td align="left" valign="top" class="body_txt">
                                    <%=durationDisplay%>
                                 </td>
                                 <td align="left" valign="top" class="body_txt">
                                    <%=DisplayShortDateTimeSecs(BuildStart) & durationText  & completionText%>
                                 </td>
                              </tr>
                              <tr>
                                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                              </tr>
                              <%
                              ' Allow for 20 seconds of planning between builds
                              BuildStart = DateAdd("s", 20, BuildStart)
                              rsQry.MoveNext()
                           Wend
                           rsQry.Close()
                           Set rsQry = nothing
                           %>
                        </table>
                     </td>
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
                  </tr>
                  <tr>
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
                     <td background="images/lbox_bg_blue.gif"></td>
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
                  </tr>
               </table>

            </td>
            <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
         </tr>
         <tr>
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
                <img src="images/img_gear.gif" width="86" height="99" vspace="20" hspace="30">
            </td>
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350">
            </td>
         </tr>
      </table>
      <!-- FOOTER -->
      <!--#include file="_footer.asp"-->
   </body>
</html>
<%
Call Destroy_All_Objects
%>