Subversion Repositories DevTools

Rev

Rev 6070 | Rev 6615 | 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">
6579 dpurdie 190
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
191
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
192
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
193
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 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 -->
5983 dpurdie 265
<!--#include file="_jquery_includes.asp"-->
5357 dpurdie 266
<!--#include file="_menu_def.asp"-->
6579 dpurdie 267
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 268
 
269
</head>
270
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.proj_name.focus();">
271
<!-- HEADER -->
272
<!--#include file="_header.asp"-->
273
<!-- BODY ---->
274
 
275
<table width="100%" border="0" cellspacing="0" cellpadding="0">
276
   <%
277
   '-- FROM START ---------------------------------------------------------------------------------------------------------
278
   objFormComponent.FormName = "FormName"
279
   objFormComponent.Action = ScriptName
280
   Call objFormComponent.FormStart()
281
   %>
282
   <tr>
283
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
284
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
285
         <table width="10" border="0" cellspacing="0" cellpadding="0">
286
            <tr>
287
               <td width="1%"></td>
288
               <td width="100%">
289
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
290
                     <tr>
291
                        <td nowrap class="body_txt">
292
                        </td>
293
                     </tr>
294
                  </table>
295
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
296
                     <tr>
297
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
298
                        <%If parModeCode = 5 Then%>
299
                           <p>EDIT RELEASE BEFORE ARCHIVING</p>
300
                        <%ElseIf parModeCode = 6 Then%>
301
                           <p>EDIT RELEASE BEFORE PRESERVING</p>
302
                        <%Else%>
303
                           <p>EDIT RELEASE BEFORE CLOSING</p>
304
                        <%End If%>
305
                        </td>
306
                        <td align="right" valign="bottom"></td>
307
                     </tr>
308
                  </table>
309
               </td>
310
               <td width="1%"></td>
311
            </tr>
312
            <tr>
313
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
314
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
315
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
316
            </tr>
317
            <tr>
318
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
319
               <td bgcolor="#FFFFFF" valign="top">
320
                  <%If ProblemInfo.Count > 0 Then%>
321
                  <span class=err_alert>Problems encountered</span>
322
                  <%End If%>
323
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
324
                  <!--#include file="messages/_msg_inline.asp"-->
325
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
326
                  <br>
327
 
328
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
329
 
330
                     <tr>
331
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>
332
 
333
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
334
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
335
                        <%If ProblemInfo.Count > 0 Then%>
336
                        <td valign="top" wrap background="images/bg_table_col.gif" class="body_col">Problem</td>
337
                        <%End If%>
338
                        <td valign="top">
339
                     </tr>
340
                     <%
341
                     Dim currState
342
                     currState = ""
343
                     OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
344
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
345
                     OraDatabase.Parameters.Remove "RTAG_ID"
346
 
347
                     '--- Render rows ---
348
                     Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
349
 
350
                        'Add   the   pv_ids   to   the   Array
351
                        pvIdList.Add   CStr(rsQry("pv_id")), rsQry("pkg_version")
352
                        ' -------- GROUP BY BASE VIEW  -----------------
353
                        If CStr(currState) <> CStr(rsQry("state")) Then
354
                        %>
355
                           <tr>
356
                              <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
357
                           </tr>
358
                           <tr>
359
                              <td nowrap class="body_scol"><%=rsQry("state")%></td>
360
                              <td nowrap class="body_scol"></td>
361
                              <td nowrap class="body_scol"></td>
362
                           </tr>
363
                           <%
364
                           currState = CStr(rsQry("state"))
365
                        End If
366
                        %>
367
 
368
                        <tr>
369
                           <td nowrap class="body_rowg"></td>
370
                           <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
371
                           <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
372
                        <%If ProblemInfo.Count > 0 Then%>
373
                           <td nowrap class="body_rowg err_alert"><%=ProblemInfo.Item(CStr(rsQry("pv_id")))%></td>
374
                        <%End If%>
375
                        </tr>
376
                        <%
377
                        rsQry.MoveNext
378
 
379
                        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
380
                           <tr>
381
                              <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
382
                           </tr>
383
                        <%End If
384
                     Loop
385
                     rsQry.Close()
386
                     Set rsQry = nothing
387
 
388
                     pvIds = pvIdList.Keys
389
                     For i = 0 to pvIdList.Count -1
390
                        PVS   =   PVS   +   pvIds(i)   +   ","
391
                     Next
392
                     Set pvIds = Nothing
393
                     %>
394
                     <tr>
395
                        <td class="form_iname">&nbsp;</td>
396
                        <td>&nbsp;</td>
397
                        <td class="val_err"></td>
398
                     </tr>
399
                  </table>
400
               </td>
401
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
402
            </tr>
403
            <tr>
404
               <td background="images/bg_action_norm.gif" ></td>
405
               <td align="right" background="images/bg_action_norm.gif" >
406
                  <a class="body_col">Select Decision: </a>
407
                  <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">
408
                     <option value='0' selected>--None--</option>
409
                     <option value='1' >Delete All</option>
410
                     <option value='2' >Move All</option>
411
                  </select>
412
 
413
                  <a class="body_col">Select Destination: </a>
414
                  <select name="FRrtag_id" id="FRrtag_id" class="form_item">
415
                  </select>
416
 
417
                  <%=objFormComponent.SubmitButton ( "OK", "class='form_btn' id='FormOk' disabled" )%>&nbsp;
418
                  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", rfile&"?rtag_id="&Request("rtag_id") )%>
419
                  <%=objPMod.ComposeHiddenTags()%>
420
                  <input type="hidden" name="decision" value="decision.value">
421
                  <%If Request("FRrtag_id") <> "" Then%>
422
                     <input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
423
                  <%End If%>
424
                  <input type="hidden" name="action" value="true">
425
                  <input type="hidden" name="pvIds" value=<%=PVS%>>
426
                  <input type="hidden" name="mode_code" value=<%=parModeCode%>>
427
               </td>
428
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
429
            </tr>
430
            <tr>
431
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
432
               <td background="images/lbox_bg_blue.gif"></td>
433
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
434
            </tr>
435
         </table>
436
 
437
         <!-- ACTION BUTTONS ---------------------------------------------->
438
         <!-- ACTION BUTTONS END  ------------------------------------------>
439
      </td>
440
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
441
   </tr>
442
   <tr>
443
      <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>
444
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
445
   </tr>
446
   <%
447
   Call objFormComponent.FormEnd()
448
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
449
   %>
450
</table>
451
<!-- FOOTER -->
452
<!--#include file="_footer.asp"-->
453
</body>
454
</html>