Subversion Repositories DevTools

Rev

Rev 187 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%
'=====================================================
'               Package Pages
'=====================================================
%>
<!--#include file="_tabs.asp"-->
<!--#include file="_action_buttons.asp"-->
<%
'------------ Variable Definition -------------
Dim parExtpkg, parExtrtag_id
Dim rsTemp
Dim CanIgnoreWarnings
'Dim parFileDiff
'Dim parComparePvId
'Dim parFileFilter
'Dim dFileFilter
'Dim parDepFilter
'Dim dDepFilter
'------------ Constants Declaration -----------
Const imgPkgLocked = "<img src='images/i_locked.gif' width='7' height='10' hspace='4' align='absmiddle'>"
Const imgPkgLockSpacer = "<img src='images/spacer.gif' width='7' height='10' hspace='4' align='absmiddle'>"
'------------ Variable Init -------------------
parExtpkg = QStrPar("extpkg")
parExtrtag_id = QStrPar("extrtag_id")
'----------------------------------------------
%>
<%
'-----------------------------------------------------------------------------------------------------------------
Sub Print_Pkg_Dependencies ( NNpv_id, NNrtag_id, BBextpkg )
   Dim rsTemp, Query_String, noDependencies
   noDependencies = FALSE


   Query_String = ReadFile( rootPath & "queries\dependencies.sql" )

   OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT
   OraDatabase.Parameters("RTAG_ID").ServerType = ORATYPE_NUMBER

   OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT
   OraDatabase.Parameters("PV_ID").ServerType = ORATYPE_NUMBER

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, 0 )

   CanIgnoreWarnings = FALSE
   If NNrtag_id <> "" AND is_daemon_enabled_release(NNrtag_id, TRUE) = FALSE Then
      If pkgInfoHash.Item("build_type") = "M" OR _
         ( pkgInfoHash.Item("build_type") = "A" AND pkgInfoHash.Item("dlocked") = "Y" ) OR _
         ( pkgInfoHash.Item("build_type") = "Y" AND pkgInfoHash.Item("dlocked") = "Y" ) Then
         CanIgnoreWarnings = TRUE
      End If
   End If

   %>
   <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <form name="ignore_warnings" method="get" action="_ignore_warnings.asp" onSubmit="ProgressBar.style.visibility='visible';">
         <tr>
            <%If CanIgnoreWarnings Then%><td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field" align="center">Ignore<br>warnings</td><%End If%>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"></td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Name<br><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"><%=imgPkgLockSpacer%>Version</td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="100%" class="form_field"><%=imgPkgLockSpacer%>Released</td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field" align="center">Last&nbsp;Modified</td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"></td>
            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">&nbsp;&nbsp;&nbsp;</td>
         </tr>
         <%' Display "no dependencies" if needed%>
         <%If rsTemp.RecordCount = 0 Then%>
            <tr>
               <%If CanIgnoreWarnings Then%><td align="center" nowrap background="images/bg_form_lightgray.gif"></td><%End If%>
               <td align="center" background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
               <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
               <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
               <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
               <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
               <td background="images/bg_form_lightgray.gif" class="form_item"></td>
               <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
            </tr>
            <%
            noDependencies = TRUE
         End If
         %>
         <%
         Dim objTempSession, pkgURL, workInProgress

         Do Until ((rsTemp.BOF) OR (rsTemp.EOF))
            pkgURL = "#"
            If NOT IsNull(rsTemp.Fields("dpv_link")) Then pkgURL = scriptName &"?pv_id="& rsTemp("dpv_link") &"&rtag_id="& NNrtag_id

            If rsTemp("latest_dlocked") = "N" Then
               workInProgress = "<img src='images/i_user.gif' width='10' height='13' border='0' alt='Work is in progress...' align='absmiddle' hspace='2'>"
            Else
               workInProgress = ""
            End If

            %>
            <tr>
               <%If CanIgnoreWarnings Then%><td align="center" nowrap background="images/bg_form_lightbluedark.gif"><input type="checkbox" name="forced" value="<%=rsTemp("ignore_dpv")%>" <%=Define_Ignore_State ( rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), rsTemp("pkg_state"), rsTemp("latest_pkg_version"), rsTemp("dlocked") )%>></td><%End If%>
               <td align="center" background="images/bg_form_lightgray.gif" class="form_item">
                  <%If rsTemp("pkg_state") = 0 AND rsTemp("deprecated_state") <> "" Then%>
                     <%=DefineStateIcon ( rsTemp("deprecated_state"), rsTemp("dlocked"), rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), pkgInfoHash.Item("build_type"), FALSE )%>
                  <%Else%>
                     <%=DefineStateIcon ( rsTemp("pkg_state"), rsTemp("dlocked"), rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), pkgInfoHash.Item("build_type"), FALSE )%>
                  <%End If%>
               </td>
               <td background="images/bg_form_lightgray.gif" class="envPkg" nowrap><%If NOT IsNull(rsTemp.Fields("dpv_link")) Then%><a href="<%=pkgURL%>" class="txt_linked"><%=rsTemp.Fields("dpkg_name")%></a><%Else%><%=rsTemp.Fields("dpkg_name")%><%End If%></td>
               <td background="images/bg_form_lightgray.gif" class="form_item" nowrap><%If rsTemp("dlocked") = "Y" Then%><%=imgPkgLocked%><%Else%><%=imgPkgLockSpacer%><%End If%><%=rsTemp("dpkg_version")%></td>
               <td background="images/bg_form_lightgray.gif" <%If IsNull(rsTemp("ignore_warn")) Then%>class="sublbox_hitem"<%Else%>class="body_scol_thin"<%End If%>><%If rsTemp("latest_dlocked") = "Y" AND ( NOT IsNull(rsTemp("latest_pkg_version")) ) Then%><%=imgPkgLocked%><%Else%><%=imgPkgLockSpacer%><%End If%><%=rsTemp("latest_pkg_version")%></td>
               <td background="images/bg_form_lightgray.gif" class="form_item" nowrap><%If NOT IsNull(rsTemp.Fields("modifier_name")) Then%><a href="mailto:<%=rsTemp.Fields("modifier_email")%>" class="txt_linked"><%=workInProgress%><%=rsTemp.Fields("modifier_name")%></a> on <%=EuroDateTime ( rsTemp("modified_stamp")  )%><%End If%></td>
               <td background="images/bg_form_lightgray.gif" class="form_item"><%If (pkgInfoHash.Item ("dlocked") = "N") OR (pkgInfoHash.Item ("dlocked") = "R") Then%><a href="_remove_build_dependency.asp?pv_id=<%=NNpv_id%>&dpv_id=<%=rsTemp("orig_pv_id")%>&rtag_id=<%=NNrtag_id%>" onClick="return confirmDelete('this Build Dependency');"><img src="images/i_delete.gif" alt="Remove from list." width="13" height="12" hspace="3" border="0"></a><%Else%><img src="images/i_delete_disable.gif" width="13" height="12" hspace="3" border="0"><%End If%></td>
               <td background="images/bg_form_lightgray.gif" class="form_item">
               <%If (NNrtag_id <> "") and (CInt(rsTemp("pkg_state")) = enumPKG_NOT_FOUND) Then%>
               <%
                 Dim sonclick
                 Dim surl
                 surl = "_wform_add_missing_dependency.asp" &_
                   "?rfile=" & scriptName &_
                   "&ppv_id=" & NNpv_id &_
                   "&pv_id=" & rsTemp("orig_pv_id") &_
                   "&rtag_id=" & NNrtag_id
                 sonclick = "MM_openBrWindow('" & surl & "','AddDependency','resizable=yes,width=560,height=310');"
               %>
                 <img onclick="<%=sonclick%>" src="images/i_add_missing_dep.gif" alt="Add missing dependency." width="15" height="15" hspace="3" border="0">
               <%Else%>
                 <img src="images/i_add_missing_dep.gif" width="15" height="15" hspace="3" border="0" style="visibility:hidden">
               <%End If%>
               </td>


            </tr>
            <%
            rsTemp.MoveNext
         Loop
         %>
        <tr>
            <%If noDependencies OR (ReleaseMode = enumDB_RELEASE_IN_CLOSED_MODE) Then%>
               <td></td>
            <%Else%>
               <%If CanIgnoreWarnings Then%><td nowrap background="images/bg_form_lightbluedark.gif" align="center"><input name="Submit" type="submit" class="form_btn" id="Submit" value="Apply" ></td><%End If%>
            <%End If%>
            <td colspan="2" class="body_scol"><SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;"><img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...</SPAN></td>
            <td><img src="images/spacer.gif" width="150" height="1"></td>
            <td></td>
            <td></td>
            <td></td>
         </tr>
         <input type="hidden" name="pv_id" value="<%=NNpv_id%>">
         <input type="hidden" name="rtag_id" value="<%=NNrtag_id%>">
      </form>
   </table>
   <%
   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "PV_ID"
   rsTemp.Close
   Set rsTemp = nothing
