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