Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
4
Response.Expires = 0	' always load the page, dont store
5
%>
6
<%
7
'=====================================================
8
'					Ripple Properties
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"-->
18
<%
19
' Set rfile parameter. This is a return page after Login
20
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parPv_id
29
Dim query
30
Dim rsQry, rsTemp
31
Dim checked
32
Dim FRripplebuildYES, FRripplebuildNO
33
Dim objFormCollector
34
Dim	Query_String
35
Dim isDLocked
36
'------------ Constants Declaration -----------
37
'------------ Variable Init -------------------
38
Set objFormCollector = CreateObject("Scripting.Dictionary")
39
parPv_id = QStrPar("pv_id")
40
'----------------------------------------------
41
%>
42
<%
43
'------------------------------------------------------------------------------------------------------------------------------------
44
Sub UpdateRippleType ( )
45
	Dim rsTemp, Query_String
46
	Query_String = _
47
	" SELECT ripple_field"&_
48
	" FROM package_versions"&_
49
	" WHERE pv_id = "& Request("pv_id")
50
	Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
51
 
52
	If (rsTemp("ripple_field").Value <> Request("ripple_type_combo")) OR IsNull(rsTemp("ripple_field").Value) Then
53
 
54
		'update fields
55
		rsTemp.Edit()
56
		rsTemp.Fields("ripple_field").Value = Request("ripple_type_combo")
57
		rsTemp.Update()
58
 
59
 
60
 
61
		'/* Log Action */
62
		If Request("ripple_type_combo") = "M" Then
63
			Call Log_Action ( Request("pv_id"), "ripple_type_update", "Major Number" )
64
 
65
		ElseIf Request("ripple_type_combo") = "m" Then
66
			Call Log_Action ( Request("pv_id"), "ripple_type_update", "Minor Number" )
67
 
68
		ElseIf Request("ripple_type_combo") = "p" Then
69
			Call Log_Action ( Request("pv_id"), "ripple_type_update", "Patch Number" )
70
 
71
		Else
72
			Call Log_Action ( Request("pv_id"), "ripple_type_update", "Build Number" )
73
 
74
		End If
75
 
76
	End If
77
 
78
	rsTemp.Close()
79
	Set rsTemp = nothing
80
End Sub
81
'------------------------------------------------------------------------------------------------------------------------------------
82
Sub RipplePackage (flag)
83
 
84
	OraDatabase.Parameters.Add "PV_ID", 		parPv_id,	ORAPARM_INPUT, ORATYPE_NUMBER
85
	OraDatabase.Parameters.Add "RTAG_ID", 		parRtag_id,	ORAPARM_INPUT, ORATYPE_NUMBER
86
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId,	ORAPARM_INPUT, ORATYPE_NUMBER
87
 
88
 
89
	OraSession.BeginTrans
90
 
91
	If flag Then
92
		OraDatabase.ExecuteSQL _
93
		"BEGIN  Ripple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
94
	Else
95
		OraDatabase.ExecuteSQL _
96
		"BEGIN  UnRipple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
97
	End If
98
 
99
    OraSession.CommitTrans
100
 
101
 
102
	OraDatabase.Parameters.Remove "PV_ID"
103
	OraDatabase.Parameters.Remove "RTAG_ID"
104
	OraDatabase.Parameters.Remove "USER_ID"
105
 
106
End Sub
107
'------------------------------------------------------------------------------------------------------------------------------------
108
Sub Get_Form_Details( nPv_id, ByRef objDetails )
109
	Dim rsTemp, Query_String
110
	Query_String = _
111
	" SELECT * "&_
112
	"  FROM package_versions pv, packages pkg"&_
113
	" WHERE pv.pkg_id = pkg.pkg_id"&_
114
	"   AND pv_id = "& nPv_id
115
 
116
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
117
	If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
118
		objDetails.Item("pkg_name") 		= rsTemp("pkg_name")
119
		objDetails.Item("pkg_version") 		= rsTemp("pkg_version")
120
		objDetails.Item("pkg_label") 		= rsTemp("pkg_label")
