Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
157 ghuddy 5
'|                        RTREE                      |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
157 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/_rtree_common.asp"-->
183 brianf 20
<!--#include file="common/daemon_status.asp"-->
119 ghuddy 21
<%
22
' Make sure rtag_id is always present
23
If Request("proj_id") = "" Then
157 ghuddy 24
   Response.Redirect("index.asp")
119 ghuddy 25
End If
26
'------------ ACCESS CONTROL ------------------
27
%>
28
<!--#include file="_access_control_general.asp"-->
29
<%
30
'------------ Variable Definition -------------
31
Dim objSortHelper
32
Dim ViewType
157 ghuddy 33
Dim rsQryStr
119 ghuddy 34
Dim rsQry
35
Dim parProjId
157 ghuddy 36
Dim parShowFilter
119 ghuddy 37
Dim nProjTreeVersion
38
Dim objBtnControl
39
Dim currLevel, lastLevel, lastRow, aVersions, i
157 ghuddy 40
Dim dListFilter
183 brianf 41
Dim objDmSts
119 ghuddy 42
'------------ Constants Declaration -----------
43
'Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_i_half.gif' align='absmiddle'>"
44
'Const LIMG_TREE_I_FULL = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_i.gif' align='absmiddle'>"
45
'Const LIMG_TREE_T = "<img src='images/spacer.gif' width='5' height='1'><img src='icons/tree_t.gif' align='absmiddle'>"
46
Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='20' height='1'>"
4078 dpurdie 47
Const LIMG_TREE_I_NONE = "<img src='images/spacer.gif' width='30' height='15'>"
48
Const LIMG_TREE_I_FULL = "<img src='images/dot1h.gif' width='30' height='15'>"
157 ghuddy 49
Const LIMG_TREE_T      = "<img src='images/dot1.gif' width='30' height='15'>"
50
Const LIMG_LIST_VIEW   = "<img src='images/abtn_list_view.gif' border='0' align=absmiddle' name='imgviewtype' usemap='#mapviewtype' id='imgviewtype'>"
51
Const LIMG_TREE_VIEW   = "<img src='images/abtn_tree_view.gif' border='0' align=absmiddle' name='imgviewtype' usemap='#mapviewtype' id='imgviewtype'>"
119 ghuddy 52
Const LCONST_LIST_VIEW = 1
53
Const LCONST_TREE_VIEW = 2
157 ghuddy 54
Const DEFAULT_SHOW_FILTER = "'N','R','C'"
55
Const LIMG_FILTER_ON  = "<img src='images/i_data_table.gif' border='0' align='absmiddle' hspace='0' title='Filter in use.'>"
56
Const LIMG_FILTER_OFF = "<img src='images/i_data_table_off.gif' border='0' align='absmiddle' hspace='0' title='Filter not in use.'>"
57
Const LIMG_DROP_DOWN_ARROW = "<img src='images/i_drop_down_arrow.gif' width='5' height='15' hspace='1' border='0' align='absmiddle'>"
58
 
119 ghuddy 59
'------------ Variable Init -------------------
60
parProjId = Request("proj_id")
157 ghuddy 61
 
62
' Get show_filter from query string or failing that, from the cookie.
63
' Make sure that if neither supplies it, use the default
64
parShowFilter = Request("show_filter")
65
If NOT IsNull(parShowFilter) AND parShowFilter <> "" Then
66
   Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = parShowFilter
67
Else
68
   parShowFilter = Request.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter")
69
   If IsNull(parShowFilter) OR parShowFilter = "" Then
70
      parShowFilter = DEFAULT_SHOW_FILTER
71
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = parShowFilter
72
   End If
73
End If
74
 
75
Set dListFilter = CreateObject("Scripting.Dictionary")
76
 
119 ghuddy 77
nProjTreeVersion = GetProjTreeVersion( parProjId )
78
Set objBtnControl = New ActionButtonControl
79
objPMod.PersistInQryString("proj_id")
183 brianf 80
 
119 ghuddy 81
'----------------------------------------------
82
%>
83
<%
157 ghuddy 84
'--------------------------------------------------------------------------------------------------------------------------
85
' Determines icon that precedes the drop down arrow in the filter box
86
Function GetIsListFilterInUseIcon()
87
   GetIsListFilterInUseIcon = LIMG_FILTER_ON & LIMG_DROP_DOWN_ARROW
88
 
89
   If dListFilter.Count > 0 Then
90
      GetIsListFilterInUseIcon = LIMG_FILTER_OFF & LIMG_DROP_DOWN_ARROW
91
   End If
92
End Function
93
'--------------------------------------------------------------------------------------------------------------------------
94
' Determines if the specified filter is on/off and returns a string to use to check the associated checkbox accordingly
95
Function GetIsListFilterChecked( nFilterId )
96
   GetIsListFilterChecked = ""
