Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    	Edit Project View Details    |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/_form_window_common.asp"-->
20
<%
21
' Set rfile parameter. This is a return page after Login
22
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
23
objPMod.PersistInQryString("proj_id")
24
'------------ ACCESS CONTROL ------------------
25
%>
26
<!--#include file="_access_control_login.asp"-->
27
<!--#include file="_access_control_general.asp"-->
28
<!--#include file="_access_control_project.asp"-->
29
<%
30
'------------ Variable Definition -------------
31
Dim objSortHelper
32
Dim rsQry
33
Dim parProjId
34
Dim parSourceRtagId
35
Dim	pvIdList, pvIds, PVS, i, aFullList
36
Dim ProblemsString
37
'------------ Constants Declaration -----------
38
'------------ Variable Init -------------------
39
parProjId = Request("proj_id")
40
objPMod.PersistInQryString("proj_id")
41
Set	pvIdList	=	Server.CreateObject("Scripting.Dictionary")
42
'----------------------------------------------
43
%>
44
 
45
<%
46
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )
47
 
48
	OraDatabase.Parameters.Add "PV_ID", 			nPvId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
49
	OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, 	ORAPARM_INPUT, ORATYPE_CHAR
50
	OraDatabase.Parameters.Add "PROBLEM_STRING", 	NULL, 	ORAPARM_OUTPUT, ORATYPE_VARCHAR2
51
 
52
	'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
53
 
54
	OraSession.BeginTrans
55
 
56
	OraDatabase.ExecuteSQL _
57
	"BEGIN "&_
58
	" PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_
59
	"END; "
60
 
61
	OraSession.CommitTrans
62
 
63
	outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").Value 
64
 
65
 
66
	OraDatabase.Parameters.Remove "PV_ID"
67
	OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS"
68
	OraDatabase.Parameters.Remove "PROBLEM_STRING"
69
End Sub
70
%>
71
<%
72
Sub MovePackage(nPvId, newRtagId)
73
 
74
	OraDatabase.Parameters.Add "PV_ID", 			nPvId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
75
	OraDatabase.Parameters.Add "CURRENT_RTAG_ID", 	Request("rtag_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER
76
	OraDatabase.Parameters.Add "NEW_RTAG_ID", 		newRtagId, 	ORAPARM_INPUT, ORATYPE_NUMBER
77
	OraDatabase.Parameters.Add "USER_ID", 			objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER
78
 
79
	'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
80
 
81
	OraSession.BeginTrans
82
 
83
	OraDatabase.ExecuteSQL _
84
	"BEGIN "&_
85
	" PK_PACKAGE.MOVE_PACKAGE ( :PV_ID, :CURRENT_RTAG_ID, :NEW_RTAG_ID, :USER_ID ); "&_
86
	"END; "
87
 
88
	OraSession.CommitTrans
89
 
90
 
91
 
92
	OraDatabase.Parameters.Remove "PV_ID"
93
	OraDatabase.Parameters.Remove "CURRENT_RTAG_ID"
94
	OraDatabase.Parameters.Remove "NEW_RTAG_ID"
95
	OraDatabase.Parameters.Remove "USER_ID"
96
 
97
End Sub
98
%>
99
<%
100
'--------------------------------------------------------------------------------------------------------------------------
101
Sub GetFormDetails ( parProjId, ByRef outobjDetails )
102
	Dim rsQry, query
103
 
104
 
105
	OraDatabase.Parameters.Add "PROJ_ID", 	parProjId,		ORAPARM_INPUT, ORATYPE_NUMBER 
106
 
107
	query = _
108
	" SELECT prj.* "&_
109
	"  FROM PROJECTS prj"&_
110
	" WHERE prj.PROJ_ID = :PROJ_ID"
111
 
112
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
113
 
114
	OraDatabase.Parameters.Remove "PROJ_ID"
115
 
116
 
117
 
118
	If rsQry.RecordCount > 0 Then
119
		outobjDetails.Item ("proj_id") = rsQry("proj_id")
120
		outobjDetails.Item ("proj_name") = rsQry("proj_name")
121
		'outobjDetails.Item ("description") = rsQry("description")
122
		'outobjDetails.Item ("parent_rtag_id") = rsQry("parent_rtag_id")
123
		'outobjDetails.Item ("config_spec_branch") = rsQry("config_spec_branch")
124
		'outobjDetails.Item ("owner_email") = rsQry("owner_email")
125
		'If rsQry("assoc_mass_ref") <> "" Then
126
		'outobjDetails.Item ("massref_rtag_id") = rsQry("assoc_mass_ref")
127
		'End If
128
	Else
129
		Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parProjId="& parProjId
130
 
131
	End If
132
 
133
 
134
	rsQry.Close
135
	Set rsQry = Nothing
136
End Sub
137
 
138
'--------------------------------------------------------------------------------------------------------------------------
139
%>
140
<%
141
'------------ RUN BEFORE PAGE RENDER ----------
142
' --- Get Form details from DB ---
143
'Call GetFormDetails ( Request("proj_id"), objFormCollector )
144
 
145
' --- Load Validation Rules ---
146
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )		' Load Validation Rules
147
 
