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
259
            Call OpenInWindow ( "form_edit_release.asp?rtag_id_list="& Replace( Request("rtag_id_list"), " ","" ) &"&"& objPMod.ComposeURL() )
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
'----------------------------------------------------------------------------------------------------------------------------------------------
345
%>
346
<%
347
'------------ RUN BEFORE PAGE RENDER ----------
348
If (Request("action") <> "") Then
121 hknight 349
 
157 ghuddy 350
   If Request("btn") = "Show" Then
351
      ' Store filter in cookie
352
      Response.Cookies (COOKIE_RELEASE_MANAGER_MEMORY)("show_filter") = Request("listFilter")
353
      parShowFilter = Request("listFilter")
354
   Else
355
      '-- Select Action
356
      Select Case Request("action")
357
      Case "btnNewRelease"
358
         Call NewRelease()
121 hknight 359
 
157 ghuddy 360
      Case "btnDestroyRelease"
361
         Call DestroyRelease()
121 hknight 362
 
157 ghuddy 363
      Case "btnEditRelease"
364
         Call EditRelease()
121 hknight 365
 
157 ghuddy 366
      Case "btnMoveRelease"
367
         Call MoveRelease()
368
 
369
      Case "btnMergeManager"
370
         Call MergeManager()
371
 
372
      Case "btnAdminView"
373
         Dim Query_String
374
         Query_String = _
375
         "   SELECT DISTINCT vi.view_id, vi.view_name"&_
376
         "   FROM VIEWS vi"&_
377
         "   WHERE vi.view_name = 'PROJECT WIDE'"
378
         Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
379
 
380
         Dim viewRecordCount
381
         Dim id
382
         viewRecordCount=0
383
         viewRecordCount = rsQry.RecordCount
384
 
385
         While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
386
            id=rsQry.Fields("view_id")
387
            rsQry.MoveNext
388
         WEnd
389
 
390
          rsQry.Close()
391
         Set rsQry = nothing
392
 
393
         If viewRecordCount = 0 Then
394
            OraDatabase.Parameters.Add "PROJ_ID", parProjId,    ORAPARM_INPUT, ORATYPE_NUMBER
395
            Query_String = _
396
            " SELECT DISTINCT vi.view_id, vi.view_name"&_
397
            " FROM VIEWS vi, RELEASE_CONTENT rc, RELEASE_TAGS rt"&_
398
            " WHERE rc.BASE_VIEW_ID = vi.VIEW_ID AND rt.proj_id = "& parProjId &"AND rc.rtag_id = rt.rtag_id"&_
399
            " ORDER BY ( vi.view_name )"
400
 
401
            Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
402
 
403
            OraDatabase.Parameters.Remove "PROJ_ID"
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
         End If
414
         If viewRecordCount = 0 Then
415
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id"))
416
         Else
417
            Call OpenInWindow ( "form_edit_project_view.asp?proj_id="&Request("proj_id")&"&FRview_id="&id)
418
         End If
419
      End Select
420
   End If
421
 
119 ghuddy 422
End If
423
 
424
' Set view type if required
425
Call SetViewType ()
426
 
427
' Get current view type
428
ViewType = GetViewType()
157 ghuddy 429
 
430
 
119 ghuddy 431
'----------------------------------------------
432
%>
433
 
434
<html>
435
<head>
436
<%
157 ghuddy 437
   Set rsQry = OraDatabase.DbCreateDynaset( "SELECT PROJ_NAME FROM PROJECTS WHERE PROJ_ID="& Request("proj_id"), ORADYN_DEFAULT )
119 ghuddy 438
%>
439
<title><%=rsQry("proj_name")%></title>
440
<%
157 ghuddy 441
   rsQry.Close
442
   Set rsQry = Nothing
119 ghuddy 443
%>
444
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
445
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
446
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
447
<link rel="stylesheet" href="images/navigation.css" type="text/css">
448
<script language="JavaScript" src="images/common.js"></script>
449
 
450
<!-- DROPDOWN MENUS -->
451
<!--#include file="_menu_def.asp"-->
452
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
453
 
454
</head>
455
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
456
<!-- MENU LAYERS -------------------------------------->
157 ghuddy 457
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 458
</div>
459
<!-- TIPS LAYERS -------------------------------------->
460
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
461
<!----------------------------------------------------->
462
<!-- HEADER -->
463
<!--#include file="_header.asp"-->
464
<!-- BODY ---->
465
 
466
<table width="100%" border="0" cellspacing="0" cellpadding="0">
157 ghuddy 467
   <tr>
