Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
129 ghuddy 5
'|                   Edit Project View Details    |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
129 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 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", "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
5176 dpurdie 34
Dim parModeCode
129 ghuddy 35
Dim   pvIdList, pvIds, PVS, i, aFullList
119 ghuddy 36
Dim ProblemsString
5176 dpurdie 37
Dim ProblemInfo
119 ghuddy 38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
parProjId = Request("proj_id")
5176 dpurdie 41
parModeCode = Request("mode_code")
119 ghuddy 42
objPMod.PersistInQryString("proj_id")
5176 dpurdie 43
Set pvIdList    =   Server.CreateObject("Scripting.Dictionary")
44
Set ProblemInfo =   Server.CreateObject("Scripting.Dictionary")
119 ghuddy 45
'----------------------------------------------
46
%>
47
 
48
<%
49
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )
129 ghuddy 50
 
51
   OraDatabase.Parameters.Add "PV_ID",             nPvId,             ORAPARM_INPUT,  ORATYPE_NUMBER
52
   OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT,  ORATYPE_CHAR
53
   OraDatabase.Parameters.Add "PROBLEM_STRING",    NULL,              ORAPARM_OUTPUT, ORATYPE_VARCHAR2
54
 
55
   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
56
 
57
   objEH.TryORA ( OraSession )
58
   On Error Resume Next
59
 
60
   OraDatabase.ExecuteSQL _
61
   "BEGIN "&_
62
   " PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_
63
   "END; "
64
 
65
   objEH.CatchORA ( OraSession )
66
 
67
   outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").Value
68
 
69
   OraDatabase.Parameters.Remove "PV_ID"
70
   OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS"
71
   OraDatabase.Parameters.Remove "PROBLEM_STRING"
119 ghuddy 72
End Sub
73
%>
74
<%
75
Sub MovePackage(nPvId, newRtagId)
76
 
129 ghuddy 77
   OraDatabase.Parameters.Add "PV_ID",          nPvId,    ORAPARM_INPUT, ORATYPE_NUMBER
78
   OraDatabase.Parameters.Add "CURRENT_RTAG_ID",    Request("rtag_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
79
   OraDatabase.Parameters.Add "NEW_RTAG_ID",       newRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
80
   OraDatabase.Parameters.Add "USER_ID",          objAccessControl.UserId,    ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 81
 
129 ghuddy 82
   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
83
 
84
   objEH.TryORA ( OraSession )
85
   On Error Resume Next
86
 
87
   OraDatabase.ExecuteSQL _
88
   "BEGIN "&_
89
   " PK_PACKAGE.MOVE_PACKAGE ( :PV_ID, :CURRENT_RTAG_ID, :NEW_RTAG_ID, :USER_ID ); "&_
90
   "END; "
91
 
92
   objEH.CatchORA ( OraSession )
93
 
94
   OraDatabase.Parameters.Remove "PV_ID"
95
   OraDatabase.Parameters.Remove "CURRENT_RTAG_ID"
96
   OraDatabase.Parameters.Remove "NEW_RTAG_ID"
97
   OraDatabase.Parameters.Remove "USER_ID"
98
 
119 ghuddy 99
End Sub
100
%>
101
<%
102
'--------------------------------------------------------------------------------------------------------------------------
103
Sub GetFormDetails ( parProjId, ByRef outobjDetails )
129 ghuddy 104
   Dim rsQry, query
105
 
106
 
107
   OraDatabase.Parameters.Add "PROJ_ID",    parProjId,      ORAPARM_INPUT, ORATYPE_NUMBER
108
 
109
   query = _
110
   " SELECT prj.* "&_
111
   "  FROM PROJECTS prj"&_
112
   " WHERE prj.PROJ_ID = :PROJ_ID"
113
 
114
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
115
 
116
   OraDatabase.Parameters.Remove "PROJ_ID"
117
 
118
   If rsQry.RecordCount > 0 Then
119
      outobjDetails.Item ("proj_id") = rsQry("proj_id")
120
      outobjDetails.Item ("proj_name") = rsQry("proj_name")
121
      'outobjDetails.Item ("description") = rsQry("description")
122
      'outobjDetails.Item ("parent_rtag_id") = rsQry("parent_rtag_id")
123
      'outobjDetails.Item ("config_spec_branch") = rsQry("config_spec_branch")
124
      'outobjDetails.Item ("owner_email") = rsQry("owner_email")
125
      'If rsQry("assoc_mass_ref") <> "" Then
126
      'outobjDetails.Item ("massref_rtag_id") = rsQry("assoc_mass_ref")
127
      'End If
128
   Else
129
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parProjId="& parProjId
130
 
131
   End If
132
 
133
 
134
   rsQry.Close
135
   Set rsQry = Nothing
119 ghuddy 136
End Sub
137
 
138
'--------------------------------------------------------------------------------------------------------------------------
139
%>
140
<%
141
'------------ RUN BEFORE PAGE RENDER ----------
142
' --- Get Form details from DB ---
143
'Call GetFormDetails ( Request("proj_id"), objFormCollector )
144
 
145
' --- Load Validation Rules ---
129 ghuddy 146
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )      ' Load Validation Rules
119 ghuddy 147
 