148
' --- Enter Form Validation Rule Changes here... ----
149
'----------------------------------------------------
150
 
151
' --- RUN onPostBack ---
152
If Request("action") <> "" Then
153
	Dim decision
154
	decision = Left(Request("decision"), 1) 'Gets the decision based on the combo box selection
155
 
156
	aFullList = Split ( Replace( Request("pvIds"), " ", "" ), "," )
157
 
158
	If decision = 0 Then
159
		Call OpenInWindow ( "dependencies.asp?rtag_id="&Request("rtag_id") )
160
	ElseIf decision = 1 Then
161
		For Each PVS In aFullList
162
			If PVS <> "" Then Call DestroyPackage(PVS, "N", ProblemsString)	
163
		Next
164
	ElseIf decision = 2 Then
165
		For Each PVS In aFullList
166
			If PVS <> "" Then Call MovePackage(PVS,Request("FRrtag_id"))	
167
		Next		
168
	End If	
169
 
170
 
171
 
172
 
173
	If objEH.Finally Then
174
		Call OpenInWindow ( "_change_release_mode.asp?mode_code=3&rtag_id="&Request("rtag_id") )
175
	End If
176
 
177
 
178
 
179
End If
180
 
181
'----------------------------------------------
182
%>
183
 
184
<html>
185
<head>
186
<title>Release Manager</title>
187
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
188
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
189
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
190
<link rel="stylesheet" href="images/navigation.css" type="text/css">
191
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
192
<script language="JavaScript" src="images/common.js"></script>
193
<script language="JavaScript" type="text/javascript">
194
<!--
195
 
196
function RequestDetails( option, paramString, rowId){
197
 
198
	if ( option == 2 )
199
	{
200
 
201
		var requestURL = 'RequestReleaseMoveCombo.asp';
202
 
203
		// Set ajax divname
204
		ajaxdivname = rowId;
205
 
206
		//Append the name to search for to the requestURL
207
		var url = requestURL + paramString;
208
 
209
		//Progress
210
		//alert(MM_findObj( rowId ));
211
 
212
		//MM_findObj( rowId ).options[0] = new Option('Loading...','');
213
		//MM_findObj( rowId ).selectedIndex = 0;
214
		rowId.options[0] = new Option('Loading...','');
215
		rowId.selectedIndex = 0;
216
 
217
 
218
		//Create the xmlHttp object to use in the request
219
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
220
		// This is non-blocking (asynchronous)
221
		xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
222
 
223
		//Send the xmlHttp get to the specified url
224
		xmlHttp_Get(xmlHttp, url);
225
 
226
	}
227
	else 
228
	{
229
		var requestURL = 'RequestReleaseMoveCombo.asp';
230
		// Set ajax divname
231
		ajaxdivname = rowId;
232
 
233
		//Append the name to search for to the requestURL
234
		var url = requestURL + '?proj_id=0';
235
 
236
		//Progress
237
		//alert(MM_findObj( rowId ));
238
 
239
		//MM_findObj( rowId ).options[0] = new Option('Loading...','');
240
		//MM_findObj( rowId ).selectedIndex = 0;
241
		//rowId.options[0] = new Option('Loading...','');
242
		//rowId.selectedIndex = 0;
243
 
244
 
245
		//Create the xmlHttp object to use in the request
246
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
247
		// This is non-blocking (asynchronous)
248
		xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
249
 
250
		//Send the xmlHttp get to the specified url
251
		xmlHttp_Get(xmlHttp, url);
252
	}
253
 
254
 
255
 
256
}
257
 
258
//-->
259
</script>
260
<!-- DROPDOWN MENUS -->
261
 
262
 
263
<!--#include file="_menu_def.asp"-->
264
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
265
 
266
</head>
267
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.proj_name.focus();">
268
<!-- MENU LAYERS -------------------------------------->
269
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
270
</div>
271
<!-- TIPS LAYERS -------------------------------------->
272
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
273
<!----------------------------------------------------->
274
<!-- HEADER -->
275
<!--#include file="_header.asp"-->
276
<!-- BODY ---->
277
 
278
<table width="100%" border="0" cellspacing="0" cellpadding="0">
279
<%
280
'-- FROM START ---------------------------------------------------------------------------------------------------------
281
objFormComponent.FormName = "FormName"
282
objFormComponent.Action = ScriptName
283
Call objFormComponent.FormStart()
284
%>
285
  <tr> 
286
    <td width="1" background="images/bg_home_orange.gif" valign="top">
287
	</td>
288
	<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF"><table width="10" border="0" cellspacing="0" cellpadding="0">
289
      <tr>
290
        <td width="1%"></td>
291
        <td width="100%">
292
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
293
            <tr>
294
              <td nowrap class="body_txt">
295
 
296
			  </td>
297
 
298
            </tr>
299
          </table>
300
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
301
            <tr>
302
              <td nowrap class="form_ttl"><p>&nbsp;</p>
