Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
123 ghuddy 3
'               Build Environment
119 ghuddy 4
'=====================================================
5
%>
6
<!--#include file="_tabs_definition_env.asp"-->
7
<!--#include file="common/_form_window_common.asp"-->
8
<%
9
'------------ Variable Definition -------------
123 ghuddy 10
Dim parOLshow     ' show/hide outer-latest
11
Dim parBshow      ' expand/collapse base views
12
Dim parPshow      ' expand/collapse personal views
13
Dim parPview      ' enable/disable all personal views
14
Dim parDview      ' enable/disable   deployment   view.
119 ghuddy 15
Dim IMG_locked
16
Dim rsEnvQry
17
Dim pvIdInList
18
Dim checked
19
Dim disabled
20
Dim pkgType
21
Dim SCRIPT_NAME 'Use this here only as the previous one ScriptName is Already Defined
22
'------------ Constants Declaration -----------
23
Const imgMaximise  = "<IMG src='images/i_maximise.gif' alt='Show view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
24
Const imgMinimise  = "<IMG src='images/i_minimise.gif' alt='Hide view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
25
Const imgForced    = "<img src='images/s_forced.gif' width='19' height='17' align='absmiddle'>"
26
Const imgLocked    = "<img src='images/i_locked.gif' width='7' height='10' border='0' hspace='2'>"
27
Const hlColor      = "#DDDDDD"
28
Const imgAdded     = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Added'>"
29
Const imgRemoved   = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Removed'>"
30
'------------ Variable Init -------------------
31
parOLshow = QStrPar("OLshow")
32
parBshow = QStrPar("Bshow")
33
parPshow = QStrPar("Pshow")
34
parPview = QStrPar("Pview")
35
parDview = QStrPar("Dview")
36
'----------------------------------------------
37
%>
38
 
39
<script language="JavaScript" type="text/javascript">
40
<!--
41
var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0;
42
var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0;
43
var is_opera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0;
44
    //netscape, safari, mozilla behave the same???
45
var is_netscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0;
46
 
47
 
123 ghuddy 48
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
49
// This function is executed when the Bulk Release action button is pressed. It will do some local
50
// client side checks and then if all is well, it will use the make_bulk_release.asp to initiate
51
// the bulk release process on the server side.
52
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
53
function makeBulkRelease()
54
{
55
   // Get the form containing all of the pending items
56
   var f = document.getElementById('pending_PVID_List');
57
   if (f == null)
58
      alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
59
   else
60
   {
61
      // When no items exist in the pending tab, the pending_PVID_List form will not contain any
62
      // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
63
      if (f.pv_id_list == null)
64
      {
65
         alert('There are no items pending that can be considered for bulk release.\n\n' +
66
               'Use the Bulk Release button when items with checkboxes are present in the\n' +
67
               'Pending Tab.');
68
      }
69
      else
70
      {
71
         var doBulkRelease = true;
119 ghuddy 72
 
123 ghuddy 73
         // Count the number of checked and enabled items to see if there is actually any work to
74
         // do and if not issue an alert to the user. The pending_PVID_List form contains checkbox
75
         // items representing the pending versions, and the user may have checked any number of them
76
         // or none.
77
         //
78
         // NOTE, disabled items are indicative of pending autobuild versions that have already
79
         // been approved and are just awaiting processing by the build daemon that will make
80
         // them released once they have built successfully. We must not count those in our total.
81
         var n;
82
         var numCheckedAndEnabled = 0;
83
         var numUncheckedAndEnabled = 0;
119 ghuddy 84
 
123 ghuddy 85
         // Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
86
         // has to change. We cannot use array access syntax in such a case.
87
         if (f.length == 1 )
88
         {
89
            if (f.pv_id_list.value != null)
90
            {
91
               if (false == f.pv_id_list.disabled)
92
               {
93
                  if (true == f.pv_id_list.checked)
94
                     numCheckedAndEnabled++;
95
                  else
96
                     numUncheckedAndEnabled++;
97
               }
98
            }
99
         }
100
         else
101
         {
102
            // Here we can and have to use array access syntax.
103
            for (n = 0; n < f.pv_id_list.length; n++)
104
            {
105
               if (false == f.pv_id_list[n].disabled)
106
               {
107
                  if (true == f.pv_id_list[n].checked)
108
                     numCheckedAndEnabled++;
109
                  else
110
                     numUncheckedAndEnabled++;
111
               }
112
            }
113
         }
119 ghuddy 114
 
123 ghuddy 115
         if (numCheckedAndEnabled == 0)
116
         {
117
				if (numUncheckedAndEnabled == 0)
118
				{
119
					alert('Currently, there are no items that can be bulk released');
120
					doBulkRelease = false;
121
				}
122
				else
123
				{
124
            	// No enabled items have their checkboxes checked. Offer the user an easy way to
125
            	// bulk release the entire set, or to abort
126
            	doBulkRelease = confirm('No (enabled) items in the Pending Tab have been checked.\n' +
127
                                    	'This may mean you wish to bulk release ALL items without\n' +
128
                                    	'having to check every single one of them individually.\n\n' +
129
                                    	'\tPress OK to bulk release all outstanding items.\n' +
130
                                    	'\tPress CANCEL to abort bulk release.\n\n' );
131
            	if (doBulkRelease == true)
132
            	{
133
               	// Programmatically check all the enabled items. The user will see this happening on their browser
134
               	// and may be able to uncheck a few items before the submit() action further down in this
135
               	// function is called. However, the worst that can happen is that a few items will not get
136
               	// bulk released and the user has to do another bulk release operation.
137
                  if (f.length == 1 )
138
                  {
139
                     if (false == f.pv_id_list.checked && false == f.pv_id_list.disabled)
140
                     {
141
                        f.pv_id_list.checked = true;
142
                     }
143
                  }
144
                  else
145
                  {
146
                     for (n = 0; n < f.pv_id_list.length; n++)
147
                     {
148
                        if (false == f.pv_id_list[n].checked && false == f.pv_id_list[n].disabled)
149
                        {
150
                           f.pv_id_list[n].checked = true;
151
                        }
152
                     }
153
                  }
154
            	}
155
				}
156
         }
119 ghuddy 157
 
123 ghuddy 158
         if (doBulkRelease == true)
159
         {
160
            // Initiate the bulk release by redirecting the browser to the make_bulk_release.asp page
161
            // which holds the server side VBScript code that actually carries out the release operations.
162
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
163
            // this _environment.asp file is a part (by direct inclusion)
125 ghuddy 164
            <%If Request("pv_id") Then%>
165
               f.action = "make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
123 ghuddy 166
            <%Else%>
167
               f.action = "make_bulk_release.asp?rtag_id=<%=parRtag_id%>";
168
            <%End If%>
169
            f.submit();
170
            // TODO : I would like to show progress? Is that even possible? If so, how?
171
         }
172
      }
173
   }
174
}
119 ghuddy 175
 
