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