| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' Package Information
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/formating.asp"-->
|
|
|
14 |
<!--#include file="common/qstr.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
17 |
<!--#include file="common/_popup_window_common.asp"-->
|
| 7286 |
dpurdie |
18 |
<!--#include file="common/_form_window_common.asp"-->
|
| 5357 |
dpurdie |
19 |
<%
|
|
|
20 |
' Set rfile parameter. This is a return page after Login
|
|
|
21 |
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
|
|
|
22 |
'------------ ACCESS CONTROL ------------------
|
|
|
23 |
%>
|
|
|
24 |
<!--#include file="_access_control_login.asp"-->
|
|
|
25 |
<!--#include file="_access_control_general.asp"-->
|
|
|
26 |
<!--#include file="_access_control_project.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim parPv_id
|
|
|
30 |
Dim query
|
|
|
31 |
Dim rsQry, rsTemp
|
|
|
32 |
Dim checked
|
|
|
33 |
Dim FRdeployableYES, FRdeployableNO
|
|
|
34 |
Dim pageIsEditable, criticalSectionIsEditable
|
|
|
35 |
Dim disableCriticalSectionEdit
|
|
|
36 |
Dim Query_String
|
|
|
37 |
Dim parVCSTag
|
|
|
38 |
Dim parBSName
|
|
|
39 |
Dim submit_action_url
|
|
|
40 |
Dim on_submit_validation
|
|
|
41 |
Dim sDefaultLabel, sLabel, sLabelReadOnly
|
|
|
42 |
Dim isWIP
|
|
|
43 |
'------------ Constants Declaration -----------
|
|
|
44 |
'------------ Variable Init -------------------
|
|
|
45 |
parPv_id = QStrPar("pv_id")
|
|
|
46 |
parVCSTag = QStrPar("vcs_tag")
|
|
|
47 |
parBSName = QStrPar("bs_name")
|
|
|
48 |
'----------------------------------------------
|
|
|
49 |
%>
|
|
|
50 |
<%
|
|
|
51 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
52 |
' Function to get the build standard name (eg. JATS) from a build standard ID
|
|
|
53 |
Function bs_name_from_bs_id( nBs_Id )
|
|
|
54 |
Dim rsTemp, Query_String
|
|
|
55 |
|
|
|
56 |
bs_name_from_bs_id = "NONE"
|
|
|
57 |
|
|
|
58 |
If NOT IsNull(nBs_Id) Then
|
|
|
59 |
Query_String = " SELECT * FROM build_standards WHERE bs_id = "& nBs_Id
|
|
|
60 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
61 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
62 |
bs_name_from_bs_id = rsTemp("bs_name")
|
|
|
63 |
End If
|
|
|
64 |
End If
|
|
|
65 |
End Function
|
|
|
66 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
67 |
' Function to get the build standard ID from a build standard name (eg. JATS)
|
|
|
68 |
Function bs_id_from_bs_name( nBs_Name )
|
|
|
69 |
Dim rsTemp, Query_String
|
|
|
70 |
|
|
|
71 |
bs_id_from_bs_name = 0
|
|
|
72 |
|
|
|
73 |
Query_String = " SELECT * FROM build_standards WHERE bs_name = '"& nBs_Name &"'"
|
|
|
74 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
75 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
76 |
bs_id_from_bs_name = rsTemp("bs_id")
|
|
|
77 |
End If
|
|
|
78 |
End Function
|
|
|
79 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
80 |
' Function to get the Version Control System type ID for ClearCase, based on the assumption that the TAG used for
|
|
|
81 |
' ClearCase is 'CC'
|
|
|
82 |
'Function get_clearcase_vcs_type_id()
|
|
|
83 |
' Dim rsTemp, Query_String
|
|
|
84 |
'
|
|
|
85 |
' Query_String = _
|
|
|
86 |
' " SELECT * FROM VCS_TYPE WHERE tag = 'CC'"
|
|
|
87 |
'
|
|
|
88 |
' Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
89 |
' If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
90 |
' get_clearcase_vcs_type_id = rsTemp("vcs_type_id")
|
|
|
91 |
' Else
|
|
|
92 |
' Call RaiseMsg(enum_MSG_ERROR, "Database is missing a VCS setting for Name: ClearCase, Tag: CC")
|
|
|
93 |
' End If
|
|
|
94 |
' rsTemp.Close
|
|
|
95 |
' Set rsTemp = nothing
|
|
|
96 |
'End Function
|
|
|
97 |
|
|
|
98 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
99 |
' Function to get the Version Control System type ID for Subversion, based on the assumption that the TAG used for
|
|
|
100 |
' Subversion is 'SVN'
|
|
|
101 |
Function get_subversion_vcs_type_id()
|
|
|
102 |
Dim rsTemp, Query_String
|
|
|
103 |
|
|
|
104 |
Query_String = _
|
|
|
105 |
" SELECT * FROM VCS_TYPE WHERE tag = 'SVN'"
|
|
|
106 |
|
|
|
107 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
108 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
109 |
get_subversion_vcs_type_id = rsTemp("vcs_type_id")
|
|
|
110 |
Else
|
|
|
111 |
Call RaiseMsg(enum_MSG_ERROR, "Database is missing a VCS setting for Name: Subversion, Tag: SVN")
|
|
|
112 |
End If
|
|
|
113 |
rsTemp.Close
|
|
|
114 |
Set rsTemp = nothing
|
|
|
115 |
End Function
|
|
|
116 |
|
|
|
117 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
118 |
' Function to get the Version Control System type ID for Uncontrolled, based on the assumption that the TAG used for
|
|
|
119 |
' ClearCase is 'UC'
|
|
|
120 |
Function get_uncontrolled_vcs_type_id()
|
|
|
121 |
Dim rsTemp, Query_String
|
|
|
122 |
|
|
|
123 |
Query_String = _
|
|
|
124 |
" SELECT * FROM VCS_TYPE WHERE tag = 'UC'"
|
|
|
125 |
|
|
|
126 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
127 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
128 |
get_uncontrolled_vcs_type_id = rsTemp("vcs_type_id")
|
|
|
129 |
Else
|
|
|
130 |
Call RaiseMsg(enum_MSG_ERROR, "Database is missing a VCS setting for Name: Uncontrolled, Tag: UC")
|
|
|
131 |
End If
|
|
|
132 |
rsTemp.Close
|
|
|
133 |
Set rsTemp = nothing
|
|
|
134 |
End Function
|
|
|
135 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
136 |
Sub Get_Form_Details( nPv_id, ByRef objDetails )
|
|
|
137 |
Dim rsTemp, Query_String
|
|
|
138 |
|
|
|
139 |
' Dim CC_vcs_type_id
|
|
|
140 |
Dim SVN_vcs_type_id
|
|
|
141 |
Dim UC_vcs_type_id
|
|
|
142 |
|
|
|
143 |
' Get VCS type IDs to use when evaluating legacy rows created before the introduction of the VCS tables and logic.
|
|
|
144 |
' These get uses in the query (see below) in the CASE statement.
|
|
|
145 |
' CC_vcs_type_id = get_clearcase_vcs_type_id()
|
|
|
146 |
SVN_vcs_type_id = get_subversion_vcs_type_id
|
|
|
147 |
UC_vcs_type_id = get_uncontrolled_vcs_type_id()
|
|
|
148 |
|
|
|
149 |
Query_String = _
|
|
|
150 |
" SELECT pkg.pkg_name, pv.pkg_version, pv.pkg_label, pv.src_path, pv.pv_description,"&_
|
|
|
151 |
" pv.pv_overview, pv.v_ext, is_deployable, is_build_env_required, pv.build_type,"&_
|
|
|
152 |
" pv.change_type, pv.bs_id, pv.dlocked,"&_
|
|
|
153 |
" (CASE WHEN pkg_label = 'N/A' AND pv.vcs_type_id IS NULL THEN "& UC_vcs_type_id &_
|
|
|
154 |
" WHEN pv.vcs_type_id IS NULL THEN " & SVN_vcs_type_id &_
|
|
|
155 |
" ELSE pv.vcs_type_id END) AS vcs_type_id "&_
|
|
|
156 |
" FROM package_versions pv, packages pkg"&_
|
|
|
157 |
" WHERE pv.pkg_id = pkg.pkg_id"&_
|
|
|
158 |
" AND pv_id = "& nPv_id
|
|
|
159 |
|
|
|
160 |
|
|
|
161 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
162 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
163 |
objDetails.Item("pkg_name") = rsTemp("pkg_name")
|
|
|
164 |
objDetails.Item("pkg_version") = rsTemp("pkg_version")
|
|
|
165 |
objDetails.Item("pkg_label") = rsTemp("pkg_label")
|
|
|
166 |
objDetails.Item("src_path") = rsTemp("src_path")
|
|
|
167 |
objDetails.Item("pv_description") = rsTemp("pv_description")
|
|
|
168 |
objDetails.Item("pv_overview") = rsTemp("pv_overview")
|
|
|
169 |
objDetails.Item("v_ext") = rsTemp("v_ext")
|
|
|
170 |
objDetails.Item("is_deployable") = rsTemp("is_deployable")
|
|
|
171 |
objDetails.Item("is_build_env_required") = rsTemp("is_build_env_required")
|
|
|
172 |
objDetails.Item("build_type") = rsTemp("build_type")
|
|
|
173 |
objDetails.Item("change_type") = rsTemp("change_type")
|
|
|
174 |
objDetails.Item("bs_id") = rsTemp("bs_id")
|
|
|
175 |
objDetails.Item("dlocked") = rsTemp("dlocked")
|
|
|
176 |
objDetails.Item("vcs_type_id") = rsTemp("vcs_type_id")
|
|
|
177 |
|
|
|
178 |
rsTemp.Close
|
|
|
179 |
|
|
|
180 |
' This code allows the form to be altered by the user from the original build std configuration to a new
|
|
|
181 |
' one without having to update the database - we only want to do that when the user hits the
|
|
|
182 |
' submit button. The relevant fields in the objDetails are obtained in different ways accordingly.
|
|
|
183 |
If IsNull(parBSName) OR parBSName = "" Then
|
|
|
184 |
objDetails.Item("bs_name") = bs_name_from_bs_id( objDetails.Item("bs_id") )
|
|
|
185 |
Else
|
|
|
186 |
objDetails.Item("bs_id") = bs_id_from_bs_name( parBSName )
|
|
|
187 |
objDetails.Item("bs_name") = parBSName
|
|
|
188 |
End If
|
|
|
189 |
|
|
|
190 |
' Re-evaluate the is_build_env_required flag setting based on the possibly updated bs_name
|
|
|
191 |
If UCase(objDetails.Item("bs_name")) = "NONE" Then
|
|
|
192 |
objDetails.Item("is_build_env_required") = "N"
|
|
|
193 |
Else
|
|
|
194 |
objDetails.Item("is_build_env_required") = "Y"
|
|
|
195 |
End If
|
|
|
196 |
|
|
|
197 |
' This code allows the form to be altered by the user from the original VCS configuration to a new
|
|
|
198 |
' one without having to update the database - we only want to do that when the user hits the
|
|
|
199 |
' submit button. The relevant fields in the objDetails are obtained in different ways accordingly.
|
|
|
200 |
If IsNull(parVCSTag) OR parVCSTag = "" Then
|
|
|
201 |
call vcs_info_from_vcs_type_id( objDetails.Item("vcs_type_id"), objDetails )
|
|
|
202 |
Else
|
|
|
203 |
call vcs_info_from_vcs_tag( parVCSTag, objDetails )
|
|
|
204 |
End If
|
|
|
205 |
|
|
|
206 |
End If
|
|
|
207 |
|
|
|
208 |
rsTemp.Close
|
|
|
209 |
Set rsTemp = Nothing
|
|
|
210 |
End Sub
|
|
|
211 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
212 |
' Updates the database, specifically the is_build_env_required flag setting in the package_versions table
|
|
|
213 |
' The update is only performed if it is needed, ie. if the value is already correct, no update is needed.
|
|
|
214 |
Sub UpdateIsBuildEnvRequired( nPv_id, nBs_name )
|
|
|
215 |
Dim rsTemp, Query_String
|
|
|
216 |
|
|
|
217 |
Query_String = _
|
|
|
218 |
" SELECT bs_id, is_build_env_required"&_
|
|
|
219 |
" FROM package_versions"&_
|
|
|
220 |
" WHERE pv_id = "& nPv_id
|
|
|
221 |
|
|
|
222 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
223 |
|
|
|
224 |
If (UCase(nBs_name) = "NONE") AND (IsNull(rsTemp("is_build_env_required")) OR (rsTemp("is_build_env_required") <> "N")) Then
|
|
|
225 |
rsTemp.Edit
|
|
|
226 |
rsTemp.Fields("bs_id").Value = rsTemp("bs_id")
|
|
|
227 |
rsTemp.Fields("is_build_env_required").Value = "N"
|
|
|
228 |
rsTemp.Update
|
|
|
229 |
ElseIf (UCase(nBs_name) <> "NONE") AND (IsNull(rsTemp("is_build_env_required")) OR (rsTemp("is_build_env_required") <> "Y")) Then
|
|
|
230 |
rsTemp.Edit
|
|
|
231 |
rsTemp.Fields("bs_id").Value = rsTemp("bs_id")
|
|
|
232 |
rsTemp.Fields("is_build_env_required").Value = "Y"
|
|
|
233 |
rsTemp.Update
|
|
|
234 |
End If
|
|
|
235 |
|
|
|
236 |
rsTemp.Close
|
|
|
237 |
Set rsTemp = nothing
|
|
|
238 |
End Sub
|
|
|
239 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
240 |
' Deletes the rows belonging to the current PV_ID, from the package_build_info table.
|
|
|
241 |
' This is normally done in preparation for updating the package_build_info table based on the latest
|
|
|
242 |
' (and possibly updated) build standard for the current PV_ID.
|
|
|
243 |
Sub DeletePackageBuildInfo( nPv_id )
|
|
|
244 |
|
|
|
245 |
On Error Resume Next
|
|
|
246 |
objEH.TryORA ( OraSession )
|
|
|
247 |
|
|
|
248 |
OraDatabase.ExecuteSQL _
|
|
|
249 |
"DELETE FROM PACKAGE_BUILD_INFO WHERE PV_ID ="& nPv_id
|
|
|
250 |
|
|
|
251 |
objEH.CatchORA ( OraSession )
|
|
|
252 |
|
|
|
253 |
End Sub
|
|
|
254 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
255 |
' Updates the vcs_type_id column for the current PV_ID, in the package_versions table.
|
|
|
256 |
' The update is only performed if it is necessary, ie. the user has changed the setting via the form, or the existing
|
|
|
257 |
' value is not yet assigned.
|
|
|
258 |
Sub UpdateVCS ( nPv_id, nVcs_type_id, nVcs_name, nVcs_tag )
|
|
|
259 |
Dim rsTemp, Query_String
|
|
|
260 |
Dim new_bs_id
|
|
|
261 |
|
|
|
262 |
Query_String = _
|
|
|
263 |
" SELECT vcs_type_id"&_
|
|
|
264 |
" FROM package_versions"&_
|
|
|
265 |
" WHERE pv_id = "& nPv_id
|
|
|
266 |
|
|
|
267 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
268 |
|
|
|
269 |
' compare new bs_id to existing bs_id to see if a change has been requested
|
|
|
270 |
If nVcs_type_id <> rsTemp("vcs_type_id") OR IsNull(rsTemp("vcs_type_id")) Then
|
|
|
271 |
|
|
|
272 |
'update fields
|
|
|
273 |
rsTemp.Edit
|
|
|
274 |
rsTemp.Fields("vcs_type_id").Value = nVcs_type_id
|
|
|
275 |
rsTemp.Update
|
|
|
276 |
|
|
|
277 |
Call Log_Action ( nPv_id, "vcs_type_id_update", "VCS Type ID Update: " & nVcs_name )
|
|
|
278 |
End If
|
|
|
279 |
|
|
|
280 |
rsTemp.Close
|
|
|
281 |
Set rsTemp = nothing
|
|
|
282 |
End Sub
|
|
|
283 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
284 |
' Updates the bs_id column value for the current PV_ID in the package_versions table.
|
|
|
285 |
' The update is only performed if it is necessary, ie. the user has changed the setting via the form, or the existing
|
|
|
286 |
' value is not yet assigned.
|
|
|
287 |
Sub UpdateBuildStandard ( nPv_id, nBs_name )
|
|
|
288 |
Dim rsTemp, Query_String
|
|
|
289 |
Dim new_bs_id
|
|
|
290 |
|
|
|
291 |
' get the new bs_id from the bs_name parameter
|
|
|
292 |
new_bs_id = bs_id_from_bs_name(nBs_name)
|
|
|
293 |
|
|
|
294 |
Query_String = _
|
|
|
295 |
" SELECT bs_id, is_build_env_required"&_
|
|
|
296 |
" FROM package_versions"&_
|
|
|
297 |
" WHERE pv_id = "& nPv_id
|
|
|
298 |
|
|
|
299 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
300 |
|
|
|
301 |
' compare new bs_id to existing bs_id to see if a change has been requested
|
|
|
302 |
If new_bs_id <> rsTemp("bs_id") OR IsNull(rsTemp("bs_id")) Then
|
|
|
303 |
|
|
|
304 |
'update fields
|
|
|
305 |
rsTemp.Edit
|
|
|
306 |
rsTemp.Fields("bs_id").Value = new_bs_id
|
|
|
307 |
|
|
|
308 |
If UCase(nBs_name) = "NONE" Then
|
|
|
309 |
rsTemp.Fields("is_build_env_required").Value = "N"
|
|
|
310 |
Else
|
|
|
311 |
rsTemp.Fields("is_build_env_required").Value = "Y"
|
|
|
312 |
End If
|
|
|
313 |
rsTemp.Update
|
|
|
314 |
|
|
|
315 |
' Clear out the build info table of entries for this PV_ID.
|
|
|
316 |
Call DeletePackageBuildInfo(nPv_id)
|
|
|
317 |
|
|
|
318 |
Call Log_Action ( nPv_id, "build_standard_update", "Build Standard Update: " & nBs_name )
|
|
|
319 |
End If
|
|
|
320 |
|
|
|
321 |
rsTemp.Close
|
|
|
322 |
Set rsTemp = nothing
|
|
|
323 |
End Sub
|
|
|
324 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
325 |
' Updates the package_build_info table for the current PV_ID, based on the latest build_standard settings made
|
|
|
326 |
' by the user on the form
|
|
|
327 |
Sub UpdatePackageBuildInfo( NNpv_id )
|
|
|
328 |
'--- Set Build Types ---
|
|
|
329 |
Dim aBuildEnvList
|
|
|
330 |
Dim OraParameter
|
|
|
331 |
Dim nBuildMachine
|
|
|
332 |
|
|
|
333 |
' Before doing inserts for this PV_ID into the package_build_info table, we need to delete any existing
|
|
|
334 |
' rows for this PV_ID. This may have already been done if the user has changed the build standard, but
|
|
|
335 |
' there is no guarantee at this point that they have done that during this forms display.
|
|
|
336 |
Call DeletePackageBuildInfo( NNpv_id )
|
|
|
337 |
|
|
|
338 |
OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
339 |
OraDatabase.Parameters.Add "BM_ID", 0, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
340 |
OraDatabase.Parameters.Add "BSA_ID", 0, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
341 |
|
|
|
342 |
Set OraParameter = OraDatabase.Parameters
|
|
|
343 |
|
|
|
344 |
aBuildEnvList = Split( Replace( Request("be_id_list"), " ", "" ) , ",")
|
|
|
345 |
|
|
|
346 |
On Error Resume Next
|
|
|
347 |
objEH.TryORA ( OraSession )
|
|
|
348 |
|
|
|
349 |
For Each nBuildMachine In aBuildEnvList
|
|
|
350 |
|
|
|
351 |
OraParameter("BM_ID").Value = nBuildMachine
|
|
|
352 |
OraParameter("BSA_ID").Value = Request("build_type_comb_"& nBuildMachine)
|
|
|
353 |
|
|
|
354 |
If Err.Number = 0 Then
|
|
|
355 |
OraDatabase.ExecuteSQL("begin INSERT INTO PACKAGE_BUILD_INFO ( PV_ID, BM_ID, BSA_ID ) "&_
|
|
|
356 |
" VALUES( :PV_ID, :BM_ID, :BSA_ID ); end;")
|
|
|
357 |
End If
|
|
|
358 |
Next
|
|
|
359 |
|
|
|
360 |
objEH.CatchORA ( OraSession )
|
|
|
361 |
|
|
|
362 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
363 |
OraDatabase.Parameters.Remove "BM_ID"
|
|
|
364 |
OraDatabase.Parameters.Remove "BSA_ID"
|
|
|
365 |
End Sub
|
|
|
366 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
367 |
' This is the overall database update function called when the user hits the submit button on the form.
|
|
|
368 |
' It does some minor updates itself, but most of the work is done in subroutines.
|
|
|
369 |
' No attempt is made to keep the entire set of updates atomic. There really is no need to do that.
|
|
|
370 |
Sub Update_Pkg_Info ( NNpv_id, NNdeployable, SSLabel, SSPath, SSdesc, SSoverview )
|
|
|
371 |
Dim rsTemp, Query_String
|
|
|
372 |
|
|
|
373 |
On Error Resume Next
|
|
|
374 |
|
|
|
375 |
Query_String = _
|
|
|
376 |
" SELECT pkg_label, src_path, pv_description, pv_overview, is_deployable "&_
|
|
|
377 |
" FROM package_versions"&_
|
|
|
378 |
" WHERE pv_id = "& NNpv_id
|
|
|
379 |
|
|
|
380 |
If SSdesc = "" Then SSdesc = NULL
|
|
|
381 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
382 |
|
|
|
383 |
rsTemp.Edit
|
|
|
384 |
|
|
|
385 |
' Only update build critical sections (label, source path) if allowed
|
|
|
386 |
If criticalSectionIsEditable Then
|
|
|
387 |
rsTemp.Fields("pkg_label").Value = SSLabel
|
|
|
388 |
rsTemp.Fields("src_path").Value = SSPath
|
|
|
389 |
End If
|
|
|
390 |
|
|
|
391 |
' Update non-build critical sections
|
|
|
392 |
rsTemp.Fields("pv_description").Value = SSdesc
|
|
|
393 |
rsTemp.Fields("pv_overview").Value = SSoverview
|
|
|
394 |
|
|
|
395 |
If NNdeployable = "1" Then
|
|
|
396 |
rsTemp.Fields("is_deployable").Value = "Y"
|
|
|
397 |
Else
|
|
|
398 |
rsTemp.Fields("is_deployable").Value = NULL
|
|
|
399 |
End If
|
|
|
400 |
|
|
|
401 |
rsTemp.Update
|
|
|
402 |
|
|
|
403 |
rsTemp.Close
|
|
|
404 |
Set rsTemp = nothing
|
|
|
405 |
|
|
|
406 |
' Only update build critical sections if allowed
|
|
|
407 |
If criticalSectionIsEditable Then
|
|
|
408 |
|
|
|
409 |
' Update the VCS if necessary for this PV_ID
|
|
|
410 |
Call UpdateVCS( NNpv_id, objFormCollector.Item("vcs_type_id"), objFormCollector.Item("vcs_name"), objFormCollector.Item("vcs_tag") )
|
|
|
411 |
|
|
|
412 |
' Update the build standard if necessary for this PV_ID
|
|
|
413 |
Call UpdateBuildStandard( NNpv_id, objFormCollector.Item("bs_name") )
|
|
|
414 |
|
|
|
415 |
' Update the 'is build_env_required' flag for this PV_ID
|
|
|
416 |
Call UpdateIsBuildEnvRequired( NNpv_id, objFormCollector.Item("bs_name") )
|
|
|
417 |
|
|
|
418 |
' Update the package_build_info table for this PV_ID
|
|
|
419 |
Call UpdatePackageBuildInfo( NNpv_id )
|
|
|
420 |
End If
|
|
|
421 |
End Sub
|
|
|
422 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
423 |
Function ShowHideBuildType( sBuildEnvChecked )
|
|
|
424 |
|
|
|
425 |
ShowHideBuildType = "style='display:none;'"
|
|
|
426 |
|
|
|
427 |
If (sBuildEnvChecked <> "") Then
|
|
|
428 |
ShowHideBuildType = "style='display:block;'"
|
|
|
429 |
End If
|
|
|
430 |
|
|
|
431 |
End Function
|
|
|
432 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
433 |
' Renders the HTML for the build standard addendum drop down list boxes, ie. Prod, Debug, Prod+Debug, Java 1.4, Java 1.5, etc.
|
|
|
434 |
Sub RenderBuildTypeCombo( nBuildAddendum, nBuildMachine, nBuildStandard )
|
|
|
435 |
|
|
|
436 |
If nBuildStandard <> "" Then
|
|
|
437 |
Query_String = "SELECT * FROM build_standards_addendum WHERE bs_id ="& nBuildStandard & " ORDER BY bsa_id DESC"
|
|
|
438 |
|
|
|
439 |
'Response.Write Query_String
|
|
|
440 |
Response.Write "<select name='build_type_comb_"& nBuildMachine &"' class='form_item'"& disableCriticalSectionEdit &">"
|
|
|
441 |
|
|
|
442 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
443 |
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
|
|
|
444 |
|
|
|
445 |
If nBuildAddendum = rsTemp.Fields("bsa_id") Then
|
|
|
446 |
Response.write "<option value='"& rsTemp.Fields("bsa_id") &"' selected>"& rsTemp.Fields("bsa_name") &"</option>"
|
|
|
447 |
Else
|
|
|
448 |
Response.write "<option value='"& rsTemp.Fields("bsa_id") &"'>"& rsTemp.Fields("bsa_name") &"</option>"
|
|
|
449 |
End If
|
|
|
450 |
rsTemp.MoveNext
|
|
|
451 |
WEnd
|
|
|
452 |
Response.Write "</select>"
|
|
|
453 |
|
|
|
454 |
rsTemp.Close()
|
|
|
455 |
Set rsTemp = nothing
|
|
|
456 |
End If
|
|
|
457 |
End Sub
|
|
|
458 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
459 |
' Renders the HTML for the Version Control Settings drop down list box
|
|
|
460 |
Sub RenderVCSCombo(nTag)
|
|
|
461 |
|
|
|
462 |
If IsNull(nTag) OR nTag = "" Then
|
|
|
463 |
nTag = enum_VCS_SUBVERSION_TAG
|
|
|
464 |
End If
|
|
|
465 |
|
|
|
466 |
Query_String = "SELECT * FROM vcs_type ORDER BY name"
|
|
|
467 |
|
|
|
468 |
Response.Write "<select id='vcs_name_combo' name='vcs_name_combo' class='form_item' "& disableCriticalSectionEdit &" onchange='vcs_changed();'>"
|
|
|
469 |
|
|
|
470 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
471 |
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
|
|
|
472 |
|
|
|
473 |
If nTag = rsTemp.Fields("tag") Then
|
|
|
474 |
Response.write "<option value='"& rsTemp.Fields("name") &"' selected>"& rsTemp.Fields("name") &"</option>"
|
|
|
475 |
Else
|
|
|
476 |
' Add item to drop down only if it is not UC (uncontrolled). If it is UC, then only add it if the package
|
|
|
477 |
' version is a manual build type. It is not valid to allow autobuild packages to be uncontrolled (ie. the
|
|
|
478 |
' build (daemon) tool needs a label or something doesn't it?)
|
|
|
479 |
If rsTemp.Fields("tag") <> enum_VCS_UNCONTROLLED_TAG OR objFormCollector.Item("build_type") = "M" Then
|
|
|
480 |
Response.write "<option value='"& rsTemp.Fields("name") &"'>"& rsTemp.Fields("name") &"</option>"
|
|
|
481 |
End If
|
|
|
482 |
End If
|
|
|
483 |
rsTemp.MoveNext
|
|
|
484 |
WEnd
|
|
|
485 |
Response.Write "</select>"
|
|
|
486 |
|
|
|
487 |
' Create a hidden combo containing tags instead of names - we can use this to get a tag for a name without
|
|
|
488 |
' doing a database query
|
| 7002 |
dpurdie |
489 |
Response.Write "<div id='div_vcs_tag_combo' name='div_vcs_tag_combo' style='visibility:hidden'>"
|
| 5357 |
dpurdie |
490 |
Response.Write "<select id='vcs_tag_combo' name='vcs_tag_combo' disabled hidden class='form_item' "& disableCriticalSectionEdit &">"
|
|
|
491 |
rsTemp.MoveFirst
|
|
|
492 |
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
|
|
|
493 |
Response.write "<option value='"& rsTemp.Fields("tag") &"'>"& rsTemp.Fields("tag") &"</option>"
|
|
|
494 |
rsTemp.MoveNext
|
|
|
495 |
WEnd
|
|
|
496 |
Response.Write "</select>"
|
| 5590 |
dpurdie |
497 |
Response.Write "</div>"
|
| 5357 |
dpurdie |
498 |
|
|
|
499 |
rsTemp.Close()
|
|
|
500 |
Set rsTemp = nothing
|
|
|
501 |
End Sub
|
|
|
502 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
503 |
' Renders the HTML for the build standard drop down list box
|
|
|
504 |
'
|
|
|
505 |
' Typically, this drop down would contain ANT, JATS, and NONE, although ofcoarse this is dependant upon what data is
|
|
|
506 |
' present in the build_standards table of the database
|
|
|
507 |
Sub RenderBldStdCombo(nBldStdName)
|
|
|
508 |
|
|
|
509 |
Query_String = "SELECT * FROM build_standards"
|
|
|
510 |
|
|
|
511 |
Response.Write "<select id='bld_std_combo' name='bld_std_combo' class='form_item' "& disableCriticalSectionEdit &" onchange='bld_std_changed();'>"
|
|
|
512 |
|
|
|
513 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
514 |
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
|
|
|
515 |
|
|
|
516 |
If nBldStdName = rsTemp.Fields("bs_name") Then
|
|
|
517 |
Response.write "<option value='"& rsTemp.Fields("bs_name") &"' selected>"& rsTemp.Fields("bs_name") &"</option>"
|
|
|
518 |
Else
|
|
|
519 |
Response.write "<option value='"& rsTemp.Fields("bs_name") &"'>"& rsTemp.Fields("bs_name") &"</option>"
|
|
|
520 |
End If
|
|
|
521 |
rsTemp.MoveNext
|
|
|
522 |
WEnd
|
|
|
523 |
Response.Write "</select>"
|
|
|
524 |
rsTemp.Close()
|
|
|
525 |
Set rsTemp = nothing
|
|
|
526 |
End Sub
|
|
|
527 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
528 |
' Figures out what the url should be for when the form is submitted, ensuring that all of the paramters are present if
|
|
|
529 |
' need be. Note that the VCS and BSName parameters are optional. They will only be present if the user has made modifications
|
|
|
530 |
' to the respective drop down list boxes before submitting the form.
|
|
|
531 |
Sub Determine_submit_action_url ()
|
|
|
532 |
' Work out what the reload url should be for when the user hits the submit button
|
|
|
533 |
If IsNull(parVCSTag) OR parVCSTag = "" Then
|
|
|
534 |
If IsNull(parBSName) OR parBSName = "" Then
|
|
|
535 |
submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id
|
|
|
536 |
Else
|
|
|
537 |
submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id & "&bs_name=" & parBSName
|
|
|
538 |
End If
|
|
|
539 |
Else
|
|
|
540 |
If IsNull(parBSName) OR parBSName = "" Then
|
|
|
541 |
submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id & "&vcs_tag=" & parVCSTag
|
|
|
542 |
Else
|
|
|
543 |
submit_action_url = scriptName & "?pv_id=" & parPv_id & "&rtag_id=" & parRtag_id & "&vcs_tag=" & parVCSTag & "&bs_name=" & parBSName
|
|
|
544 |
End If
|
|
|
545 |
End If
|
|
|
546 |
End Sub
|
|
|
547 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
548 |
%>
|
|
|
549 |
<%
|
|
|
550 |
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------
|
|
|
551 |
|
|
|
552 |
Call Get_Form_Details( parPv_id, objFormCollector )
|
|
|
553 |
|
|
|
554 |
'--- Access Control Setup ------------
|
|
|
555 |
pageIsEditable = Is_Page_Editable ( objFormCollector.Item ("dlocked") )
|
|
|
556 |
criticalSectionIsEditable = Is_Critical_Section_Editable ( objFormCollector.Item("dlocked") )
|
|
|
557 |
isWIP = PackageExists(parRtag_id,parPv_id,"work_in_progress")
|
|
|
558 |
|
|
|
559 |
If criticalSectionIsEditable then
|
|
|
560 |
disableCriticalSectionEdit = ""
|
|
|
561 |
Else
|
|
|
562 |
disableCriticalSectionEdit = "disabled"
|
|
|
563 |
End If
|
|
|
564 |
|
|
|
565 |
'--- Process Submission ---------------
|
|
|
566 |
If objForm.IsPostBack Then
|
|
|
567 |
' has the user pressed the submit button?
|
| 5596 |
dpurdie |
568 |
If Request("btn") = "Submit" Then
|
|
|
569 |
Call Update_Pkg_Info ( parPv_id, QStrPar("FRdeployable"), QStrPar("FRlabel"), QStrPar("FRpath"), QStrPar("pv_description"), QStrPar("pv_overview") )
|
|
|
570 |
Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
|
|
|
571 |
Call CloseWindow
|
| 5957 |
dpurdie |
572 |
Call Destroy_All_Objects
|
| 5596 |
dpurdie |
573 |
Response.End
|
| 5357 |
dpurdie |
574 |
End If
|
|
|
575 |
End If
|
|
|
576 |
|
|
|
577 |
' Determine the URL to use when and if this form is refreshed using F5, or when a user changes the
|
|
|
578 |
' values in one of the drop down lists and the form is reloaded with additional or changed parameters
|
|
|
579 |
' The html form will use the result of this in its action tag.
|
|
|
580 |
Call Determine_submit_action_url()
|
|
|
581 |
|
|
|
582 |
'--------------------------------------------------------------------------------------------
|
|
|
583 |
%>
|
|
|
584 |
<html>
|
|
|
585 |
<head>
|
|
|
586 |
<title>Release Manager</title>
|
|
|
587 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
588 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
589 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
590 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
591 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
592 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
593 |
<!-- TIPS -->
|
| 6579 |
dpurdie |
594 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
595 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
596 |
<script language="JavaScript" type="text/javascript">
|
|
|
597 |
<!--
|
| 5596 |
dpurdie |
598 |
// Validate tags on window load
|
|
|
599 |
window.onload = function(e)
|
|
|
600 |
{
|
|
|
601 |
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) AND criticalSectionIsEditable Then%>
|
|
|
602 |
validateSvnPath();
|
|
|
603 |
validateSvnTag();
|
|
|
604 |
<%End If%>
|
| 5357 |
dpurdie |
605 |
|
| 5596 |
dpurdie |
606 |
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) AND criticalSectionIsEditable Then%>
|
|
|
607 |
validateCCPath();
|
|
|
608 |
validateCCLabel();
|
|
|
609 |
<%End If%>
|
|
|
610 |
|
|
|
611 |
validateDesc();
|
|
|
612 |
validateOverview();
|
|
|
613 |
}
|
|
|
614 |
|
| 5357 |
dpurdie |
615 |
// This function is the onchange event handler for the Version Control System drop down list box.
|
|
|
616 |
// It will re-format the web page URL to pass the vcs_tag paramter reflecting the users choice in the drop down list,
|
|
|
617 |
// and submit the form using the updated URL.
|
|
|
618 |
function vcs_changed() {
|
|
|
619 |
var f = document.getElementById('pkginfo');
|
|
|
620 |
if (f == null) {
|
|
|
621 |
alert('Javascript Error : Failed to get pkginfo');
|
|
|
622 |
}
|
|
|
623 |
else {
|
|
|
624 |
|
|
|
625 |
var nc = document.getElementById('vcs_name_combo');
|
|
|
626 |
if (nc == null) {
|
|
|
627 |
alert('Javascript Error : Failed to get vcs_name_combo');
|
|
|
628 |
}
|
|
|
629 |
else {
|
|
|
630 |
var tc = document.getElementById('vcs_tag_combo');
|
|
|
631 |
if (tc == null) {
|
|
|
632 |
alert('Javascript Error : Failed to get vcs_tag_combo');
|
|
|
633 |
}
|
|
|
634 |
else {
|
|
|
635 |
// Form the new URL with the updated VCS tag passed as a parameter
|
|
|
636 |
<%If IsNull(parBSName) OR parBSName = "" Then%>
|
|
|
637 |
f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
|
|
|
638 |
<%Else%>
|
|
|
639 |
f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&bs_name=<%=parBSName%>&vcs_tag=" + tc.options[nc.selectedIndex].value;
|
|
|
640 |
<%End If%>
|
|
|
641 |
|
|
|
642 |
f.submit();
|
|
|
643 |
}
|
|
|
644 |
}
|
|
|
645 |
}
|
|
|
646 |
}
|
|
|
647 |
|
|
|
648 |
// This function is the onchange event handler for the Build Standard drop down list box.
|
|
|
649 |
// It will re-format the web page URL to pass the vcs_tag paramter reflecting the users choice in the drop down list,
|
|
|
650 |
// and submit the form using the updated URL.
|
|
|
651 |
function bld_std_changed() {
|
|
|
652 |
var f = document.getElementById('pkginfo');
|
|
|
653 |
if (f == null) {
|
|
|
654 |
alert('Javascript Error : Failed to get pkginfo');
|
|
|
655 |
}
|
|
|
656 |
else {
|
|
|
657 |
var nc = document.getElementById('bld_std_combo');
|
|
|
658 |
if (nc == null) {
|
|
|
659 |
alert('Javascript Error : Failed to get bld_std_combo');
|
|
|
660 |
}
|
|
|
661 |
else {
|
|
|
662 |
// Form the new URL with the updated build standard name passed as a parameter
|
|
|
663 |
<%If IsNull(parVCSTag) OR parVCSTag = "" Then%>
|
|
|
664 |
f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&bs_name=" + nc.options[nc.selectedIndex].value;
|
|
|
665 |
<%Else%>
|
|
|
666 |
f.action = "_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&vcs_tag=<%=parVCSTag%>&bs_name=" + nc.options[nc.selectedIndex].value;
|
|
|
667 |
<%End If%>
|
|
|
668 |
|
|
|
669 |
f.submit();
|
|
|
670 |
}
|
|
|
671 |
}
|
|
|
672 |
}
|
| 5596 |
dpurdie |
673 |
//
|
|
|
674 |
// Update the Build Enviroment Display
|
|
|
675 |
// Generic is not allowed to be checked if any of the others are checked
|
|
|
676 |
// If Generic is ticked - then untick all others and hide associated combobox
|
|
|
677 |
// If Generic is not ticked - the untick Generic and hide associated combobox
|
|
|
678 |
function UpdateBeDisplay(me, targetId)
|
|
|
679 |
{
|
|
|
680 |
// Toggle related target id
|
|
|
681 |
ToggleDisplay(targetId);
|
| 5357 |
dpurdie |
682 |
|
| 5596 |
dpurdie |
683 |
if (me.checked) {
|
|
|
684 |
// Handle Generic changes
|
|
|
685 |
isGeneric = me.getAttribute("data-generic");
|
|
|
686 |
items = document.getElementsByName("be_id_list");
|
|
|
687 |
if (isGeneric){
|
|
|
688 |
// Generic item has been checked
|
|
|
689 |
for(idx = 0;idx < items.length; idx++){
|
|
|
690 |
item = items[idx];
|
|
|
691 |
if ( item != me ) {
|
|
|
692 |
item.checked = false;
|
|
|
693 |
target = item.getAttribute("data-target-id");
|
|
|
694 |
el = document.getElementById(target);
|
|
|
695 |
el.style.display = 'none';
|
|
|
696 |
}
|
|
|
697 |
}
|
|
|
698 |
} else {
|
|
|
699 |
for(idx = 0;idx < items.length; idx++){
|
|
|
700 |
item = items[idx];
|
|
|
701 |
itemGeneric = item.getAttribute("data-generic");
|
|
|
702 |
if(itemGeneric) {
|
|
|
703 |
item.checked = false;
|
|
|
704 |
target = item.getAttribute("data-target-id");
|
|
|
705 |
el = document.getElementById(target);
|
|
|
706 |
el.style.display = 'none';
|
|
|
707 |
}
|
|
|
708 |
}
|
|
|
709 |
}
|
|
|
710 |
}
|
|
|
711 |
}
|
|
|
712 |
|
|
|
713 |
var bPathOk = true;
|
|
|
714 |
var bLabelOk = true;
|
|
|
715 |
var bDescOk = true;
|
|
|
716 |
var bOverview = true;
|
|
|
717 |
|
|
|
718 |
function validateDesc()
|
|
|
719 |
{
|
|
|
720 |
document.MM_returnValue = true;
|
|
|
721 |
document.MM_error = "";
|
|
|
722 |
|
|
|
723 |
e = MM_findObj('pv_description');
|
|
|
724 |
if ( e.value.length )
|
|
|
725 |
MM_validateForm('--Silent','--NoPrefix','pv_description','Package Description','minLength:10');
|
|
|
726 |
|
|
|
727 |
bDescOk = document.MM_returnValue;
|
|
|
728 |
setIdText('descErr',document.MM_error);
|
|
|
729 |
parent.resizeIframe();
|
|
|
730 |
}
|
|
|
731 |
|
|
|
732 |
function validateOverview()
|
|
|
733 |
{
|
|
|
734 |
document.MM_returnValue = true;
|
|
|
735 |
document.MM_error = "";
|
|
|
736 |
|
|
|
737 |
e = MM_findObj('pv_overview');
|
|
|
738 |
if ( e.value.length )
|
|
|
739 |
MM_validateForm('--Silent','--NoPrefix','pv_overview','Package Overview','minLength:20');
|
|
|
740 |
|
|
|
741 |
bOverview = document.MM_returnValue;
|
|
|
742 |
setIdText('viewErr',document.MM_error);
|
|
|
743 |
parent.resizeIframe();
|
|
|
744 |
}
|
|
|
745 |
|
|
|
746 |
// Validate the SVN Path
|
|
|
747 |
//
|
|
|
748 |
function validateSvnPath()
|
|
|
749 |
{
|
|
|
750 |
document.MM_returnValue = true;
|
|
|
751 |
document.MM_error = "";
|
|
|
752 |
|
|
|
753 |
e = MM_findObj('FRpath');
|
| 6300 |
dpurdie |
754 |
if ( e.value.length ) {
|
| 5596 |
dpurdie |
755 |
MM_validateForm('--Silent','--NoPrefix','FRpath','Source Path','RisSVNPath');
|
| 6300 |
dpurdie |
756 |
if ( !document.MM_error ) {
|
|
|
757 |
if ( e.value.indexOf('AUPERASVN0X/') != -1 || e.value.indexOf('/RepoName/') != -1 ) {
|
|
|
758 |
document.MM_error = "Example path cannot be used";
|
|
|
759 |
document.MM_returnValue = false;
|
|
|
760 |
}
|
|
|
761 |
}
|
|
|
762 |
}
|
| 5596 |
dpurdie |
763 |
|
|
|
764 |
bPathOk = document.MM_returnValue;
|
|
|
765 |
setIdText('svnPathErr',document.MM_error);
|
|
|
766 |
parent.resizeIframe();
|
|
|
767 |
}
|
|
|
768 |
|
|
|
769 |
// Validate the SVN Tag
|
|
|
770 |
//
|
|
|
771 |
function validateSvnTag()
|
|
|
772 |
{
|
|
|
773 |
document.MM_returnValue = true;
|
|
|
774 |
document.MM_error = "";
|
|
|
775 |
|
|
|
776 |
e = MM_findObj('FRlabel');
|
|
|
777 |
if ( e.value.length )
|
|
|
778 |
MM_validateForm('--Silent','--NoPrefix','FRlabel','Subversion Tag','RisSVNTag');
|
|
|
779 |
|
|
|
780 |
bLabelOk = document.MM_returnValue;
|
|
|
781 |
setIdText('svnTagErr',document.MM_error);
|
|
|
782 |
<%If (objFormCollector.Item("build_type") = "M" ) Then%>
|
|
|
783 |
if(bLabelOk){
|
|
|
784 |
MM_validateForm('--Silent','FRlabel','Subversion Tag','RisSVNPegTag');
|
|
|
785 |
bLabelOk = document.MM_returnValue;
|
|
|
786 |
setIdText('svnTagErr',document.MM_error);
|
|
|
787 |
}
|
|
|
788 |
<%End If%>
|
|
|
789 |
parent.resizeIframe();
|
|
|
790 |
}
|
|
|
791 |
|
|
|
792 |
// Validate the CC Path
|
|
|
793 |
//
|
|
|
794 |
function validateCCPath()
|
|
|
795 |
{
|
|
|
796 |
document.MM_returnValue = true;
|
|
|
797 |
document.MM_error = "";
|
|
|
798 |
|
|
|
799 |
e = MM_findObj('FRpath');
|
|
|
800 |
if ( e.value.length)
|
|
|
801 |
MM_validateForm('--Silent','--NoPrefix','FRpath','Source Path','RisCCPath');
|
|
|
802 |
bPathOk = document.MM_returnValue;
|
|
|
803 |
setIdText('ccPathErr',document.MM_error);
|
|
|
804 |
parent.resizeIframe();
|
|
|
805 |
}
|
|
|
806 |
|
|
|
807 |
// Validate the CC Label
|
|
|
808 |
//
|
|
|
809 |
function validateCCLabel()
|
|
|
810 |
{
|
|
|
811 |
document.MM_returnValue = true;
|
|
|
812 |
document.MM_error = "";
|
|
|
813 |
|
|
|
814 |
e = MM_findObj('FRlabel');
|
|
|
815 |
if ( e.value.length)
|
|
|
816 |
MM_validateForm('--Silent','--NoPrefix','FRlabel','Label','RisCCLabel');
|
|
|
817 |
|
|
|
818 |
bLabelOk = document.MM_returnValue;
|
|
|
819 |
setIdText('ccLabelErr',document.MM_error);
|
|
|
820 |
parent.resizeIframe();
|
|
|
821 |
}
|
|
|
822 |
|
|
|
823 |
// Show/Hide error message in specified element
|
|
|
824 |
function setIdText(id, text) {
|
|
|
825 |
var element = document.getElementById(id);
|
|
|
826 |
if ( element ) {
|
|
|
827 |
while (element.firstChild!==null)
|
|
|
828 |
element.removeChild(element.firstChild); // remove all existing content
|
|
|
829 |
if(text){
|
|
|
830 |
element.appendChild(document.createTextNode(text));
|
|
|
831 |
element.style.display = 'block';
|
|
|
832 |
}
|
|
|
833 |
else {
|
|
|
834 |
element.style.display = 'none';
|
|
|
835 |
}
|
|
|
836 |
}
|
|
|
837 |
updateSubmit();
|
|
|
838 |
}
|
|
|
839 |
|
|
|
840 |
// Enable/disable the submit button
|
|
|
841 |
// Based on the state of bPathOk and bLabelOk
|
|
|
842 |
function updateSubmit(){
|
|
|
843 |
var element = document.getElementById('btn_submit');
|
|
|
844 |
if ( element ) {
|
|
|
845 |
element.disabled = !(bPathOk && bLabelOk && bOverview && bDescOk);
|
|
|
846 |
if (element.disabled) {
|
|
|
847 |
removeClass(element, 'form_btn_comp');
|
|
|
848 |
addClass(element, 'form_btn_comp_disabled');
|
|
|
849 |
} else {
|
|
|
850 |
removeClass(element, 'form_btn_comp_disabled') ;
|
|
|
851 |
addClass(element, 'form_btn_comp');
|
|
|
852 |
}
|
|
|
853 |
}
|
|
|
854 |
}
|
|
|
855 |
|
|
|
856 |
|
| 5357 |
dpurdie |
857 |
// This function will replace back slashes with forward slashes and can be used with an onchange event on fields
|
|
|
858 |
// where back slashes may be entered
|
|
|
859 |
function replace_back_slashes(e) {
|
|
|
860 |
strip_whitespace(e);
|
|
|
861 |
var str = e.value;
|
|
|
862 |
e.value = str.replace(/\\/g,"/");
|
|
|
863 |
}
|
|
|
864 |
|
|
|
865 |
function strip_whitespace(e) {
|
|
|
866 |
var str = e.value;
|
|
|
867 |
str = str.replace(/^\s+/,"");
|
|
|
868 |
e.value = str.replace(/\s+$/,"");
|
|
|
869 |
}
|
|
|
870 |
|
|
|
871 |
//-->
|
|
|
872 |
</script>
|
|
|
873 |
</head>
|
|
|
874 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
| 5596 |
dpurdie |
875 |
<form id="pkginfo" name="pkginfo" method="post" onSubmit="return document.MM_returnValue;" action="<%=submit_action_url%>" class="form_tight">
|
| 5590 |
dpurdie |
876 |
<table border="0" cellspacing="0" cellpadding="2">
|
| 5357 |
dpurdie |
877 |
<tr>
|
| 7002 |
dpurdie |
878 |
<td nowrap class="wform_ttl">
|
|
|
879 |
<table width="100%" border="0" cellspacing="1" cellpadding="2" class=lhsGrey>
|
| 5357 |
dpurdie |
880 |
<tr>
|
| 7002 |
dpurdie |
881 |
<td nowrap>Package</td>
|
|
|
882 |
<td nowrap><%=objFormCollector.Item("pkg_name") &" "& objFormCollector.Item("pkg_version")%></td>
|
| 5357 |
dpurdie |
883 |
</tr>
|
|
|
884 |
<tr>
|
| 7002 |
dpurdie |
885 |
<td nowrap>Deployable?<%=Quick_Help ( "deployable" )%></td>
|
| 5357 |
dpurdie |
886 |
<%
|
|
|
887 |
FRdeployableYES = ""
|
|
|
888 |
FRdeployableNO = ""
|
|
|
889 |
|
|
|
890 |
If objForm.IsPostBack Then
|
|
|
891 |
If Request("FRdeployable") = "1" Then
|
|
|
892 |
FRdeployableYES = "checked"
|
|
|
893 |
Else
|
|
|
894 |
FRdeployableNO = "checked"
|
|
|
895 |
End If
|
|
|
896 |
|
|
|
897 |
Else
|
|
|
898 |
If objFormCollector.Item("is_deployable") = enumDB_YES Then
|
|
|
899 |
FRdeployableYES = "checked"
|
|
|
900 |
Else
|
|
|
901 |
FRdeployableNO = "checked"
|
|
|
902 |
End If
|
|
|
903 |
|
|
|
904 |
End If
|
|
|
905 |
%>
|
| 7002 |
dpurdie |
906 |
<td nowrap>Yes<input name="FRdeployable" type="radio" value="1" <%=FRdeployableYES%>>
|
| 5357 |
dpurdie |
907 |
No<input name="FRdeployable" type="radio" value="0" <%=FRdeployableNO%>></td>
|
|
|
908 |
</tr>
|
|
|
909 |
<tr>
|
| 7002 |
dpurdie |
910 |
<td nowrap>Version Control System</td>
|
|
|
911 |
<td nowrap>
|
| 5357 |
dpurdie |
912 |
<% Call RenderVCSCombo(objFormCollector.Item("vcs_tag"))%>
|
| 5596 |
dpurdie |
913 |
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
|
|
|
914 |
<span class='err_alert'>[Not fully Supported]</span>
|
|
|
915 |
<%End If%>
|
| 5357 |
dpurdie |
916 |
</td>
|
|
|
917 |
</tr>
|
|
|
918 |
|
|
|
919 |
<!--- Source Path ---------------------------------------------->
|
|
|
920 |
<%If (objFormCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) Then%>
|
|
|
921 |
|
|
|
922 |
<tr>
|
| 7002 |
dpurdie |
923 |
<td nowrap>Source Path<%=Quick_Help ( "src_path" )%></td>
|
|
|
924 |
<td nowrap>
|
| 5596 |
dpurdie |
925 |
<input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateCCPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
|
| 6300 |
dpurdie |
926 |
<br> Example: /MASS_Dev_Infra/<%=objFormCollector.Item("pkg_name")%> <br>
|
| 5596 |
dpurdie |
927 |
<span class='val_err' id=ccPathErr style='display:none'></span>
|
| 5357 |
dpurdie |
928 |
</td>
|
|
|
929 |
</tr>
|
|
|
930 |
|
|
|
931 |
<tr>
|
| 7002 |
dpurdie |
932 |
<td nowrap>Label<%=Quick_Help ( "pkg_label" )%></td>
|
|
|
933 |
<td nowrap>
|
| 5357 |
dpurdie |
934 |
<%
|
|
|
935 |
sLabelReadOnly = ""
|
|
|
936 |
sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("change_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
|
|
|
937 |
|
|
|
938 |
If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
|
|
|
939 |
sLabelReadOnly = "readonly"
|
|
|
940 |
End If
|
|
|
941 |
|
|
|
942 |
If objForm.IsPostBack Then
|
|
|
943 |
sLabel = Request("FRlabel")
|
|
|
944 |
|
|
|
945 |
' If a user has switched the form back and forth between different VCS settings, and the previous one did not utilise a label
|
|
|
946 |
' the FRlabel request we just did will return a null/empty, so set sLabel to the default label once more if this is the case.
|
|
|
947 |
' Also, we use the SetValueForced() function to force the value of sLabel into the object that does some of our validation for us.
|
|
|
948 |
' That function (as opposed to the plain SetValue() function) cares nothing about the setting of the IsPostBack flag in the
|
|
|
949 |
' object. If we didnt do this, the field on the visible form would be highlighted with "Required" because SetValue() just does
|
|
|
950 |
' a Request() in IsPostBack situations, and so our sLabel value will not be acquired by the object for validation.
|
|
|
951 |
If IsNull(sLabel) OR sLabel = "" Then
|
|
|
952 |
sLabel = sDefaultLabel
|
|
|
953 |
objForm.SetValueForced "FRlabel", sLabel
|
|
|
954 |
End If
|
|
|
955 |
Else
|
|
|
956 |
If (objFormCollector.Item("pkg_label") = "N/A") Then
|
|
|
957 |
sLabel = "N/A"
|
|
|
958 |
Else
|
|
|
959 |
If objFormCollector.Item("pkg_label") = "" OR IsNull(objFormCollector.Item("pkg_label")) Then
|
|
|
960 |
sLabel = sDefaultLabel
|
|
|
961 |
Else
|
|
|
962 |
sLabel = objFormCollector.Item("pkg_label")
|
|
|
963 |
End If
|
|
|
964 |
objForm.SetValue "FRlabel", sLabel
|
|
|
965 |
End If
|
|
|
966 |
End If
|
|
|
967 |
%>
|
| 5596 |
dpurdie |
968 |
<input type="text" name="FRlabel" id="FRlabel" maxlength="50" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateCCLabel();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
|
| 6300 |
dpurdie |
969 |
<br> Example: <%=objFormCollector.Item("pkg_name")%>_1.0.0000.cr.WIP<br>
|
| 5596 |
dpurdie |
970 |
<span class='val_err' id=ccLabelErr style='display:none'></span>
|
| 5357 |
dpurdie |
971 |
</td>
|
|
|
972 |
</tr>
|
|
|
973 |
|
|
|
974 |
<%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG) Then%>
|
|
|
975 |
<tr>
|
| 7002 |
dpurdie |
976 |
<td nowrap>Source Path<%=Quick_Help ( "svn_source_path" )%></td>
|
|
|
977 |
<td nowrap>
|
| 5596 |
dpurdie |
978 |
<input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);validateSvnPath();" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
|
| 7002 |
dpurdie |
979 |
<table>
|
| 6300 |
dpurdie |
980 |
<tr>
|
|
|
981 |
<td>Example:</td>
|
|
|
982 |
<td>AUPERASVN0X/RepoName/<%=objFormCollector.Item("pkg_name")%>/trunk</td>
|
|
|
983 |
</tr>
|
|
|
984 |
</table>
|
| 5596 |
dpurdie |
985 |
<span class='val_err' id=svnPathErr style='display:none'></span>
|
| 5357 |
dpurdie |
986 |
</td>
|
|
|
987 |
</tr>
|
|
|
988 |
<tr>
|
| 7002 |
dpurdie |
989 |
<td nowrap nowrap>Tag<%=Quick_Help ( "svn_tag" )%></td>
|
|
|
990 |
<td nowrap>
|
| 5357 |
dpurdie |
991 |
<%
|
|
|
992 |
sLabelReadOnly = ""
|
|
|
993 |
sDefaultLabel = Default_Label(parPv_id, objFormCollector.Item("build_type"), objFormCollector.Item("change_type"), objFormCollector.Item("pkg_name"), objFormCollector.Item("pkg_version"), objFormCollector.Item("v_ext"))
|
|
|
994 |
|
|
|
995 |
If objFormCollector.Item("build_type") = "A" AND NOT criticalSectionIsEditable Then
|
|
|
996 |
sLabelReadOnly = "readonly"
|
|
|
997 |
End If
|
|
|
998 |
|
|
|
999 |
If objForm.IsPostBack Then
|
|
|
1000 |
sLabel = Request("FRlabel")
|
|
|
1001 |
|
|
|
1002 |
' If a user has switched the form back and forth between different VCS settings, and the previous one did not utilise a label
|
|
|
1003 |
' the FRlabel request we just did will return a null/empty, so set sLabel to the default label once more if this is the case.
|
|
|
1004 |
' Also, we use the SetValueForced() function to force the value of sLabel into the object that does some of our validation for us.
|
|
|
1005 |
' That function (as opposed to the plain SetValue() function) cares nothing about the setting of the IsPostBack flag in the
|
|
|
1006 |
' object. If we didnt do this, the field on the visible form would be highlighted with "Required" because SetValue() just does
|
|
|
1007 |
' a Request() in IsPostBack situations, and so our sLabel value will not be acquired by the object for validation.
|
|
|
1008 |
If IsNull(sLabel) OR sLabel = "" Then
|
|
|
1009 |
sLabel = sDefaultLabel
|
|
|
1010 |
objForm.SetValueForced "FRlabel", sLabel
|
|
|
1011 |
End If
|
|
|
1012 |
Else
|
|
|
1013 |
If (objFormCollector.Item("pkg_label") = "N/A") Then
|
|
|
1014 |
sLabel = "N/A"
|
|
|
1015 |
Else
|
|
|
1016 |
If objFormCollector.Item("pkg_label") = "" OR IsNull(objFormCollector.Item("pkg_label")) Then
|
|
|
1017 |
sLabel = sDefaultLabel
|
|
|
1018 |
Else
|
|
|
1019 |
sLabel = objFormCollector.Item("pkg_label")
|
|
|
1020 |
End If
|
|
|
1021 |
objForm.SetValue "FRlabel", sLabel
|
|
|
1022 |
End If
|
|
|
1023 |
End If
|
|
|
1024 |
%>
|
|
|
1025 |
|
| 5623 |
dpurdie |
1026 |
<input type="text" name="FRlabel" id="FRlabel" maxlength="120" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);validateSvnTag();" value="<%=sLabel%>" <%=sLabelReadOnly%>>
|
| 5357 |
dpurdie |
1027 |
<%
|
|
|
1028 |
If objFormCollector.Item("build_type") = "M" Then
|
| 6300 |
dpurdie |
1029 |
sDefaultLabel = sDefaultLabel & "@1234"
|
| 5357 |
dpurdie |
1030 |
Else
|
| 6300 |
dpurdie |
1031 |
sDefaultLabel = sDefaultLabel & "[@1234]"
|
| 5357 |
dpurdie |
1032 |
End If
|
|
|
1033 |
%>
|
| 7002 |
dpurdie |
1034 |
<table>
|
| 6300 |
dpurdie |
1035 |
<tr>
|
|
|
1036 |
<td>Example:</td>
|
|
|
1037 |
<td><%=sDefaultLabel%></td>
|
|
|
1038 |
</tr>
|
|
|
1039 |
</table>
|
| 5596 |
dpurdie |
1040 |
<span class='val_err' id=svnTagErr style='display:none'></span>
|
| 5357 |
dpurdie |
1041 |
</td>
|
|
|
1042 |
</tr>
|
|
|
1043 |
|
|
|
1044 |
<%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
|
|
|
1045 |
<tr>
|
| 7002 |
dpurdie |
1046 |
<td nowrap>Source Path<%=Quick_Help ( "src_path" )%></td>
|
|
|
1047 |
<td nowrap>
|
| 5357 |
dpurdie |
1048 |
<input name="FRpath" type="text" class="form_item" <%=disableCriticalSectionEdit%> id="FRpath" onchange="replace_back_slashes(this);" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>" size="60" maxlength="2000">
|
| 6300 |
dpurdie |
1049 |
<br> Example: /MASS_Dev_Infra/<%=objFormCollector.Item("pkg_name")%><br>
|
| 5357 |
dpurdie |
1050 |
</td>
|
|
|
1051 |
</tr>
|
|
|
1052 |
|
|
|
1053 |
<tr>
|
| 7002 |
dpurdie |
1054 |
<td nowrap>Label<%=Quick_Help ( "pkg_label" )%></td>
|
|
|
1055 |
<td nowrap>
|
|
|
1056 |
<input type="text" name="FRlabel" id="FRlabel" maxlength="120" size="60" class="form_item" <%=disableCriticalSectionEdit%> onchange="strip_whitespace(this);" value="<%=objForm.GetValue( "FRlabel", objFormCollector.Item("pkg_label") )%>">
|
| 5357 |
dpurdie |
1057 |
</td>
|
|
|
1058 |
</tr>
|
|
|
1059 |
|
|
|
1060 |
<%ElseIf (objFormCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG) Then%>
|
|
|
1061 |
<input name="FRpath" type="hidden" id="FRpath" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
|
|
|
1062 |
<input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
|
|
|
1063 |
<%Else%>
|
|
|
1064 |
<tr>
|
| 7002 |
dpurdie |
1065 |
<td colspan=3 class="sublbox_txt">
|
| 5357 |
dpurdie |
1066 |
<span class='err_alert'><b>WARNING:</b> Release Manager Website does not currently support the selected Version Control System</span>
|
|
|
1067 |
</td>
|
|
|
1068 |
</tr>
|
|
|
1069 |
<input name="FRpath" type="hidden" id="FRpath" value="<%=objForm.GetValue( "FRpath", objFormCollector.Item("src_path") )%>">
|
|
|
1070 |
<input name="FRlabel" type="hidden" id="FRlabel" value="<%=sLabel%>">
|
|
|
1071 |
<%End If%>
|
|
|
1072 |
|
|
|
1073 |
<tr>
|
| 7002 |
dpurdie |
1074 |
<td>Short Package Description<%=Quick_Help ( "pkg_info_short_desc" )%></td>
|
|
|
1075 |
<td nowrap>
|
| 5596 |
dpurdie |
1076 |
<textarea name="pv_description" cols="57" rows="5" class="form_item" id="pv_description" onchange="strip_whitespace(this);validateDesc()"><%=objForm.GetValue( "pv_description", objFormCollector.Item("pv_description") )%></textarea>
|
|
|
1077 |
<span class='val_err' id=descErr style='display:none'></span>
|
| 5357 |
dpurdie |
1078 |
</td>
|
|
|
1079 |
</tr>
|
|
|
1080 |
<tr>
|
| 7002 |
dpurdie |
1081 |
<td>Package Overview<%=Quick_Help ( "pkg_info_overview" )%></td>
|
|
|
1082 |
<td nowrap>
|
| 5596 |
dpurdie |
1083 |
<textarea name="pv_overview" cols="57" rows="10" class="form_item" id="pv_overview" onchange="strip_whitespace(this);validateOverview();"><%=objForm.GetValue( "pv_overview", objFormCollector.Item("pv_overview") )%></textarea>
|
|
|
1084 |
<span class='val_err' id=viewErr style='display:none'></span>
|
| 5357 |
dpurdie |
1085 |
</td>
|
|
|
1086 |
</tr>
|
|
|
1087 |
|
|
|
1088 |
<tr>
|
| 7002 |
dpurdie |
1089 |
<td nowrap>Build Standard</td>
|
|
|
1090 |
<td nowrap>
|
|
|
1091 |
<% Call RenderBldStdCombo(objFormCollector.Item("bs_name"))
|
|
|
1092 |
If objFormCollector.Item("bs_name") = "ANT" Then
|
|
|
1093 |
%><span class='err_alert'> - Not recomended for new packages.</span><%
|
|
|
1094 |
End If
|
|
|
1095 |
%>
|
| 5357 |
dpurdie |
1096 |
</td>
|
|
|
1097 |
</tr>
|
|
|
1098 |
|
|
|
1099 |
<tr>
|
| 7002 |
dpurdie |
1100 |
<td nowrap>Build Environment<%=Quick_Help ( "build_environment" )%></td>
|
|
|
1101 |
<td nowrap>
|
| 5357 |
dpurdie |
1102 |
<%If objFormCollector.Item("is_build_env_required") = "N" Then%>
|
|
|
1103 |
Build Environment not applicable
|
|
|
1104 |
<%Else%>
|
|
|
1105 |
<%End If%>
|
| 5590 |
dpurdie |
1106 |
<div id="divBuildEnv" name="divBuildEnv" style="overflow: auto; <%If (objFormCollector.Item("is_build_env_required") = "N") Then%>display:none;<%Else%>display:block;<%End If%>">
|
| 5357 |
dpurdie |
1107 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
1108 |
<tr>
|
|
|
1109 |
<td bgcolor="#FFFFFF">
|
| 7002 |
dpurdie |
1110 |
<table width="100%" border="0" cellspacing="0" cellpadding="3" class=stdGrey>
|
| 5357 |
dpurdie |
1111 |
<%
|
|
|
1112 |
OraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
1113 |
|
|
|
1114 |
query = _
|
| 5596 |
dpurdie |
1115 |
" SELECT DECODE ( pkgbinfo.BM_ID, bm.BM_ID, 'checked', NULL ) AS checked,"&_
|
| 5357 |
dpurdie |
1116 |
" bm.BM_ID,"&_
|
|
|
1117 |
" bm.BM_NAME, "&_
|
| 5596 |
dpurdie |
1118 |
" pkgbinfo.BSA_ID, "&_
|
|
|
1119 |
" DECODE (UPPER(bm.BM_NAME) , UPPER('Generic'), 1, NULL ) AS isGeneric" &_
|
| 5357 |
dpurdie |
1120 |
" FROM BUILD_MACHINES bm,"&_
|
|
|
1121 |
" PACKAGE_BUILD_INFO pkgbinfo"&_
|
|
|
1122 |
" WHERE pkgbinfo.BM_ID (+)= bm.BM_ID"&_
|
|
|
1123 |
" AND pkgbinfo.PV_ID (+)= :PV_ID"&_
|
|
|
1124 |
" ORDER BY UPPER(bm.bm_name) "
|
|
|
1125 |
|
|
|
1126 |
Set rsQry = OraDatabase.DbCreateDynaset( query, cint(0))
|
| 7002 |
dpurdie |
1127 |
Dim rowClass : rowClass = "even"
|
| 5357 |
dpurdie |
1128 |
|
|
|
1129 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
1130 |
checked = ""
|
|
|
1131 |
If objForm.IsTicked( "be_id_list", rsQry("bm_id"), rsQry("checked") ) Then
|
|
|
1132 |
checked = "checked"
|
|
|
1133 |
objForm.SetValue "be_id_list", checked
|
|
|
1134 |
End If
|
|
|
1135 |
|
| 7002 |
dpurdie |
1136 |
rowClass = IIF( rowClass = "odd" , "even", "odd" )
|
| 5357 |
dpurdie |
1137 |
%>
|
| 7002 |
dpurdie |
1138 |
<tr class='nowrap tight <%=rowClass%>'>
|
|
|
1139 |
<td width='1%' >
|
| 5596 |
dpurdie |
1140 |
<input type="checkbox"
|
|
|
1141 |
name="be_id_list"
|
|
|
1142 |
onClick="UpdateBeDisplay(this, 'build_type_<%=rsQry("bm_id")%>');"
|
|
|
1143 |
<%=disableCriticalSectionEdit%>
|
| 5597 |
dpurdie |
1144 |
<%=IIf(rsQry("ISGENERIC"), " data-generic='1'","")%>
|
| 5596 |
dpurdie |
1145 |
data-target-id='build_type_<%=rsQry("bm_id")%>'
|
|
|
1146 |
value="<%=rsQry("bm_id")%>" <%=checked%>>
|
|
|
1147 |
</td>
|
| 7002 |
dpurdie |
1148 |
<td width='1%' ><%=rsQry("bm_name")%></td>
|
|
|
1149 |
<td width='98%' >
|
| 5357 |
dpurdie |
1150 |
<div id="build_type_<%=rsQry("bm_id")%>" <%=ShowHideBuildType( checked )%>>
|
|
|
1151 |
<% Call RenderBuildTypeCombo( rsQry("bsa_id"), rsQry("bm_id"), objFormCollector.Item("bs_id") )%>
|
| 7002 |
dpurdie |
1152 |
</div>
|
| 5357 |
dpurdie |
1153 |
</td>
|
|
|
1154 |
<%If checked = "checked" AND rsQry("bsa_id") = 0 Then%>
|
| 7002 |
dpurdie |
1155 |
<td>
|
| 5357 |
dpurdie |
1156 |
<td valign='top' width='1%' style='vertical-align: middle;'><img src='icons/i_bulet_red.gif' width='4' height='4' hspace='3' vspace='4' border='0' align='absmiddle'></td>
|
| 7002 |
dpurdie |
1157 |
<td class='val_err'>Required</td>
|
| 5357 |
dpurdie |
1158 |
<%End If%>
|
|
|
1159 |
</tr>
|
|
|
1160 |
<%rsQry.MoveNext
|
|
|
1161 |
WEnd
|
|
|
1162 |
|
|
|
1163 |
rsQry.Close
|
|
|
1164 |
Set rsQry = Nothing
|
|
|
1165 |
|
|
|
1166 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
1167 |
%>
|
|
|
1168 |
</table>
|
|
|
1169 |
</td>
|
|
|
1170 |
</tr>
|
|
|
1171 |
</table>
|
|
|
1172 |
</div>
|
|
|
1173 |
</td>
|
|
|
1174 |
</tr>
|
|
|
1175 |
</table>
|
|
|
1176 |
</td>
|
|
|
1177 |
</tr>
|
|
|
1178 |
<tr>
|
| 7002 |
dpurdie |
1179 |
<td align="right">
|
| 5596 |
dpurdie |
1180 |
<input id="btn_submit" type="submit" name="btn" value="Submit" <%If pageIsEditable Then%>class="form_btn_comp"<%Else%>disabled class="form_btn_comp_disabled"<%End If%>>
|
| 5590 |
dpurdie |
1181 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
|
|
1182 |
</td>
|
| 5357 |
dpurdie |
1183 |
</tr>
|
|
|
1184 |
</table>
|
|
|
1185 |
<input type="hidden" name="pv_id" id="pv_id" value="<%=parPv_id%>">
|
|
|
1186 |
<input type="hidden" name="rtag_id" id="rtag_id" value="<%=parRtag_id%>">
|
|
|
1187 |
<input type="hidden" name="vcs_tag" id="vcs_tag" value="<%=parVCSTag%>">
|
|
|
1188 |
<input type="hidden" name="bs_name" id="bs_name" value="<%=parBSName%>">
|
| 5596 |
dpurdie |
1189 |
<%objForm.AddPostBack()%>
|
| 5357 |
dpurdie |
1190 |
</form>
|
|
|
1191 |
</body>
|
|
|
1192 |
</html>
|
|
|
1193 |
<%
|
|
|
1194 |
'------------- RUN AFTER PAGE RENDER ---------------
|
|
|
1195 |
Set objFormCollector = Nothing
|
|
|
1196 |
'---------------------------------------------------
|
|
|
1197 |
%>
|
|
|
1198 |
<!-- DESTRUCTOR ------->
|
|
|
1199 |
<!--#include file="common/destructor.asp"-->
|