| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
'| |
|
4 |
'| |
|
| 5 |
'| view by version |
|
5 |
'| Edit/View Build Configuration |
|
| 6 |
'| |
|
6 |
'| |
|
| 7 |
'=====================================================
|
7 |
'=====================================================
|
| 8 |
%>
|
8 |
%>
|
| 9 |
<%
|
9 |
<%
|
| 10 |
Option explicit
|
10 |
Option explicit
|
| Line 28... |
Line 28... |
| 28 |
Dim parFPkgVersion
|
28 |
Dim parFPkgVersion
|
| 29 |
Dim sLink
|
29 |
Dim sLink
|
| 30 |
Dim parPkgId
|
30 |
Dim parPkgId
|
| 31 |
Dim PackageName
|
31 |
Dim PackageName
|
| 32 |
Dim imgLock
|
32 |
Dim imgLock
|
| - |
|
33 |
Dim imgData
|
| 33 |
Dim DestroyPackage
|
34 |
Dim DestroyPackage
|
| 34 |
Dim CanDestroyProjectPackage
|
35 |
Dim CanDestroyProjectPackage
|
| 35 |
Dim CanDestroyPackage
|
36 |
Dim CanDestroyPackage
|
| 36 |
Dim hideRipple
|
37 |
Dim hideRipple
|
| 37 |
Dim rippleFilter
|
38 |
Dim rippleFilter
|
| 38 |
'------------ Constants Declaration -----------
|
39 |
'------------ Constants Declaration -----------
|
| 39 |
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
|
40 |
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
|
| 40 |
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
|
41 |
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
|
| 41 |
'------------ Variable Init -------------------
|
42 |
'------------ Variable Init -------------------
|
| 42 |
parFPkgVersion = Request("fpkgversion")
|
43 |
parFPkgVersion = RequestDefault("fpkgversion", "*")
|
| 43 |
If parFPkgVersion = "" Then parFPkgVersion = "*"
|
- |
|
| 44 |
|
- |
|
| 45 |
parPkgId = Request("pkg_id")
|
44 |
parPkgId = Request("pkg_id")
|
| 46 |
If Request("hideRipple") = "True" Then
|
45 |
If Request("hideRipple") = "True" Then
|
| 47 |
hideRipple = True
|
46 |
hideRipple = True
|
| 48 |
rippleFilter = " AND PV.BUILD_TYPE != 'Y'"
|
47 |
rippleFilter = " AND PV.BUILD_TYPE != 'Y'"
|
| 49 |
Else
|
48 |
Else
|
| 50 |
hideRipple = False
|
49 |
hideRipple = False
|
| 51 |
rippleFilter = ""
|
50 |
rippleFilter = ""
|
| 52 |
End If
|
51 |
End If
|
| 53 |
|
- |
|
| 54 |
|
- |
|
| 55 |
'----------------------------------------------
|
52 |
'----------------------------------------------
|
| 56 |
%>
|
- |
|
| 57 |
<%
|
- |
|
| 58 |
'-----------------------------------------------------------------------------------------------------------------------
|
53 |
' Convert PKG_ID into a package name
|
| 59 |
Function GetPackageName ( nPkgId )
|
54 |
Function GetPackageName ( nPkgId )
|
| 60 |
Dim rsQry, query
|
55 |
Dim rsQry, query
|
| 61 |
|
56 |
|
| 62 |
query = _
|
- |
|
| 63 |
" SELECT PKG_NAME FROM PACKAGES WHERE PKG_ID = :PKG_ID"
|
57 |
query = "SELECT PKG_NAME FROM PACKAGES WHERE PKG_ID = :PKG_ID"
|
| 64 |
|
- |
|
| 65 |
OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
58 |
OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 66 |
|
- |
|
| 67 |
Set rsQry = OraDatabase.DbCreateDynaset( query, 0 )
|
59 |
Set rsQry = OraDatabase.DbCreateDynaset( query, 0 )
|
| 68 |
|
- |
|
| 69 |
OraDatabase.Parameters.Remove "PKG_ID"
|
60 |
OraDatabase.Parameters.Remove "PKG_ID"
|
| 70 |
|
- |
|
| 71 |
GetPackageName = rsQry("pkg_name")
|
61 |
GetPackageName = rsQry("pkg_name")
|
| 72 |
|
62 |
|
| 73 |
rsQry.Close()
|
63 |
rsQry.Close()
|
| 74 |
Set rsQry = nothing
|
64 |
Set rsQry = nothing
|
| 75 |
End Function
|
65 |
End Function
|
| - |
|
66 |
|
| 76 |
'-----------------------------------------------------------------------------------------------------------------------
|
67 |
'----------------------------------------------
|
| - |
|
68 |
' Determine if a PKG_ID has any package-versions
|
| - |
|
69 |
' If not then it can be deleted
|
| - |
|
70 |
Function hasNoVersions ( nPkgId )
|
| - |
|
71 |
Dim rsQry, query
|
| - |
|
72 |
|
| - |
|
73 |
query = "select count(*) as count from package_versions where pkg_id = :PKG_ID"
|
| - |
|
74 |
OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
75 |
Set rsQry = OraDatabase.DbCreateDynaset( query, 0 )
|
| - |
|
76 |
OraDatabase.Parameters.Remove "PKG_ID"
|
| 77 |
%>
|
77 |
|
| - |
|
78 |
hasNoVersions = NOT rsQry("count") <> 0
|
| - |
|
79 |
|
| - |
|
80 |
rsQry.Close()
|
| - |
|
81 |
Set rsQry = nothing
|
| - |
|
82 |
End Function
|
| 78 |
<%
|
83 |
|
| 79 |
'==================== MAIN LINE ===============================
|
84 |
'==================== MAIN LINE ===============================
|
| 80 |
If (parPkgId = "") Then
|
85 |
If (parPkgId = "") Then
|
| 81 |
Call Destroy_All_Objects
|
86 |
Call Destroy_All_Objects
|
| 82 |
Response.Redirect ("index.asp")
|
87 |
Response.Redirect ("index.asp")
|
| 83 |
End If
|
88 |
End If
|
| 84 |
|
89 |
|
| 85 |
PackageName = GetPackageName ( parPkgId )
|
90 |
PackageName = GetPackageName ( parPkgId )
|
| 86 |
'==============================================================
|
91 |
'==============================================================
|
| - |
|
92 |
Sub MainPanelContent
|
| 87 |
%>
|
93 |
%>
|
| 88 |
<html>
|
94 |
<!-- MainPanelContent -->
|
| 89 |
<head>
|
95 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 90 |
<title>Release Manager</title>
|
96 |
<tr>
|
| 91 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
97 |
<td width="1%"></td>
|
| 92 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
98 |
<td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
|
| 93 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
99 |
<td width="1%"></td>
|
| 94 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
100 |
</tr>
|
| 95 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
101 |
<tr>
|
| 96 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
102 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
|
| 97 |
<!--#include file="_jquery_includes.asp"-->
|
103 |
<td bgcolor="#FFFFFF" valign="top">
|
| 98 |
<!-- DROPDOWN MENUS -->
|
104 |
<!-- PACKAGE SEARCH ------------------------------------------------>
|
| 99 |
<!--#include file="_menu_def.asp"-->
|
105 |
<%
|
| 100 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
106 |
|
| 101 |
</head>
|
107 |
Dim aVersions
|
| 102 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
108 |
Dim lastRow
|
| 103 |
<!-- HEADER -->
|
109 |
Dim objSortHelper
|
| 104 |
<!--#include file="_header.asp"-->
|
110 |
Dim i
|
| 105 |
<!-- BODY ---->
|
111 |
|
| 106 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
112 |
OraDatabase.Parameters.Add "PKG_VERSION", Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 107 |
<tr>
|
113 |
OraDatabase.Parameters.Add "PKG_ID", parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 108 |
<td width="1%" background="images/bg_home_orange.gif" valign="top">
|
114 |
|
| 109 |
<!--#include file="_front_explorer.asp"-->
|
115 |
Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql") & rippleFilter, 0 )
|
| 110 |
</td>
|
116 |
|
| 111 |
<td rowspan="2" valign="top">
|
117 |
OraDatabase.Parameters.Remove "PKG_ID"
|
| 112 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
118 |
OraDatabase.Parameters.Remove "PKG_VERSION"
|
| 113 |
<tr>
|
119 |
|
| 114 |
<td >
|
120 |
|
| 115 |
|
121 |
%>
|
| 116 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
122 |
|
| 117 |
<tr>
|
123 |
<table id="versionTable" width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 118 |
<td width="1%"></td>
|
124 |
<thead>
|
| 119 |
<td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
|
125 |
<tr>
|
| 120 |
<td width="1%"></td>
|
126 |
<td class="body_sect" colspan='10'>Package Versions</td>
|
| 121 |
</tr>
|
127 |
</tr>
|
| 122 |
<tr>
|
128 |
<tr class="form_field_bg">
|
| 123 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
|
129 |
<td nowrap" class="body_txt" colspan='10'>
|
| 124 |
<td bgcolor="#FFFFFF" valign="top">
|
130 |
Results for <b><%=PackageName%></b>
|
| 125 |
<!-- PACKAGE SEARCH ------------------------------------------------>
|
131 |
</td>
|
| 126 |
<%
|
132 |
</tr>
|
| 127 |
|
133 |
<form name="versions" method="get" action="<%=ScriptName%>">
|
| 128 |
Dim aVersions
|
134 |
<input type="hidden" name="pkg_id" value="<%=parPkgId%>">
|
| 129 |
Dim lastRow
|
135 |
<input type="hidden" name="listby" value="<%=parListBy%>">
|
| 130 |
Dim objSortHelper
|
136 |
<tr class="form_field_bg">
|
| 131 |
Dim i
|
137 |
<td width="20px" nowrap class="body_col"></td>
|
| 132 |
|
138 |
<td width="10%" nowrap class="body_col">Version</td>
|
| 133 |
OraDatabase.Parameters.Add "PKG_VERSION", Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
139 |
<td width="80%" nowrap class="body_col">Reason for Release</td>
|
| 134 |
OraDatabase.Parameters.Add "PKG_ID", parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
140 |
<td width="1%" nowrap class="body_col tcenter" rowspan="2">Build<br>Reason</td>
|
| 135 |
|
141 |
<td width="1%" nowrap class="body_col tcenter" rowspan="2">Lines of<br>Code</td>
|
| 136 |
Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql") & rippleFilter, 0 )
|
142 |
<td width="1%" nowrap class="body_col tcenter" rowspan="2">Auto<br>Tests</td>
|
| 137 |
|
143 |
<td width="1%" nowrap class="body_col tcenter" rowspan="2">Build<br>Time</td>
|
| 138 |
OraDatabase.Parameters.Remove "PKG_ID"
|
144 |
<td width="10%" nowrap class="body_col tcenter" colspan="2">Last Modified</td>
|
| 139 |
OraDatabase.Parameters.Remove "PKG_VERSION"
|
145 |
<td width="21px" nowrap class="body_col"></td>
|
| 140 |
|
146 |
</tr>
|
| 141 |
|
147 |
<tr class="body_col form_field_bg">
|
| 142 |
%>
|
148 |
<td nowrap ></td>
|
| 143 |
|
149 |
<td nowrap ><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
|
| 144 |
<table width="100%" border="0" cellspacing="0" cellpadding="5">
|
150 |
<td nowrap >
|
| 145 |
<tr>
|
151 |
<%
|
| 146 |
<td class="body_sect">Package Versions</td>
|
152 |
Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
|
| 147 |
</tr>
|
153 |
If hideRipple Then
|
| 148 |
<tr>
|
154 |
Response.write "<img src='images/RippleSquareOff.gif' width='20' height='20' border='0' title='Rippled Versions Hidden. Toggle'>"
|
| 149 |
<td nowrap bgcolor="#E4E9EC" class="body_txt">
|
155 |
Else
|
| 150 |
Results for <b><%=PackageName%></b>
|
156 |
Response.write "<img src='images/RippleSquare.gif' width='20' height='20' border='0' title='Rippled Versions Shown. Toggle'>"
|
| 151 |
</td>
|
157 |
End If
|
| 152 |
</tr>
|
158 |
Response.write "</a>"
|
| 153 |
</table>
|
159 |
%>
|
| 154 |
|
160 |
</td>
|
| 155 |
|
161 |
<td nowrap class="tcenter">Who</td>
|
| 156 |
|
162 |
<td nowrap class="tcenter">Date</td>
|
| 157 |
<table width="100%" border="0" cellspacing="1" cellpadding="5">
|
163 |
<td nowrap ></td>
|
| 158 |
<form name="versions" method="get" action="<%=ScriptName%>">
|
164 |
</tr>
|
| 159 |
<input type="hidden" name="pkg_id" value="<%=parPkgId%>">
|
165 |
</thead>
|
| 160 |
<input type="hidden" name="listby" value="<%=parListBy%>">
|
166 |
<tbody>
|
| 161 |
<tr>
|
167 |
|
| 162 |
<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
|
168 |
<%If rsRep.RecordCount = 0 Then%>
|
| 163 |
<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
|
169 |
<tr>
|
| 164 |
<td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td>
|
170 |
<td colspan='10' class='body_row'>
|
| 165 |
<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC" colspan="2">Last Modified</td>
|
171 |
<%If hasNoVersions(parPkgId) Then %>
|
| 166 |
<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
|
172 |
This package name has no versions.
|
| 167 |
</tr>
|
173 |
<br><a href='javascript:;' title='Delete unused package name' onClick="MM_openVixIFrame('_delete_package_name.asp?pkgId=<%=parPkgId%>&bfile=index.asp','Delete Unused Package');" >Delete this name<img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' align='absmiddle' hspace='2'></a>
|
| 168 |
<tr bgcolor="#E4E9EC" class="body_col">
|
174 |
<%Else%>
|
| 169 |
<td nowrap ></td>
|
175 |
Found 0 records - with current filters.
|
| 170 |
<td nowrap ><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
|
176 |
<%End If%>
|
| 171 |
<td nowrap >
|
- |
|
| 172 |
<%
|
- |
|
| 173 |
Response.write "<a href='"& scriptName &"?"& Persists_Query_String( "hideRipple=" & not hideRipple ) &"'>"
|
- |
|
| 174 |
If hideRipple Then
|
- |
|
| 175 |
Response.write "<img src='images/RippleSquareOff.gif' width='20' height='20' border='0' title='Rippled Versions Hidden. Toggle'>"
|
- |
|
| 176 |
Else
|
- |
|
| 177 |
Response.write "<img src='images/RippleSquare.gif' width='20' height='20' border='0' title='Rippled Versions Shown. Toggle'>"
|
- |
|
| 178 |
End If
|
- |
|
| 179 |
Response.write "</a>"
|
- |
|
| 180 |
%>
|
- |
|
| 181 |
</td>
|
- |
|
| 182 |
<td nowrap >Who</td>
|
- |
|
| 183 |
<td nowrap >Date</td>
|
- |
|
| 184 |
<td nowrap ></td>
|
- |
|
| 185 |
</tr>
|
- |
|
| 186 |
<%
|
- |
|
| 187 |
' Descending order
|
- |
|
| 188 |
If rsRep.RecordCount = 0 Then
|
- |
|
| 189 |
|
- |
|
| 190 |
With Response
|
- |
|
| 191 |
.write "<tr>"
|
- |
|
| 192 |
.write "<td colspan='6' class='body_row'>Found 0 records."
|
- |
|
| 193 |
.write " Delete Unused Package Name "
|
- |
|
| 194 |
.write "<a href='javascript:;'"&_
|
- |
|
| 195 |
" title='Delete unused package name' "&_
|
- |
|
| 196 |
" onClick=""MM_openVixIFrame('_delete_package_name.asp?pkgId=" & parPkgId & "&bfile=index.asp','Delete Unused Package');"" >" &_
|
- |
|
| 197 |
"<img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ></a>"
|
- |
|
| 198 |
.write "</td>"
|
- |
|
| 199 |
.write "</tr>"
|
- |
|
| 200 |
End With
|
- |
|
| 201 |
|
- |
|
| 202 |
Else
|
- |
|
| 203 |
|
- |
|
| 204 |
aVersions = rsRep.GetRows()
|
- |
|
| 205 |
lastRow = UBound( aVersions, 2 )
|
- |
|
| 206 |
|
- |
|
| 207 |
Set objSortHelper = New SortHelper
|
- |
|
| 208 |
|
- |
|
| 209 |
|
- |
|
| 210 |
' Sort versions
|
- |
|
| 211 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
|
- |
|
| 212 |
|
- |
|
| 213 |
|
- |
|
| 214 |
' Not in a project context
|
- |
|
| 215 |
' Only god-like users will have this permission
|
- |
|
| 216 |
CanDestroyProjectPackage = canShowControl( "DestroyPackage" )
|
- |
|
| 217 |
|
- |
|
| 218 |
' Descending order
|
- |
|
| 219 |
For i = lastRow To 0 Step -1
|
- |
|
| 220 |
imgLock = IMG_NOT_OFFICIAL
|
- |
|
| 221 |
If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y") OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
|
- |
|
| 222 |
imgLock = IMG_OFFICIAL
|
- |
|
| 223 |
End If
|
- |
|
| 224 |
|
- |
|
| 225 |
sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
|
- |
|
| 226 |
|
- |
|
| 227 |
' User can try to delete package iff
|
- |
|
| 228 |
' Have suffiecient access (unusual)
|
- |
|
| 229 |
' They created it or is its owner
|
- |
|
| 230 |
' The version is not in use by any release (allow to be in pendinf or WIP)
|
- |
|
| 231 |
' [Not at the moment] The package was created less than xxxx days ago
|
- |
|
| 232 |
' Is not locked or Approved for Autobuild
|
- |
|
| 233 |
CanDestroyPackage = CanDestroyProjectPackage
|
- |
|
| 234 |
If CanDestroyPackage = false Then
|
- |
|
| 235 |
If objAccessControl.UserId = aVersions( rsRep.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsRep.FieldIndex("OWNER_ID"), i )Then
|
- |
|
| 236 |
If aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then
|
- |
|
| 237 |
'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 Then
|
- |
|
| 238 |
If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then
|
- |
|
| 239 |
'If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" Then
|
- |
|
| 240 |
CanDestroyPackage = true
|
- |
|
| 241 |
'End If
|
- |
|
| 242 |
End If
|
- |
|
| 243 |
'End If
|
- |
|
| 244 |
End If
|
- |
|
| 245 |
End If
|
- |
|
| 246 |
End If
|
- |
|
| 247 |
|
- |
|
| 248 |
' Set destroy package action
|
- |
|
| 249 |
If CanDestroyPackage Then
|
- |
|
| 250 |
DestroyPackage = "<a href='javascript:;'"&_
|
- |
|
| 251 |
" title='Destroy this version of the package.' "&_
|
- |
|
| 252 |
" onClick=""MM_openVixIFrame('_destroy_package.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i ) &"&bfile="& ScriptName &"&pkg_id="& parPkgId &"&listby="& parListBy &"','Destroy Package Version');"" >" &_
|
- |
|
| 253 |
" <img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ></a>"
|
- |
|
| 254 |
Else
|
- |
|
| 255 |
DestroyPackage = ""
|
- |
|
| 256 |
End If
|
- |
|
| 257 |
%>
|
- |
|
| 258 |
<tr bgcolor="#F5F5F5" valign="top" class="body_row">
|
- |
|
| 259 |
<td><%=imgLock%></td>
|
- |
|
| 260 |
<td nowrap><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
|
- |
|
| 261 |
<td class="body_txt_gray"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
|
- |
|
| 262 |
<td nowrap><%=emailField(enum_imgUser & aVersions( rsRep.FieldIndex("full_name"), i ), aVersions( rsRep.FieldIndex("user_email"), i ))%></td>
|
- |
|
| 263 |
<td nowrap><%=DisplayShortDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td>
|
- |
|
| 264 |
<td ><%=DestroyPackage%></td>
|
- |
|
| 265 |
</tr>
|
- |
|
| 266 |
<%
|
- |
|
| 267 |
|
- |
|
| 268 |
Next
|
- |
|
| 269 |
|
- |
|
| 270 |
rsRep.Close()
|
- |
|
| 271 |
|
- |
|
| 272 |
End If
|
- |
|
| 273 |
%>
|
- |
|
| 274 |
<tr>
|
- |
|
| 275 |
<td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
- |
|
| 276 |
</tr>
|
- |
|
| 277 |
|
- |
|
| 278 |
</form>
|
- |
|
| 279 |
</table>
|
- |
|
| 280 |
<br>
|
- |
|
| 281 |
<!------------------------------------------------------------>
|
- |
|
| 282 |
|
- |
|
| 283 |
|
- |
|
| 284 |
</td>
|
177 |
</td>
|
| - |
|
178 |
</tr>
|
| - |
|
179 |
|
| - |
|
180 |
<%Else
|
| - |
|
181 |
|
| - |
|
182 |
aVersions = rsRep.GetRows()
|
| - |
|
183 |
lastRow = UBound( aVersions, 2 )
|
| - |
|
184 |
|
| - |
|
185 |
' Sort versions
|
| - |
|
186 |
Set objSortHelper = New SortHelper
|
| - |
|
187 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
|
| - |
|
188 |
|
| - |
|
189 |
|
| - |
|
190 |
' Not in a project context
|
| - |
|
191 |
' Only god-like users will have this permission
|
| - |
|
192 |
CanDestroyProjectPackage = canShowControl( "DestroyPackage" )
|
| - |
|
193 |
|
| - |
|
194 |
' Descending order
|
| - |
|
195 |
For i = lastRow To 0 Step -1
|
| - |
|
196 |
imgLock = IMG_NOT_OFFICIAL
|
| - |
|
197 |
imgData = 2
|
| - |
|
198 |
If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y") OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
|
| - |
|
199 |
imgLock = IMG_OFFICIAL
|
| - |
|
200 |
imgData = 1
|
| - |
|
201 |
End If
|
| - |
|
202 |
|
| - |
|
203 |
sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
|
| - |
|
204 |
|
| - |
|
205 |
' User can try to delete package iff
|
| - |
|
206 |
' Have suffiecient access (unusual)
|
| - |
|
207 |
' They created it or is its owner
|
| - |
|
208 |
' The version is not in use by any release (allow to be in pending or WIP)
|
| - |
|
209 |
' [Not at the moment] The package was created less than xxxx days ago
|
| - |
|
210 |
' Is not locked or Approved for Autobuild
|
| - |
|
211 |
CanDestroyPackage = CanDestroyProjectPackage
|
| - |
|
212 |
If CanDestroyPackage = false Then
|
| - |
|
213 |
If objAccessControl.UserId = aVersions( rsRep.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsRep.FieldIndex("OWNER_ID"), i )Then
|
| - |
|
214 |
If aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then
|
| - |
|
215 |
'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 Then
|
| - |
|
216 |
If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then
|
| - |
|
217 |
'If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" Then
|
| - |
|
218 |
CanDestroyPackage = true
|
| - |
|
219 |
'End If
|
| - |
|
220 |
End If
|
| - |
|
221 |
'End If
|
| - |
|
222 |
End If
|
| - |
|
223 |
End If
|
| - |
|
224 |
End If
|
| - |
|
225 |
|
| - |
|
226 |
' Set destroy package action
|
| - |
|
227 |
' title will be added by javascript
|
| - |
|
228 |
If CanDestroyPackage Then
|
| - |
|
229 |
DestroyPackage = "<img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' class='destroyThis'>"
|
| - |
|
230 |
Else
|
| - |
|
231 |
DestroyPackage = ""
|
| - |
|
232 |
End If
|
| - |
|
233 |
|
| - |
|
234 |
Dim testCount
|
| - |
|
235 |
testCount = aVersions( rsRep.FieldIndex("test_count"), i )
|
| - |
|
236 |
If testCount = 0 Then testCount = ""
|
| - |
|
237 |
|
| - |
|
238 |
%>
|
| - |
|
239 |
<tr valign="top" class="body_row form_field_grey_bg">
|
| - |
|
240 |
<td data-order='<%=imgData%>'><%=imgLock%></td>
|
| - |
|
241 |
<td nowrap><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
|
| - |
|
242 |
<td class="body_txt_gray"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
|
| - |
|
243 |
<td nowrap><%=aVersions( rsRep.FieldIndex("reason"), i )%></td>
|
| - |
|
244 |
<td nowrap class='tright'><%=aVersions( rsRep.FieldIndex("code_lines"), i )%></td>
|
| 285 |
<td background="images/lbox_bgside_white.gif"> </td>
|
245 |
<td nowrap class='tright'><%=testCount%></td>
|
| - |
|
246 |
<td nowrap class='tright'><%=aVersions( rsRep.FieldIndex("build_time"), i )%></td>
|
| - |
|
247 |
<td nowrap><%=emailField(enum_imgUser & aVersions( rsRep.FieldIndex("full_name"), i ), aVersions( rsRep.FieldIndex("user_email"), i ))%></td>
|
| - |
|
248 |
<td nowrap><%=DisplayShortDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td>
|
| - |
|
249 |
<td data-pvid='<%=aVersions( rsRep.FieldIndex("pv_id"), i )%>'><%=DestroyPackage%></td>
|
| - |
|
250 |
</tr>
|
| - |
|
251 |
<%
|
| - |
|
252 |
|
| - |
|
253 |
Next
|
| - |
|
254 |
|
| - |
|
255 |
rsRep.Close()
|
| - |
|
256 |
|
| - |
|
257 |
End If
|
| 286 |
</tr>
|
258 |
%>
|
| - |
|
259 |
</form>
|
| - |
|
260 |
</tbody>
|
| 287 |
</table>
|
261 |
</table>
|
| - |
|
262 |
<br>
|
| - |
|
263 |
<!------------------------------------------------------------>
|
| - |
|
264 |
</td>
|
| - |
|
265 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
|
| - |
|
266 |
</tr>
|
| - |
|
267 |
</table>
|
| - |
|
268 |
<%
|
| - |
|
269 |
End Sub
|
| - |
|
270 |
%>
|
| - |
|
271 |
<html>
|
| - |
|
272 |
<head>
|
| - |
|
273 |
<title>Release Manager</title>
|
| - |
|
274 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| - |
|
275 |
<meta http-equiv="Pragma" content="no-cache">
|
| - |
|
276 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| - |
|
277 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
| - |
|
278 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
| - |
|
279 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| - |
|
280 |
<!-- DROPDOWN MENUS -->
|
| - |
|
281 |
<%bJqueryDataTables=true%>
|
| - |
|
282 |
<%sJqueryDataTablesCss="jquery/dataTables.vix.grey.css"%>
|
| - |
|
283 |
<!--#include file="_jquery_includes.asp"-->
|
| - |
|
284 |
<!--#include file="_menu_def.asp"-->
|
| - |
|
285 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| - |
|
286 |
<script language="JavaScript" type="text/JavaScript">
|
| - |
|
287 |
$(document).ready(function() {
|
| - |
|
288 |
|
| - |
|
289 |
$('#versionTable').DataTable({
|
| - |
|
290 |
"paging": false,
|
| - |
|
291 |
"ordering": true,
|
| - |
|
292 |
"info": true
|
| - |
|
293 |
});
|
| - |
|
294 |
|
| - |
|
295 |
// Add Title to icons
|
| - |
|
296 |
$('.destroyThis').prop('title', 'Destroy this version of the package.');
|
| - |
|
297 |
|
| - |
|
298 |
// Destroy a package version
|
| 288 |
|
299 |
//
|
| - |
|
300 |
$( ".destroyThis" ).on( "click", function(event) {
|
| - |
|
301 |
var pvid = $(this).closest('td').data('pvid');
|
| - |
|
302 |
if (pvid) {
|
| - |
|
303 |
var data = {
|
| - |
|
304 |
pv_id : pvid,
|
| - |
|
305 |
bfile : "<%=ScriptName%>",
|
| - |
|
306 |
pkg_id : "<%=parPkgId%>",
|
| - |
|
307 |
listby : "<%=parListBy%>",
|
| - |
|
308 |
fpkgversion : "<%=parFPkgVersion%>",
|
| - |
|
309 |
};
|
| - |
|
310 |
MM_openVixIFrame('_destroy_package.asp?' + encodeData(data), 'Destroy Package Version')
|
| - |
|
311 |
}
|
| - |
|
312 |
});
|
| - |
|
313 |
});
|
| - |
|
314 |
|
| - |
|
315 |
// Encode data into URL
|
| - |
|
316 |
function encodeData(data) {
|
| - |
|
317 |
return Object.keys(data).map(function(key) {
|
| - |
|
318 |
return [key, data[key]].map(encodeURIComponent).join("=");
|
| - |
|
319 |
}).join("&");
|
| - |
|
320 |
}
|
| - |
|
321 |
|
| - |
|
322 |
//# sourceURL=view_by_version.asp
|
| - |
|
323 |
</script>
|
| - |
|
324 |
</head>
|
| - |
|
325 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
| - |
|
326 |
<!-- HEADER -->
|
| - |
|
327 |
<!--#include file="_header.asp"-->
|
| - |
|
328 |
<!-- BODY ---->
|
| - |
|
329 |
<table class="full_table">
|
| - |
|
330 |
<tr>
|
| - |
|
331 |
<td width="146px" class="panel_bg" valign="top">
|
| - |
|
332 |
<!--#include file="_front_explorer.asp"-->
|
| - |
|
333 |
</td>
|
| - |
|
334 |
<td width="100%" rowspan="2" align="center" valign="top">
|
| - |
|
335 |
<%Call MainPanelContent%>
|
| 289 |
</td>
|
336 |
</td>
|
| - |
|
337 |
</tr>
|
| - |
|
338 |
<tr>
|
| - |
|
339 |
<td class="panel_bg" valign="bottom" align="center" height="350">
|
| - |
|
340 |
<img src="images/img_gear.gif" vspace="20" hspace="30"></td>
|
| 290 |
</tr>
|
341 |
</tr>
|
| 291 |
</table>
|
342 |
</table>
|
| 292 |
</td>
|
- |
|
| 293 |
<td width="11%"> </td>
|
- |
|
| 294 |
</tr>
|
- |
|
| 295 |
<tr>
|
- |
|
| 296 |
<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>
|
- |
|
| 297 |
<td> </td>
|
- |
|
| 298 |
</tr>
|
- |
|
| 299 |
</table>
|
- |
|
| 300 |
<!-- FOOTER -->
|
343 |
<!-- FOOTER -->
|
| 301 |
<!--#include file="_footer.asp"-->
|
344 |
<!--#include file="_footer.asp"-->
|
| 302 |
</body>
|
345 |
</body>
|
| 303 |
</html>
|
346 |
</html>
|
| - |
|
347 |
|