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