4358 dpurdie 176
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
177
// This function is executed when the Bulk Remove action button is pressed. It will do some local
178
// client side checks and then if all is well, it will use the make_bulk_remove.asp to initiate
179
// the bulk remove process on the server side.
180
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
181
function makeBulkReject()
182
{
183
   // Get the form containing all of the pending items
184
   var f = document.getElementById('pending_PVID_List');
185
   if (f == null)
186
      alert('Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
187
   else
188
   {
189
      // When no items exist in the pending tab, the pending_PVID_List form will not contain any
190
      // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
191
      if (f.pv_id_list == null)
192
      {
193
         alert('There are no items pending that can be considered for bulk rejection.\n\n' +
194
               'Use the Bulk Reject button when items with checkboxes are present in the\n' +
195
               'Pending Tab.');
196
      }
197
      else
198
      {
199
         var doBulkReject = true;
200
 
201
         // Count the number of checked and enabled items to see if there is actually any work to
202
         // do and if not issue an alert to the user. The pending_PVID_List form contains checkbox
203
         // items representing the pending versions, and the user may have checked any number of them
204
         // or none.
205
         //
206
         // NOTE, disabled items are indicative of pending autobuild versions that have already
207
         // been approved and are just awaiting processing by the build daemon that will make
208
         // them removed once they have built successfully. We must not count those in our total.
209
         var n;
210
         var numCheckedAndEnabled = 0;
211
         var numUncheckedAndEnabled = 0;
212
 
213
         // Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
214
         // has to change. We cannot use array access syntax in such a case.
215
         if (f.length == 1 )
216
         {
217
            if (f.pv_id_list.value != null)
218
            {
219
               if (false == f.pv_id_list.disabled)
220
               {
221
                  if (true == f.pv_id_list.checked)
222
                     numCheckedAndEnabled++;
223
                  else
224
                     numUncheckedAndEnabled++;
225
               }
226
            }
227
         }
228
         else
229
         {
230
            // Here we can and have to use array access syntax.
231
            for (n = 0; n < f.pv_id_list.length; n++)
232
            {
233
               if (false == f.pv_id_list[n].disabled)
234
               {
235
                  if (true == f.pv_id_list[n].checked)
236
                     numCheckedAndEnabled++;
237
                  else
238
                     numUncheckedAndEnabled++;
239
               }
240
            }
241
         }
242
 
243
         if (numCheckedAndEnabled == 0)
244
         {
245
				if (numUncheckedAndEnabled == 0)
246
				{
247
					alert('Currently, there are no items that can be bulk removed');
248
					doBulkReject = false;
249
				}
250
				else
251
				{
252
            	// No enabled items have their checkboxes checked. Offer the user an easy way to
253
            	// bulk remove the entire set, or to abort
254
            	doBulkReject = confirm('No (enabled) items in the Pending Tab have been checked.\n' +
255
                                    	'This may mean you wish to bulk remove ALL items without\n' +
256
                                    	'having to check every single one of them individually.\n\n' +
257
                                    	'\tPress OK to bulk reject all outstanding items.\n' +
258
                                    	'\tPress CANCEL to abort bulk reject.\n\n' );
259
            	if (doBulkReject == true)
260
            	{
261
               	// Programmatically check all the enabled items. The user will see this happening on their browser
262
               	// and may be able to uncheck a few items before the submit() action further down in this
263
               	// function is called. However, the worst that can happen is that a few items will not get
264
               	// bulk removed and the user has to do another bulk remove operation.
265
                  if (f.length == 1 )
266
                  {
267
                     if (false == f.pv_id_list.checked && false == f.pv_id_list.disabled)
268
                     {
269
                        f.pv_id_list.checked = true;
270
                     }
271
                  }
272
                  else
273
                  {
274
                     for (n = 0; n < f.pv_id_list.length; n++)
275
                     {
276
                        if (false == f.pv_id_list[n].checked && false == f.pv_id_list[n].disabled)
277
                        {
278
                           f.pv_id_list[n].checked = true;
279
                        }
280
                     }
281
                  }
282
            	}
283
				}
284
         }
285
         else
286
         {
287
             doBulkReject = confirm('Reject all checked items from the Pending List.\n\n' +
288
                                     '\tPress OK to bulk reject all outstanding items.\n' +
289
                                     '\tPress CANCEL to abort bulk reject.\n\n' );
290
 
291
         }
292
 
293
         if (doBulkReject == true)
294
         {
295
            // Initiate the bulk remove by redirecting the browser to the make_bulk_remove.asp page
296
            // which holds the server side VBScript code that actually carries out the remove operations.
297
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
298
            // this _environment.asp file is a part (by direct inclusion)
299
            <%If Request("pv_id") Then%>
300
               f.action = "make_bulk_reject.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
301
            <%Else%>
302
               f.action = "make_bulk_reject.asp?rtag_id=<%=parRtag_id%>";
303
            <%End If%>
304
            f.submit();
305
            // TODO : I would like to show progress? Is that even possible? If so, how?
306
         }
307
      }
308
   }
309
}
310
 
311
 
123 ghuddy 312
function RequestViewContent( paramString, rowId ){
313
   var requestURL = 'RequestViewContent.asp';
119 ghuddy 314
 
123 ghuddy 315
   // Toggle div
316
   ToggleDisplay( 'ENVDIV'+ rowId );
119 ghuddy 317
 
123 ghuddy 318
   // Change display states
319
   if ( (MM_findObj( 'ENVIMG'+ rowId ).src).indexOf('btn_max.gif') == -1 )
320
   {
321
      // View is currently minimised
322
      MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_max.gif';
323
      MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#808080';
119 ghuddy 324
 
123 ghuddy 325
      // Remove from SHow View List
326
      RemoveFromShowView ( rowId );
327
   }
328
   else
329
   {
330
      // View is currently maximised
331
      MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
332
      MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
119 ghuddy 333
 
123 ghuddy 334
      // Add it to Show view id
335
      AddToShowView ( rowId );
336
   }
119 ghuddy 337
 
123 ghuddy 338
   // Fix div width for ie so it does not overflow
339
   if (is_ie)
340
   {
341
      MM_findObj( 'ENVDIV'+ rowId ).style.width = '100%';
342
   }
119 ghuddy 343
 
123 ghuddy 344
   // Set ajax divname
345
   ajaxdivname = 'ENVDIV'+ rowId;
119 ghuddy 346
 
123 ghuddy 347
   // Request data from server
348
   if ( (MM_findObj( ajaxdivname ).innerHTML).indexOf('<%=enumLOADING%>') != -1 )
349
   {
350
      //Append the name to search for to the requestURL
351
      var url = requestURL + paramString;
119 ghuddy 352
 
123 ghuddy 353
      //Create the xmlHttp object to use in the request
354
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
355
      // This is non-blocking (asynchronous)
356
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 357
 
123 ghuddy 358
      //Send the xmlHttp get to the specified url
359
      xmlHttp_Get(xmlHttp, url);
360
   }
361
}
119 ghuddy 362
 
123 ghuddy 363
function GetXmlHttpObject(handler) {
364
   var objXmlHttp = null;    //Holds the local xmlHTTP object instance
119 ghuddy 365
 
123 ghuddy 366
   //Depending on the browser, try to create the xmlHttp object
367
   if (is_ie){
368
      //The object to create depends on version of IE
369
      //If it isn't ie5, then default to the Msxml2.XMLHTTP object
370
      var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
119 ghuddy 371
 
123 ghuddy 372
      //Attempt to create the object
373
      try{
374
         objXmlHttp = new ActiveXObject(strObjName);
375
         objXmlHttp.onreadystatechange = handler;
376
      }
377
      catch(e){
378
      //Object creation errored
379
         alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
380
         return;
381
      }
382
   }
383
   else if (is_opera){
384
      //Opera has some issues with xmlHttp object functionality
385
      alert('Opera detected. The page may not behave as expected.');
386
      return;
387
   }
388
   else{
389
      // Mozilla | Netscape | Safari
390
      objXmlHttp = new XMLHttpRequest();
391
      objXmlHttp.onload = handler;
392
      objXmlHttp.onerror = handler;
393
   }
119 ghuddy 394
 
123 ghuddy 395
   //Return the instantiated object
396
   return objXmlHttp;
119 ghuddy 397
}
398
 
123 ghuddy 399
//stateChangeHandler will fire when the state has changed, i.e. data is received back
400
// This is non-blocking (asynchronous)
401
function stateChangeHandler()
402
{
403
   //readyState of 4 or 'complete' represents that data has been returned
404
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
405
      //Gather the results from the callback
406
      var str = xmlHttp.responseText;
119 ghuddy 407
 
123 ghuddy 408
      //Populate the innerHTML of the div with the results
409
      document.getElementById(ajaxdivname).innerHTML = str;
410
   }
411
}
119 ghuddy 412
 