97
   If dListFilter.Exists ( "'" & CStr(nFilterId) & "'"  ) Then
98
      GetIsListFilterChecked = "checked"
99
   End If
100
End Function
101
'--------------------------------------------------------------------------------------------------------------------------
102
' Reads the cookie for the filter and creats a dictionary element for each item therein. the dictionary
103
' is used by the GetIsListFilterChecked function to determine checkbox state in the filter options
104
Sub GetListFilterValues ( outDepFilter )
105
   Dim FilterVal, aFilterValues
106
 
107
   If Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") <> "" Then
108
      aFilterValues = Split( Replace( Request.Cookies(COOKIE_RELEASE_MANAGER_MEMORY)("show_filter"), " ", ""), ",")
109
 
110
      For Each FilterVal In aFilterValues
111
         outDepFilter.Item (CStr( FilterVal )) = ""
112
      Next
113
   End If
114
End Sub
115
 
119 ghuddy 116
'----------------------------------------------------------------------------------------------------------------------------------------------
117
Function GetProjTreeVersion ( nProjId )
157 ghuddy 118
   Dim rsTemp, QueryString
119
 
120
   QueryString = _
121
   " SELECT rt.RTAG_VERSION "&_
122
   "   FROM RELEASE_TAGS rt "&_
123
   "  WHERE rt.PROJ_ID = :PROJ_ID "&_
124
   "    AND rt.RTAG_ID = rt.PARENT_RTAG_ID"
125
 
126
   OraDatabase.Parameters.Add "PROJ_ID",  nProjId,    ORAPARM_INPUT, ORATYPE_NUMBER
127
 
128
   Set rsTemp = OraDatabase.DbCreateDynaset( QueryString, cint(0))
129
 
130
   OraDatabase.Parameters.Remove "PROJ_ID"
131
 
132
 
133
 
134
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
135
      GetProjTreeVersion = rsTemp("rtag_version")
136
   Else
137
      GetProjTreeVersion = NULL
138
   End If
139
 
140
   rsTemp.Close
141
   Set rsTemp = nothing
119 ghuddy 142
End Function
143
'----------------------------------------------------------------------------------------------------------------------------------------------
144
Sub RenderRowConnectors ( nLastLevel, nCurrLevel )
157 ghuddy 145
   Dim i, LastLine
146
 
147
   '-- Initial Draw --
148
   If nLastLevel = 0 Then
149
      nLastLevel = nCurrLevel
150
      Exit Sub
151
   End If
152
 
153
   '-- Calculate number of half lines rendered
154
   If nLastLevel < nCurrLevel Then
155
      LastLine = nLastLevel
156
   Else
157
      LastLine = nCurrLevel
158
   End If
159
 
160
 
161
   '-- Render half lines
162
   For i = 1 To LastLine
163
      Response.write LIMG_TREE_I_HALF
164
   Next
165
 
119 ghuddy 166
End Sub
167
'----------------------------------------------------------------------------------------------------------------------------------------------
168
Sub RenderIndent ( nLastLevel, nCurrLevel )
157 ghuddy 169
   Dim i
170
 
171
   If nCurrLevel <= 1 Then Exit Sub
172
 
173
 
174
   '-- Render half lines
175
   If nCurrLevel > 2 Then
176
      For i = 1 To nCurrLevel - 2
4078 dpurdie 177
         Response.write LIMG_TREE_I_NONE
157 ghuddy 178
      Next
179
   End If
180
 
181
 
182
   '-- Render branch or line
183
   If nLastLevel < nCurrLevel Then
184
      Response.write LIMG_TREE_T
185
   Else
186
      Response.write LIMG_TREE_I_FULL
187
   End If
188
 
189
 
190
 
191
 
119 ghuddy 192
End Sub
193
'----------------------------------------------------------------------------------------------------------------------------------------------
194
Function GetLevel ( sRtagVersion )
157 ghuddy 195
   Dim tempArr
196
 
197
   If InStr( sRtagVersion, "." ) > 0 Then
198
      '-- Dot separator found --
199
 
200
      '-- Split version --
201
      tempArr = Split( sRtagVersion, "." )
202
 
203
      GetLevel = UBound( tempArr ) + 1
204
 
205
   Else
206
      GetLevel = 1
207
 
208
   End If
209
 
119 ghuddy 210
End Function
211
'----------------------------------------------------------------------------------------------------------------------------------------------
212
Sub NewRelease ()
157 ghuddy 213
   On Error Resume Next
214
 
215
   objEH.Try
216
      If NOT IsNumeric(Request("rtag_id_list")) Then
217
         Err.Raise 8, "Please select one release only.", "No further details available."
