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