121
		objDetails.Item("src_path") 		= rsTemp("src_path")
122
		objDetails.Item("pv_description") 	= rsTemp("pv_description")
123
		objDetails.Item("pv_overview") 		= rsTemp("pv_overview")
124
		objDetails.Item("v_ext") 			= rsTemp("v_ext")
125
		objDetails.Item("is_deployable") 	= rsTemp("is_deployable")
126
		objDetails.Item("is_build_env_required") 	= rsTemp("is_build_env_required")
127
		objDetails.Item("build_type") 		= rsTemp("build_type")
128
		objDetails.Item("bs_id") 			= rsTemp("bs_id")
129
		objDetails.Item("ripple_field") 	= rsTemp("ripple_field")
130
	End If
131
 
132
	rsTemp.Close()
133
	Set rsTemp = Nothing
134
End Sub
135
'----------------------------------------------------------------------------------------------------------------------
136
Sub RenderRippleTypeCombo( cRippleType, cDLocked )
137
 
138
	Dim criticalSectionIsEditable
139
 
140
	criticalSectionIsEditable = Is_Critical_Section_Editable ( isDLocked )
141
 
142
	Query_String = "select * from ripple_field_states"
143
 
144
	If (criticalSectionIsEditable) Then
145
		Response.Write "<select name='ripple_type_combo' class='form_item'>"
146
	Else
147
		Response.Write "<select name='ripple_type_combo' class='form_item' disabled>"
148
	End If
149
 
150
	Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
151
 
152
	While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
153
		If cRippleType = rsTemp.Fields("state_acronym") Then
154
			Response.write "<option value='"& rsTemp.Fields("state_acronym") &"' selected>"& rsTemp.Fields("state_name") &"</option>"
155
		ElseIf IsNull(cRippleType) AND rsTemp.Fields("state_acronym") = "b" Then 'If nothing selected, select Build Number
156
			Response.write "<option value='"& rsTemp.Fields("state_acronym") &"' selected>"& rsTemp.Fields("state_name") & "</option>"
157
		Else
158
			Response.write "<option value='"& rsTemp.Fields("state_acronym") &"'>"& rsTemp.Fields("state_name") & "</option>"
159
		End If
160
		rsTemp.MoveNext
161
	WEnd
162
 
163
	rsTemp.Close()
164
	Set rsTemp = nothing
165
 
166
	Response.Write "</select>"
167
 
168
End Sub
169
'----------------------------------------------------------------------------------------------------------------------
170
%>
171
<%
172
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------
173
 
174
Call Get_Form_Details( parPv_id, objFormCollector )
175
 
176
Call Get_Pkg_Short_Info( parPv_id, NULL, NULL, NULL, NULL, NULL, isDLocked )
177
 
178
'-------------------------------------
179
'Start Process Submission
180
If CBool(QStrPar("action"))  AND  objAccessControl.UserLogedIn Then
181
 
182
	Call UpdateRippleType()
183
 
184
 
185
	If NOT CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "1" Then
186
		Call RipplePackage(True)
187
	End If
188
 
189
	If CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "0" Then
190
		Call RipplePackage(False)
191
	End If
192
 
193
 
194
	Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
195
	Call CloseWindow
196
 
197
End If
198
'End Process Submission
199
'--------------------------------------------------------------------------------------------
200
%>
201
<html>
202
<head>
203
<title>Release Manager</title>
204
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
205
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
206
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
207
<link rel="stylesheet" href="images/navigation.css" type="text/css">
208
<script language="JavaScript" src="images/common.js"></script>
209
<!-- TIPS -->
210
<script language="JavaScript" src="images/tipster.js"></script>
211
<script language="JavaScript" src="images/_help_tips.js"></script>
212
<script language="JavaScript" type="text/JavaScript">
213
<!--
214
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
215
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
216
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
217
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
218
}
219
MM_reloadPage(true);
220
//-->
221
</script>
222
</head>
223
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
224
<!-- TIPS LAYERS -------------------------------------->
225
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
226
<!----------------------------------------------------->
227
<form name="rippleproperties" method="post" action="<%=scriptName%>">
228
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
229
    <tr>
