Subversion Repositories DevTools

Rev

Details | 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
' --- Load Validation Rules ---
148
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )      ' Load Validation Rules
149
 
150
' --- Enter Form Validation Rule Changes here... ----
151
'----------------------------------------------------
152
 
153
' --- RUN onPostBack ---
154
If Request("action") <> "" Then
155
   Dim decision
156
   Dim problem : problem = false
157
 
158
   decision = Left(Request("decision"), 1) 'Gets the decision based on the combo box selection
159
 
160
   aFullList = Split ( Replace( Request("pvIds"), " ", "" ), "," )
161
 
162
   If decision = 0 Then
163
      Call OpenInWindow ( rfile & "?rtag_id="&Request("rtag_id") )
164
   ElseIf decision = 1 Then
165
      For Each PVS In aFullList
166
         If PVS <> "" Then Call DestroyPackage(PVS, "N", ProblemsString)
167
         If ProblemsString <> "" Then
168
            ProblemInfo.Add PVS, ProblemsString
169
            problem = true
170
         End If
171
      Next
172
   ElseIf decision = 2 Then
173
      For Each PVS In aFullList
174
         If PVS <> "" Then Call MovePackage(PVS,Request("FRrtag_id"))
175
      Next
176
   End If
177
 
178
   If objEH.Finally AND NOT problem Then
179
      Call OpenInWindow ( "_change_release_mode.asp?mode_code=" & parModeCode & "&rtag_id="&Request("rtag_id") )
180
   End If
181
 
182
End If
183
 
184
'----------------------------------------------
185
%>
186
 
187
<html>
188
<head>
189
<title>Release Manager</title>
190
<link rel="shortcut icon" href="<%=FavIcon%>"/>
191
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
192
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
193
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
194
<link rel="stylesheet" href="images/navigation.css" type="text/css">
195
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
196
<script language="JavaScript" src="images/common.js"></script>
197
<script language="JavaScript" type="text/javascript">
198
<!--
199
 
200
function RequestDetails( option, paramString, rowId){
201
 
202
   // Drive the OK button.
203
   // Enable it if user has selected an option
204
   var okBtn = MM_findObj( 'FormOk' );
205
   if (okBtn ) {
206
    okBtn.disabled  = option == 0;
207
    }
208
 
209
   if ( option == 2 )
210
   {
211
      var requestURL = 'RequestReleaseMoveCombo.asp';
212
 
213
      // Set ajax divname
214
      ajaxdivname = rowId;
215
 
216
      //Append the name to search for to the requestURL
217
      var url = requestURL + paramString;
218
 
219
      //Progress
220
      //alert(MM_findObj( rowId ));
221
 
222
      //MM_findObj( rowId ).options[0] = new Option('Loading...','');
223
      //MM_findObj( rowId ).selectedIndex = 0;
224
      rowId.options[0] = new Option('Loading...','');
225
      rowId.selectedIndex = 0;
226
 
227
 
228
      //Create the xmlHttp object to use in the request
229
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
230
      // This is non-blocking (asynchronous)
231
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
232
 
233
      //Send the xmlHttp get to the specified url
234
      xmlHttp_Get(xmlHttp, url);
235
 
236
   }
237
   else
238
   {
239
      var requestURL = 'RequestReleaseMoveCombo.asp';
240
      // Set ajax divname
241
      ajaxdivname = rowId;
242
 
243
      //Append the name to search for to the requestURL
244
      var url = requestURL + '?proj_id=0';
245
 
246
      //Progress
247
      //alert(MM_findObj( rowId ));
248
 
249
      //MM_findObj( rowId ).options[0] = new Option('Loading...','');
250
      //MM_findObj( rowId ).selectedIndex = 0;
251
      //rowId.options[0] = new Option('Loading...','');
252
      //rowId.selectedIndex = 0;
253
 
254
 
255
      //Create the xmlHttp object to use in the request
256
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
257
      // This is non-blocking (asynchronous)
258
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
259
 
260
      //Send the xmlHttp get to the specified url
261
      xmlHttp_Get(xmlHttp, url);
262
   }
263
}
264
 
265
//-->
266
</script>
267
<!-- DROPDOWN MENUS -->
268
 
269
 
270
<!--#include file="_menu_def.asp"-->
271
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
272
 
273
</head>
274
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.proj_name.focus();">
275
<!-- MENU LAYERS -------------------------------------->
276
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
277
</div>
278
<!-- TIPS LAYERS -------------------------------------->
279
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
280
<!----------------------------------------------------->
281
<!-- HEADER -->
282
<!--#include file="_header.asp"-->
283
<!-- BODY ---->
284
 
285
<table width="100%" border="0" cellspacing="0" cellpadding="0">
286
   <%
287
   '-- FROM START ---------------------------------------------------------------------------------------------------------
288
   objFormComponent.FormName = "FormName"
289
   objFormComponent.Action = ScriptName
290
   Call objFormComponent.FormStart()
291
   %>
292
   <tr>
293
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
294
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
295
         <table width="10" border="0" cellspacing="0" cellpadding="0">
296
            <tr>
297
               <td width="1%"></td>
298
               <td width="100%">
299
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
300
                     <tr>
301
                        <td nowrap class="body_txt">
302
                        </td>
303
                     </tr>
304
                  </table>
305
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
306
                     <tr>
307
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
308
                        <%If parModeCode = 5 Then%>