End Sub
'-----------------------------------------------------------------------------------------------------------------
Sub Print_Patch_Dependencies ( NNpv_id, NNrtag_id, BBextpkg )
   Dim rsTemp, Query_String, noDependencies
   noDependencies = FALSE

   Query_String = ReadFile( rootPath & "queries\dependencies.sql" )

   OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT
   OraDatabase.Parameters("RTAG_ID").ServerType = ORATYPE_NUMBER

   OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT
   OraDatabase.Parameters("PV_ID").ServerType = ORATYPE_NUMBER

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, 0 )%>

   <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
         <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Name<br><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
         <td background="images/bg_form_lightbluedark.gif" nowrap width="100%" class="form_field"><%=imgPkgLockSpacer%>Version</td>
         <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field" align="center">Last&nbsp;Modified</td>
         <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"></td>
      </tr>
      <%' Display "no dependencies" if needed%>
      <%If rsTemp.RecordCount = 0 Then%>
         <tr>
            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
         </tr>
         <%
         noDependencies = TRUE
      End If
      %>
      <%
      Dim objTempSession, pkgURL, workInProgress

      Do Until ((rsTemp.BOF) OR (rsTemp.EOF))
         pkgURL = "#"
         If NOT IsNull(rsTemp.Fields("dpv_link")) Then pkgURL = scriptName &"?pv_id="& rsTemp("orig_pv_id") &"&rtag_id="& parRtag_id

         If rsTemp("latest_dlocked") = "N" Then
            workInProgress = "<img src='images/i_user.gif' width='10' height='13' border='0' alt='Work is in progress...' align='absmiddle' hspace='2'>"
         Else
            workInProgress = ""
         End If

         %>
         <tr>
            <td background="images/bg_form_lightgray.gif" class="envPkg" nowrap><a href="<%=pkgURL%>" class="txt_linked"><%If rsTemp("is_patch") = "Y" Then%><%=PatchIcon ( rsTemp("is_patch"), rsTemp("is_obsolete") )%><%End If%><%=rsTemp.Fields("dpkg_name")%></a></td>
            <td background="images/bg_form_lightgray.gif" class="form_item" nowrap><%If rsTemp("dlocked") = "Y" Then%><%=imgPkgLocked%><%Else%><%=imgPkgLockSpacer%><%End If%><%=rsTemp("dpkg_version")%></td>
            <td background="images/bg_form_lightgray.gif" class="form_item" nowrap><%If NOT IsNull(rsTemp.Fields("modifier_name")) Then%><a href="mailto:<%=rsTemp.Fields("modifier_email")%>" class="txt_linked"><%=workInProgress%><%=rsTemp.Fields("modifier_name")%></a> on <%=EuroDateTime ( rsTemp("modified_stamp") )%><%End If%></td>
            <td background="images/bg_form_lightgray.gif" class="form_item"><%If (pkgInfoHash.Item ("dlocked") = "N") OR (pkgInfoHash.Item ("dlocked") = "R") Then%><a href="_remove_build_dependency.asp?pv_id=<%=parPv_id%>&dpv_id=<%=rsTemp("orig_pv_id")%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this Build Dependency');"><img src="images/i_delete.gif" alt="Remove from list." width="13" height="12" hspace="3" border="0"></a><%Else%><img src="images/i_delete_disable.gif" width="13" height="12" hspace="3" border="0"><%End If%></td>
         </tr>
         <%
         rsTemp.MoveNext
      Loop
      %>
      <tr>
         <td colspan="2" class="body_scol"><SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;"><img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...</SPAN></td>
         <td></td>
         <td></td>
         <td></td>
      </tr>
   </table>
   <%
   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "PV_ID"
   rsTemp.Close
   Set rsTemp = nothing