123 ghuddy 413
// XMLHttp send GET request
414
function xmlHttp_Get(xmlhttp, url) {
415
   //Getting a permissions error here? Check the url string to
416
   // ensure it is accurate (defined above)
417
   xmlhttp.open('GET', url, true);
418
   xmlhttp.send(null);
419
}
119 ghuddy 420
 
421
 
422
 
423
function RemoveFromShowView ( ViewId )
424
{
123 ghuddy 425
   // Get current cookie settings
426
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
427
   var aShowViews = new Array();
119 ghuddy 428
 
123 ghuddy 429
   if (us)
430
   {
431
      // Cookie is not empty, hence just append new value
432
      var aViews = us.split(',');
119 ghuddy 433
 
123 ghuddy 434
      // Make sure that view is not already on the list
435
      for (i=0; i<aViews.length; i++)
436
      {
437
         if (aViews[i] != ViewId)
438
         {
439
            aShowViews.push(aViews[i]);
440
         }
441
      }
119 ghuddy 442
 
123 ghuddy 443
      // Make a new view list to be stored in cookie
444
      us = aShowViews.join(',');
445
   }
446
   else
447
   {
448
      us = '';
449
   }
119 ghuddy 450
 
123 ghuddy 451
   // Store to cookie
452
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 453
}
454
 
455
function AddToShowView ( ViewId )
456
{
123 ghuddy 457
   // Get current cookie settings
458
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
459
   var aShowViews = new Array();
119 ghuddy 460
 
123 ghuddy 461
   //Release Manager Cookie Available on Show View
462
   if ( us )
463
   {
464
      // Cookie is not empty, hence just append new value
465
      var aViews = us.split(',');
119 ghuddy 466
 
123 ghuddy 467
      // Make sure that view is not already on the list
468
      for (i=0; i<aViews.length; i++)
469
      {
470
         if (aViews[i] != ViewId)
471
         {
472
            aShowViews.push(aViews[i]);
473
         }
474
      }
119 ghuddy 475
 
123 ghuddy 476
      // Make a new view list to be stored in cookie
477
      us = aShowViews.join(',') + ',' + ViewId;
478
   }
479
   else//Release Manager Cookie Not Available on Show View
480
   {
481
      // Cookie is empty, just add this value
482
      us = ViewId;
119 ghuddy 483
 
123 ghuddy 484
   }
119 ghuddy 485
 
123 ghuddy 486
   // Store to cookie
487
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 488
}
489
 
490
 
491
//-->
492
</script>
493
 
494
<%
495
'------------------------------------------------------------------------------------------------------------------------------------------------
496
Function GetEnvTab ( sEnvTab )
123 ghuddy 497
   If sEnvTab <> "" Then
498
      GetEnvTab = sEnvTab
499
      Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = sEnvTab
500
   Else
501
      If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") <> "" Then
502
         GetEnvTab = Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab")
503
      Else