230
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="icons/i_pkg_ripple_type.gif" width="21" height="21" hspace="5" border="0"></td>
231
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Ripple Properties </td>
232
      <td background="images/lbox_bg_blue.gif" align="right" width="50%">
233
        <input type="submit" name="btn" value="Submit" class="form_btn_comp">
234
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
235
      </td>
236
      <td background="images/lbox_bg_blue.gif" align="right" width="1%" nowrap>
237
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
238
    </tr>
239
    <tr>
240
      <td height="100%" width="1%">&nbsp;</td>
241
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
242
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
243
          <tr>
244
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
245
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
246
            <td nowrap width="1%">&nbsp; </td>
247
            <td nowrap width="100%">&nbsp;</td>
248
          </tr>
249
          <tr>
250
            <td>&nbsp;</td>
251
            <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Build Inclusion?<%=Quick_Help ( "ripple_build" )%></td>
252
			<%
253
			FRripplebuildYES = ""
254
			FRripplebuildNO = ""
255
 
256
			Dim rsQryRipple, rippleFlag
257
			Set rsQryRipple = OraDatabase.DbCreateDynaset( "SELECT * FROM DO_NOT_RIPPLE WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))
258
 
259
 
260
 
261
			If rsQryRipple.RecordCount = 0  Then
262
				FRripplebuildYES = "checked"
263
				rippleFlag = True
264
			Else
265
				FRripplebuildNO = "checked"
266
				rippleFlag = False
267
			End If
268
 
269
			rsQryRipple.Close()
270
			Set rsQryRipple = nothing
271
 
272
			%>
273
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">Yes<input name="FRripplebuild" type="radio" value="1" <%=FRripplebuildYES%>>
274
              &nbsp;&nbsp;No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>></td>
275
            <td background="images/bg_form_lightbluedark.gif"><span class='err_alert'><b>WARNING!</span><font size='1'> When set to No, this package and <u>all</u> packages which depend on this package, either directly or indirectly, will be excluded from the build.</font></b></td>
276
          </tr>
277
          <tr>
278
            <td>&nbsp;</td>
279
            <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Ripple Type?<%=Quick_Help ( "ripple_type" )%></td>
280
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
281
 
282
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
283
				<tr>
284
				  <td bgcolor="#FFFFFF">
285
				   <table width="100" border="0" cellpadding="3" cellspacing="0" background="images/bg_form_lightbluedark.gif">
286
					<tr>
287
					  <td nowrap background="images/bg_form_lightbluedark.gif" bgcolor="#F5F5F5" class="form_txt"><% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%></td>
288
					</tr>
289
				   <tr>
290
					  <td width="1" background="images/bg_form_lightbluedark.gif"></td>
291
					  <td width="1"></td>
292
					  <td width="100%"></td>
293
					</tr>
294
				  </table></td>
295
				</tr>
296
			  </table>
297
 
298
			</td>
299
            <td background="images/bg_form_lightbluedark.gif"><span class='err_alert'><b>WARNING!</span><font size='1'> This enables a package to advertise how it will be numbered when rippled. THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER, AND FOR PRODUCTS
300
			WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.</font></b></td>
301
          </tr>
302
          <tr>
303
            <td>&nbsp;</td>
304
            <td nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
305
            <td nowrap> <p>&nbsp;</p></td>
306
            <td nowrap>&nbsp;</td>
307
          </tr>
308
        </table>
309
      </td>
310
    </tr>
311
    <tr>
312
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
313
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
314
    </tr>
315
  </table>
316
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
317
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
318
<input type="hidden" name="rippleFlag" value="<%=rippleFlag%>">
319
<input type="hidden" name="action" value="true">
320
</form>
321
</body>
322
</html>
323
<%
324
'------------- RUN AFTER PAGE RENDER ---------------
325
Set objFormCollector = Nothing
326
'---------------------------------------------------
327
%>
328
 
329
<!-- DESTRUCTOR ------->
330
<!--#include file="common/destructor.asp"-->