Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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