218
 
219
      Else
220
         Call OpenInWindow ( "new_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
221
 
222
      End If
223
 
224
   objEH.Catch
225
 
119 ghuddy 226
End Sub
227
'----------------------------------------------------------------------------------------------------------------------------------------------
228
Sub DestroyRelease ()
157 ghuddy 229
   On Error Resume Next
230
 
231
   objEH.Try
232
      If NOT IsNumeric(Request("rtag_id_list")) Then
233
         Err.Raise 8, "Please select one release only.", "No further details available."
234
 
235
      Else
236
         If Request("rtag_id_list") = "" Then
237
            Err.Raise 8, "Please select one release.", "No further details available."
238
         Else
239
            Call OpenInWindow ( "_destroy_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
240
         End If
241
 
242
      End If
243
 
244
   objEH.Catch
245
 
119 ghuddy 246
End Sub
247
'----------------------------------------------------------------------------------------------------------------------------------------------
248
Sub EditRelease ()
157 ghuddy 249
   On Error Resume Next
250
 
251
   objEH.Try
252
      If NOT IsNumeric(Request("rtag_id_list")) Then
253
         Err.Raise 8, "Please select one release only.", "No further details available."
254
 
255
      Else
256
         If Request("rtag_id_list") = "" Then
257
            Err.Raise 8, "Please select one release.", "No further details available."
258
         Else
5061 dpurdie 259
            Call OpenInWindow ( "form_edit_release.asp?rtag_id="& Replace( Request("rtag_id_list"), " ","" ) & "&" & objPMod.ComposeURLWithout("proj_id") )
157 ghuddy 260
         End If
261
 
262
      End If
263
 
264
   objEH.Catch
265
 
119 ghuddy 266
End Sub
267
'----------------------------------------------------------------------------------------------------------------------------------------------
268
Sub MoveRelease ()
157 ghuddy 269
   On Error Resume Next
270
 
271
   objEH.Try
272
      If NOT IsNumeric(Request("rtag_id_list")) Then
273
         Err.Raise 8, "Please select one release only.", "No further details available."
274
 
275
      Else
276
         If Request("rtag_id_list") = "" Then
277
            Err.Raise 8, "Please select one release.", "No further details available."
278
         Else
279
            Call OpenInWindow ( "form_move_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
280
         End If
281
 
282
      End If
283
 
284
   objEH.Catch
285
 
119 ghuddy 286
End Sub
287
'----------------------------------------------------------------------------------------------------------------------------------------------
288
Sub MergeManager ()
157 ghuddy 289
   Dim aReleases
290
   On Error Resume Next
291
 
292
   objEH.Try
293
 
294
      If Request("rtag_id_list") <> "" Then
295
         aReleases = Split ( Replace( Request("rtag_id_list"), " ", ""), "," )
296
 
297
         If UBound(aReleases) = 0 Then
298
            ' Open Merge Manager
299
            Call OpenInWindow ( "diff.asp?rtagA="& aReleases(0)  )
300
 
301
 
302
         ElseIf UBound(aReleases) = 1 Then
303
            ' Open Merge Manager
304
            Call OpenInWindow ( "diff.asp?rtagA="& aReleases(0) &"&rtagB="& aReleases(1) )
305
 
306
 
307
         Else
308
            Err.Raise 8, "Please select maximum two release.", "No further details available."
309
 
310
         End If
311
 
312
      Else
313
         ' Open Merge Manager without parameters
314
         Call OpenInWindow ( "diff.asp" )
315
 
316
      End If
317
 
318
   objEH.Catch
319
 
119 ghuddy 320
End Sub
321
'----------------------------------------------------------------------------------------------------------------------------------------------
322
Function GetViewType ()
157 ghuddy 323
   Dim CookieViewType
324
 
325
   CookieViewType = Request.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW")
326
 
327
   If CookieViewType <> "" Then
328
      ' Get current view type from cookie
329
      GetViewType = CInt(CookieViewType)
330
   Else
331
      ' Set current view to list view
332
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW") = LCONST_LIST_VIEW
333
      GetViewType = LCONST_LIST_VIEW
334
   End If
335
 
119 ghuddy 336
End Function
337
'----------------------------------------------------------------------------------------------------------------------------------------------
338
Sub SetViewType ()
157 ghuddy 339
   If Request("viewtype") = "" Then Exit Sub    ' Nothing to do
340
 
341
   Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("RELEASE_VIEW") = Request("viewtype")
119 ghuddy 342
End Sub
183 brianf 343
 
119 ghuddy 344
'----------------------------------------------------------------------------------------------------------------------------------------------
5009 dpurdie 345
Sub RenderDaemonStatusConfig(rtag_id) 
346
   %>
347
   <table class="embedded_table">
348
    <tr>
349
     <td>
350
     <%
351
      Response.Write("<img src=""icons/i_edit.gif"" border=0 vspace=0 hspace=0 title='Configure Daemons' onclick='location.href=""release_config.asp?rtag_id="&rtag_id&"""'>")
352
      Response.Write("<img src=""icons/ext_log.gif"" border=0 vspace=0 hspace=0 title='View Build Log'onclick='location.href=""build_release_log.asp?rtag_id="&rtag_id&"""'>")
353
     %>
354
     </td>
355
     <td>
356
   <%
357
    Call objDmSts.RenderDaemonStatus(rtag_id,16)
358
    %>
359
        </td>
360
        </tr>
361
        </table>
362
    <%
363
End Sub
364
 
365
'----------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 366
%>
367
<%
368
'------------ RUN BEFORE PAGE RENDER ----------
369
If (Request("action") <> "") Then
121 hknight 370
 
157 ghuddy 371
   If Request("btn") = "Show" Then
372
      ' Store filter in cookie
373
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = Request("listFilter")
374
      parShowFilter = Request("listFilter")
375
   Else
376
      '-- Select Action
377
      Select Case Request("action")
378
      Case "btnNewRelease"
379
         Call NewRelease()
121 hknight 380
 
157 ghuddy 381
      Case "btnDestroyRelease"
382
         Call DestroyRelease()
121 hknight 383
 
157 ghuddy 384
      Case "btnEditRelease"
385
         Call EditRelease()
121 hknight 386
 
157 ghuddy 387
      Case "btnMoveRelease"
388
         Call MoveRelease()
389
 
390
      Case "btnMergeManager"
391
         Call MergeManager()
392
 
393
      Case "btnAdminView"
394
         Dim Query_String
395
         Query_String = _
396
         "   SELECT DISTINCT vi.view_id, vi.view_name"&_
397
         "   FROM VIEWS vi"&_
398
         "   WHERE vi.view_name = 'PROJECT WIDE'"
399
         Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
400
 
401
         Dim viewRecordCount
402
         Dim id
403
         viewRecordCount=0
404
         viewRecordCount = rsQry.RecordCount
405
 
406
         While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
407
            id=rsQry.Fields("view_id")
408
            rsQry.MoveNext
409
         WEnd
410
 
411
          rsQry.Close()
412
         Set rsQry = nothing
413
 
414
         If viewRecordCount = 0 Then
415
            OraDatabase.Parameters.Add "PROJ_ID", parProjId,    ORAPARM_INPUT, ORATYPE_NUMBER
416
            Query_String = _
417
            " SELECT DISTINCT vi.view_id, vi.view_name"&_
418
            " FROM VIEWS vi, RELEASE_CONTENT rc, RELEASE_TAGS rt"&_
419
            " WHERE rc.BASE_VIEW_ID = vi.VIEW_ID AND rt.proj_id = "& parProjId &"AND rc.rtag_id = rt.rtag_id"&_
420
            " ORDER BY ( vi.view_name )"
421
 
422
            Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
423
 
424
            OraDatabase.Parameters.Remove "PROJ_ID"
425
            viewRecordCount = rsQry.RecordCount
426
 
427
            While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
428
               id=rsQry.Fields("view_id")
429
               rsQry.MoveNext
430
            WEnd
431
 
432
            rsQry.Close()
433
            Set rsQry = nothing
434
         End If
435
         If viewRecordCount = 0 Then
436
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id"))
437
         Else
438
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id")&"&FRview_id="&id)
439
         End If
440
      End Select
441
   End If
442
 
119 ghuddy 443
End If
444
 
445
' Set view type if required
446
Call SetViewType ()
447
 
448
' Get current view type
449
ViewType = GetViewType()
157 ghuddy 450
 
451
 
119 ghuddy 452
'----------------------------------------------
453
%>
454
 
455
<html>
456
<head>
457
<%
157 ghuddy 458
   Set rsQry = OraDatabase.DbCreateDynaset( "SELECT PROJ_NAME FROM PROJECTS WHERE PROJ_ID="& Request("proj_id"), ORADYN_DEFAULT )
119 ghuddy 459
%>
460
<title><%=rsQry("proj_name")%></title>
461
<%
157 ghuddy 462
   rsQry.Close
463
   Set rsQry = Nothing
119 ghuddy 464
%>
465
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
466
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
467
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
468
<link rel="stylesheet" href="images/navigation.css" type="text/css">
469
<script language="JavaScript" src="images/common.js"></script>
470
 
471
<!-- DROPDOWN MENUS -->
472
<!--#include file="_menu_def.asp"-->
473
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
474
 
475
</head>
476
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
477
<!-- MENU LAYERS -------------------------------------->
157 ghuddy 478
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 479
</div>
480
<!-- TIPS LAYERS -------------------------------------->
481
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
482
<!----------------------------------------------------->
483
<!-- HEADER -->
484
<!--#include file="_header.asp"-->
485
<!-- BODY ---->
486
 
487
<table width="100%" border="0" cellspacing="0" cellpadding="0">
157 ghuddy 488
   <tr>
489
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
490
      <td rowspan="2" valign="top" width="100%">
119 ghuddy 491
 
157 ghuddy 492
         <!-- ACTION BUTTONS ---------------------------------------------->
493
         <table width="100%"  border="0" cellspacing="0" cellpadding="7">
494
            <tr>
495
               <td width="1" bgcolor="#DAD7C8">
496
                  <%
497
                  If ViewType = LCONST_TREE_VIEW Then
498
                     Response.write LIMG_TREE_VIEW
499
                  Else
500
                     Response.write LIMG_LIST_VIEW
501
                  End If
502
                  %>
503
               </td>
504
               <td width="100%" bgcolor="#DAD7C8">
505
                  <%
506
                  Dim aBtnsDef
507
                  ' Define action buttons
508
                  aBtnsDef = Array("btnNewRelease", "btnEditRelease", "btnMoveRelease", "width=20", "btnDestroyRelease", "width=20", "btnMergeManager", "width=20", "btnAdminView")
119 ghuddy 509
 
157 ghuddy 510
                  ' Load action buttons from database
511
                  Call objBtnControl.LoadActionButtons ( aBtnsDef, OraDatabase )
119 ghuddy 512
 
157 ghuddy 513
                  ' Set spacing to minimum between buttons
514
                  objBtnControl.ButtonSpacer = 0
515
                  objBtnControl.ImageHspace = 2
119 ghuddy 516
 
157 ghuddy 517
                  ' Access Control
5061 dpurdie 518
                  If NOT canActionControlInProject("CreateNewRelease") Then Call objBtnControl.Active ( "btnNewRelease", "N" )
519
                  If NOT canActionControlInProject("DestroyRelease") Then Call objBtnControl.Active ( "btnDestroyRelease", "N" )
520
                  If NOT canActionControlInProject("ConfigureRelease") Then Call objBtnControl.Active ( "btnMoveRelease", "N" )
119 ghuddy 521
 
157 ghuddy 522
                  ' -- Render Buttons
523
                  Call objBtnControl.Render  ( aBtnsDef, objAccessControl )
524
                  %>
525
               </td>
526
            </tr>
527
         </table>
528
         <!-- ACTION BUTTONS END  ------------------------------------------>
119 ghuddy 529
 
157 ghuddy 530
         <table width="100%"  border="0" cellspacing="10" cellpadding="0">
531
            <form name="FormName" method="post" action="<%=ScriptName%>">
532
               <tr>
533
                  <td>
119 ghuddy 534
 
157 ghuddy 535
                     <!-- TREE VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
536
                     <%If ViewType = LCONST_TREE_VIEW Then%>
119 ghuddy 537
 
157 ghuddy 538
                        <table width="100%"  border="0" cellspacing="1" cellpadding="1">
539
                           <tr>
183 brianf 540
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
119 ghuddy 541
 
157 ghuddy 542
                              <%If parProjId <> 2 Then %>
183 brianf 543
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
544
                                 <td width="47%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
545
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 546
                              <%Else%>
183 brianf 547
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
548
                                 <td width="25%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
549
                                 <td width="22%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
550
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt"">Daemon Status</td>
157 ghuddy 551
                              <%End If%>
552
                           </tr>
553
                           <%
554
                           'OraDatabase.Parameters.Add "TREE_VERSION",  nProjTreeVersion,    ORAPARM_INPUT, ORATYPE_NUMBER
555
                           OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
556
 
557
                           Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ReleaseVersionTree.sql") , ORADYN_DEFAULT )
558
                           lastLevel = 0
559
 
560
                           'OraDatabase.Parameters.Remove "TREE_VERSION"
561
                           OraDatabase.Parameters.Remove "PROJ_ID"
562
 
563
                           Dim lastRtagId, parentRtag_id
564
 
565
                           If rsQry.RecordCount > 0 Then
566
 
183 brianf 567
                              Set objDmSts = New DaemonStatus
568
                              Call objDmSts.GetDaemonStatus(parProjId)
569
 
157 ghuddy 570
                              'aVersions = rsQry.GetRows()
571
                              'lastRow = UBound( aVersions, 2 )
572
 
573
                              'Set objSortHelper = New SortHelper
574
 
575
                              ' Sort versions
576
                              'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
577
 
578
                              'For i = 0 To lastRow   ' Ascending order
579
                              While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
580
 
581
                                 'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
582
                                 currLevel = CInt(rsQry("hierarchy"))
583
                                 'lastLevel = currLevel - 1
4080 dpurdie 584
 
585
                                 'Dim hoverTitle
586
                                 hoverTitle = "Last change: "& rsQry("OFFICIAL_STAMP") & " by " & rsQry("modifier")
587
 
157 ghuddy 588
                                 %>
589
                                 <tr>
590
                                    <td bgcolor="#F5F5F5" class="body_rowg">
591
                                       <%Call RenderIndent( lastLevel, currLevel )%>
592
                                       <input type="checkbox" name="rtag_id_list" value="<%=rsQry("rtag_id")%>" style="vertical-align:middle;">
4080 dpurdie 593
                                       <a href="dependencies.asp?rtag_id=<%=rsQry("rtag_id")%>" class="body_link" title="<%=hoverTitle%>" >
157 ghuddy 594
                                       <%=ReleaseIcon( rsQry("official") )%>&nbsp;<%=rsQry("rtag_name")%></a>
183 brianf 595
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=rsQry("created_stamp") & " by " & rsQry("creator")%></td>
157 ghuddy 596
                                       <%
597
                                       If parProjId <> 2 Then
598
                                          Dim assocMASSREF, rsQryAssoc, assocMASSREFName, link
599
                                          assocMASSREF =  rsQry("assoc_mass_ref")
600
                                          If assocMASSREF <> "" Then
601
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
602
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
603
                                             link = "dependencies.asp?rtag_id="&rsQryAssoc("rtag_id")
604
                                             rsQryAssoc.Close
605
                                             Set rsQryAssoc = Nothing
606
                                          Else
607
                                             assocMASSREFName = "None."
608
                                          End If
183 brianf 609
                                       Else
157 ghuddy 610
                                          Dim UsedBy, rsQryUse, comment, linkB
611
                                          UsedBy =  rsQry("rtag_id")
612
                                          If UsedBy <> "" Then
613
                                             Set rsQryUse = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_TAGS RT, PROJECTS P WHERE RT.ASSOC_MASS_REF="&rsQry("rtag_id")&" AND RT.PROJ_ID=P.PROJ_ID", ORADYN_DEFAULT)
614
 
615
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
616
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
617
                                                   linkB = "dependencies.asp?rtag_id="&rsQryUse("rtag_id")
618
                                                   If comment = "" Then
619
                                                      comment = rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
620
                                                   Else
621
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
622
                                                   End If
623
                                                   rsQryUse.MoveNext
624
                                                End If
625
                                             WEnd
626
                                          End If
627
                                          %>
628
                                          <%If comment <> "" Then %>
629
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
630
                                          <%Else%>
631
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
632
                                          <%End If%>
633
                                       <%End If%>
634
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(rsQry("description"))%></td>
183 brianf 635
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
636
                                       <%
637
                                         ' Get daemon summary bar chart for current release
5009 dpurdie 638
                                         Call RenderDaemonStatusConfig(rsQry("rtag_id"))
183 brianf 639
                                       %>
640
                                       </td>
157 ghuddy 641
                                 </tr>
642
                                 <%
643
                                 lastLevel = currLevel
644
                                 rsQry.MoveNext
645
                                 comment = ""
646
                              WEnd
647
                              'Next
183 brianf 648
                              Set objDmSts = Nothing
157 ghuddy 649
                           End If
650
                           rsQry.Close
651
                           Set rsQry = Nothing
652
                           %>
653
                        </table>
654
 
655
                     <!-- LIST VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
656
                     <%Else%>
657
                        <%
658
                        Call GetListFilterValues ( dListFilter )
659
                        %>
660
 
661
                        <!-- RELEASE LIST FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
662
                        <fieldset style="width:200px;">
663
                           <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divListFilter');" ><%=GetIsListFilterInUseIcon() %>&nbsp;Show&nbsp;Release Types...</a></legend>
664
                           <div name="divListFilter" id="divListFilter" class="body_txt" style="display:none;">
665
                              <br>
666
                              <table width="100%"  border="0" cellspacing="1" cellpadding="3">
667
                                 <tr>
668
                                    <td width="10" background="images/bg_action_norm.gif">
669
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_OPEN_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_OPEN_MODE)%>>
670
                                    </td>
671
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
672
                                       <img src="images/i_rtag_open_mode.gif" width="15" height="13">&nbsp;Open&nbsp;Mode
673
                                    </td>
674
                                 </tr>
675
                                 <tr>
676
                                    <td width="10" background="images/bg_action_norm.gif">
677
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_RESTRICTIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_RESTRICTIVE_MODE)%>>
678
                                    </td>
679
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
680
                                       <img src="images/i_rtag_restrictive_mode.gif" width="15" height="13">&nbsp;Restrictive&nbsp;Mode
681
                                    </td>
682
                                 </tr>
683
                                 <tr>
684
                                    <td width="10" background="images/bg_action_norm.gif">
685
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CCB_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CCB_MODE)%>>
686
                                    </td>
687
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
688
                                       <img src="images/i_rtag_ccb_mode.gif" width="15" height="13">&nbsp;CCB&nbsp;Mode
689
                                    </td>
690
                                 </tr>
691
                                 <tr>
692
                                    <td width="10" background="images/bg_action_norm.gif">
693
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CLOSED_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CLOSED_MODE)%>>
694
                                    </td>
