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