Subversion Repositories DevTools

Rev

Rev 121 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 121 Rev 127
Line 41... Line 41...
41
%>
41
%>
42
<%
42
<%
43
'------------------------------------------------------------------------------------------------------------------------------------
43
'------------------------------------------------------------------------------------------------------------------------------------
44
Sub UpdateRippleType ( )
44
Sub UpdateRippleType ( )
45
   Dim rsTemp, Query_String
45
   Dim rsTemp, Query_String
-
 
46
   Dim storedRippleType
-
 
47
   Dim storedMajorLimit
-
 
48
   Dim storedMinorLimit
-
 
49
   Dim storedPatchLimit
-
 
50
   Dim storedBuildNumberLimit
-
 
51
   Dim selectedRippleType
-
 
52
   selectedRippleType = Request("ripple_type_combo")
-
 
53
   Dim enteredMajorLimit
-
 
54
   ' enteredMajorLimit is a string of digits
-
 
55
   ' it will be compared with a string representing a NUMBER in the db
-
 
56
   ' use CInt to at least strip leading zeros
-
 
57
   enteredMajorLimit = CInt(Request("Major"))
-
 
58
   Dim enteredMinorLimit
-
 
59
   enteredMinorLimit = CInt(Request("Minor"))
-
 
60
   Dim enteredPatchLimit
-
 
61
   enteredPatchLimit = CInt(Request("Patch"))
-
 
62
   Dim enteredBuildLimit
-
 
63
   enteredBuildLimit = CInt(Request("Build"))
46
   Query_String = _
64
   Query_String = _
47
   " SELECT ripple_field"&_
65
    " SELECT ripple_field, major_limit, minor_limit, patch_limit, build_number_limit"&_
48
   " FROM package_versions"&_
66
    " FROM package_versions"&_
49
   " WHERE pv_id = "& Request("pv_id")
67
    " WHERE pv_id = "& Request("pv_id")
50
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
68
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
-
 
69
   storedRippleType = rsTemp("ripple_field").Value
-
 
70
   storedMajorLimit = rsTemp("major_limit").Value
51
 
71
 
-
 
72
   If ( IsNull(storedMajorLimit) ) Then
-
 
73
     storedMajorLimit = "0"
-
 
74
   End If
-
 
75
 
-
 
76
   storedMinorLimit = rsTemp("minor_limit").Value
-
 
77
 
-
 
78
   If ( IsNull(storedMinorLimit) ) Then
-
 
79
     storedMinorLimit = "0"
-
 
80
   End If
-
 
81
 
-
 
82
   storedPatchLimit = rsTemp("patch_limit").Value
-
 
83
 
-
 
84
   If ( IsNull(storedPatchLimit) ) Then
-
 
85
     storedPatchLimit = "0"
-
 
86
   End If
-
 
87
 
-
 
88
   storedBuildNumberLimit = rsTemp("build_number_limit").Value
-
 
89
 
-
 
90
   If ( IsNull(storedBuildNumberLimit) ) Then
-
 
91
     storedBuildNumberLimit = "0"
-
 
92
   End If
-
 
93
 
-
 
94
   'normalise for comparison purposes
-
 
95
   storedMajorLimit = CInt( storedMajorLimit )
-
 
96
   storedMinorLimit = CInt( storedMinorLimit )
-
 
97
   storedPatchlimit = CInt( storedPatchLimit )
-
 
98
   storedBuildNumberLimit = CInt( storedBuildNumberLimit )
-
 
99
 
52
   If (rsTemp("ripple_field").Value <> Request("ripple_type_combo")) OR IsNull(rsTemp("ripple_field").Value) Then
100
   If (storedRippleType <> selectedRippleType) OR IsNull(storedRippleType) Then
53
 
101
 
54
      'update fields
102
      'update fields
55
      rsTemp.Edit()
103
      rsTemp.Edit()