468
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
469
      <td rowspan="2" valign="top" width="100%">
119 ghuddy 470
 
157 ghuddy 471
         <!-- ACTION BUTTONS ---------------------------------------------->
472
         <table width="100%"  border="0" cellspacing="0" cellpadding="7">
473
            <tr>
474
               <td width="1" bgcolor="#DAD7C8">
475
                  <%
476
                  If ViewType = LCONST_TREE_VIEW Then
477
                     Response.write LIMG_TREE_VIEW
478
                  Else
479
                     Response.write LIMG_LIST_VIEW
480
                  End If
481
                  %>
482
               </td>
483
               <td width="100%" bgcolor="#DAD7C8">
484
                  <%
485
                  Dim aBtnsDef
486
                  ' Define action buttons
487
                  aBtnsDef = Array("btnNewRelease", "btnEditRelease", "btnMoveRelease", "width=20", "btnDestroyRelease", "width=20", "btnMergeManager", "width=20", "btnAdminView")
119 ghuddy 488
 
157 ghuddy 489
                  ' Load action buttons from database
490
                  Call objBtnControl.LoadActionButtons ( aBtnsDef, OraDatabase )
119 ghuddy 491
 
157 ghuddy 492
                  ' Set spacing to minimum between buttons
493
                  objBtnControl.ButtonSpacer = 0
494
                  objBtnControl.ImageHspace = 2
119 ghuddy 495
 
157 ghuddy 496
                  ' Access Control
497
                  If NOT objAccessControl.IsActive("CreateNewRelease") Then Call objBtnControl.Active ( "btnNewRelease", "N" )
498
                  If NOT objAccessControl.IsActive("DestroyRelease") Then Call objBtnControl.Active ( "btnDestroyRelease", "N" )
499
                  If NOT objAccessControl.IsActive("CreateNewRelease") Then Call objBtnControl.Active ( "btnMoveRelease", "N" )
119 ghuddy 500
 
157 ghuddy 501
                  ' -- Render Buttons
502
                  Call objBtnControl.Render  ( aBtnsDef, objAccessControl )
503
                  %>
504
               </td>
505
            </tr>
506
         </table>
507
         <!-- ACTION BUTTONS END  ------------------------------------------>
119 ghuddy 508
 
157 ghuddy 509
         <table width="100%"  border="0" cellspacing="10" cellpadding="0">
510
            <form name="FormName" method="post" action="<%=ScriptName%>">
511
               <tr>
512
                  <td>
119 ghuddy 513
 
157 ghuddy 514
                     <!-- TREE VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
515
                     <%If ViewType = LCONST_TREE_VIEW Then%>
119 ghuddy 516
 
157 ghuddy 517
                        <table width="100%"  border="0" cellspacing="1" cellpadding="1">
518
                           <tr>
183 brianf 519
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
119 ghuddy 520
 
157 ghuddy 521
                              <%If parProjId <> 2 Then %>
183 brianf 522
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
523
                                 <td width="47%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
524
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 525
                              <%Else%>
183 brianf 526
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
527
                                 <td width="25%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
528
                                 <td width="22%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
529
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt"">Daemon Status</td>
157 ghuddy 530
                              <%End If%>
531
                           </tr>
532
                           <%
533
                           'OraDatabase.Parameters.Add "TREE_VERSION",  nProjTreeVersion,    ORAPARM_INPUT, ORATYPE_NUMBER
534
                           OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
535
 
536
                           Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ReleaseVersionTree.sql") , ORADYN_DEFAULT )
537
                           lastLevel = 0
538
 
539
                           'OraDatabase.Parameters.Remove "TREE_VERSION"
540
                           OraDatabase.Parameters.Remove "PROJ_ID"
541
 
542
                           Dim lastRtagId, parentRtag_id
543
 
544
                           If rsQry.RecordCount > 0 Then
545
 
183 brianf 546
                              Set objDmSts = New DaemonStatus
547
                              Call objDmSts.GetDaemonStatus(parProjId)
548
 
157 ghuddy 549
                              'aVersions = rsQry.GetRows()
550
                              'lastRow = UBound( aVersions, 2 )
551
 
552
                              'Set objSortHelper = New SortHelper
553
 
554
                              ' Sort versions
555
                              'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
556
 
557
                              'For i = 0 To lastRow   ' Ascending order
558
                              While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
559
 
560
                                 'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
561
                                 currLevel = CInt(rsQry("hierarchy"))
562
                                 'lastLevel = currLevel - 1