303
                <p>EDIT RELEASE BEFORE CLOSING</p></td>
304
              <td align="right" valign="bottom"></td>
305
            </tr>
306
        </table></td>
307
        <td width="1%"></td>
308
      </tr>
309
      <tr>
310
        <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
311
        <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
312
        <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
313
      </tr>
314
      <tr>
315
        <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
316
        <td bgcolor="#FFFFFF" valign="top">
317
 
318
		<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
319
		<!--#include file="messages/_msg_inline.asp"-->
320
		<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
321
		<br>
322
 
323
		<table width="100%"  border="0" cellspacing="2" cellpadding="0">
324
 
325
		  		  <tr>				  
326
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>
327
 
328
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
329
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
330
			<td valign="top">
331
		  </tr>
332
		  <%
333
		  Dim currState
334
		  currState = ""
335
		  	OraDatabase.Parameters.Add "RTAG_ID", 			Request("rtag_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
336
			Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
337
			OraDatabase.Parameters.Remove "RTAG_ID"
338
 
339
 
340
 
341
 
342
		  '--- Render rows ---
343
		  Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
344
 
345
		  'Add	the	pv_ids	to	the	Array
346
		  pvIdList.Add	CStr(rsQry("pv_id")), rsQry("pkg_version")
347
		  ' -------- GROUP BY BASE VIEW  -----------------
348
		  If CStr(currState) <> CStr(rsQry("state")) Then		  
349
		 	%>
350
      <tr>
351
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
352
      </tr>
353
      <tr>
354
        <td nowrap class="body_scol"><%=rsQry("state")%></td>
355
		<td nowrap class="body_scol"></td>
356
        <td nowrap class="body_scol"></td>
357
      </tr>
358
      <%
359
		  	currState = CStr(rsQry("state"))
360
		  End If	  
361
 
362
	  %>
363
 
364
		 <tr>
365
		 <td nowrap class="body_rowg"></td>
366
		 <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
367
		 <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
368
		 </tr>
369
		 <%
370
		 	rsQry.MoveNext
371
 
372
				If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
373
          	<tr>
374
            <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
375
         	 </tr>
376
		 	 <%End If			
377
		 Loop	
378
		 		rsQry.Close()
379
				Set rsQry = nothing	
380
 
381
		pvIds = pvIdList.Keys		
382
		For i = 0 to pvIdList.Count -1
383
			PVS	=	PVS	+	pvIds(i)	+	","
384
		Next
385
			Set pvIds = Nothing		
386
		  %>		  
387
 
388
 
389
 
390
		  <tr>
391
		    <td class="form_iname">&nbsp;</td>
392
		    <td>&nbsp;</td>
393
		    <td class="val_err"></td>
394
		    </tr>
395
		</table>
396
 
397
 
398
		</td>
399
        <td background="images/lbox_bgside_white.gif">&nbsp;</td>
400
      </tr>
401
	  <tr>
402
        <td background="images/bg_action_norm.gif" ></td>
403
        <td align="right" background="images/bg_action_norm.gif" >
404
		<a class="body_col">Select Decision: </a>
405
		<select name="decision" id="decision" onChange="RequestDetails( this.value, '?proj_id=<%=Get_Proj_ID(Request("rtag_id"))%>&rtag_id=<%=Request("rtag_id")%>', FormName.FRrtag_id );" class="form_item">
406
		<option value='0' selected>--None--</option>
407
		<option value='1' >Delete All</option>
408
		<option value='2' >Move All</option>
409
		</select>
410
 
411
		<a class="body_col">Select Destination: </a>
412
		<select name="FRrtag_id" id="FRrtag_id" class="form_item">
413
 
414
 
415
 
416
		</select>	
417
 
418
 
419
		<%=objFormComponent.SubmitButton ( "OK", "class='form_btn'" )%>&nbsp;
420
		<%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", "dependencies.asp?rtag_id="&Request("rtag_id") )%>
421
		<%=objPMod.ComposeHiddenTags()%>
422
		<input type="hidden" name="decision" value="decision.value">
423
		<%If Request("FRrtag_id") <> "" Then%>
424
		<input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
425
		<%End If%>
426
		<input type="hidden" name="action" value="true">
427
		<input type="hidden" name="pvIds" value=<%=PVS%>>
428
		</td>
429
        <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
430
      </tr>
431
      <tr>
432
        <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
433
        <td background="images/lbox_bg_blue.gif"></td>
434
        <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
435
      </tr>
436
    </table>
437
 
438
	<!-- ACTION BUTTONS ---------------------------------------------->
439
	<!-- ACTION BUTTONS END  ------------------------------------------></td>
440
	<td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
441
  </tr>
442
  <tr> 
443
    <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
444
    <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
445
  </tr>
446
<%
447
Call objFormComponent.FormEnd()
448
'-- FROM END ----------------------------------------------------------------------------------------------------------------
449
%>   
450
</table>
451
 
452
 
453
<!-- FOOTER -->
454
<!--#include file="_footer.asp"-->
455
</body>
456
</html>
457
<%
458
Call Destroy_All_Objects
459
%>