56
      rsTemp.Fields("ripple_field").Value = Request("ripple_type_combo")
104
      rsTemp.Fields("ripple_field").Value = selectedRippleType
57
      rsTemp.Update()
105
      rsTemp.Update()
58
 
106
 
-
 
107
      Dim anotherQry
-
 
108
      Set anotherQry = OraDatabase.DbCreateDynaset( "SELECT state_name from ripple_field_states WHERE state_acronym ='"& selectedRippleType &"'", cint(0))
59
 
109
 
-
 
110
      '/* Log Action */
-
 
111
      Call Log_Action ( Request("pv_id"), "ripple_type_update", anotherQry.Fields("state_name").Value )
-
 
112
      anotherQry.Close()
-
 
113
      Set anotherQry = nothing
-
 
114
   End If
-
 
115
 
-
 
116
   If ( storedMajorLimit <> enteredMajorLimit ) Then
-
 
117
 
-
 
118
      'update fields
-
 
119
      rsTemp.Edit()
-
 
120
      If ( enteredMajorLimit <> "0" ) Then
-
 
121
        rsTemp.Fields("major_limit").Value = enteredMajorLimit
-
 
122
      Else
-
 
123
        rsTemp.Fields("major_limit").Value = NULL
-
 
124
      End If
-
 
125
      rsTemp.Update()
60
 
126
 
61
      '/* Log Action */
127
      '/* Log Action */
62
      If Request("ripple_type_combo") = "M" Then
-
 
63
         Call Log_Action ( Request("pv_id"), "ripple_type_update", "Major Number" )
128
      Call Log_Action ( Request("pv_id"), "major_limit_update", enteredMajorLimit )
-
 
129
   End If
64
 
130
 
65
      ElseIf Request("ripple_type_combo") = "m" Then
131
   If ( storedMinorLimit <> enteredMinorLimit ) Then
66
         Call Log_Action ( Request("pv_id"), "ripple_type_update", "Minor Number" )
-
 
67
 
132
 
-
 
133
      'update fields
-
 
134
      rsTemp.Edit()
68
      ElseIf Request("ripple_type_combo") = "p" Then
135
      If ( enteredMinorLimit <> "0" ) Then
69
         Call Log_Action ( Request("pv_id"), "ripple_type_update", "Patch Number" )
136
        rsTemp.Fields("minor_limit").Value = enteredMinorLimit
-
 
137
      Else
-
 
138
        rsTemp.Fields("minor_limit").Value = NULL
-
 
139
      End If
-
 
140
      rsTemp.Update()
70
 
141
 
71
      ElseIf Request("ripple_type_combo") = "z" Then
142
      '/* Log Action */
72
         Call Log_Action ( Request("pv_id"), "ripple_type_update", "Do not ripple build" )
143
      Call Log_Action ( Request("pv_id"), "minor_limit_update", enteredMinorLimit )
-
 
144
   End If
73
 
145
 
-
 
146
   If ( storedPatchLimit <> enteredPatchLimit ) Then
-
 
147
 
-
 
148
      'update fields
-
 
149
      rsTemp.Edit()
-
 
150
      If ( enteredPatchLimit <> "0" ) Then
-
 
151
        rsTemp.Fields("patch_limit").Value = enteredPatchLimit
74
      Else
152
      Else
75
         Call Log_Action ( Request("pv_id"), "ripple_type_update", "Build Number" )
153
        rsTemp.Fields("patch_limit").Value = NULL
-
 
154
      End If
-
 
155
      rsTemp.Update()
76
 
156
 
-
 
157
      '/* Log Action */
-
 
158
      Call Log_Action ( Request("pv_id"), "patch_limit_update", enteredPatchLimit )
-
 
159
   End If
-
 
160
 
-
 
161
   If ( storedBuildNumberLimit <> enteredBuildLimit ) Then
-
 
162
 
-
 
163
      'update fields
-
 
164
      rsTemp.Edit()
