Subversion Repositories DevTools

Rev

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

Rev 3959 Rev 4198
Line 13... Line 13...
13
<!--#include file="common/conf.asp"-->
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_dbedit.asp"-->
-
 
19
<!--#include file="common/_popup_window_common.asp"-->
-
 
20
<!--#include file="_drawExtensionSelectBox.asp"-->
-
 
21
<%
18
<%
22
'------------ ACCESS CONTROL ------------------
19
'------------ ACCESS CONTROL ------------------
23
%>
20
%>
24
<!--#include file="_access_control_login.asp"-->
21
<!--#include file="_access_control_login.asp"-->
25
<!--#include file="_access_control_general.asp"-->
22
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_project.asp"-->
23
<!--#include file="_access_control_project.asp"-->
27
<%
-
 
28
'------------ Variable Definition -------------
-
 
29
Dim parPv_id
-
 
30
Dim parRfile
-
 
31
Dim rsPkgInfo
-
 
32
Dim errMessage
-
 
33
Dim objPkgInfo
-
 
34
'------------ Constants Declaration -----------
-
 
35
'------------ Variable Init -------------------
-
 
36
parPv_id = QStrPar("pv_id")
-
 
37
parRfile = QStrPar("rfile")
-
 
38
Set objPkgInfo = CreateObject("Scripting.Dictionary")
-
 
39
'-----------------------------------------------------------------------------------------------------------------------------
-
 
40
Sub GetPackageInfo( nPvId, outPkgInfo )
-
 
41
   Dim rsTemp, Query_String
-
 
42
   If IsEmpty(nPvId) Then Exit Sub
-
 
43
 
-
 
44
   Query_String = _
-
 
45
   " SELECT pv.pv_id, pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, pv.build_type, pv.is_patch"&_
-
 
46
   "  FROM packages pkg, package_versions pv"&_
-
 
47
   " WHERE pkg.pkg_id = pv.pkg_id  AND pv.pv_id ="& nPvId
-
 
48
 
-
 
49
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
50
 
-
 
51
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
-
 
52
      outPkgInfo.Item("pv_id") = rsTemp.Fields("pv_id")
-
 
53
      outPkgInfo.Item("pkg_id") = rsTemp.Fields("pkg_id")
-
 
54
      outPkgInfo.Item("pkg_name") = rsTemp.Fields("pkg_name")
-
 
55
      outPkgInfo.Item("pkg_version") = rsTemp.Fields("pkg_version")
-
 
56
      outPkgInfo.Item("v_ext") = rsTemp.Fields("v_ext")
-
 
57
      outPkgInfo.Item("build_type") = rsTemp.Fields("build_type")
-
 
58
      outPkgInfo.Item("is_patch") = rsTemp.Fields("is_patch")
-
 
59
 
-
 
60
      If rsTemp.Fields("build_type") = "M" Then
-
 
61
         objPkgInfo.Item("M_checked") = "checked"
-
 
62
         objPkgInfo.Item("A_checked") = ""
-
 
63
         objPkgInfo.Item("M_display") = "style='display:inline;'"
-
 
64
         objPkgInfo.Item("A_display") = "style='display:none;'"
-
 
65
      ElseIf rsTemp.Fields("build_type") = "A" Then
-
 
66
         objPkgInfo.Item("M_checked") = ""
-
 
67
         objPkgInfo.Item("A_checked") = "checked"
-
 
68
         objPkgInfo.Item("M_display") = "style='display:none;'"
-
 
69
         objPkgInfo.Item("A_display") = "style='display:inline;'"
-
 
70
      End If
-
 
71
   End If
-
 
72
 
-
 
73
   rsTemp.Close
-
 
74
   Set rsTemp = nothing
-
 
75
End Sub
-
 
76
 
-
 
77
'-----------------------------------------------------------------------------------------------------------------------------
-
 
78
Function GetVersionNumber(SSpkg_version, SSv_ext)
-
 
79
   Dim versionNumber
-
 
80
 
-
 
81
   If SSv_ext <> "" Then
-
 
82
      versionNumber = Replace(SSpkg_version, SSv_ext, "")
-
 
83
   Else