4080 dpurdie 563
 
564
                                 'Dim hoverTitle
565
                                 hoverTitle = "Last change: "& rsQry("OFFICIAL_STAMP") & " by " & rsQry("modifier")
566
 
157 ghuddy 567
                                 %>
568
                                 <tr>
569
                                    <td bgcolor="#F5F5F5" class="body_rowg">
570
                                       <%Call RenderIndent( lastLevel, currLevel )%>
571
                                       <input type="checkbox" name="rtag_id_list" value="<%=rsQry("rtag_id")%>" style="vertical-align:middle;">
4080 dpurdie 572
                                       <a href="dependencies.asp?rtag_id=<%=rsQry("rtag_id")%>" class="body_link" title="<%=hoverTitle%>" >
157 ghuddy 573
                                       <%=ReleaseIcon( rsQry("official") )%>&nbsp;<%=rsQry("rtag_name")%></a>
183 brianf 574
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=rsQry("created_stamp") & " by " & rsQry("creator")%></td>
157 ghuddy 575
                                       <%
576
                                       If parProjId <> 2 Then
577
                                          Dim assocMASSREF, rsQryAssoc, assocMASSREFName, link
578
                                          assocMASSREF =  rsQry("assoc_mass_ref")
579
                                          If assocMASSREF <> "" Then
580
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
581
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
582
                                             link = "dependencies.asp?rtag_id="&rsQryAssoc("rtag_id")
583
                                             rsQryAssoc.Close
584
                                             Set rsQryAssoc = Nothing
585
                                          Else
586
                                             assocMASSREFName = "None."
587
                                          End If
183 brianf 588
                                       Else
157 ghuddy 589
                                          Dim UsedBy, rsQryUse, comment, linkB
590
                                          UsedBy =  rsQry("rtag_id")
591
                                          If UsedBy <> "" Then
592
                                             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)
593
 
594
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
595
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
596
                                                   linkB = "dependencies.asp?rtag_id="&rsQryUse("rtag_id")
597
                                                   If comment = "" Then
598
                                                      comment = rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
599
                                                   Else
600
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
601
                                                   End If
602
                                                   rsQryUse.MoveNext
603
                                                End If
604
                                             WEnd
605
                                          End If
606
                                          %>
607
                                          <%If comment <> "" Then %>
608
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
609
                                          <%Else%>
610
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
611
                                          <%End If%>
612
                                       <%End If%>
613
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(rsQry("description"))%></td>
183 brianf 614
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
615
                                       <%
616
                                         ' Get daemon summary bar chart for current release
617
                                         Call objDmSts.RenderDaemonStatus(rsQry("rtag_id"),16)
618
                                       %>
619
                                       </td>
157 ghuddy 620
                                 </tr>
621
                                 <%
622
                                 lastLevel = currLevel
623
                                 rsQry.MoveNext
624
                                 comment = ""
625
                              WEnd
626
                              'Next
183 brianf 627
                              Set objDmSts = Nothing
157 ghuddy 628
                           End If
629
                           rsQry.Close
630
                           Set rsQry = Nothing
631
                           %>
632
                        </table>
633
 
634
                     <!-- LIST VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
635
                     <%Else%>
636
                        <%
637
                        Call GetListFilterValues ( dListFilter )
638
                        %>
639
 
640
                        <!-- RELEASE LIST FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
641
                        <fieldset style="width:200px;">
642
                           <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divListFilter');" ><%=GetIsListFilterInUseIcon() %>&nbsp;Show&nbsp;Release Types...</a></legend>
643
                           <div name="divListFilter" id="divListFilter" class="body_txt" style="display:none;">
644
                              <br>
645
                              <table width="100%"  border="0" cellspacing="1" cellpadding="3">
646
                                 <tr>
647
                                    <td width="10" background="images/bg_action_norm.gif">
648
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_OPEN_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_OPEN_MODE)%>>
649
                                    </td>
650
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
651
                                       <img src="images/i_rtag_open_mode.gif" width="15" height="13">&nbsp;Open&nbsp;Mode
652
                                    </td>
653
                                 </tr>
654
                                 <tr>
655
                                    <td width="10" background="images/bg_action_norm.gif">
656
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_RESTRICTIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_RESTRICTIVE_MODE)%>>
657
                                    </td>
658
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
659
                                       <img src="images/i_rtag_restrictive_mode.gif" width="15" height="13">&nbsp;Restrictive&nbsp;Mode
660
                                    </td>
661
                                 </tr>