-
 
165
      If ( enteredBuildLimit <> "0" ) Then
-
 
166
        rsTemp.Fields("build_number_limit").Value = enteredBuildLimit
-
 
167
      Else
-
 
168
        rsTemp.Fields("build_number_limit").Value = NULL
77
      End If
169
      End If
-
 
170
      rsTemp.Update()
78
 
171
 
-
 
172
      '/* Log Action */
-
 
173
      Call Log_Action ( Request("pv_id"), "build_number_limit_update", enteredBuildLimit )
79
   End If
174
   End If
80
 
175
 
81
   rsTemp.Close()
176
   rsTemp.Close()
82
   Set rsTemp = nothing
177
   Set rsTemp = nothing
83
End Sub
178
End Sub
Line 128... Line 223...
128
      objDetails.Item("is_deployable")         = rsTemp("is_deployable")
223
      objDetails.Item("is_deployable")         = rsTemp("is_deployable")
129
      objDetails.Item("is_build_env_required") = rsTemp("is_build_env_required")
224
      objDetails.Item("is_build_env_required") = rsTemp("is_build_env_required")
130
      objDetails.Item("build_type")            = rsTemp("build_type")
225
      objDetails.Item("build_type")            = rsTemp("build_type")
131
      objDetails.Item("bs_id")                 = rsTemp("bs_id")
226
      objDetails.Item("bs_id")                 = rsTemp("bs_id")
132
      objDetails.Item("ripple_field")          = rsTemp("ripple_field")
227
      objDetails.Item("ripple_field")          = rsTemp("ripple_field")
-
 
228
      If isNull(rsTemp("major_limit")) Then
-
 
229
        objDetails.Item("major_limit")         = "0"
-
 
230
      Else
-
 
231
        objDetails.Item("major_limit")         = rsTemp("major_limit")
-
 
232
      End If
-
 
233
      If isNull(rsTemp("minor_limit")) Then
-
 
234
        objDetails.Item("minor_limit")         = "0"
-
 
235
      Else
-
 
236
        objDetails.Item("minor_limit")         = rsTemp("minor_limit")
-
 
237
      End If
-
 
238
      If isNull(rsTemp("patch_limit")) Then
-
 
239
        objDetails.Item("patch_limit")         = "0"
-
 
240
      Else
-
 
241
        objDetails.Item("patch_limit")         = rsTemp("patch_limit")
-
 
242
      End If
-
 
243
      If isNull(rsTemp("build_number_limit")) Then
-
 
244
        objDetails.Item("build_number_limit")  = "0"
-
 
245
      Else
-
 
246
        objDetails.Item("build_number_limit")  = rsTemp("build_number_limit")
-
 
247
      End If
133
   End If
248
   End If
134
 
249
 
135
   rsTemp.Close()
250
   rsTemp.Close()
136
   Set rsTemp = Nothing
251
   Set rsTemp = Nothing
137
End Sub
252
End Sub
Line 145... Line 260...
145
   isEditable = Is_Page_Editable ( isDLocked )
260
   isEditable = Is_Page_Editable ( isDLocked )
146
 
261
 
147
   Query_String = "select * from ripple_field_states"
262
   Query_String = "select * from ripple_field_states"
148
 
263
 
149
   If (isEditable) Then
264
   If (isEditable) Then
150
      Response.Write "<select name='ripple_type_combo' class='form_item'>"
265
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' onChange='changeToRippleType(this.options[this.selectedIndex].value)'>"
151
   Else
266
   Else
152
      Response.Write "<select name='ripple_type_combo' class='form_item' disabled>"
267
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' disabled>"
153
   End If
268
   End If
154
 
269
 
155
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
270
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
156
 
271
 
157
   While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
272
   While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
Line 220... Line 335...
220
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
335
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
221
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
336
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
222
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
337
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
223
}
338
}
224
MM_reloadPage(true);
339
MM_reloadPage(true);
-
 