695
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
696
                                       <img src="images/i_rtag_closed_mode.gif" width="15" height="13">&nbsp;Closed&nbsp;Mode
697
                                    </td>
698
                                 </tr>
699
                                 <tr>
700
                                    <td width="10" background="images/bg_action_norm.gif">
701
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_ARCHIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_ARCHIVE_MODE)%>>
702
                                    </td>
703
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
704
                                       <img src="images/i_rtag_archive_mode.gif" width="15" height="13">&nbsp;Archive&nbsp;Mode
705
                                    </td>
706
                                 </tr>
707
                                 <tr>
708
                                    <td background="images/bg_action_norm.gif">&nbsp;</td>
709
                                    <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Show"></td>
710
                                 </tr>
711
                              </table>
712
                           </div>
713
                        </fieldset>
714
 
715
                        <table width="100%"  border="0" cellspacing="1" cellpadding="3">
716
                           <tr>
717
                              <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
718
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
719
 
720
                              <%If parProjId <> 2 Then %>
183 brianf 721
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
722
                                 <td width="47%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
723
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 724
                              <%Else%>
183 brianf 725
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
157 ghuddy 726
                                 <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
183 brianf 727
                                 <td width="24%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
728
                                 <td width="22%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
729
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 730
                              <%End If%>
731
 
