Subversion Repositories DevTools

Rev

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