Rev 6480 | Rev 6612 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| view by version |'| |'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.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="class/classSortHelper.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsRepDim parFPkgVersionDim sLinkDim parPkgIdDim PackageNameDim imgLockDim DestroyPackageDim CanDestroyProjectPackageDim CanDestroyPackageDim hideRippleDim rippleFilter'------------ Constants Declaration -----------Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"'------------ Variable Init -------------------parFPkgVersion = Request("fpkgversion")If parFPkgVersion = "" Then parFPkgVersion = "*"parPkgId = Request("pkg_id")If Request("hideRipple") = "True" ThenhideRipple = TruerippleFilter = " AND PV.BUILD_TYPE != 'Y'"ElsehideRipple = FalserippleFilter = ""End If'----------------------------------------------%><%'-----------------------------------------------------------------------------------------------------------------------Function GetPackageName ( nPkgId )Dim rsQry, queryquery = _" SELECT PKG_NAME FROM PACKAGES WHERE PKG_ID = :PKG_ID"OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( query, 0 )OraDatabase.Parameters.Remove "PKG_ID"GetPackageName = rsQry("pkg_name")rsQry.Close()Set rsQry = nothingEnd Function'-----------------------------------------------------------------------------------------------------------------------%><%'==================== MAIN LINE ===============================If (parPkgId = "") ThenCall Destroy_All_ObjectsResponse.Redirect ("index.asp")End IfPackageName = GetPackageName ( parPkgId )'==============================================================%><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?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><!--#include file="_jquery_includes.asp"--><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" ><!-- 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"><!--#include file="_front_explorer.asp"--></td><td rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td ><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"></td><td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td><td width="1%"></td></tr><tr><td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td><td bgcolor="#FFFFFF" valign="top"><!-- PACKAGE SEARCH ------------------------------------------------><%Dim aVersionsDim lastRowDim objSortHelperDim iOraDatabase.Parameters.Add "PKG_VERSION", Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "PKG_ID", parPkgId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql") & rippleFilter, 0 )OraDatabase.Parameters.Remove "PKG_ID"OraDatabase.Parameters.Remove "PKG_VERSION"%><table width="100%" border="0" cellspacing="0" cellpadding="5"><tr><td class="body_sect">Package Versions</td></tr><tr><td nowrap bgcolor="#E4E9EC" class="body_txt">Results for <b><%=PackageName%></b></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="5"><form name="versions" method="get" action="<%=ScriptName%>"><input type="hidden" name="pkg_id" value="<%=parPkgId%>"><input type="hidden" name="listby" value="<%=parListBy%>"><tr><td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td><td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td><td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td><td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Last Modified</td><td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td></tr><tr><td nowrap bgcolor="#E4E9EC"></td><td nowrap bgcolor="#E4E9EC"><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td><td nowrap bgcolor="#E4E9EC"><%Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"If hideRipple ThenResponse.write "<img src='images/RippleSquareOff.gif' width='20' height='20' border='0' title='Rippled Versions Hidden. Toggle'>"ElseResponse.write "<img src='images/RippleSquare.gif' width='20' height='20' border='0' title='Rippled Versions Shown. Toggle'>"End IfResponse.write "</a>"%></td><td nowrap bgcolor="#E4E9EC"></td><td nowrap bgcolor="#E4E9EC"></td></tr><%' Descending orderIf rsRep.RecordCount = 0 ThenWith Response.write "<tr>".write "<td colspan='5' class='body_row'>Found 0 records.".write " Delete Unused Package Name ".write "<a href='javascript:;'"&_" title='Delete unused package name' "&_" onClick=""MM_openVixIFrame('_delete_package_name.asp?pkgId=" & parPkgId & "&bfile=index.asp','Delete Unused Package');"" >" &_"<img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ></a>".write "</td>".write "</tr>"End WithElseaVersions = rsRep.GetRows()lastRow = UBound( aVersions, 2 )Set objSortHelper = New SortHelper' Sort versionsCall objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )' Not in a project context' Only god-like users will have this permissionCanDestroyProjectPackage = canShowControl( "DestroyPackage" )' Descending orderFor i = lastRow To 0 Step -1imgLock = IMG_NOT_OFFICIALIf (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y") OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") ThenimgLock = IMG_OFFICIALEnd IfsLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )' User can try to delete package iff' Have suffiecient access (unusual)' They created it or is its owner' The version is not in use by any release (allow to be in pendinf or WIP)' [Not at the moment] The package was created less than xxxx days ago' Is not locked or Approved for AutobuildCanDestroyPackage = CanDestroyProjectPackageIf CanDestroyPackage = false ThenIf objAccessControl.UserId = aVersions( rsRep.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsRep.FieldIndex("OWNER_ID"), i )ThenIf aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 ThenIf aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then'If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" ThenCanDestroyPackage = true'End IfEnd If'End IfEnd IfEnd IfEnd If' Set destroy package actionIf CanDestroyPackage ThenDestroyPackage = "<a href='javascript:;'"&_" title='Destroy this version of the package.' "&_" onClick=""MM_openVixIFrame('_destroy_package.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i ) &"&bfile="& ScriptName &"&pkg_id="& parPkgId &"&listby="& parListBy &"','Destroy Package Version');"" >" &_" <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ></a>"ElseDestroyPackage = ""End If%><tr><td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td><td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td><td class="body_txt_gray" valign="top" bgcolor="#F5F5F5"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td><td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><%= "<a href='mailto:"& aVersions( rsRep.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsRep.FieldIndex("full_name"), i ) &" <"& aVersions( rsRep.FieldIndex("user_email"), i ) &">'>"& aVersions( rsRep.FieldIndex("full_name"), i ) &"</a> "& DisplayShortDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td><td valign="top" bgcolor="#F5F5F5"><%=DestroyPackage%></td></tr><%NextrsRep.Close()End If%><tr><td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></form></table><br><!------------------------------------------------------------></td><td background="images/lbox_bgside_white.gif"> </td></tr></table></td></tr></table></td><td width="11%"> </td></tr><tr><td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td><td> </td></tr></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html>