732
                           </tr>
733
                           <%
734
                           If NOT IsEmpty(parShowFilter) Then
735
                              OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
736
 
737
                              rsQryStr = GetQuery ("ReleaseVersionList.sql")
738
                              rsQryStr = Replace(rsQryStr, "/*SHOW_FILTER*/", parShowFilter)
739
 
740
                              Set rsQry = OraDatabase.DbCreateDynaset( rsQryStr, ORADYN_DEFAULT )
741
                              lastLevel = 0
742
 
743
                              OraDatabase.Parameters.Remove "PROJ_ID"
744
 
745
 
746
                              If rsQry.RecordCount > 0 Then
747
 
748
                                 aVersions = rsQry.GetRows()
749
                                 lastRow = UBound( aVersions, 2 )
750
 
183 brianf 751
                                 Set objDmSts = New DaemonStatus
752
                                 Call objDmSts.GetDaemonStatus(parProjId)
753
 
157 ghuddy 754
                                 'Set objSortHelper = New SortHelper
755
 
756
                                 ' Sort versions
757
                                 'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
758
 
759
                                 For i = 0 To lastRow ' Ascending order
4080 dpurdie 760
                                    Dim hoverTitle
761
                                    hoverTitle = "Last change: "& aVersions( rsQry.FieldIndex("OFFICIAL_STAMP"), i ) & " by " & aVersions( rsQry.FieldIndex("modifier"), i )