148
' --- Enter Form Validation Rule Changes here... ----
149
'----------------------------------------------------
150
 
151
' --- RUN onPostBack ---
152
If Request("action") <> "" Then
129 ghuddy 153
   Dim decision
5176 dpurdie 154
   Dim problem : problem = false
155
 
129 ghuddy 156
   decision = Left(Request("decision"), 1) 'Gets the decision based on the combo box selection
119 ghuddy 157
 
129 ghuddy 158
   aFullList = Split ( Replace( Request("pvIds"), " ", "" ), "," )
159
 
160
   If decision = 0 Then
161
      Call OpenInWindow ( "dependencies.asp?rtag_id="&Request("rtag_id") )
162
   ElseIf decision = 1 Then
163
      For Each PVS In aFullList
164
         If PVS <> "" Then Call DestroyPackage(PVS, "N", ProblemsString)
5176 dpurdie 165
         If ProblemsString <> "" Then
166
            ProblemInfo.Add PVS, ProblemsString
167
            problem = true
168
         End If
129 ghuddy 169
      Next
170
   ElseIf decision = 2 Then
171
      For Each PVS In aFullList
172
         If PVS <> "" Then Call MovePackage(PVS,Request("FRrtag_id"))
173
      Next
174
   End If
175
 
5176 dpurdie 176
   If objEH.Finally AND NOT problem Then
177
      Call OpenInWindow ( "_change_release_mode.asp?mode_code=" & parModeCode & "&rtag_id="&Request("rtag_id") )
129 ghuddy 178
   End If
179
 
119 ghuddy 180
End If
181
 
182
'----------------------------------------------
183
%>
184
 
185
<html>
186
<head>
187
<title>Release Manager</title>
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
 
5176 dpurdie 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
 
129 ghuddy 206
   if ( option == 2 )
207
   {
208
      var requestURL = 'RequestReleaseMoveCombo.asp';
119 ghuddy 209
 
129 ghuddy 210
      // Set ajax divname
211
      ajaxdivname = rowId;
119 ghuddy 212
 
129 ghuddy 213
      //Append the name to search for to the requestURL
214
      var url = requestURL + paramString;
119 ghuddy 215
 
129 ghuddy 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
   }
119 ghuddy 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 -------------------------------------->
129 ghuddy 273
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 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">
129 ghuddy 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">
119 ghuddy 293
            <tr>
129 ghuddy 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>
5176 dpurdie 305
                        <%If parModeCode = 5 Then%>
306
                           <p>EDIT RELEASE BEFORE ARCHIVING</p>
307
                        <%Else%>
129 ghuddy 308
                           <p>EDIT RELEASE BEFORE CLOSING</p>
5176 dpurdie 309
                        <%End If%>
129 ghuddy 310
                        </td>
311
                        <td align="right" valign="bottom"></td>
312
                     </tr>
313
                  </table>
314
               </td>
315
               <td width="1%"></td>
119 ghuddy 316
            </tr>
317
            <tr>
129 ghuddy 318
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
319
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
320
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
119 ghuddy 321
            </tr>
129 ghuddy 322
            <tr>
323
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
324
               <td bgcolor="#FFFFFF" valign="top">
5176 dpurdie 325
                  <%If ProblemInfo.Count > 0 Then%>
326
                  <span class=err_alert>Problems encountered</span>
327
                  <%End If%>
129 ghuddy 328
                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
329
                  <!--#include file="messages/_msg_inline.asp"-->
330
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
331
                  <br>
119 ghuddy 332
 
129 ghuddy 333
                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">
119 ghuddy 334
 
129 ghuddy 335
                     <tr>
336
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>
119 ghuddy 337
 
129 ghuddy 338
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
339
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
5176 dpurdie 340
                        <%If ProblemInfo.Count > 0 Then%>
341
                        <td valign="top" wrap background="images/bg_table_col.gif" class="body_col">Problem</td>