309
                           <p>EDIT RELEASE BEFORE ARCHIVING</p>
310
                        <%ElseIf parModeCode = 6 Then%>
311
                           <p>EDIT RELEASE BEFORE PRESERVING</p>
312
                        <%Else%>
313
                           <p>EDIT RELEASE BEFORE CLOSING</p>
314
                        <%End If%>
315
                        </td>
316
                        <td align="right" valign="bottom"></td>
317
                     </tr>
318
                  </table>
319
               </td>
320
               <td width="1%"></td>
321
            </tr>
322
            <tr>
323
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
324
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
325
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
326
            </tr>
327
            <tr>
328
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
329
               <td bgcolor="#FFFFFF" valign="top">
330
                  <%If ProblemInfo.Count > 0 Then%>
331
                  <span class=err_alert>Problems encountered</span>
332
                  <%End If%>
333
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
334
                  <!--#include file="messages/_msg_inline.asp"-->
335
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
336
                  <br>
337
 
338
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
339
 
340
                     <tr>
341
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>
342
 
343
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
344
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
345
                        <%If ProblemInfo.Count > 0 Then%>
346
                        <td valign="top" wrap background="images/bg_table_col.gif" class="body_col">Problem</td>
347
                        <%End If%>
348
                        <td valign="top">
349
                     </tr>
350
                     <%
351
                     Dim currState
352
                     currState = ""
353
                     OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
354
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
355
                     OraDatabase.Parameters.Remove "RTAG_ID"
356
 
357
                     '--- Render rows ---
358
                     Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
359
 
360
                        'Add   the   pv_ids   to   the   Array
361
                        pvIdList.Add   CStr(rsQry("pv_id")), rsQry("pkg_version")
362
                        ' -------- GROUP BY BASE VIEW  -----------------
363
                        If CStr(currState) <> CStr(rsQry("state")) Then
364
                        %>
365
                           <tr>
366
                              <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
367
                           </tr>
368
                           <tr>
369
                              <td nowrap class="body_scol"><%=rsQry("state")%></td>
370
                              <td nowrap class="body_scol"></td>
371
                              <td nowrap class="body_scol"></td>
372
                           </tr>
373
                           <%
374
                           currState = CStr(rsQry("state"))
375
                        End If
376
                        %>
377
 
378
                        <tr>
379
                           <td nowrap class="body_rowg"></td>
380
                           <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
381
                           <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
382
                        <%If ProblemInfo.Count > 0 Then%>
383
                           <td nowrap class="body_rowg err_alert"><%=ProblemInfo.Item(CStr(rsQry("pv_id")))%></td>
384
                        <%End If%>
385
                        </tr>
386
                        <%
387
                        rsQry.MoveNext
388
 
389
                        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
390
                           <tr>
391
                              <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
392
                           </tr>
393
                        <%End If
394
                     Loop
395
                     rsQry.Close()
396
                     Set rsQry = nothing
397
 
398
                     pvIds = pvIdList.Keys
399
                     For i = 0 to pvIdList.Count -1
400
                        PVS   =   PVS   +   pvIds(i)   +   ","
401
                     Next
402
                     Set pvIds = Nothing
403
                     %>
404
                     <tr>
405
                        <td class="form_iname">&nbsp;</td>
406
                        <td>&nbsp;</td>
407
                        <td class="val_err"></td>
408
                     </tr>
409
                  </table>
410
               </td>
411
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
412
            </tr>
413
            <tr>
414
               <td background="images/bg_action_norm.gif" ></td>
415
               <td align="right" background="images/bg_action_norm.gif" >
416
                  <a class="body_col">Select Decision: </a>
417
                  <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">
418
                     <option value='0' selected>--None--</option>
419
                     <option value='1' >Delete All</option>
420
                     <option value='2' >Move All</option>
421
                  </select>
422
 
423
                  <a class="body_col">Select Destination: </a>
424
                  <select name="FRrtag_id" id="FRrtag_id" class="form_item">
425
                  </select>
426
 
427
                  <%=objFormComponent.SubmitButton ( "OK", "class='form_btn' id='FormOk' disabled" )%>&nbsp;
428
                  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", rfile&"?rtag_id="&Request("rtag_id") )%>
429
                  <%=objPMod.ComposeHiddenTags()%>
430
                  <input type="hidden" name="decision" value="decision.value">
431
                  <%If Request("FRrtag_id") <> "" Then%>
432
                     <input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
433
                  <%End If%>
434
                  <input type="hidden" name="action" value="true">
435
                  <input type="hidden" name="pvIds" value=<%=PVS%>>
436
                  <input type="hidden" name="mode_code" value=<%=parModeCode%>>
437
               </td>
438
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
439
            </tr>
440
            <tr>
441
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
442
               <td background="images/lbox_bg_blue.gif"></td>
443
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
444
            </tr>
445
         </table>
446
 
447
         <!-- ACTION BUTTONS ---------------------------------------------->
448
         <!-- ACTION BUTTONS END  ------------------------------------------>
449
      </td>
450
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
451
   </tr>
452
   <tr>
453
      <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>
454
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
455
   </tr>
456
   <%
457
   Call objFormComponent.FormEnd()
458
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
459
   %>
460
</table>
461
 
462
<!-- FOOTER -->
463
<!--#include file="_footer.asp"-->
464
</body>
465
</html>
466
<%
467
Call Destroy_All_Objects
468
%>