Rev 6881 | Rev 7288 | 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"--><!--#include file="_tabs.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsQryDim enableRemoval : enableRemoval = FALSEDim enabledText : enabledText = "disabled "Dim parMode : parMode = QStrParDefault("mode", 0)Dim modeCb1 : modeCb1 = iif ( parMode AND 1, " checked", "" )Dim modeCb2 : modeCb2 = iif ( parMode AND 2, " checked", "" )Dim modeCb3 : modeCb3 = iif ( parMode AND 4, " checked", "" )'------------ 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 "RETURN_CODE"OraDatabase.Parameters.Remove "FORCE_REMOVE"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?ver=<%=VixVerNum%>" type="text/css"><link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css"><script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script><script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script><%bCsvExport = True%><!--#include file="_jquery_includes.asp"--><!-- TIPS --><script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script><script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script><script>function updateDisplay(){function getCbValue(n){var el = document.getElementById(n);if (el && el.checked) {return parseInt(el.value);}return 0;}var all = getCbValue('cb1') + getCbValue('cb2') + getCbValue('cb3');//console.log ('all:', all );location.href='<%=ScriptName%>?rtag_id=<%=parRtag_id%>&mode=' + all;}</script></head><body bgcolor="White" text="Black" leftmargin=0 topmargin=0 onLoad="divProgressBar.style.visibility='hidden'"><!-- HEADER --><!--#include file="_header.asp"--><!-- BODY ----><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class='bg_bage'><!-- 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_NUMBEROraDatabase.Parameters.Add "SMODE", parMode, ORAPARM_INPUT, ORATYPE_NUMBER%><form method="post" name="removePackages"><table class="embedded_table etable" width="10%"><thead><th width="1%" nowrap class="body_colb noCsv"> </th><th width="1%" nowrap class="body_colb">Package Name and Version </th><th width="1%" nowrap class="body_colb">Released </th><th width="1%" nowrap class="body_colb">Added to Release </th><th width="1%" nowrap class="body_colb noCsv"></th></thead><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 )OraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "SMODE"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="5" 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 class='csvData'><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 <%=emailField(rsRep("modifier"),rsRep("modifier_email"))%> </td><td nowrap class="body_row"><%=DisplayDate( rsRep("insert_stamp") )%> by <%=emailField(rsRep("insertor"),rsRep("insertor_email"))%> </td><td nowrap class="body_row"><input type="checkbox" name="list_pv_id" <%=enabledText%> value="<%=rsRep("pv_id")%>"></td></tr><% rsRep.MoveNextWEndrsRep.CloseSet rsRep = Nothing%><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="1" ><%=ProgressBar()%></td><td class="body_scol" colspan="4" style="text-align:right"><fieldset class="fset" align="left" style="border: 1px groove;display: inline;"><legend style="text-align: left;">Hide</legend><input id=cb1 type="checkbox" value=1 <%=modeCb1%> onclick="return updateDisplay();">Products<input id=cb2 type="checkbox" value=2 <%=modeCb2%> onclick="return updateDisplay();">3rdParty<input id=cb3 type="checkbox" value=4 <%=modeCb3%> onclick="return updateDisplay();">Deployable</fieldset><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>Certain classes of package may be hidden:<br>Packages in the 'PRODUCTS' or 'AUTO PRODUCTS' are often assumed to be used.<br>Packages in the '3RDPARTY_PRODUCTS' are often artfacts of Deploment Manager.<br>Packages marked as 'Deployable' may be assumed to be used.<br>Packages that are imported as part of an SDK are not shown.<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>