157 ghuddy 762
 
763
                                    'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
764
                                    %>
765
                                    <tr>
766
                                       <td bgcolor="#F5F5F5" class="body_txt" valign="top">
767
                                          <input type="checkbox" name="rtag_id_list" value="<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>">
768
                                       </td>
769
                                       <td bgcolor="#F5F5F5" valign="top">
4080 dpurdie 770
                                          <a href="dependencies.asp?rtag_id=<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>" class="body_link" title="<%=hoverTitle%>">
157 ghuddy 771
                                          <%=ReleaseIcon( aVersions( rsQry.FieldIndex("official"), i ) )%>&nbsp;<%=aVersions( rsQry.FieldIndex("rtag_name"), i )%></a>
772
                                       </td>
185 brianf 773
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=aVersions( rsQry.FieldIndex("created_stamp"), i) & " by " & aVersions( rsQry.FieldIndex("creator"), i)%></td>
157 ghuddy 774
                                       <%
775
                                       If parProjId <> 2 Then
776
                                          assocMASSREF = aVersions( rsQry.FieldIndex("assoc_mass_ref"), i )
777
                                          If assocMASSREF <> "" Then
778
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
779
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
780
                                             link = rsQryAssoc("rtag_id")
781
                                             rsQryAssoc.Close
782
                                             Set rsQryAssoc = Nothing
