Subversion Repositories DevTools

Rev

Rev 5591 | Rev 5983 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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