504
         GetEnvTab = enumENVTAB_WORK_IN_PROGRESS
505
         Response.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("envtab") = enumENVTAB_WORK_IN_PROGRESS
506
      End If
507
   End If
119 ghuddy 508
 
509
End Function
510
'------------------------------------------------------------------------------------------------------------------------------------------------
511
Sub Display_Env_BaseView ( NNbase_view_id, SSbase_view, BBviewCollapsed, SScontents )
512
%>
513
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
123 ghuddy 514
   <tr>
515
      <td width="1" align="left" valign="top" bgcolor="#dad7c8"><img src="images/p_ctl.gif" width="3" height="3"></td>
516
      <td width="100%" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
517
      <td width="1" bgcolor="#dad7c8"><img src="images/spacer.gif" width="1" height="1"></td>
518
      <td width="1" align="right" valign="top" bgcolor="#dad7c8"><img src="images/p_ctr.gif" width="3" height="3"></td>
519
   </tr>
520
   <tr>
521
      <td align="left" valign="top" bgcolor="#dad7c8">&nbsp;</td>
522
      <td bgcolor="#dad7c8"><SPAN id="SPANVIEW<%=NNbase_view_id%>" <%If BBviewCollapsed Then%>class="body_scol_thin"<%Else%>class="body_txt"<%End If%>>&nbsp;<b><%=SSbase_view%></b></SPAN></td>
523
      <td align="right" bgcolor="#dad7c8"><a href="javascript:;" onClick="RequestViewContent('?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&view_id=<%=NNbase_view_id%>&script_name=<%=ScriptName%>','<%=NNbase_view_id%>');"><img id="ENVIMG<%=NNbase_view_id%>" src="images/<%If BBviewCollapsed Then %>btn_max.gif<%Else%>btn_min.gif<%End If%>" border="0"></a></td>
524
      <td align="right" valign="top" bgcolor="#dad7c8">&nbsp;</td>
525
   </tr>
119 ghuddy 526
</table>
527
<DIV id="ENVDIV<%=NNbase_view_id%>" class="envContent" <%If BBviewCollapsed Then %>style="display:none;"<%Else%>style="display:block;"<%End If%>>
123 ghuddy 528
   <%If NOT BBviewCollapsed Then %>
529
      <%=SScontents%>
530
   <%Else%>
531
      <%=enumLOADING%>
532
   <%End If%>
533
</DIV>
119 ghuddy 534
<br>
535
<%
536
End Sub
537
'------------------------------------------------------------------------------------------------------------------------------------------------
538
Sub Print_View( NNEnvTab, SSviewtype, NNrtag_id, SSshowviews, NNuser_id )
123 ghuddy 539
   Dim rsView, Query_String
540
   'Dim btn1
541
   Dim tmpURL
542
   Dim SSscript
543
   Dim qstrPar
544
   Dim nViewType
545
   Dim nTrueRecordCount
546
   Dim nOperation
547
   Dim relContentsSTR, viewCollapsed, curr_view_id, view_name
119 ghuddy 548
 
123 ghuddy 549
   If scriptName = "find.asp" Then
550
      SSscript = "dependencies.asp"
551
   Else
552
      SSscript = scriptName
553
   End If
119 ghuddy 554
 
123 ghuddy 555
   If SSviewtype = "guest" Then
556
      nViewType = 1
557
      qstrPar = "Bshow"
558
   ElseIf SSviewtype = "personal" Then
559
      nViewType = 2
560
      qstrPar = "Pshow"
561
   End If
119 ghuddy 562
 
123 ghuddy 563
   OraDatabase.Parameters.Add "VIEW_TYPE",           nViewType, ORAPARM_INPUT, ORATYPE_NUMBER
564
   'OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   ShowView( Pipes2Commas( SSshowviews ), SSviewtype ), ORAPARM_INPUT, ORATYPE_VARCHAR2
565
   OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   GetShowViewList(), ORAPARM_INPUT, ORATYPE_VARCHAR2
566
   OraDatabase.Parameters.Add "RTAG_ID",             NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
567
   OraDatabase.Parameters.Add "USER_ID",             NNuser_id, ORAPARM_INPUT, ORATYPE_NUMBER
568
   OraDatabase.Parameters.Add "TRUE_RECORD_COUNT",   NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
569
   OraDatabase.Parameters.Add "RECORD_SET",          NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
119 ghuddy 570
 
123 ghuddy 571
   'If it's a Deployment View
572
   If parDview = "enable" Then
573
      ' Decide which environment list is to be displayed to the Integrators/Testers
574
      Select Case CInt( NNEnvTab )
575
         Case enumENVTAB_PRODRELEASE
576
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PRODRELEASE_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 577
 
123 ghuddy 578
         Case enumENVTAB_INTEGRATE
579
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_INTEGRATION_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 580
 
123 ghuddy 581
         Case enumENVTAB_TEST
582
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_TEST_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 583
 
123 ghuddy 584
         Case enumENVTAB_DEPLOY
585
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_DEPLOY_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 586
 
123 ghuddy 587
         Case enumENVTAB_REJECT
588
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_REJECT_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 589
 
123 ghuddy 590
      End Select
119 ghuddy 591
 
123 ghuddy 592
   Else
593
      ' Decide which environment list is to be displayed
594
      Select Case CInt( NNEnvTab )
595
         Case enumENVTAB_WORK_IN_PROGRESS
596
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_WORK_IN_PROGRESS_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 597
 
123 ghuddy 598
         Case enumENVTAB_PLANNED
599
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PENDING_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 600
 
123 ghuddy 601
         Case enumENVTAB_RELEASED
602
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_RELEASED_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 603
 
123 ghuddy 604
         Case Else
605
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_ENVIRONMENT_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 606
 
123 ghuddy 607
      End Select
119 ghuddy 608
 
123 ghuddy 609
   End If
119 ghuddy 610
 
123 ghuddy 611
   ' Get Record set from database
612
   Set rsView = OraDatabase.Parameters("RECORD_SET").Value
613
   nTrueRecordCount = OraDatabase.Parameters("TRUE_RECORD_COUNT").Value
119 ghuddy 614
 
123 ghuddy 615
   OraDatabase.Parameters.Remove "RTAG_ID"
