Subversion Repositories DevTools

Rev

Rev 6615 | Rev 6693 | 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
      rowId.options[0] = new Option('Loading...','');
217
      rowId.selectedIndex = 0;
218
 
219
 
220
      //Create the xmlHttp object to use in the request
221
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
222
      // This is non-blocking (asynchronous)
223
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
224
 
225
      //Send the xmlHttp get to the specified url
226
      xmlHttp_Get(xmlHttp, url);
227
 
228
   }
229
   else
230
   {
231
      var requestURL = 'RequestReleaseMoveCombo.asp';
232
      // Set ajax divname
233
      ajaxdivname = rowId;
234
 
235
      //Append the name to search for to the requestURL
236
      var url = requestURL + '?proj_id=0';
237
 
238
      //Progress
239
 
240
      //Create the xmlHttp object to use in the request
241
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
242
      // This is non-blocking (asynchronous)
243
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
244
 
245
      //Send the xmlHttp get to the specified url
246
      xmlHttp_Get(xmlHttp, url);
247
   }
248
}
249
 
250
//-->
251
</script>
252
<!-- DROPDOWN MENUS -->
5983 dpurdie 253
<!--#include file="_jquery_includes.asp"-->
5357 dpurdie 254
<!--#include file="_menu_def.asp"-->
6579 dpurdie 255
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 256
 
257
</head>
258
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.proj_name.focus();">
259
<!-- HEADER -->
260
<!--#include file="_header.asp"-->
261
<!-- BODY ---->
262
 
263
<table width="100%" border="0" cellspacing="0" cellpadding="0">
264
   <%
265
   '-- FROM START ---------------------------------------------------------------------------------------------------------
266
   objFormComponent.FormName = "FormName"
267
   objFormComponent.Action = ScriptName
268
   Call objFormComponent.FormStart()
269
   %>
270
   <tr>
271
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
272
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
273
         <table width="10" border="0" cellspacing="0" cellpadding="0">
274
            <tr>
275
               <td width="1%"></td>
276
               <td width="100%">
277
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
278
                     <tr>
279
                        <td nowrap class="body_txt">
280
                        </td>
281
                     </tr>
282
                  </table>
283
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
284
                     <tr>
285
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
286
                        <%If parModeCode = 5 Then%>
287
                           <p>EDIT RELEASE BEFORE ARCHIVING</p>
288
                        <%ElseIf parModeCode = 6 Then%>
289
                           <p>EDIT RELEASE BEFORE PRESERVING</p>
290
                        <%Else%>
291
                           <p>EDIT RELEASE BEFORE CLOSING</p>
292
                        <%End If%>
293
                        </td>
294
                        <td align="right" valign="bottom"></td>
295
                     </tr>
296
                  </table>
297
               </td>
298
               <td width="1%"></td>
299
            </tr>
300
            <tr>
301
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
302
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
303
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
304
            </tr>
305
            <tr>
306
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
307
               <td bgcolor="#FFFFFF" valign="top">
308
                  <%If ProblemInfo.Count > 0 Then%>
309
                  <span class=err_alert>Problems encountered</span>
310
                  <%End If%>
311
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
312
                  <!--#include file="messages/_msg_inline.asp"-->
313
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
314
                  <br>
315
 
316
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
317
 
318
                     <tr>
319
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>
320
 
321
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
322
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
323
                        <%If ProblemInfo.Count > 0 Then%>
324
                        <td valign="top" wrap background="images/bg_table_col.gif" class="body_col">Problem</td>
325
                        <%End If%>
326
                        <td valign="top">
327
                     </tr>
328
                     <%
329
                     Dim currState
330
                     currState = ""
331
                     OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
332
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
333
                     OraDatabase.Parameters.Remove "RTAG_ID"
334
 
335
                     '--- Render rows ---
336
                     Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
337
 
338
                        'Add   the   pv_ids   to   the   Array
339
                        pvIdList.Add   CStr(rsQry("pv_id")), rsQry("pkg_version")
340
                        ' -------- GROUP BY BASE VIEW  -----------------
341
                        If CStr(currState) <> CStr(rsQry("state")) Then
342
                        %>
343
                           <tr>
344
                              <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
345
                           </tr>
346
                           <tr>
347
                              <td nowrap class="body_scol"><%=rsQry("state")%></td>
348
                              <td nowrap class="body_scol"></td>
349
                              <td nowrap class="body_scol"></td>
350
                           </tr>
351
                           <%
352
                           currState = CStr(rsQry("state"))
353
                        End If
354
                        %>
355
 
356
                        <tr>
357
                           <td nowrap class="body_rowg"></td>
358
                           <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
359
                           <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
360
                        <%If ProblemInfo.Count > 0 Then%>
361
                           <td nowrap class="body_rowg err_alert"><%=ProblemInfo.Item(CStr(rsQry("pv_id")))%></td>
362
                        <%End If%>
363
                        </tr>
364
                        <%
365
                        rsQry.MoveNext
366
 
367
                        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
368
                           <tr>
369
                              <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
370
                           </tr>
371
                        <%End If
372
                     Loop
373
                     rsQry.Close()
374
                     Set rsQry = nothing
375
 
376
                     pvIds = pvIdList.Keys
377
                     For i = 0 to pvIdList.Count -1
378
                        PVS   =   PVS   +   pvIds(i)   +   ","
379
                     Next
380
                     Set pvIds = Nothing
381
                     %>
382
                     <tr>
383
                        <td class="form_iname">&nbsp;</td>
384
                        <td>&nbsp;</td>
385
                        <td class="val_err"></td>
386
                     </tr>
387
                  </table>
388
               </td>
389
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
390
            </tr>
391
            <tr>
392
               <td background="images/bg_action_norm.gif" ></td>
393
               <td align="right" background="images/bg_action_norm.gif" >
394
                  <a class="body_col">Select Decision: </a>
395
                  <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">
396
                     <option value='0' selected>--None--</option>
397
                     <option value='1' >Delete All</option>
398
                     <option value='2' >Move All</option>
399
                  </select>
400
 
401
                  <a class="body_col">Select Destination: </a>
402
                  <select name="FRrtag_id" id="FRrtag_id" class="form_item">
403
                  </select>
404
 
405
                  <%=objFormComponent.SubmitButton ( "OK", "class='form_btn' id='FormOk' disabled" )%>&nbsp;
406
                  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", rfile&"?rtag_id="&Request("rtag_id") )%>
407
                  <%=objPMod.ComposeHiddenTags()%>
408
                  <input type="hidden" name="decision" value="decision.value">
409
                  <%If Request("FRrtag_id") <> "" Then%>
410
                     <input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
411
                  <%End If%>
412
                  <input type="hidden" name="action" value="true">
413
                  <input type="hidden" name="pvIds" value=<%=PVS%>>
414
                  <input type="hidden" name="mode_code" value=<%=parModeCode%>>
415
               </td>
416
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
417
            </tr>
418
            <tr>
419
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
420
               <td background="images/lbox_bg_blue.gif"></td>
421
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
422
            </tr>
423
         </table>
424
 
425
         <!-- ACTION BUTTONS ---------------------------------------------->
426
         <!-- ACTION BUTTONS END  ------------------------------------------>
427
      </td>
428
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
429
   </tr>
430
   <tr>
431
      <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>
432
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
433
   </tr>
434
   <%
435
   Call objFormComponent.FormEnd()
436
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
437
   %>
438
</table>
439
<!-- FOOTER -->
440
<!--#include file="_footer.asp"-->
441
</body>
442
</html>