-
 
84
      versionNumber = SSpkg_version
-
 
85
   End If
-
 
86
 
-
 
87
   GetVersionNumber = versionNumber
-
 
88
End Function
-
 
89
'-----------------------------------------------------------------------------------------------------------------------------
-
 
90
Sub Rename_Pkg_Version ( NNpv_id, SSnewVersion, errMessage )
-
 
91
   OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
92
   OraDatabase.Parameters.Add "NNpv_id", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
93
 
-
 
94
   If Request("build_type") = "M" Then
-
 
95
      ' Manual build
-
 
96
      OraDatabase.Parameters.Add "SSpkg_version",  SSnewVersion & Request("v_ext"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
97
   Else
-
 
98
      ' Automated Build
-
 
99
      OraDatabase.Parameters.Add "SSpkg_version",  Request("v_ext"), ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
100
 
-
 
101
   End If
-
 
102
 
-
 
103
   OraDatabase.Parameters.Add "BUILD_TYPE", Request("build_type"), ORAPARM_INPUT, ORATYPE_CHAR
-
 
104
   OraDatabase.Parameters.Add "NNuser_id", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
105
 
-
 
106
 
-
 
107
   OraDatabase.Parameters.Add "errMessage", 0, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
-
 
108
 
-
 
109
 
-
 
110
   objEH.TryORA ( OraSession )
-
 
111
   On Error Resume Next
-
 
112
 
-
 
113
   OraDatabase.ExecuteSQL _
-
 
114
   "BEGIN Rename_Package_Version ( :NNpv_id,"&_
-
 
115
   "                               :SSpkg_version,"&_
-
 
116
   "                               :BUILD_TYPE,"&_
-
 
117
   "                               :NNuser_id,"&_
-
 
118
   "                               :errMessage ); END;"
-
 
119
 
-
 
120
   objEH.CatchORA ( OraSession )
-
 
121
 
-
 
122
   errMessage = OraDatabase.Parameters("errMessage").Value
-
 
123
 
-
 
124
   OraDatabase.Parameters.Remove "RTAG_ID"
-
 
125
   OraDatabase.Parameters.Remove "NNpv_id"
-
 
126
   OraDatabase.Parameters.Remove "SSpkg_version"
-
 
127
   OraDatabase.Parameters.Remove "NNuser_id"
-
 
128
   OraDatabase.Parameters.Remove "errMessage"
-
 
129
   OraDatabase.Parameters.Remove "BUILD_TYPE"
-
 
130
End Sub
-
 
131
'-----------------------------------------------------------------------------------------------------------------------------
-
 
132
%>
-
 
133
<%
-
 
134
'-----------------------  MAIN LINE  ---------------------------
-
 
135
'--- Process submition ---
-
 
136
If CBool(QStrPar("action")) AND  objAccessControl.UserLogedIn  Then
-
 
137
 
-
 
138
   Call Rename_Pkg_Version ( parPv_id, Request("FRnewver"), errMessage )
-
 
139
 
-
 
140
   If NOT IsNull(errMessage) Then
-
 
141
      Call RaiseMsgInParent ( Eval(errMessage), parRtag_id &"|"& parPv_id)
-
 
142
   Else
-
 
143
      Call OpenInParentWindow ( parRfile &"?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
-
 
144
   End If
-
 
145
 
-
 
146
   Call CloseWindow
-
 
147
End If
-
 
148
%>
-
 
149
<%Call GetPackageInfo( parPv_id, objPkgInfo )%>
-
 
150
<html>
24
<html>
151
<head>
25
<head>
152
<title>Release Manager</title>
26
<title>Release Manager</title>
153
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
27
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
154
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
28
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
155
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
29
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
156
<link rel="stylesheet" href="images/navigation.css" type="text/css">
30
<link rel="stylesheet" href="images/navigation.css" type="text/css">
157
<script language="JavaScript" src="images/common.js"></script>
31
<script language="JavaScript" src="images/common.js"></script>
158
<script language="JavaScript" type="text/JavaScript">
-
 
159
<!--
-
 
160
   function validateVersion(is_patch)
-
 
161
   {
-
 
162
      var versionBase = document.getElementsByName('FRnewver')[0].value;
-
 
163
 
-
 
164
      var exts = document.getElementsByName('v_ext')[0]
-
 
165
      var versionExt =  exts.options[exts.options.selectedIndex].value
-
 
166
 
-
 
167
      var typeButtons = document.getElementsByName('build_type');
-
 
168
      var isAutobuild = typeButtons[0].checked || false;
-
 
169
 
-
 
170
      MM_validateForm({vBase:versionBase, vExt:versionExt, isAuto:isAutobuild, isPatch:is_patch == "Y"},'Version Number','RisVersionNumber');
-
 
171
      return document.MM_returnValue;
-
 
172
   }
-
 
173
 
-
 
174
   // Change the elements displayed on the page depending on the build type selected.
-
 
175
   function configurePage(buildType)
-
 
176
   {
-
 
177
      var typeButtons = document.getElementsByName('build_type');
-
 
178
 
-
 
179
 
-
 
180
      if (buildType == "M")
-
 
181
      {
-
 
182
         Visible ('divVersionNumber','inline', 'divAutoVersion','none');
-
 
183
         typeButtons[1].checked = true;
-
 
184
         showCots();
-
 
185
      }
-
 
186
      else if (buildType == "A")
-
 
187
      {
-
 
188
         Visible ('divVersionNumber','none', 'divAutoVersion','inline');
-
 
189
         typeButtons[0].checked = true;
-
 
190
         hideCots();
-
 
191
      }
-
 
192
   }
-
 
193
 
-
 
194
   // Show the .cots/.tool extension. It's not included in the intial query results.
-
 
195
   // Show extensions that are Allowed in Manual mode
-
 
196
   function showCots()
-
 
197
   {
-
 
198
      var exts = document.getElementsByName('v_ext')[0];
-
 
199
 
-
 
200
      for (index = 0; index < exts.length; index++)
-
 
201
      {
-
 
202
         if (exts.options[index].getAttribute("isCOTS") == "Y")
-
 
203
         {
-
 
204
            exts.options[index].style.display = "inline";
-
 
205
            exts.options[index].disabled=false;
-
 
206
         }
-
 
207
      }
-
 
208
   }
-
 
209
 
-
 
210
   // Hide the .cots/.tool extension from the list of extensions.
-
 
211
   // Hide extensions that are not allowed in AUTO mode
-
 
212
   // IE does not honor .style.display - so just disable it.
-
 
213
   function hideCots()
-
 
214
   {
-
 
215
      var exts = document.getElementsByName('v_ext')[0];
-
 
216
 
-
 
217
      for (index = 0; index < exts.length; index++)
-
 
218
      {
-
 
219
         if (exts.options[index].getAttribute("isCOTS") == "Y")
-
 
220
         {
-
 
221
            exts.options[index].style.display = "none";
-
 
222
            exts.options[index].disabled=true;
-
 
223
         }
-
 
224
      }
-
 
225
   }
-
 
226
 
-
 
227
   // Change the selected extensions in the list to the existing package extension.
-
 
228
   function selectExtension(extension)
-
 
229
   {
-
 
230
      var exts = document.getElementsByName('v_ext')[0];
-
 
231
 
-
 
232
      // Set the first option as selected by default
-
 
233
      exts.options[0].selected = true;
-
 
234
 
-
 
235
      for (index = 0; index < exts.length; index++)
-
 
236
      {
-
 
237
         if (exts.options[index].value == extension)
-
 
238
         {
-
 
239
            exts.options[index].selected = true;
-
 
240
         }
-
 
241
      }
-
 
242
   }
-
 
243
//-->
-
 
244
</script>
-
 
245
</head>
32
</head>
246
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();configurePage('<%=objPkgInfo("build_type")%>');selectExtension('<%=objPkgInfo("v_ext")%>');">
-
 
247
<form name="renameversion" method="post" action="<%=scriptName%>" onsubmit="return validateVersion('<%=objPkgInfo("is_patch")%>');">
-
 
248
   <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
-
 
249
      <tr>
-
 
250
         <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_new_off.gif" width="18" height="23" hspace="5" border="0"></td>
-
 
251
         <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Reversion Package </td>
-
 
252
         <td background="images/lbox_bg_blue.gif" align="right" width="50%">
-
 
253
            <input type="submit" name="btn" value="Submit" class="form_btn_comp">
-
 
254
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
-
 
255
         </td>
-
 
256
         <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
-
 
257
         <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
-
 
258
      </tr>
-
 
259
      <tr>
-
 
260
         <td height="100%" width="1%">&nbsp;</td>
-
 
261
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
-
 
262
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
33
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
263
            <tr>
-
 
264
               <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
-
 
265
               <td width="1%" nowrap class="form_group" valign="bottom"></td>
-
 
266
               <td width="100%" nowrap></td>
-
 
267
            </tr>
-
 
268
            <tr>
-
 
269
               <td width="1%">&nbsp;</td>
-
 
270
               <td width="1%"   nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package</td>
-
 
271
               <td width="100%" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><%=objPkgInfo.Item("pkg_name")%></td>
-
 
272
            </tr>
-
 
273
            <tr>
-
 
274
               <td width="1%">&nbsp;</td>
-
 
275
               <td width="1%"   nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Version Number Assignment</td>
-
 
276
               <td width="100%" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
-
 
277
                  <%
-
 
278
                  ' Patches are never auto-built so tell user this if they try to make them so and make sure Manual
-
 
279
                  ' build_type value of the radio button is checked afterwards.
-
 
280
                  If objPkgInfo("is_patch") = "Y" Then%>
34
<!-- TIPS LAYERS -------------------------------------->
281
                     <input name="build_type" type="radio" value="A" onclick="alert('Patches must be manually versioned'); document.renameversion.build_type[1].click()">Auto
-
 
282
                  <%Else%>
-
 
283
                     <input name="build_type" type="radio" value="A" onclick="configurePage('A')">Auto
-
 
284
                  <%End If%>
-
 
285
                  <input name="build_type" type="radio" value="M" onclick="configurePage('M')">Manual
-
 
286
               </td>
-
 
287
            </tr>
-
 
288
            <tr>
-
 
289
               <td>&nbsp;</td>
-
 
290
               <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Version</td>
-
 
291
               <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
-
 
292
                  <DIV id="divVersionNumber" name="divVersionNumber">
-
 
293
                     <input type="text" name="FRnewver" class="form_item" size="10" value="<%=GetVersionNumber(objPkgInfo.Item("pkg_version"), objPkgInfo.Item("v_ext"))%>">
-
 
294
                  </DIV>
-
 
295
                  <div id="divAutoVersion" name="divAutoVersion">(auto-number)</div>
-
 
296
                  <div id="divVersionExtension" name="divVersionExtension" style="display:inline;">
-
 
297
                     <select name="v_ext" id="v_ext" class="form_item">
-
 
298
                        <%
-
 
299
                        Call drawExtensionSelectBox( objPkgInfo.Item("v_ext"), false )
-
 
300
                        %>
-
 
301
                     </select>
-
 
302
                  </div>
-
 
303
               </td>
-
 
304
            </tr>
-
 
305
            <tr>
-
 
306
               <td width="1%">&nbsp;</td>
-
 
307
               <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
35
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
308
               <td nowrap width="100%"> <p>&nbsp;</p></td>
36
<!----------------------------------------------------->
309
            </tr>
37
<!-- MIDDLE -->
310
         </table>
-
 
311
         </td>
-
 
312
      </tr>
-
 
313
      <tr>
-
 
314
         <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
-
 
315
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
-
 
316
      </tr>
-
 
317
   </table>
-
 
318
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
-
 
319
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
-
 
320
<input type="hidden" name="rfile" value="<%=parRfile%>">
-
 
321
<input type="hidden" name="action" value="true">
38
<!--#include file="_form_new_version_page.asp"-->
322
</form>
-
 
323
</body>
39
</body>
324
</html>
40
</html>
325
 
41
<%
-
 
42
Call Destroy_All_Objects
326
 
43
%>
327
<!-- DESTRUCTOR ------->
-
 
328
<!--#include file="common/destructor.asp"-->
-