616
   OraDatabase.Parameters.Remove "USER_ID"
617
   OraDatabase.Parameters.Remove "VIEW_TYPE"
618
   OraDatabase.Parameters.Remove "VIEW_ID_SHOW_LIST"
619
   OraDatabase.Parameters.Remove "RECORD_SET"
620
   OraDatabase.Parameters.Remove "TRUE_RECORD_COUNT"
119 ghuddy 621
 
123 ghuddy 622
   ' Initialise variables
623
   If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
624
      relContentsSTR = ""
625
      viewCollapsed = FALSE
626
      curr_view_id = rsView("view_id")      ' Set current view
627
      view_name = rsView("view_name")
628
   End If
119 ghuddy 629
 
123 ghuddy 630
   While ((NOT rsView.BOF) AND (NOT rsView.EOF))
631
      '==== Get View Contents ====
632
      If NOT IsNull(rsView.Fields("pv_id")) Then
633
         tmpURL = SSscript &"?pv_id="& rsView.Fields("pv_id") &"&rtag_id="& parRtag_id
634
         IMG_locked = ""
635
         If rsView.Fields("dlocked") = "Y" Then IMG_locked = imgLocked
119 ghuddy 636
 
123 ghuddy 637
         ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge
638
         ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user
639
         ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate
640
         ' what the intended action is to be, once the pending item is approved.
641
         ' Obviously, this functionality does not apply if we are in the deployment view, and only applies if viewing
642
         ' the PENDING or ALL environment tabs.
643
         ' With regard to the operation value, A = Added, S = Subtracted
644
         nOperation = " "
645
         If parDview <> "enable" AND (CInt( NNEnvTab ) = enumENVTAB_PLANNED OR CInt( NNEnvTab ) = enumENVTAB_ALL) Then
646
            nOperation = rsView.Fields("operation")   ' NB. this field is only availble if earlier query was GET_PENDING_ITEMS or GET_ENVIRONMENT_ITEMS
647
            If nOperation = "A" Then
648
               IMG_locked = imgAdded
649
            ElseIf nOperation = "S" Then
650
               IMG_locked = imgRemoved
651
            End If
652
         End If
119 ghuddy 653
 
123 ghuddy 654
         relContentsSTR = relContentsSTR & "<tr>" & VBNewLine
119 ghuddy 655
 
123 ghuddy 656
         If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then
657
            relContentsSTR = relContentsSTR & "  <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
658
         Else
659
            If (parDview <> "enable") AND ( ( CInt(NNEnvTab) = enumENVTAB_PLANNED ) OR ( Request("envtab") = enumENVTAB_PLANNED ) ) Then
119 ghuddy 660
 
123 ghuddy 661
               ' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), then