340
function isNum(passedVal)
-
 
341
{
-
 
342
  if (passedVal == "")
-
 
343
  {
-
 
344
    return false
-
 
345
  }
-
 
346
  for(i=0; i<passedVal.length; i++)
-
 
347
  {
-
 
348
    if (passedVal.charAt(i) < "0")
-
 
349
    {
-
 
350
      return false
-
 
351
    }
-
 
352
    if (passedVal.charAt(i) > "9")
-
 
353
    {
-
 
354
      return false
-
 
355
    }
-
 
356
  }
-
 
357
  return true
-
 
358
}
-
 
359
function valid(form)
-
 
360
{
-
 
361
  if (!isNum(rippleproperties.Major.value))
-
 
362
  {
-
 
363
    alert("Invalid major number")
-
 
364
    return false
-
 
365
  }
-
 
366
  return true
-
 
367
}
-
 
368
function changeToRippleType(val)
-
 
369
{
-
 
370
  if ( val.match("L") )
-
 
371
  {
-
 
372
    document.getElementById("limits_row").style.visibility="visible"
-
 
373
  }
-
 
374
  else
-
 
375
  {
-
 
376
    document.getElementById("limits_row").style.visibility="hidden"
-
 
377
    document.getElementById("Major").value  = "0"
-
 
378
    document.getElementById("Minor").value  = "0"
-
 
379
    document.getElementById("Patch").value  = "0"
-
 
380
    document.getElementById("Build").value  = "0"
-
 
381
  }
-
 
382
}
-
 
383
function loader()
-
 
384
{
-
 
385
  changeToRippleType(document.getElementById("rtc").options[document.getElementById("rtc").selectedIndex].value)
-
 
386
}
-
 
387
if (window.addEventListener)
-
 
388
{
-
 
389
  window.addEventListener("load", loader, false)
-
 
390
}
-
 
391
else if (window.attachEvent)
-
 
392
{
-
 
393
  window.attachEvent("onload", loader)
-
 
394
}
-
 
395
else if (document.getElementById)
-
 
396
{
-
 
397
  window.onload=loader
-
 
398
}
225
//-->
399
//-->
226
</script>
400
</script>
227
</head>
401
</head>
228
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
402
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
229
<!-- TIPS LAYERS -------------------------------------->
403
<!-- TIPS LAYERS -------------------------------------->
230
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
404
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
231
<!----------------------------------------------------->
405
<!----------------------------------------------------->
232
<form name="rippleproperties" method="post" action="<%=scriptName%>">
406
<form onSubmit="return valid(this)" name="rippleproperties" id="rp" method="post" action="<%=scriptName%>">
233
   <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
407
   <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
234
      <tr>
408
      <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>
409
         <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>
410
         <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%">
411
         <td background="images/lbox_bg_blue.gif" align="right" width="50%">
Line 286... Line 460...
286
 
460
 
287
                  rsQryRipple.Close()
461
                  rsQryRipple.Close()
288
                  Set rsQryRipple = nothing
462
                  Set rsQryRipple = nothing
289
 
463
 
290
                  %>
464
                  %>
291
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">Yes
465
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
292
                     <input name="FRripplebuild" type="radio" value="1" <%=FRripplebuildYES%>  <%=disabled%>>
466
                     Yes<input name="FRripplebuild" type="radio" value="1" <%=FRripplebuildYES%>  <%=disabled%>>&nbsp;&nbsp;
293
                     &nbsp;&nbsp;No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>>
467
                     No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>>&nbsp;&nbsp;
294
                  </td>
468
                  </td>
295
                  <td background="images/bg_form_lightbluedark.gif">
469
                  <td background="images/bg_form_lightbluedark.gif">
296
                     <span class='err_alert'><b>WARNING!</span>
470
                     <span class='err_alert'><b>WARNING!</span>
297
                     <font size='1'>