783
                                          Else
784
                                             assocMASSREFName = "None."
785
                                          End If
183 brianf 786
                                       Else
157 ghuddy 787
                                          UsedBy = aVersions( rsQry.FieldIndex("rtag_id"), i )
788
                                          If UsedBy <> "" Then
789
                                          Set rsQryUse = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_TAGS RT, PROJECTS P WHERE RT.ASSOC_MASS_REF="&aVersions( rsQry.FieldIndex("rtag_id"), i )&" AND RT.PROJ_ID=P.PROJ_ID", ORADYN_DEFAULT)
790
 
791
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
792
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
793
                                                linkB = rsQryUse("rtag_id")
794
                                                   If comment = "" Then
795
                                                      comment = rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
796
                                                   Else
797
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
798
                                                   End If
799
                                                   rsQryUse.MoveNext
800
                                                End If
801
                                             WEnd
802
                                          End If
803
                                          %>
804
                                          <%If comment <> "" Then %>
805
                                             <td bgcolor="#F5F5F5" class="body_txt" valign="top">
806
                                                <input type="checkbox" name="rtag_id_list" value="<%=linkB%>">
807
                                                </td>
808
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
809
                                          <%Else%>
810
                                             <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
811
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
812
                                          <%End If%>
813
                                       <%End If%>