End Sub
'-----------------------------------------------------------------------------------------------------------------
Function Define_Ignore_State ( BBcurr_ignore_state, cIsPatchIgnore, NNpkg_state, SSlatest, SSdlocked )
   ' ==== Ignore Warning Rules ====
   ' ENABLE - Dependency is   official  AND  PKG_STATE is OK  AND  has no latest  AND  current ignore warning is not ticked AND not Patch Ignore
   ' ENABLE - current ignore state is ticked AND not Patch Ignore

   If  (SSdlocked = "Y") AND _
      ( (CInt(NNpkg_state) <> enumPKG_STATE_OK) OR (SSlatest <> "") ) _
   Then

      Define_Ignore_State = " "& BBcurr_ignore_state

   Else

      Define_Ignore_State = "disabled "& BBcurr_ignore_state

   End If


   'If ( (SSdlocked = "Y") AND _
   '     (CInt(NNpkg_state) = enumPKG_STATE_OK) AND _
   '     (SSlatest <> "") AND _
   '     IsNull(BBcurr_ignore_state) AND _
   '    IsNull(cIsPatchIgnore) ) _
   '   OR _
   '   ( NOT IsNull(BBcurr_ignore_state)  AND  IsNull(cIsPatchIgnore) ) Then
   '
   '   Define_Ignore_State = " "& BBcurr_ignore_state
   'Else
   '   Define_Ignore_State = "disabled "& BBcurr_ignore_state
   'End If
