Rev 5506 | Rev 5952 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'=====================================================' unused_packages.asp' Display unused packages in the current release' Does not include packages marked as deployable ?'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont storeConst allowNoPackage = TRUE ' Allow page display without pvid being presentServer.ScriptTimeout=300 ' To enable the script timeout to 5 mins%><!--#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/common_dbedit.asp"--><!--#include file="common/_package_common.asp"--><!--#include file="common/release_changed.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsQryDim enableRemoval : enableRemoval = FALSEDim enabledText : enabledText = "disabled "'------------ Constants Declaration -----------'------------ Variable Init -------------------'----------------------------------------------'------------------------- MAIN LINE ---------------------------If Request("action") = "RemovePackages" AND Request("list_pv_id") <> "" ThenDim pvidArray, nPvIdpvidArray = Split(Request("list_pv_id"), ",")For Each nPvId in pvidArraynPvId = Trim(nPvId)Dim objRC: Set objRC = New ReleaseChangedCall objRC.Get_Package_Info (parRtag_id,nPvId)Dim bReleased: bReleased = objRC.IsReleased(parRtag_id,nPvId)OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "RETURN_CODE", NULL, ORAPARM_OUTPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "FORCE_REMOVE","N", ORAPARM_INPUT, ORATYPE_NUMBERobjEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL _"BEGIN "&_" :RETURN_CODE := PK_ENVIRONMENT.REMOVE_PACKAGE ( :PV_ID, :RTAG_ID, :USER_ID, :FORCE_REMOVE );"&_"END; "objEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "PV_ID"OraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "USER_ID"OraDatabase.Parameters.Remove "FORCE_REMOVE"OraDatabase.Parameters.Remove "RETURN_CODE"If Not objEH.LastOraFailed ThenIf bReleased ThenCall objRC.Run_ReleaseChanged(parRtag_id,nPvId,enumRELEASE_CHANGE_MODE_PKG_REMOVED,false)End IfEnd IfSet objRC = NothingNextEnd If'---------------------------------------------------------------%><html><head><title><%=Title(parRtag_id)%></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><script language="JavaScript" src="scripts/remote_scripting.js"></script><!--#include file="_jquery_includes.asp"--><!-- TIPS --><script language="JavaScript" src="images/tipster.js"></script><script language="JavaScript" src="images/_help_tips.js"></script><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js"></script></head><body bgcolor="White" text="Black" leftmargin=0 topmargin=0 onLoad="divProgressBar.style.visibility='hidden'"><!-- 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"> </div><!-----------------------------------------------------><!-- HEADER --><!--#include file="_header.asp"--><!-- BODY ----><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" width="1" background="images/bg_bage.gif"><!-- LEFT --><!--#include file="_environment.asp"--></td><td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td><td valign="top" width="100%"><!-- MIDDLE --><%' Determine if the current user can remove packages from this releaseIf releaseIsWritable(ReleaseMode) ThenenableRemoval = TRUEenabledText = ""End IfDim Query_StringQuery_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER%><form method="post" name="removePackages"><table class="embedded_table" width="10%"><tr><td width="1%" nowrap class="body_colb"> </td><td width="1%" nowrap class="body_colb">Package Name and Version </td><td width="1%" nowrap class="body_colb">Released </td><td width="1%" nowrap class="body_colb">Added to Release </td><td width="1%" nowrap class="body_colb"></td></tr><tr><td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%Dim currView_idcurrView_id = -1Dim rsRepSet rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )If rsRep.RecordCount = 0 ThenWith Response.write "<tr>".write "<td colspan='5' class='body_row'>Found 0 records</td>".write "</tr>"End WithEnd IfWhile ((NOT rsRep.BOF) AND (NOT rsRep.EOF))' -------- GROUP BY BASE VIEW -----------------If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then%><tr><td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td><td></td></tr><tr><td nowrap class="body_scol"><%=rsRep("view_name")%></td><td class="body_scol"></td><td class="body_scol"></td><td class="body_scol"></td><td class="body_scol"></td></tr><%currView_id = CDbl(rsRep("view_id"))End If' -------- END GROUP ------------------------%><tr><td class="body_row"></td><td nowrap class="body_row"><a href="used_by.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td><td nowrap class="body_row"><%=DisplayDate( rsRep("modified_stamp") )%> by <a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a> </td><td nowrap class="body_row"><%=DisplayDate( rsRep("insert_stamp") )%> by <a href="mailto:<%=rsRep("insertor_email")%>" class="txt_linked"><%=rsRep("insertor")%></a> </td><td nowrap class="body_row"><input type="checkbox" name="list_pv_id" <%=enabledText%> value="<%=rsRep("pv_id")%>"></td></tr><% rsRep.MoveNextWEnd%><tr><td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><tr><td class="body_scol" colspan="3" ><%=ProgressBar()%></td><td class="body_scol" colspan="2" style="text-align:right"><input type="submit" value="Remove from Release" <%=enabledText%> onclick="return vixConfirm('Remove all selected packages from this Release',{post: 'removePackages', progress:'#divProgressBar'})"></td></tr><tr><td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><tr><td colspan="5" class=body_txt>These packages are not used within this Release. There is no package that lists any of these packages as a dependent.<p>The named packages can be removed without breaking the build, although they may be required for test purposes.<p>Packages in the 'PRODUCTS' or 'AUTO PRODUCTS' view are not shown in this list, nor are packages that are a part of an SDK.<br>It is assumed that they are to be deployed and as such do not need to be used.<p>Removing one or more packages may result in other packages nolonger being used.</td></tr></table><input type="hidden" name="action" value="RemovePackages"></form><!-- End of Middle --></td></tr></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html><%Call Destroy_All_Objects%>