662
               If (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Then
663
                  checked = NULL
664
                  disabled = NULL
665
                  ' disable check box if not logged in, or if not in open mode and user has no permission to approve pending
666
                  If objAccessControl.UserLogedIn Then
667
                     If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
668
                        If NOT objAccessControl.IsActive("ApproveForAutoBuild") Then
669
                           disabled = "disabled"
670
                        End If
671
                     End If
672
                  Else
673
                     disabled = "disabled"
674
                  End If
119 ghuddy 675
 
123 ghuddy 676
               Else ' always check and disable the checkbox
677
                  checked = "checked"
678
                  disabled = "disabled"
679
               End If
119 ghuddy 680
 
123 ghuddy 681
               relContentsSTR = relContentsSTR & " <td width='1%'><input name='pv_id_list' id='pv_id_list' type=checkbox value="&rsView.Fields("pv_id")&" "&checked&" "&disabled&"></td>"& VBNewLine
682
            Else
683
               relContentsSTR = relContentsSTR & " <td width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
684
            End If
685
         End If
119 ghuddy 686
 
123 ghuddy 687
         relContentsSTR = relContentsSTR & "  <td width='100%' nowrap><a href='"& tmpURL &"' class='body_txt_drk' title="""& HTMLEncode( rsView("pv_description") ) &""">"& rsView.Fields("pkg_name") &"</a></td>" & VBNewLine
688
         relContentsSTR = relContentsSTR & "  <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLine
689
         relContentsSTR = relContentsSTR & "  <td width='1%'>"& IMG_locked &"</td>"
690
         relContentsSTR = relContentsSTR & "</tr>" & VBNewLine
691
      Else
692
         'relContentsSTR = relContentsSTR & "<tr><td><label class='form_txt' disabled>...</label></td></tr>"      ' Collapsed view displays dots
119 ghuddy 693
 
123 ghuddy 694
         viewCollapsed = TRUE
695
      End If
119 ghuddy 696
 
123 ghuddy 697
      rsView.MoveNext
119 ghuddy 698
 
123 ghuddy 699
      If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
700
         ' NOT end of the record set
701
         If curr_view_id <> rsView("view_id") Then
702
            '====== Draw buttons =================================
703
            'If InStrPipes( SSshowviews, curr_view_id ) Then
704
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
705
            'Else
706
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
707
            'End If
119 ghuddy 708
 
123 ghuddy 709
            '====== Print contents ===============================
710
            relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
711
            Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 712
 
123 ghuddy 713
            curr_view_id = rsView("view_id")
714
            view_name = rsView("view_name")
715
            relContentsSTR = ""      ' Empty the contents string
716
            viewCollapsed = FALSE
717
         End If
119 ghuddy 718
 
123 ghuddy 719
      Else
720
         ' End of the record set
119 ghuddy 721
 
123 ghuddy 722
         '====== Draw buttons =================================
723
         'If InStrPipes( SSshowviews, curr_view_id ) Then
724
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
725
         'Else
726
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
727
         'End If
119 ghuddy 728
 
123 ghuddy 729
         '====== Print contents ===============================
730
         relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
731
         Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 732
 
123 ghuddy 733
      End If
119 ghuddy 734
 
123 ghuddy 735
   WEnd
119 ghuddy 736
 
123 ghuddy 737
   If relContentsSTR <> "" Then
738
      Response.write "<a href='help/icons_F017.asp' target='_blank' class='body_scol'>Icon Legend...</a><br>"
739
   End If
119 ghuddy 740
 
123 ghuddy 741
   If nTrueRecordCount > 0 Then
742
      If rsView.RecordCount < 1 Then
743
         'If qstrPar = "Bshow" Then
744
         '   'Release is empty. Draw default box for Base view
745
         '   Call DisplayInfo ( "EMPTY_RELEASE_CONTENTS", "100%" )
746
         '
747
         'End If
119 ghuddy 748
 
123 ghuddy 749
         If qstrPar = "Pshow"  Then
750
            'Release is empty. Draw default box for Personal view
751
            Call DisplayInfo ( "PERSONAL_VIEW_NOT_SETUP", "100%" )
752
         End If
119 ghuddy 753
 
123 ghuddy 754
      End If
755
   End If
119 ghuddy 756
 
123 ghuddy 757
   ' Destroy
758
   rsView.Close
759
   Set rsView = nothing
119 ghuddy 760
End Sub
761
'------------------------------------------------------------------------------------------------------------------------------------------------
762
Sub PopulateGetShowViews ( ByRef outShowView )
763
 
123 ghuddy 764
   If Session(SESSION_SHOW_BASE_VIEW) <> "" Then
765
      Set outShowView = Session(SESSION_SHOW_BASE_VIEW)
119 ghuddy 766
 
123 ghuddy 767
   End If
119 ghuddy 768
End Sub
769
'------------------------------------------------------------------------------------------------------------------------------------------------
770
Function GetShowViewList ()
123 ghuddy 771
   'If SSparshow <> "" Then
772
   '   ' get list from query string
773
   '   ShowView = SSparshow
774
   'ElseIf Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype ) <> "" Then
775
   '   ' get list from cookie
776
   '   ShowView = Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype )
777
   'Else
778
   '   ' no list i.e. collapse all views
779
   '   ShowView = -1
780
   'End If
119 ghuddy 781
 
123 ghuddy 782
   'If oShowView.Count = 0 Then
783
   '   GetShowViewList = -1
784
   'Else
785
   '   GetShowViewList = Join( oShowView.Keys, "," )
786
   'End If
119 ghuddy 787
 
123 ghuddy 788
   If Request.Cookies(COOKIE_RELMGR_SHOW_VIEW) = "" Then
789
      GetShowViewList = -1
790
   Else
791
      GetShowViewList = Request.Cookies(COOKIE_RELMGR_SHOW_VIEW)
792
   End If
119 ghuddy 793
 
794
End Function
125 ghuddy 795
 
796
 
797
 
119 ghuddy 798
'------------------------------------------------------------------------------------------------------------------------------------------------
125 ghuddy 799
' This function forms a URL to use for refreshing the current dependencies.asp based page using the settings that are in effect at the time.
800
' Most importantly, it filters out the pv_id parameter if it is null (which otherwise would cause the page to be rendered incorreclty for an
801
' as yet, unknown reason).
802
'
803
Function RefreshedURL(NNdview, NNpview, NNpv_id, NNrtag_id)
804
   Dim url
805
 
806
   url = scriptName & "?Dview=" & NNdview & "&Pview=" & NNpview
807
 
808
   If NNpv_id Then
809
      url = url & "&pv_id=" & NNpv_id
810
   End If
811
 
812
   url = url & "&rtag_id=" & NNrtag_id
813
 
814
   RefreshedURL = url
815
End Function
816
 
817
 
818
'------------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 819
%>
820
<%
821
 
822
'------------------------- MAIN LINE ---------------------------
823
%>
824
 
825
<%If parRtag_Id <> "" Then%>
826
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
827
 
123 ghuddy 828
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
829
      <tr>
830
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="35"></td>
831
         <td width="100%" nowrap background="images/bg_action_norm.gif" >
832
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
833
               <tr>
834
                  <%
835
                  Dim rsTest
836
                  Set rsTest = OraDataBase.DbCreateDynaset( "SELECT PROJ_ID   FROM RELEASE_TAGS WHERE RTAG_ID ="&parRtag_id , ORADYN_DEFAULT )
119 ghuddy 837
 
123 ghuddy 838
                  If (((ReleaseMode = enumDB_RELEASE_IN_CCB_MODE) OR (ReleaseMode = enumDB_RELEASE_IN_RESTRICTIVE_MODE)) AND objAccessControl.IsActive("AddDeletePackageInRestrictiveMode") And objAccessControl.IsDataActive("PROJECTS", DB_PROJ_ID, "EditProjects")) OR (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE ) Then
839
                     Response.write "<td width='1'><a href='form_search_pkgs.asp?rtag_id="& Request("rtag_id") &"&add_type="& enum_ADD_PACKAGES &"' title='Add package to this release'><img src='images/abtn_add_pkg.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
840
                  Else
841
                     Response.write "<td width='1'><img src='images/abtn_add_pkg_off.gif' alt='Add package to this release' width='26' height='26' hspace='1' border='0'></td>"
842
                  End If
119 ghuddy 843
 
123 ghuddy 844
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (objAccessControl.UserLogedIn) AND (Request("pv_id") <> "") Then
845
                     If ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (objAccessControl.IsActive("DestroyPackageFromRelease")) ) Then
846
                        Response.write "<td width='1'><a href='_destroy_package.asp?rtag_id="& Request("rtag_id") &"&bfile="& ScriptName &"&pkg_id="& pkgInfoHash.Item("pkg_id") &"&pv_id="& Request("pv_id") &"' title='Destroy the selected Package Version' onClick='return confirmAction(""You are about to destroy ["& pkgInfoHash.Item("pkg_name") &" "& pkgInfoHash.Item("pkg_version") &"]. You cannot undo this operation.\nDo you want to proceed?"");'><img src='icons/i_destroy_package.gif' alt='Destroy the selected Package Version' width='26' height='26' hspace='1' border='0'></td>"
847
                     End If
848
                  End If
119 ghuddy 849
 
123 ghuddy 850
                  If objAccessControl.IsActive("CreateNewRelease") Then
851
                     Response.write "<td width='1'><a href='form_edit_release.asp?rtag_id_list="&parRtag_id&"&proj_id="&rsTest("proj_id")&"' title='Release properties'><img src='images/abtn_release_properties.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
852
                  End If
119 ghuddy 853
 
123 ghuddy 854
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
855
                  If objAccessControl.UserLogedIn Then
856
                     If QStrPar("Pview") = "disable" Then
125 ghuddy 857
                        Response.write "<td width='1'><a href='"& RefreshedURL(QStrPar("Dview"), "", Request("pv_id"), Request("rtag_id")) &"' title='Personal view disabled. Click to enable.'><img src='images/abtn_base_view.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 858
                     Else
125 ghuddy 859
                        Response.write "<td width='1'><a href='"& RefreshedURL(QStrPar("Dview"), "disable", Request("pv_id"), Request("rtag_id")) &"' title='Personal view enabled. Click for full view.'><img src='images/abtn_personal_view.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 860
                     End If
861
                  Else
862
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
863
                  End If
119 ghuddy 864
 
123 ghuddy 865
                  If QStrPar("Dview") = "enable" Then
125 ghuddy 866
                     Response.write "<td width='1'><a href='"& RefreshedURL("", QStrPar("Pview"), Request("pv_id"), Request("rtag_id")) &"' title='Click to switch to Release View'><img src='icons/ReleaseView.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 867
                  Else
125 ghuddy 868
                     Response.write "<td width='1'><a href='"& RefreshedURL("enable", QStrPar("Pview"), Request("pv_id"), Request("rtag_id")) &"' title='Click to switch to Deployment View'><img src='icons/DeploymentView.gif'  width='25' height='25' hspace='1' border='0'></a></td>"
123 ghuddy 869
                  End If
119 ghuddy 870
 
123 ghuddy 871
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 872
 
123 ghuddy 873
                  Response.write "<td width='1'><a href='javascript:;' title='Reference other releases...' onClick='ToggleDisplay(""DIV_RELEASE_REFERENCES"",""SPAN_RELEASE_REFERENCES"",""SPAN_RELEASE_REFERENCES_ON""); ' ><SPAN name='SPAN_RELEASE_REFERENCES' id='SPAN_RELEASE_REFERENCES' style='display:block;'><img src='images/abtn_link_release.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_RELEASE_REFERENCES_ON' id='SPAN_RELEASE_REFERENCES_ON' style='display:none;'><img src='images/abtn_link_release_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></a></td>"
119 ghuddy 874
 
123 ghuddy 875
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 876
 
123 ghuddy 877
                  Response.write "<td width='1'><a href='javascript:;' title='Advanced Search...' onClick='ToggleAdvancedSearch(); ' ><SPAN name='SPAN_ADVANCED_SEARCH' id='SPAN_ADVANCED_SEARCH' style='display:block;'><img src='images/abtn_advanced_search.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_ADVANCED_SEARCH_ON' id='SPAN_ADVANCED_SEARCH_ON' style='display:none;'><img src='images/abtn_advanced_search_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></a></td>"
119 ghuddy 878
 
123 ghuddy 879
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
880
                     If objAccessControl.UserLogedIn Then
881
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
882
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
883
                              Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
884
                           End If
885
                        Else
886
                           Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
887
                        End If
888
                     End If
889
                  End If
4358 dpurdie 890
                  Response.write "<td width='1'><img src='images/spacer.gif' width='1' height='25'></td>"
891
                  If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
892
                     If objAccessControl.UserLogedIn Then
893
                        If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
894
                           If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
895
                              Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
896
                           End If
897
                        Else
898
                           Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
899
                        End If
900
                     End If
901
                  End If
123 ghuddy 902
                  rsTest.Close()
903
                  Set rsTest = nothing
904
                  %>
905
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
906
               </tr>
907
            </table>
908
         </td>
909
         <td width="1" background="images/bg_action_norm.gif"><img src="images/spacer.gif" width="10" height="8"></td>
910
      </tr>
911
   </table>
119 ghuddy 912
 
913
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 914
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
915
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
916
         <form name="advancedsearch" method="get" action="find.asp">
917
            <tr>
918
               <td nowrap  class="form_txt" valign="middle">
919
                  <%
920
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 921
 
123 ghuddy 922
                  FindPackageCheck = ""
923
                  FindFileCheck = ""
119 ghuddy 924
 
123 ghuddy 925
                  If Request("searchtype") = "2" Then
926
                     FindFileCheck = "checked"
927
                  Else
928
                     FindPackageCheck = "checked"
929
                  End If
119 ghuddy 930
 
123 ghuddy 931
                  %>
932
                  <fieldset>
933
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
934
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
935
                     <a href="javascript:;" onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</a><br>
936
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
937
                     <a href="javascript:;" onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</a><br><br>
938
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
939
                        Find in Work In Progress<br>
940
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
941
                        Find in Pending<br>
942
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
943
                        Find in Released<br>
944
                     <%End If%>
945
                     <input type="text" name="keyword" size="25" class="form_ivaluew" value="<%=Request("keyword")%>">
946
                     <input type="submit" name="btn" value="Find" class="form_ivalue">
119 ghuddy 947
 
123 ghuddy 948
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
949
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
950
                  </fieldset>
951
                  <br>
952
               </td>
953
            </tr>
954
         </form>
955
      </table>
956
   </DIV>
119 ghuddy 957
 
123 ghuddy 958
   <script language="JavaScript" type="text/javascript">
959
      <!--
960
      function ToggleAdvancedSearch( )
961
      {
962
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
963
         {
964
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
965
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
966
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
967
         }
968
         else
969
         {
970
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
971
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
972
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
973
         }
119 ghuddy 974
 
123 ghuddy 975
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
976
      }
119 ghuddy 977
 
123 ghuddy 978
      // Run this on page render for default setting
979
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
980
      {
981
         ToggleAdvancedSearch();
982
      }
119 ghuddy 983
 
123 ghuddy 984
   //-->
985
   </script>
119 ghuddy 986
 
987
<!-- RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 988
   <DIV name="DIV_RELEASE_REFERENCES" id="DIV_RELEASE_REFERENCES" style="display:none;">
989
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
990
         <form name="relref" method="get" action="_remove_release_reference.asp" onSubmit="ToggleDisplay('RelRefProgressBar');">
991
            <tr>
992
               <td width="100%" nowrap class="form_txt">
993
                  <fieldset>
994
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release References</legend>
995
                     <DIV id="RelRefProgressBar" name="RelRefProgressBar" style="display:none;" class="class="body_scol"">
996
                        <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
997
                     </DIV>
998
                     <b>References</b>
999
                     <hr noshade size="1">
1000
                     <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
1001
                        <input <%=objAccessControl.IsComponentDisabled("AddReleaseReference")%> type="reset" name="btn" value="Add.." class="form_ivalue" onClick="MM_openBrWindow('_wform_reference_release.asp?ToRtag_id=<%=parRtag_id%>&rfile=<%=ScriptName%>&rtag_id=<%=parRtag_id%>','ReferenceRelease','scrollbars=yes,resizable=yes,width=400,height=200')">
1002
                        &nbsp;<input <%=objAccessControl.IsComponentDisabled("RemoveReleaseReference")%> type="submit" name="btn" value="Remove" class="form_ivalue"><br><br>
1003
                     <%End If%>
119 ghuddy 1004
 
123 ghuddy 1005
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
119 ghuddy 1006
 
123 ghuddy 1007
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1008
                        <tr>
1009
                           <td bgcolor="#999999">
119 ghuddy 1010
 
123 ghuddy 1011
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1012
                                 <%
1013
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1014
 
123 ghuddy 1015
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferences.sql"), 0 )
119 ghuddy 1016
 
123 ghuddy 1017
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1018
                                 %>
119 ghuddy 1019
 
123 ghuddy 1020
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1021
                                 <tr>
1022
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1023
                                       No references used.
1024
                                    </td>
1025
                                 </tr>
1026
                                 <%End If%>
119 ghuddy 1027
 
123 ghuddy 1028
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1029
                                    If rsEnvQry("official") = "Y" Then
1030
                                       IMG_locked = imgLocked
1031
                                    Else
1032
                                       IMG_locked = ""
1033
                                    End If%>
1034
                                    <tr>
1035
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>"></td>
1036
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1037
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1038
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1039
                                       </td>
1040
                                    </tr>
1041
                                    <%rsEnvQry.MoveNext()
1042
                                 WEnd%>
1043
                                 <tr>
1044
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1045
                                       <br><br><br>
1046
                                    </td>
1047
                                 </tr>
1048
                              </table>
1049
                           </td>
1050
                        </tr>
1051
                     </table>
1052
                     <br><br>
119 ghuddy 1053
 
123 ghuddy 1054
                     <b>Referenced By</b>
1055
                     <hr noshade size="1">
119 ghuddy 1056
 
123 ghuddy 1057
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1058
                        <tr>
1059
                           <td bgcolor="#999999">
119 ghuddy 1060
 
123 ghuddy 1061
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1062
                                 <%
1063
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1064
 
123 ghuddy 1065
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseReferencedBy.sql"), 0 )
119 ghuddy 1066
 
123 ghuddy 1067
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1068
                                 %>
119 ghuddy 1069
 
123 ghuddy 1070
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1071
                                    <tr>
1072
                                       <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1073
                                          Not referenced anywhere.
1074
                                       </td>
1075
                                    </tr>
1076
                                 <%End If%>
119 ghuddy 1077
 
123 ghuddy 1078
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)
1079
                                    If rsEnvQry("official") = "Y" Then
1080
                                       IMG_locked = imgLocked
1081
                                    Else
1082
                                       IMG_locked = ""
1083
                                    End If%>
1084
                                    <tr>
1085
                                       <td bgcolor="#FFFFFF" class="body_txt"><input type="checkbox" name="refrtag_id" value="<%=rsEnvQry("rtag_id")%>" disabled></td>
1086
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1087
                                          <a href="dependencies.asp?rtag_id=<%=rsEnvQry("rtag_id")%>" class="body_link" title="Go to this release...">
1088
                                          <%=rsEnvQry("proj_name")%> &gt; <%=rsEnvQry("rtag_name")%><%=IMG_locked%></a>&nbsp;
1089
                                       </td>
1090
                                    </tr>
1091
                                    <%rsEnvQry.MoveNext()
1092
                                 WEnd%>
1093
                                 <tr>
1094
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1095
                                       <br><br><br>
1096
                                    </td>
1097
                                 </tr>
1098
                              </table>
1099
                           </td>
1100
                        </tr>
1101
                     </table>
1102
                     <br>
1103
                  </fieldset>
1104
                  <br>
1105
               </td>
1106
            </tr>
1107
         </form>
1108
      </table>
1109
   </DIV>
119 ghuddy 1110
<!-- END OF RELEASE REFERENCES  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1111
 
1112
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 1113
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
125 ghuddy 1114
      <form id="pending_PVID_List" name="pending_PVID_List" method="post" action="make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>", onSubmit="makeBulkRelease();">
123 ghuddy 1115
         <tr>
1116
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="25"></td>
1117
            <td width="100%" bgcolor="#999999" valign="bottom">
1118
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
1119
               <%
1120
               Set objTabControl = New TabControl
1121
               objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleDreamWeaver/dreamweaver_style.html") ) ' Supply tab style definition
1122
               objTabControl.TabStyle = "StyleDreamWeaver"
1123
               If   QStrPar("Dview") = "enable"   Then
1124
                  objTabControl.AddTabDefnition ( arrProductEnv )   '-   Integration/Test/Deploy
1125
               Else
1126
                  objTabControl.AddTabDefnition ( arrEnv )
1127
               End If
1128
               objTabControl.SelectByIndex ( nEnvTab )
1129
               objTabControl.Render ()
1130
               %>
1131
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
1132
            </td>
1133
            <td width="1" bgcolor="#999999"><img src="images/spacer.gif" width="10" height="1"></td>
1134
         </tr>
1135
         <tr>
1136
            <td></td>
1137
            <td>
1138
               <br>
1139
               <%
1140
               Dim tempTimer
1141
               tempTimer = Timer
1142
               %>
1143
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1144
               <%
119 ghuddy 1145
 
123 ghuddy 1146
               '--- Render Environment ---
1147
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
1148
                  'Personal View
1149
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
1150
               Else
1151
                  ' Guest view
1152
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
1153
               End If
1154
               %>
119 ghuddy 1155
 
123 ghuddy 1156
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1157
               <br>
1158
            </td>
1159
            <td></td>
1160
         </tr>
1161
      </form>
1162
   </table>
1163
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 1164
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1165
 
1166
<%End If%>