814
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(  aVersions( rsQry.FieldIndex("description"), i )   )%></td>
183 brianf 815
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
816
                                       <%
817
                                         ' Get daemon summary bar chart for current release
5009 dpurdie 818
                                         Call RenderDaemonStatusConfig(aVersions( rsQry.FieldIndex("rtag_id"), i ))
183 brianf 819
                                       %>
820
                                       </td>
157 ghuddy 821
                                    </tr>
822
                                    <%
823
                                    'lastLevel = currLevel
824
                                    comment = ""
825
                                 Next
183 brianf 826
                                 Set objDmSts = Nothing
157 ghuddy 827
                              End If
828
 
829
                              rsQry.Close
830
                              Set rsQry = Nothing
831
                           End If
832
                           %>
833
                        </table>
834
                        <br>
835
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
836
                        <!--#include file="messages/_msg_inline.asp"-->
837
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
838
 
839
                     <%End If%>
840
                     <!-- LIST VIEW END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
841
 
842
                     <hr noshade color="#CAC5B8" width="100%" size="1">
843
                  </td>
844
               </tr>
845
               <%=objPMod.ComposeHiddenTags()%>
846
               <input type="hidden" name="action" value="true">
847
            </form>
848
         </table>
849
 
850
         <table width="118" border="0" align="left">
851
            <tr>
852
               <td bgcolor="#E4E9EC" width="26"><span class="body_txt">Icon</span></td>
853
               <td bgcolor="#E4E9EC" width="82"><span class="body_txt">Release State </span></td>
854
            </tr>
855
            <tr>
856
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_open_mode.gif" width="15" height="13"></td>
857
               <td bgcolor="#F5F5F5"><span class="body_txt">Open Mode</span></td>
858
            </tr>
859
            <tr>
860
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_restrictive_mode.gif" width="15" height="15"></td>
861
               <td bgcolor="#F5F5F5"><span class="body_txt">Restrictive Mode</span></td>
862
            </tr>
863
            <tr>
864
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_ccb_mode.gif" width="15" height="15"></td>
865
               <td bgcolor="#F5F5F5"><span class="body_txt">CCB Mode</span></td>
866
            </tr>
867
            <tr>
868
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_closed_mode.gif" width="15" height="14"></td>
869
               <td bgcolor="#F5F5F5"><span class="body_txt">Closed Mode</span></td>
870
            </tr>
871
            <tr>
872
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_archive_mode.gif" width="15" height="14"></td>
873
               <td bgcolor="#F5F5F5"><span class="body_txt">Archive Mode</span></td>
874
            </tr>
875
         </table>
876
         <p>&nbsp;</p>
877
      </td>
878
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
879
   </tr>
880
   <tr>
881
      <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
882
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
883
   </tr>
119 ghuddy 884
</table>
885
 
886
 
887
<!-- FOOTER -->
888
<!--#include file="_footer.asp"-->
889
<map name="mapviewtype">
890
  <area shape="rect" coords="2,2,69,23" href="<%=ScriptName%>?viewtype=1&<%=objPMod.ComposeURL()%>" title="Switch to List View">
891
  <area shape="rect" coords="73,2,143,23" href="<%=ScriptName%>?viewtype=2&<%=objPMod.ComposeURL()%>" title="Switch to Tree View">
892
</map>
893
</body>
894
</html>
895
<%
896
Call Destroy_All_Objects
157 ghuddy 897
%>