Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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