471
                     <font size='1'>
-
 
472
                        <br>
298
                        When set to No, this package and <u>all</u> packages which depend on this package, either directly or indirectly,
473
                        When set to No, this package and <u>all</u> packages which depend on this package, either directly or indirectly,<br>
299
                        will be excluded from the build. When the Yes option is disabled, indicates this package has been excluded indirectly.
474
                        will be excluded from the build. When the Yes option is disabled, indicates this package has been excluded indirectly.
300
                     </font></b>
475
                     </font></b>
301
                  </td>
476
                  </td>
302
               </tr>
477
               </tr>
303
               <tr>
478
               <tr>
304
                  <td>&nbsp;</td>
479
                  <td>&nbsp;</td>
305
                  <td valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Ripple Type?<%=Quick_Help ( "ripple_type" )%></td>
480
                  <td 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">
481
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
307
 
-
 
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 )%>
482
                    &nbsp;&nbsp;<% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%>&nbsp;&nbsp;
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>
483
                  </td>
327
 
-
 
328
                  <td background="images/bg_form_lightbluedark.gif">
484
                  <td background="images/bg_form_lightbluedark.gif">
329
                     <span class='err_alert'><b>WARNING!</span>
485
                     <span class='err_alert'><b>WARNING!</span>
-
 
486
                     <font size='1'>
-
 
487
                        <br>
330
                     <font size='1'> This enables a package to advertise how it will be numbered when rippled.
488
                        This enables a package to advertise how it will be numbered when rippled.<br>
331
                        THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER,
489
                        THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER,<br>
332
                        AND FOR PRODUCTS WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.
490
                        AND FOR PRODUCTS WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.
333
                     </font></b>
491
                     </font></b>
334
                  </td>
492
                  </td>
335
               </tr>
493
               </tr>
-
 
494
               <tr id="limits_row" style="visibility:hidden; position:static">
-
 
495
                  <td>&nbsp;</td>
-
 
496
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Version Field Limits</td>
-
 
497
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
-
 
498
                     Major&nbsp;&nbsp;<input name="Major" id="Major" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("major_limit")%>">&nbsp;&nbsp;<br>
-
 
499
                     Minor&nbsp;&nbsp;<input name="Minor" id="Minor" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("minor_limit")%>">&nbsp;&nbsp;<br>
-
 
500
                     Patch&nbsp;&nbsp;<input name="Patch" id="Patch" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("patch_limit")%>">&nbsp;&nbsp;<br>
-
 
501
                     Build&nbsp;&nbsp;<input name="Build" id="Build" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("build_number_limit")%>">&nbsp;&nbsp;
-
 
502
                  </td>
-
 
503
                  <td background="images/bg_form_lightbluedark.gif">
-
 
504
                     <span class='err_alert'><b>WARNING!</span>
-
 
505
                     <font size='1'>
-
 
506
                        <br>
-
 
507
                        A field (major/minor/patch/build number) may be assigned non zero limits to determine how it will be numbered when rippled.<br>
-
 
508
                        Prior to reaching a limit, the rightmost field able to be incremented will be when rippled.<br>
-
 
509
                        Upon reaching a limit, that rightmost field will be set to zero and the field next left with a non zero limit (if one exists) will be incremented when rippled.<br>
-
 
510
                        A field may be assigned to zero to fix the field (to 0 or 000 for the build number field) when rippled.
-
 
511
                     </font></b>
-
 
512
                  </td>
-
 
513
               </tr>
336
               <tr>
514
               <tr>
337
                  <td>&nbsp;</td>
515
                  <td>&nbsp;</td>
338
                  <td nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
516
                  <td nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
339
                  <td nowrap> <p>&nbsp;</p></td>
517
                  <td nowrap> <p>&nbsp;</p></td>
340
                  <td nowrap>&nbsp;</td>
518
                  <td nowrap>&nbsp;</td>