| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
| 121 |
hknight |
5 |
'| ADD |
|
|
|
6 |
'| PACKAGES |
|
|
|
7 |
'| OR DEPENDENCIES |
|
| 119 |
ghuddy |
8 |
'=====================================================
|
|
|
9 |
%>
|
|
|
10 |
<%
|
|
|
11 |
Option explicit
|
|
|
12 |
' Good idea to set when using redirect
|
| 121 |
hknight |
13 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
14 |
%>
|
|
|
15 |
<!--#include file="common/conf.asp"-->
|
|
|
16 |
<!--#include file="common/globals.asp"-->
|
|
|
17 |
<!--#include file="common/formating.asp"-->
|
|
|
18 |
<!--#include file="common/qstr.asp"-->
|
|
|
19 |
<!--#include file="common/common_subs.asp"-->
|
| 3959 |
dpurdie |
20 |
<!--#include file="class/classSortHelper.asp"-->
|
| 119 |
ghuddy |
21 |
<%
|
|
|
22 |
|
|
|
23 |
'------------ ACCESS CONTROL ------------------
|
|
|
24 |
%>
|
|
|
25 |
<!--#include file="_access_control_login.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<!--#include file="_access_control_project.asp"-->
|
|
|
28 |
<%
|
|
|
29 |
' Make sure rtag_id is always present
|
|
|
30 |
If Request("pv_id") = "" AND Request("rtag_id") = "" Then
|
| 121 |
hknight |
31 |
Response.Redirect("index.asp")
|
| 119 |
ghuddy |
32 |
End If
|
|
|
33 |
%>
|
|
|
34 |
<%
|
|
|
35 |
'------------ Variable Definition -------------
|
|
|
36 |
Dim parAdd_type
|
|
|
37 |
Dim parPkg_list
|
|
|
38 |
Dim parBase_view_id
|
|
|
39 |
Dim rsPkgs
|
|
|
40 |
Dim HTML_pkg_list
|
|
|
41 |
Dim parPv_id
|
|
|
42 |
Dim parPkgfind
|
|
|
43 |
'------------ Constants Declaration -----------
|
|
|
44 |
'------------ Variable Init -------------------
|
|
|
45 |
parAdd_type = Request("add_type")
|
|
|
46 |
parPkg_list = Request("pkg_list")
|
|
|
47 |
parBase_view_id = Request("base_view_id")
|
|
|
48 |
parPv_id = Request("pv_id")
|
|
|
49 |
parPkgfind = Request("pkgfind")
|
|
|
50 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
51 |
'----------------------------------------------
|
|
|
52 |
%>
|
|
|
53 |
<%
|
|
|
54 |
' ---- Action requirements ----
|
|
|
55 |
If parPkg_list = "" Then Response.Redirect( "form_search_result_pkgs.asp?pv_id="& parPv_id &_
|
|
|
56 |
"&rtag_id="& parRtag_id &_
|
| 121 |
hknight |
57 |
"&pkgfind="& parPkgfind &_
|
| 119 |
ghuddy |
58 |
"&add_type="& parAdd_type &_
|
| 121 |
hknight |
59 |
"&errmsg=true" )
|
| 119 |
ghuddy |
60 |
%>
|
|
|
61 |
<%
|
|
|
62 |
Function Page_Title ( NNadd_type )
|
| 121 |
hknight |
63 |
If NNadd_type = Cstr(enum_ADD_PACKAGES) Then
|
| 3959 |
dpurdie |
64 |
Page_Title = "ADD Package"
|
| 121 |
hknight |
65 |
|
|
|
66 |
ElseIf NNadd_type = Cstr(enum_ADD_DEPENDENCIES) Then
|
| 3959 |
dpurdie |
67 |
Page_Title = "ADD Dependency"
|
| 121 |
hknight |
68 |
|
|
|
69 |
ElseIf NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
|
|
|
70 |
Page_Title = "ADD Runtime Dependency"
|
|
|
71 |
|
|
|
72 |
Else
|
|
|
73 |
Page_Title = ""
|
|
|
74 |
|
|
|
75 |
End If
|
| 119 |
ghuddy |
76 |
End Function
|
|
|
77 |
|
| 121 |
hknight |
78 |
' Gets a set of records each one being unique by pkg_id, each row having (pkg_id, pkg_name, and num_of_versions)
|
|
|
79 |
Function Get_Pkg_Names ( NNpkg_or_pvid_list, NNadd_type )
|
| 119 |
ghuddy |
80 |
|
| 121 |
hknight |
81 |
If NNadd_type = Cstr(enum_ADD_DEPENDENCIES) OR NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
|
|
|
82 |
' When adding dependencies, the NNpkg_or_pvid_list is a list of PV_ID's
|
|
|
83 |
Get_Pkg_Names = _
|
|
|
84 |
" SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
|
|
|
85 |
" FROM PACKAGE_VERSIONS pv,"&_
|
|
|
86 |
" PACKAGES pkg"&_
|
|
|
87 |
" WHERE pv.PV_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
|
|
|
88 |
" AND pv.PKG_ID (+) = pkg.PKG_ID"&_
|
|
|
89 |
" GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
|
|
|
90 |
Else
|
|
|
91 |
' When adding packages, the NNpkg_or_pvid_list is a list of PKG_ID's
|
|
|
92 |
Get_Pkg_Names = _
|
|
|
93 |
" SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
|
|
|
94 |
" FROM PACKAGE_VERSIONS pv,"&_
|
|
|
95 |
" PACKAGES pkg"&_
|
|
|
96 |
" WHERE pkg.PKG_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
|
|
|
97 |
" AND pv.PKG_ID (+) = pkg.PKG_ID"&_
|
|
|
98 |
" GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
|
|
|
99 |
End If
|
| 119 |
ghuddy |
100 |
End Function
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
Sub Get_All_Base_Views ( NNnewgroup_id, nPkg_id )
|
| 121 |
hknight |
104 |
Dim rsTemp, Query_String
|
|
|
105 |
|
|
|
106 |
Query_String = _
|
|
|
107 |
" SELECT vi.view_id, vi.view_name, bv.hint "&_
|
|
|
108 |
" FROM views vi,"&_
|
|
|
109 |
" ("&_
|
|
|
110 |
" SELECT DISTINCT rc.BASE_VIEW_ID, '> ' AS hint"&_
|
|
|
111 |
" FROM release_content rc,"&_
|
|
|
112 |
" package_versions pv"&_
|
|
|
113 |
" WHERE rc.pv_id = pv.pv_id"&_
|
|
|
114 |
" AND pv.pkg_id IN ( "& nPkg_id &" )"&_
|
|
|
115 |
" ) bv"&_
|
|
|
116 |
" WHERE UPPER(vi.base_view) = 'Y'"&_
|
|
|
117 |
" AND bv.BASE_VIEW_ID (+) = vi.VIEW_ID"&_
|
|
|
118 |
" ORDER BY vi.view_name ASC"
|
|
|
119 |
|
|
|
120 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
121 |
|
|
|
122 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
123 |
If NNnewgroup_id = Cstr( rsTemp.Fields("view_id") ) OR NOT IsNull(rsTemp("hint")) Then
|
|
|
124 |
Response.write "<option value='"& rsTemp("view_id") &"' selected>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
|
|
|
125 |
Else
|
|
|
126 |
Response.write "<option value='"& rsTemp("view_id") &"'>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
|
|
|
127 |
End If
|
|
|
128 |
|
|
|
129 |
rsTemp.MoveNext
|
|
|
130 |
WEnd
|
|
|
131 |
|
|
|
132 |
rsTemp.Close
|
|
|
133 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
134 |
End Sub
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
Sub Get_All_Personal_Views ( NNuser_id )
|
| 121 |
hknight |
138 |
Dim rsTemp, Query_String
|
|
|
139 |
If NNuser_id = "" Then Exit Sub
|
|
|
140 |
|
|
|
141 |
Query_String = _
|
|
|
142 |
" SELECT vi.view_id, vi.view_name"&_
|
|
|
143 |
" FROM view_settings vs,"&_
|
|
|
144 |
" views vi"&_
|
|
|
145 |
" WHERE vs.view_id = vi.view_id"&_
|
|
|
146 |
" AND vs.user_id = vi.owner_id "&_
|
|
|
147 |
" AND vs.user_id = "& NNuser_id &_
|
|
|
148 |
" AND vi.base_view = 'N'"&_
|
|
|
149 |
" ORDER BY UPPER(vi.view_name)"
|
|
|
150 |
|
|
|
151 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
152 |
|
|
|
153 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
154 |
Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& rsTemp.Fields("view_name") &"</option>"
|
|
|
155 |
|
|
|
156 |
rsTemp.MoveNext
|
|
|
157 |
WEnd
|
|
|
158 |
|
|
|
159 |
rsTemp.Close
|
|
|
160 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
161 |
End Sub
|
|
|
162 |
|
|
|
163 |
|
| 121 |
hknight |
164 |
' This function is only called when adding dependencies. It gets all of the items in the specified release
|
|
|
165 |
' and sets up dictionaries as follows:
|
|
|
166 |
'
|
|
|
167 |
' Dict Name key item
|
|
|
168 |
' ------------------------------------
|
|
|
169 |
' DDdictPkgId pv_id pkg_id
|
|
|
170 |
' DDdictPkgName pv_id pkg_name
|
|
|
171 |
' DDdictPkgVer pv_id pkg_version
|
|
|
172 |
' DDdictPkgExt pv_id v_ext
|
|
|
173 |
'
|
|
|
174 |
Sub Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, DDdictPkgId, DDdictPkgName, DDdictPkgVer, DDdictPkgExt )
|
|
|
175 |
Dim rsTemp, Query_String
|
|
|
176 |
|
|
|
177 |
If NNrtag_id = "" Then
|
|
|
178 |
Exit Sub
|
|
|
179 |
End If
|
|
|
180 |
|
|
|
181 |
Query_String = _
|
|
|
182 |
" SELECT pv.pkg_id, pkgs.pkg_name, pv.pkg_version, pv.pv_id, pv.v_ext"&_
|
|
|
183 |
" FROM release_content rc,"&_
|
|
|
184 |
" package_versions pv,"&_
|
|
|
185 |
" packages pkgs"&_
|
|
|
186 |
" WHERE rc.pv_id = pv.pv_id"&_
|
|
|
187 |
" AND pkgs.pkg_id = pv.pkg_id"&_
|
|
|
188 |
" AND rc.rtag_id = "& NNrtag_id &_
|
|
|
189 |
" AND pv.pv_id IN ( "& NNpv_id_list &" )"
|
|
|
190 |
|
|
|
191 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
192 |
|
|
|
193 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
194 |
|
|
|
195 |
DDdictPkgId.ADD Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_id"))
|
|
|
196 |
DDdictPkgName.ADD Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_name"))
|
|
|
197 |
DDdictPkgVer.ADD Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_version"))
|
|
|
198 |
If NOT IsNull(rsTemp("v_ext")) Then
|
|
|
199 |
DDdictPkgExt.ADD Cstr(rsTemp("pv_id")), Cstr(rsTemp("v_ext"))
|
|
|
200 |
Else
|
|
|
201 |
DDdictPkgExt.ADD Cstr(rsTemp("pv_id")), Cstr("")
|
|
|
202 |
End If
|
|
|
203 |
|
|
|
204 |
rsTemp.MoveNext
|
|
|
205 |
WEnd
|
|
|
206 |
|
|
|
207 |
rsTemp.Close
|
|
|
208 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
209 |
End Sub
|
|
|
210 |
|
|
|
211 |
|
| 121 |
hknight |
212 |
' This function is used when adding packages to a release. The function processes a list of package ID's
|
| 3959 |
dpurdie |
213 |
' and forms the HTML to display for each item, the name, all available full versions in a list box
|
| 121 |
hknight |
214 |
Sub Generate_Package_List ( NNpkg_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
|
|
|
215 |
|
| 3959 |
dpurdie |
216 |
Dim rsPkgs, hidePatches, currRsPkg, qparPkg_list
|
|
|
217 |
Dim spanPkgNameId
|
| 121 |
hknight |
218 |
Dim commonHTML
|
|
|
219 |
hidePatches = "hidepatches=true&"
|
|
|
220 |
|
|
|
221 |
If pkgInfoHash.Item ("is_patch") = "Y" Then hidePatches = ""
|
|
|
222 |
|
|
|
223 |
Set rsPkgs = OraDatabase.DbCreateDynaset( Get_Pkg_Names( NNpkg_list, NNadd_type ), cint(0))
|
|
|
224 |
While ((NOT rsPkgs.BOF) AND (NOT rsPkgs.EOF))
|
| 3959 |
dpurdie |
225 |
|
| 121 |
hknight |
226 |
currRsPkg = chr(34) & rsPkgs("pkg_id") & chr(34)
|
|
|
227 |
qparPkg_list = chr(34) & parPkg_list & chr(34)
|
|
|
228 |
|
|
|
229 |
' Begin table row
|
|
|
230 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
|
|
231 |
|
|
|
232 |
spanPkgNameId = "spanPkgName" & rsPkgs("pkg_id")
|
|
|
233 |
|
|
|
234 |
' Form package name
|
|
|
235 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
|
|
|
236 |
& "<span id='" & spanPkgNameId & "'>"& rsPkgs("pkg_name") &"</span></td>"
|
|
|
237 |
|
|
|
238 |
' setup some common html so that we can make the (full) Version field on the right-most column of the
|
|
|
239 |
' table row update on certain events taking place in the version base input box, and version extension
|
|
|
240 |
' drop down list box
|
| 3959 |
dpurdie |
241 |
commonHTML = rsPkgs("pkg_id") & "' onblur='updateVersion(" & currRsPkg & ");'" &_
|
|
|
242 |
" onchange='updateVersion(" & currRsPkg & ");'"
|
| 121 |
hknight |
243 |
|
| 3959 |
dpurdie |
244 |
SShtml_pkg_list = SShtml_pkg_list & "<td><select class='form_item' id='pkgn" & commonHTML & "name='pkgn" & rsPkgs("pkg_id") & "'>"
|
|
|
245 |
SShtml_pkg_list = SShtml_pkg_list & populateVersionList( rsPkgs("pkg_id") )
|
|
|
246 |
SShtml_pkg_list = SShtml_pkg_list & "</select></td>"
|
| 121 |
hknight |
247 |
|
|
|
248 |
SShtml_pkg_list = SShtml_pkg_list &"</td>"
|
|
|
249 |
|
|
|
250 |
' End table row
|
|
|
251 |
SShtml_pkg_list = SShtml_pkg_list &"</tr>"
|
|
|
252 |
|
|
|
253 |
rsPkgs.MoveNext
|
|
|
254 |
WEnd
|
| 119 |
ghuddy |
255 |
End Sub
|
| 121 |
hknight |
256 |
|
|
|
257 |
' This function deals with a PV_ID list, not a PKG_ID list. Hence, it is used for the ADD Dependencies user operation.
|
|
|
258 |
' The function was initially based on the Generate_Package_List() function, and then stripped back and reworked to use
|
|
|
259 |
' the result of the Get_Versions_From_Release() function, which now processes PV_ID lists also.
|
| 3959 |
dpurdie |
260 |
' Adding a dependency means taking the latest version in the release, there is no choice about it.
|
| 121 |
hknight |
261 |
Sub Generate_Version_List ( NNpv_id_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
|
|
|
262 |
|
|
|
263 |
Dim spanPkgNameId
|
|
|
264 |
Dim fullVersion
|
|
|
265 |
Dim i
|
|
|
266 |
|
|
|
267 |
' dictionaries and arrays
|
|
|
268 |
Dim dictPkgId, dictPkgVer, dictPkgExt, dictPkgName
|
|
|
269 |
Dim pv_ids, pkg_ids, versions, pkg_names
|
|
|
270 |
|
|
|
271 |
' create dictionaries
|
|
|
272 |
Set dictPkgId = CreateObject("Scripting.Dictionary")
|
|
|
273 |
Set dictPkgName = CreateObject("Scripting.Dictionary")
|
|
|
274 |
Set dictPkgVer = CreateObject("Scripting.Dictionary")
|
|
|
275 |
Set dictPkgExt = CreateObject("Scripting.Dictionary") ' This one assigned, and populated, but currently not used thereafter
|
|
|
276 |
|
|
|
277 |
' populate dictionaries
|
|
|
278 |
Call Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, dictPkgId, dictPkgName, dictPkgVer, dictPkgExt )
|
|
|
279 |
|
|
|
280 |
' get the columns we need from the dictionaries
|
|
|
281 |
pv_ids = dictPkgId.Keys
|
|
|
282 |
pkg_names = dictPkgName.Items
|
|
|
283 |
pkg_ids = dictPkgId.Items
|
|
|
284 |
versions = dictPkgVer.Items
|
|
|
285 |
|
|
|
286 |
' iterate through all the PV_ID's we found using the Get_Versions_From_Release() function
|
|
|
287 |
For i = 0 to ubound(pv_ids)
|
|
|
288 |
|
|
|
289 |
fullVersion = versions(i)
|
|
|
290 |
|
|
|
291 |
' Begin table row
|
|
|
292 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
|
|
293 |
|
|
|
294 |
' NOTE: the formation of this span name may result in more than one span of the same name in the HTML.
|
|
|
295 |
' This is because there may be >1 package version of the same package ID (eg sysbasetypes.mas, sysbasetypes.sea)
|
|
|
296 |
' being added as dependencies. It doesn't seem to matter though. It just reflects the ancestry of this code which
|
|
|
297 |
' used to be exclusively package ID focused, whereas now, it has a pv_id focus when dealing with dependencies.
|
|
|
298 |
spanPkgNameId = "spanPkgName" & pkg_names(i)
|
|
|
299 |
|
|
|
300 |
' Form package name
|
|
|
301 |
SShtml_pkg_list = SShtml_pkg_list & " <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
|
|
|
302 |
& " <span id='" & spanPkgNameId & "'>"& pkg_names(i) &"</span></td>"
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
' Form the (full) Version display field
|
|
|
306 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'>"
|
|
|
307 |
|
|
|
308 |
If fullVersion = "" Then
|
|
|
309 |
SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
|
|
|
310 |
& "' id='spanFullVersion" & pkg_ids(i) & "'> unset </span>"
|
|
|
311 |
Else
|
|
|
312 |
SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
|
|
|
313 |
& "' id='spanFullVersion" & pkg_ids(i) & "'>" & fullVersion & "</span>"
|
|
|
314 |
End If
|
|
|
315 |
|
|
|
316 |
SShtml_pkg_list = SShtml_pkg_list & "<input type='hidden' id='pkgn" & pkg_ids(i) _
|
|
|
317 |
& "' name='pkgn" & pkg_ids(i) & "' ' class='form_item' size='12' value='" & fullVersion & "'> "
|
|
|
318 |
|
|
|
319 |
' End table row
|
|
|
320 |
SShtml_pkg_list = SShtml_pkg_list &"</tr>"
|
|
|
321 |
Next
|
|
|
322 |
End Sub
|
|
|
323 |
|
| 3959 |
dpurdie |
324 |
// Create HTML to populate a form selection with versions numbers for a specified
|
|
|
325 |
// package. This could be done via AJAX but is currently done when the page is
|
|
|
326 |
// rendered.
|
|
|
327 |
Function populateVersionList(NNpkg_id)
|
|
|
328 |
Dim rsFind
|
|
|
329 |
Dim Query_String
|
|
|
330 |
Dim aVersions
|
|
|
331 |
Dim objSortHelper
|
|
|
332 |
Dim lastRow, i
|
|
|
333 |
|
| 121 |
hknight |
334 |
|
| 3959 |
dpurdie |
335 |
// First one - Use as a prompt
|
|
|
336 |
populateVersionList = "<option>-- Select Version --</option>"
|
|
|
337 |
|
|
|
338 |
Query_String = _
|
|
|
339 |
" SELECT DISTINCT pv.pkg_version, pv.dlocked "&_
|
|
|
340 |
" FROM PACKAGES pkg, package_versions pv"&_
|
|
|
341 |
" WHERE pkg.pkg_id = pv.pkg_id AND pkg.pkg_id = " & NNpkg_id
|
|
|
342 |
|
|
|
343 |
Set rsFind = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
344 |
If rsFind.RecordCount > 0 Then
|
|
|
345 |
|
|
|
346 |
aVersions = rsFind.GetRows()
|
|
|
347 |
lastRow = UBound( aVersions, 2 )
|
|
|
348 |
|
|
|
349 |
Set objSortHelper = New SortHelper
|
|
|
350 |
|
|
|
351 |
' Sort versions
|
|
|
352 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsFind.FieldIndex("pkg_version") )
|
|
|
353 |
|
|
|
354 |
' Descending order
|
|
|
355 |
For i = lastRow To 0 Step -1
|
|
|
356 |
Dim prefix
|
|
|
357 |
Dim text
|
|
|
358 |
|
|
|
359 |
text = aVersions( rsFind.FieldIndex("pkg_version"), i )
|
|
|
360 |
|
|
|
361 |
If aVersions( rsFind.FieldIndex("dlocked"), i ) = "Y" Then
|
|
|
362 |
prefix = "R "
|
|
|
363 |
Else
|
|
|
364 |
prefix = " "
|
|
|
365 |
End If
|
|
|
366 |
|
|
|
367 |
populateVersionList = populateVersionList &_
|
|
|
368 |
"<option value='"& text &"'>" & prefix & text & "</option>"
|
|
|
369 |
|
|
|
370 |
Next
|
|
|
371 |
Set objSortHelper = nothing
|
|
|
372 |
End If
|
|
|
373 |
|
|
|
374 |
rsFind.Close
|
|
|
375 |
Set rsFind = nothing
|
|
|
376 |
End Function
|
|
|
377 |
|
| 119 |
ghuddy |
378 |
%>
|
|
|
379 |
<%
|
|
|
380 |
If parPv_id <> "" Then
|
| 121 |
hknight |
381 |
Call Get_Pkg_Info ( parPv_id, NULL )
|
| 119 |
ghuddy |
382 |
End If
|
|
|
383 |
%>
|
|
|
384 |
<html>
|
|
|
385 |
<head>
|
|
|
386 |
<title>Release Manager</title>
|
|
|
387 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
388 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
389 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
390 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
391 |
<script language="JavaScript" src="images/common.js"></script>
|
| 121 |
hknight |
392 |
<script language="JavaScript" type="text/JavaScript">
|
|
|
393 |
<!--
|
| 3959 |
dpurdie |
394 |
|
| 121 |
hknight |
395 |
window.onload = function()
|
|
|
396 |
{
|
| 3959 |
dpurdie |
397 |
checkSeletion(document.getElementById("base_view_id"));
|
|
|
398 |
var versionObjectIds = getVersionObjectIds();
|
|
|
399 |
for( var iobj in versionObjectIds )
|
| 121 |
hknight |
400 |
{
|
| 3959 |
dpurdie |
401 |
updateVersion(versionObjectIds[iobj]);
|
| 121 |
hknight |
402 |
}
|
|
|
403 |
}
|
|
|
404 |
|
| 3959 |
dpurdie |
405 |
// getVersionObjectIds is only called when adding packages to a release.
|
| 121 |
hknight |
406 |
function getVersionObjectIds ()
|
|
|
407 |
{
|
|
|
408 |
var versionObjectIds = new Array(); // Memory leak?
|
|
|
409 |
|
|
|
410 |
<%
|
|
|
411 |
Dim rsPkgs3, versionObjectId
|
|
|
412 |
Set rsPkgs3 = OraDatabase.DbCreateDynaset( Get_Pkg_Names( parPkg_list, parAdd_type ), cint(0))
|
|
|
413 |
|
|
|
414 |
While ((NOT rsPkgs3.BOF) AND (NOT rsPkgs3.EOF))
|
| 3959 |
dpurdie |
415 |
versionObjectId = rsPkgs3("pkg_id")
|
| 121 |
hknight |
416 |
%>
|
|
|
417 |
versionObjectIds.push( "<%=versionObjectId%>" );
|
|
|
418 |
<%
|
|
|
419 |
rsPkgs3.MoveNext
|
|
|
420 |
Wend
|
|
|
421 |
rsPkgs3.Close()
|
|
|
422 |
%>
|
|
|
423 |
|
|
|
424 |
return versionObjectIds;
|
|
|
425 |
}
|
|
|
426 |
|
| 3959 |
dpurdie |
427 |
// CheckVersion is only called when adding packages to a release.
|
|
|
428 |
// Called before the form is submitted. Can validate the form
|
|
|
429 |
// Simply tests that all required fields have been entered
|
| 121 |
hknight |
430 |
function checkVersion ()
|
|
|
431 |
{
|
| 3959 |
dpurdie |
432 |
var isValid = checkSeletion(document.getElementById("base_view_id"));
|
|
|
433 |
var versionObjectIds = getVersionObjectIds();
|
| 121 |
hknight |
434 |
for( var iobj in versionObjectIds )
|
|
|
435 |
{
|
| 3959 |
dpurdie |
436 |
if (updateVersion(versionObjectIds[iobj]))
|
|
|
437 |
continue;
|
| 121 |
hknight |
438 |
|
| 3959 |
dpurdie |
439 |
isValid = false;
|
|
|
440 |
break;
|
|
|
441 |
}
|
| 121 |
hknight |
442 |
|
| 3959 |
dpurdie |
443 |
if (isValid) {
|
|
|
444 |
MM_showProgressBar();
|
|
|
445 |
}
|
|
|
446 |
else
|
|
|
447 |
{
|
| 121 |
hknight |
448 |
// failed - exit function, returning false for the form.
|
|
|
449 |
document.MM_returnValue = false;
|
| 3959 |
dpurdie |
450 |
MM_hideProgressBar();
|
|
|
451 |
alert ("Complete all selections");
|
| 121 |
hknight |
452 |
return false;
|
|
|
453 |
}
|
|
|
454 |
return true;
|
|
|
455 |
}
|
|
|
456 |
|
| 3959 |
dpurdie |
457 |
// updateVersion is only called when adding packages to a release.
|
| 121 |
hknight |
458 |
function updateVersion( myPkgId, myParPkg_list )
|
|
|
459 |
{
|
| 3959 |
dpurdie |
460 |
return checkSeletion(document.getElementById("pkgn" + myPkgId));
|
| 121 |
hknight |
461 |
}
|
|
|
462 |
|
|
|
463 |
//-->
|
|
|
464 |
</script>
|
| 119 |
ghuddy |
465 |
<!-- DROPDOWN MENUS -->
|
|
|
466 |
<!--#include file="_menu_def.asp"-->
|
|
|
467 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| 121 |
hknight |
468 |
<script language="JavaScript" src="images/tipster.js"></script>
|
|
|
469 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
| 119 |
ghuddy |
470 |
</head>
|
|
|
471 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
|
|
472 |
<!-- MENU LAYERS -------------------------------------->
|
| 121 |
hknight |
473 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
| 119 |
ghuddy |
474 |
</div>
|
|
|
475 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
476 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
477 |
<!----------------------------------------------------->
|
|
|
478 |
<!-- HEADER -->
|
|
|
479 |
<!--#include file="_header.asp"-->
|
|
|
480 |
<!-- BODY ---->
|
|
|
481 |
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
|
| 121 |
hknight |
482 |
<tr>
|
|
|
483 |
<td align="center" valign="top" background="images/bg_lght_gray.gif">
|
|
|
484 |
<!-- MIDDLE ---------------------------------------->
|
|
|
485 |
<table width="650" border="0" cellspacing="0" cellpadding="0">
|
|
|
486 |
<tr>
|
|
|
487 |
<td>
|
|
|
488 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
489 |
<tr>
|
|
|
490 |
<td width="1%"></td>
|
|
|
491 |
<td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
|
|
|
492 |
<td width="1%"></td>
|
|
|
493 |
</tr>
|
|
|
494 |
<tr>
|
|
|
495 |
<td width="1%"></td>
|
|
|
496 |
<td>
|
|
|
497 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
498 |
<tr>
|
|
|
499 |
<td nowrap class="form_ttl"><%=Page_Title ( parAdd_type )%></td>
|
|
|
500 |
<td align="right" valign="bottom"></td>
|
|
|
501 |
</tr>
|
|
|
502 |
</table>
|
| 119 |
ghuddy |
503 |
</td>
|
| 121 |
hknight |
504 |
<td width="1%"></td>
|
|
|
505 |
</tr>
|
|
|
506 |
<tr>
|
|
|
507 |
<td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif">
|
|
|
508 |
<img src="images/lbox_tl_cnr_b.gif" width="13" height="13">
|
|
|
509 |
</td>
|
|
|
510 |
<td background="images/lbox_bg_blue.gif" align="right">
|
|
|
511 |
<!-- Heading -->
|
|
|
512 |
<img src="images/h_trsp_dot.gif" width="1" height="20">
|
|
|
513 |
<!-- END Heading -->
|
|
|
514 |
</td>
|
|
|
515 |
<td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif">
|
|
|
516 |
<img src="images/lbox_tr_cnr_b.gif" width="13" height="13">
|
|
|
517 |
</td>
|
|
|
518 |
</tr>
|
|
|
519 |
<tr>
|
|
|
520 |
<td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
|
|
521 |
<td bgcolor="#FFFFFF" valign="top">
|
|
|
522 |
<!-- Body -->
|
|
|
523 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
524 |
<% 'Use the parPkg_list in two different ways. When adding dependencies, the list contains pv_id's.
|
|
|
525 |
'When adding packages it contains pkg_id's. Different functions deal with each situation.
|
|
|
526 |
If ( (parAdd_type <> Cstr(enum_ADD_DEPENDENCIES)) AND (parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES)) ) Then
|
|
|
527 |
Call Generate_Package_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
|
|
|
528 |
Else
|
|
|
529 |
Call Generate_Version_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
|
|
|
530 |
End If%>
|
|
|
531 |
|
|
|
532 |
<%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
|
|
|
533 |
<form name="addpkg" id="addpkg" method="post" action="_add_pkgs_to_release.asp" onSubmit="return checkVersion();">
|
|
|
534 |
<%'----------- Base View --------------%>
|
|
|
535 |
<tr>
|
|
|
536 |
<td width="1%" nowrap class="form_group" valign="bottom"></td>
|
|
|
537 |
<td nowrap width="100%" align="right" class="form_step"> </td>
|
|
|
538 |
</tr>
|
|
|
539 |
<tr>
|
|
|
540 |
<td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Base View</td>
|
|
|
541 |
</tr>
|
|
|
542 |
<tr>
|
|
|
543 |
<td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
|
| 3959 |
dpurdie |
544 |
<select name="base_view_id" id="base_view_id" class="form_item" onblur="checkSeletion(this);" onchange="checkSeletion(this);">
|
| 121 |
hknight |
545 |
<option></option>
|
|
|
546 |
<%Call Get_All_Base_Views( parBase_view_id, parPkg_list )%>
|
|
|
547 |
</select>
|
|
|
548 |
|
|
|
549 |
<br>
|
|
|
550 |
<span class="rep_small">NOTE: Symbol '>' in Base Views drop-down list is a suggestion where to place selected package(s).</span>
|
|
|
551 |
</td>
|
|
|
552 |
</tr>
|
|
|
553 |
<tr>
|
|
|
554 |
<td width="1%" nowrap class="form_group" valign="bottom"></td>
|
|
|
555 |
<td nowrap width="100%" align="right" class="form_step"><br></td>
|
|
|
556 |
</tr>
|
|
|
557 |
<%'----------- Private View --------------%>
|
|
|
558 |
<%If QStrPar("Pview") <> "disable" Then%>
|
|
|
559 |
<tr>
|
|
|
560 |
<td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Personal View</td>
|
|
|
561 |
</tr>
|
|
|
562 |
<tr>
|
|
|
563 |
<td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
|
|
|
564 |
<select name="personal_view_id" class="form_item">
|
|
|
565 |
<option value="">None</option>
|
|
|
566 |
<%Call Get_All_Personal_Views( objAccessControl.UserId )%>
|
|
|
567 |
</select>
|
|
|
568 |
</td>
|
|
|
569 |
</tr>
|
|
|
570 |
<tr>
|
|
|
571 |
<td width="1%" nowrap class="form_group" valign="bottom"></td>
|
|
|
572 |
<td nowrap width="100%" align="right" class="form_step"><br></td>
|
|
|
573 |
</tr>
|
|
|
574 |
<%End If%>
|
|
|
575 |
<%'---------------------------------------%>
|
|
|
576 |
<%Else%>
|
|
|
577 |
<%If parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
|
|
|
578 |
<form name="addpkg" method="post" action="_add_runtime_dependencies.asp" onSubmit="return true">
|
|
|
579 |
<%Else%>
|
|
|
580 |
<form name="addpkg" method="post" action="_update_dependencies.asp" onSubmit="return true">
|
|
|
581 |
<%End If%>
|
|
|
582 |
<tr>
|
|
|
583 |
<td colspan="2" width="1%" nowrap class="form_field">
|
|
|
584 |
<%=pkgInfoHash.Item ("pkg_name")%> <%=pkgInfoHash.Item ("pkg_version")%>
|
|
|
585 |
</td>
|
|
|
586 |
</tr>
|
|
|
587 |
<%End If%>
|
|
|
588 |
|
|
|
589 |
<tr>
|
|
|
590 |
<td colspan="2" width="1%" nowrap class="form_field">
|
|
|
591 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
592 |
<tr>
|
|
|
593 |
<td background="images/bg_form_lightbluedark.gif" nowrap width="10%" class="form_field">Package Name
|
|
|
594 |
<img src="images/h_trsp_dot.gif" width="1" height="20" align="absmiddle">
|
|
|
595 |
</td>
|
| 3959 |
dpurdie |
596 |
<td background="images/bg_form_lightbluedark.gif" nowrap width="40%" class="form_field">Version
|
|
|
597 |
<%If parAdd_type <> Cstr(enum_ADD_DEPENDENCIES) AND parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
|
|
|
598 |
<a onmouseout="formTips.hide()" onmouseover="formTips.show('existingVersion')" href="javascript:;">
|
|
|
599 |
<img width="12" hspace="2" height="12" border="0" align="absmiddle" src="images/i_help.gif" />
|
|
|
600 |
</a>
|
| 121 |
hknight |
601 |
<%End If%>
|
| 3959 |
dpurdie |
602 |
</td>
|
| 121 |
hknight |
603 |
</tr>
|
|
|
604 |
<%=HTML_pkg_list%>
|
|
|
605 |
<tr>
|
|
|
606 |
<td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
|
|
|
607 |
<td></td>
|
|
|
608 |
</tr>
|
|
|
609 |
</table>
|
|
|
610 |
</td>
|
|
|
611 |
</tr>
|
|
|
612 |
<tr>
|
|
|
613 |
<td colspan="2" nowrap class="form_field">
|
|
|
614 |
<input type="reset" name="btn" value="« Back" class="form_btn" onClick="history.back();">
|
|
|
615 |
<input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.go(-3);">
|
|
|
616 |
<input type="submit" name="btn" value=" Add " class="form_btn">
|
| 5173 |
dpurdie |
617 |
<%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
|
|
|
618 |
<span><input type="checkbox" name="iMode" value="pending">Add to Pending</span>
|
|
|
619 |
<%End If%>
|
| 121 |
hknight |
620 |
<SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;" class="body_scol">
|
|
|
621 |
<img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
|
|
|
622 |
</SPAN>
|
|
|
623 |
<br> <br>
|
|
|
624 |
</td>
|
|
|
625 |
</tr>
|
|
|
626 |
<input type="hidden" name="update_type" value="add_custom">
|
|
|
627 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
628 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
629 |
<input type="hidden" name="pkg_list" value="<%=parPkg_list%>">
|
|
|
630 |
</form>
|
|
|
631 |
</table>
|
|
|
632 |
<!-- END Body-->
|
|
|
633 |
</td>
|
|
|
634 |
<td width="1%" background="images/lbox_bgside_white.gif"> </td>
|
|
|
635 |
</tr>
|
|
|
636 |
<tr>
|
|
|
637 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom">
|
|
|
638 |
<img src="images/lbox_bl_cnr_b.gif" width="13" height="13">
|
|
|
639 |
</td>
|
|
|
640 |
<td background="images/lbox_bg_blue.gif"></td>
|
|
|
641 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right">
|
|
|
642 |
<img src="images/lbox_br_cnr_b.gif" width="13" height="13">
|
|
|
643 |
</td>
|
|
|
644 |
</tr>
|
| 119 |
ghuddy |
645 |
</table>
|
| 121 |
hknight |
646 |
</td>
|
|
|
647 |
</tr>
|
|
|
648 |
</table>
|
|
|
649 |
<!-------------------------------------------------->
|
|
|
650 |
</td>
|
|
|
651 |
</tr>
|
|
|
652 |
<tr>
|
|
|
653 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
|
|
654 |
<!-- FOOTER -->
|
|
|
655 |
<!--#include file="_footer.asp"-->
|
|
|
656 |
</td>
|
|
|
657 |
</tr>
|
| 119 |
ghuddy |
658 |
</table>
|
|
|
659 |
</body>
|
|
|
660 |
</html>
|
|
|
661 |
<%
|
|
|
662 |
Call Destroy_All_Objects
|
| 121 |
hknight |
663 |
%>
|