342
                        <%End If%>
129 ghuddy 343
                        <td valign="top">
344
                     </tr>
345
                     <%
346
                     Dim currState
347
                     currState = ""
348
                     OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
349
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
350
                     OraDatabase.Parameters.Remove "RTAG_ID"
119 ghuddy 351
 
129 ghuddy 352
                     '--- Render rows ---
353
                     Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
119 ghuddy 354
 
129 ghuddy 355
                        'Add   the   pv_ids   to   the   Array
356
                        pvIdList.Add   CStr(rsQry("pv_id")), rsQry("pkg_version")
357
                        ' -------- GROUP BY BASE VIEW  -----------------
358
                        If CStr(currState) <> CStr(rsQry("state")) Then
359
                        %>
360
                           <tr>
361
                              <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
362
                           </tr>
363
                           <tr>
364
                              <td nowrap class="body_scol"><%=rsQry("state")%></td>
365
                              <td nowrap class="body_scol"></td>
366
                              <td nowrap class="body_scol"></td>
367
                           </tr>
368
                           <%
369
                           currState = CStr(rsQry("state"))
370
                        End If
371
                        %>
119 ghuddy 372
 
129 ghuddy 373
                        <tr>
374
                           <td nowrap class="body_rowg"></td>
375
                           <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
376
                           <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
5176 dpurdie 377
                        <%If ProblemInfo.Count > 0 Then%>
378
                           <td nowrap class="body_rowg err_alert"><%=ProblemInfo.Item(CStr(rsQry("pv_id")))%></td>
379
                        <%End If%>
129 ghuddy 380
                        </tr>
381
                        <%
382
                        rsQry.MoveNext
383
 
384
                        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
385
                           <tr>
386
                              <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
387
                           </tr>
388
                        <%End If
389
                     Loop
390
                     rsQry.Close()
391
                     Set rsQry = nothing
392
 
393
                     pvIds = pvIdList.Keys
394
                     For i = 0 to pvIdList.Count -1
395
                        PVS   =   PVS   +   pvIds(i)   +   ","
396
                     Next
397
                     Set pvIds = Nothing
398
                     %>
399
                     <tr>
400
                        <td class="form_iname">&nbsp;</td>
401
                        <td>&nbsp;</td>
402
                        <td class="val_err"></td>
403
                     </tr>
404
                  </table>
405
               </td>
406
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
407
            </tr>
408
            <tr>
409
               <td background="images/bg_action_norm.gif" ></td>
410
               <td align="right" background="images/bg_action_norm.gif" >
411
                  <a class="body_col">Select Decision: </a>
412
                  <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">
413
                     <option value='0' selected>--None--</option>
414
                     <option value='1' >Delete All</option>
415
                     <option value='2' >Move All</option>
416
                  </select>
417
 
418
                  <a class="body_col">Select Destination: </a>
419
                  <select name="FRrtag_id" id="FRrtag_id" class="form_item">
420
                  </select>
421
 
5176 dpurdie 422
                  <%=objFormComponent.SubmitButton ( "OK", "class='form_btn' id='FormOk' disabled" )%>&nbsp;
129 ghuddy 423
                  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", "dependencies.asp?rtag_id="&Request("rtag_id") )%>
424
                  <%=objPMod.ComposeHiddenTags()%>
425
                  <input type="hidden" name="decision" value="decision.value">
426
                  <%If Request("FRrtag_id") <> "" Then%>
427
                     <input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
428
                  <%End If%>
429
                  <input type="hidden" name="action" value="true">
430
                  <input type="hidden" name="pvIds" value=<%=PVS%>>
5176 dpurdie 431
                  <input type="hidden" name="mode_code" value=<%=parModeCode%>>
129 ghuddy 432
               </td>
433
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
434
            </tr>
435
            <tr>
436
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
437
               <td background="images/lbox_bg_blue.gif"></td>
438
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
439
            </tr>
440
         </table>
441
 
442
         <!-- ACTION BUTTONS ---------------------------------------------->
443
         <!-- ACTION BUTTONS END  ------------------------------------------>
444
      </td>
445
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
446
   </tr>
447
   <tr>
448
      <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>
449
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
450
   </tr>
451
   <%
452
   Call objFormComponent.FormEnd()
453
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
454
   %>
119 ghuddy 455
</table>
456
 
457
<!-- FOOTER -->
458
<!--#include file="_footer.asp"-->
459
</body>
460
</html>
461
<%
462
Call Destroy_All_Objects
129 ghuddy 463
%>