662
                                 <tr>
663
                                    <td width="10" background="images/bg_action_norm.gif">
664
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CCB_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CCB_MODE)%>>
665
                                    </td>
666
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
667
                                       <img src="images/i_rtag_ccb_mode.gif" width="15" height="13">&nbsp;CCB&nbsp;Mode
668
                                    </td>
669
                                 </tr>
670
                                 <tr>
671
                                    <td width="10" background="images/bg_action_norm.gif">
672
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CLOSED_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CLOSED_MODE)%>>
673
                                    </td>
674
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
675
                                       <img src="images/i_rtag_closed_mode.gif" width="15" height="13">&nbsp;Closed&nbsp;Mode
676
                                    </td>
677
                                 </tr>
678
                                 <tr>
679
                                    <td width="10" background="images/bg_action_norm.gif">
680
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_ARCHIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_ARCHIVE_MODE)%>>
681
                                    </td>
682
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
683
                                       <img src="images/i_rtag_archive_mode.gif" width="15" height="13">&nbsp;Archive&nbsp;Mode
684
                                    </td>
685
                                 </tr>
686
                                 <tr>
687
                                    <td background="images/bg_action_norm.gif">&nbsp;</td>
688
                                    <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Show"></td>
689
                                 </tr>
690
                              </table>
691
                           </div>
692
                        </fieldset>
693
 
694
                        <table width="100%"  border="0" cellspacing="1" cellpadding="3">
695
                           <tr>
696
                              <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
697
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
698
 
699
                              <%If parProjId <> 2 Then %>
183 brianf 700
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
701
                                 <td width="47%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
702
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 703
                              <%Else%>
183 brianf 704
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
157 ghuddy 705
                                 <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
183 brianf 706
                                 <td width="24%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
707
                                 <td width="22%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
708
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 709
                              <%End If%>
710
 
711
                           </tr>
712
                           <%
713
                           If NOT IsEmpty(parShowFilter) Then
714
                              OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
715
 
716
                              rsQryStr = GetQuery ("ReleaseVersionList.sql")
717
                              rsQryStr = Replace(rsQryStr, "/*SHOW_FILTER*/", parShowFilter)
718
 
719
                              Set rsQry = OraDatabase.DbCreateDynaset( rsQryStr, ORADYN_DEFAULT )
720
                              lastLevel = 0
721
 
722
                              OraDatabase.Parameters.Remove "PROJ_ID"
723
 
724
 
725
                              If rsQry.RecordCount > 0 Then
726
 
727
                                 aVersions = rsQry.GetRows()
728
                                 lastRow = UBound( aVersions, 2 )
729
 
183 brianf 730
                                 Set objDmSts = New DaemonStatus
731
                                 Call objDmSts.GetDaemonStatus(parProjId)
732
 
157 ghuddy 733
                                 'Set objSortHelper = New SortHelper
734
 
735
                                 ' Sort versions
736
                                 'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
737
 
738
                                 For i = 0 To lastRow ' Ascending order
4080 dpurdie 739
                                    Dim hoverTitle
740
                                    hoverTitle = "Last change: "& aVersions( rsQry.FieldIndex("OFFICIAL_STAMP"), i ) & " by " & aVersions( rsQry.FieldIndex("modifier"), i )
157 ghuddy 741
 
742
                                    'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
743
                                    %>
744
                                    <tr>
745
                                       <td bgcolor="#F5F5F5" class="body_txt" valign="top">
746
                                          <input type="checkbox" name="rtag_id_list" value="<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>">
747
                                       </td>
748
                                       <td bgcolor="#F5F5F5" valign="top">
4080 dpurdie 749
                                          <a href="dependencies.asp?rtag_id=<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>" class="body_link" title="<%=hoverTitle%>">
157 ghuddy 750
                                          <%=ReleaseIcon( aVersions( rsQry.FieldIndex("official"), i ) )%>&nbsp;<%=aVersions( rsQry.FieldIndex("rtag_name"), i )%></a>
751
                                       </td>
185 brianf 752
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=aVersions( rsQry.FieldIndex("created_stamp"), i) & " by " & aVersions( rsQry.FieldIndex("creator"), i)%></td>
157 ghuddy 753
                                       <%
754
                                       If parProjId <> 2 Then
755
                                          assocMASSREF = aVersions( rsQry.FieldIndex("assoc_mass_ref"), i )
756
                                          If assocMASSREF <> "" Then
757
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
758
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
759
                                             link = rsQryAssoc("rtag_id")