End Function
'-----------------------------------------------------------------------------------------------------------------
'-----------------------------------------------------------------------------------------------------------------
%>
<%
'------------------------- MAIN LINE ---------------------------


'---------------------------------------------------------------
%>
<%If (parPv_id <> "") Then%>
   <!-- MAIN PAGE ------------------------------------------>
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
         <td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
         <td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
         <td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
      </tr>
      <tr>
        <td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
        <td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
        <td background="images/bg_lght_gray.gif">&nbsp;</td>
      </tr>
      <tr>
         <td background="images/bg_lght_gray.gif">&nbsp;</td>
         <td valign="bottom" background="images/bg_lght_gray.gif">
            <table width="100" border="0" cellspacing="0" cellpadding="0">
               <tr>
                  <td><IMG height=1 src="images/spacer.gif" width=50></td>
                  <td>
                     <!-- TABS ------------------------------------->
                     <%Call Generate_Tab_Menu ( TABarray1, "Dependencies", "orange" )%>
                  </td>
               </tr>
            </table>
         </td>
         <td background="images/bg_lght_gray.gif">&nbsp;</td>
      </tr>
      <tr>
         <td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
         <td background="images/lbox_bg_orange.gif">
            <!-- TAB ACTION BUTTONS ------------------------------------->
            <%Call Action_Buttons ( "Build Dependencies" )%>
         </td>
         <td background="images/lbox_bg_orange.gif">&nbsp;</td>
      </tr>
      <tr>
         <td></td>
         <td valign="top">
            <!-- BUILD DEPENDENCIES ------------------------------------->
            <br>
            <fieldset>
               <legend class="body_colb">Build Dependencies</legend>
               <a name="DEPENDENCIES"></a>
               <%
               If pkgInfoHash.Item ("is_patch") = "Y" Then
                  Call Print_Patch_Dependencies ( parPv_id, parRtag_id, FALSE )
               Else
                  Call Print_Pkg_Dependencies ( parPv_id, parRtag_id, FALSE )
               End If
               %>
            </fieldset>
            <br><br>
            <!-- MODULE CHANGES ----------------------------------------->
            <table width="100%"  border="0" cellspacing="0" cellpadding="3">
               <tr>
                  <td align="right"><a href="javascript:;" onClick="MM_openBrWindow('_wform_dependency_changes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&rfile=<%=ScriptName%>&compare_pv_id=<%=Request("compare_pv_id")%>&filediff=<%=Request("filediff")%>','DependencyChanges','scrollbars=yes,resizable=yes,width=700,height=600')" class="txt_linked" title='Open this section in new window.'><%=LIMG_NEW_WINDOW%>New Window</a> </td>
               </tr>
            </table>

            <fieldset>
               <legend class="body_colb">Dependency Changes</legend>
               <!--#include file="_mod_dependency_changes.asp"-->
            </fieldset><br>
            <!----------------------------------------------------------->
         </td>
         <td>&nbsp;</td>
      </tr>
   </table>

<%Else%>

   <!-- NO PACKAGE SELECTED  ------------------------------------>
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
         <td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
         <td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,NULL)%></td>
         <td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
      </tr>
      <tr>
         <td background="images/bg_lght_gray.gif"><IMG height=50 src="images/spacer.gif" width=1></td>
         <td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
         <td background="images/bg_lght_gray.gif"></td>
      </tr>
      <tr>
         <td background="images/bg_lght_gray.gif"></td>
         <td valign="bottom" background="images/bg_lght_gray.gif">
            <table width="100" border="0" cellspacing="0" cellpadding="0">
               <tr>
                  <td><IMG height=1 src="images/spacer.gif" width=150></td>
                  <td><!-- TABS -------------------------------------></td>
               </tr>
            </table>
         </td>
         <td background="images/bg_lght_gray.gif">&nbsp;</td>
      </tr>
      <tr>
         <td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
         <td background="images/lbox_bg_orange.gif"><span class="sublbox_ttl">&laquo;&nbsp;Select package</span></td>
         <td background="images/lbox_bg_orange.gif">&nbsp;</td>
      </tr>
      <tr>
         <td></td>
         <td valign="top"><SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;"><img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...</SPAN></td>
         <td>&nbsp;</td>
      </tr>
   </table>
<%End If%>
<%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>