760
                                             rsQryAssoc.Close
761
                                             Set rsQryAssoc = Nothing
762
                                          Else
763
                                             assocMASSREFName = "None."
764
                                          End If
183 brianf 765
                                       Else
157 ghuddy 766
                                          UsedBy = aVersions( rsQry.FieldIndex("rtag_id"), i )
767
                                          If UsedBy <> "" Then
768
                                          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)
769
 
770
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
771
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
772
                                                linkB = rsQryUse("rtag_id")
773
                                                   If comment = "" Then
774
                                                      comment = rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
775
                                                   Else
776
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
777
                                                   End If
778
                                                   rsQryUse.MoveNext
779
                                                End If
780
                                             WEnd
781
                                          End If
782
                                          %>
783
                                          <%If comment <> "" Then %>
784
                                             <td bgcolor="#F5F5F5" class="body_txt" valign="top">
785
                                                <input type="checkbox" name="rtag_id_list" value="<%=linkB%>">
786
                                                </td>
787
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
788
                                          <%Else%>
789
                                             <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
790
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
791
                                          <%End If%>
792
                                       <%End If%>
793
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(  aVersions( rsQry.FieldIndex("description"), i )   )%></td>
183 brianf 794
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
795
                                       <%
796
                                         ' Get daemon summary bar chart for current release
797
                                         Call objDmSts.RenderDaemonStatus(aVersions( rsQry.FieldIndex("rtag_id"), i ),16)
798
                                       %>
799
                                       </td>
157 ghuddy 800
                                    </tr>
801
                                    <%
802
                                    'lastLevel = currLevel
803
                                    comment = ""
804
                                 Next
183 brianf 805
                                 Set objDmSts = Nothing
157 ghuddy 806
                              End If
807
 
808
                              rsQry.Close
809
                              Set rsQry = Nothing
810
                           End If
811
                           %>
812
                        </table>
813
                        <br>
814
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
815
                        <!--#include file="messages/_msg_inline.asp"-->
816
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
817
 
818
                     <%End If%>
819
                     <!-- LIST VIEW END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
820
 
821
                     <hr noshade color="#CAC5B8" width="100%" size="1">
822
                  </td>
823
               </tr>
824
               <%=objPMod.ComposeHiddenTags()%>
825
               <input type="hidden" name="action" value="true">
826
            </form>
827
         </table>
828
 
829
         <table width="118" border="0" align="left">
830
            <tr>
831
               <td bgcolor="#E4E9EC" width="26"><span class="body_txt">Icon</span></td>
832
               <td bgcolor="#E4E9EC" width="82"><span class="body_txt">Release State </span></td>
833
            </tr>
834
            <tr>
835
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_open_mode.gif" width="15" height="13"></td>
836
               <td bgcolor="#F5F5F5"><span class="body_txt">Open Mode</span></td>
837
            </tr>
838
            <tr>
839
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_restrictive_mode.gif" width="15" height="15"></td>
840
               <td bgcolor="#F5F5F5"><span class="body_txt">Restrictive Mode</span></td>
841
            </tr>
842
            <tr>
843
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_ccb_mode.gif" width="15" height="15"></td>
844
               <td bgcolor="#F5F5F5"><span class="body_txt">CCB Mode</span></td>
845
            </tr>
846
            <tr>
847
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_closed_mode.gif" width="15" height="14"></td>
848
               <td bgcolor="#F5F5F5"><span class="body_txt">Closed Mode</span></td>
849
            </tr>
850
            <tr>
851
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_archive_mode.gif" width="15" height="14"></td>
852
               <td bgcolor="#F5F5F5"><span class="body_txt">Archive Mode</span></td>
853
            </tr>
854
         </table>
855
         <p>&nbsp;</p>
856
      </td>
857
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
858
   </tr>
859
   <tr>
860
      <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>
861
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
862
   </tr>
119 ghuddy 863
</table>
864
 
865
 
866
<!-- FOOTER -->
867
<!--#include file="_footer.asp"-->
868
<map name="mapviewtype">
869
  <area shape="rect" coords="2,2,69,23" href="<%=ScriptName%>?viewtype=1&<%=objPMod.ComposeURL()%>" title="Switch to List View">
870
  <area shape="rect" coords="73,2,143,23" href="<%=ScriptName%>?viewtype=2&<%=objPMod.ComposeURL()%>" title="Switch to Tree View">
871
</map>
872
</body>
873
</html>
874
<%
875
Call Destroy_All_Objects
157 ghuddy 876
%>