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
563
                                 %>
564
                                 <tr>
565
                                    <td bgcolor="#F5F5F5" class="body_rowg">
566
                                       <%Call RenderIndent( lastLevel, currLevel )%>
567
                                       <input type="checkbox" name="rtag_id_list" value="<%=rsQry("rtag_id")%>" style="vertical-align:middle;">
4078 dpurdie 568
                                       <a href="dependencies.asp?rtag_id=<%=rsQry("rtag_id")%>" class="body_link" title="<%=HTMLEncode( rsQry("description") ) %>" >
157 ghuddy 569
                                       <%=ReleaseIcon( rsQry("official") )%>&nbsp;<%=rsQry("rtag_name")%></a>
183 brianf 570
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=rsQry("created_stamp") & " by " & rsQry("creator")%></td>
157 ghuddy 571
                                       <%
572
                                       If parProjId <> 2 Then
573
                                          Dim assocMASSREF, rsQryAssoc, assocMASSREFName, link
574
                                          assocMASSREF =  rsQry("assoc_mass_ref")
575
                                          If assocMASSREF <> "" Then
576
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
577
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
578
                                             link = "dependencies.asp?rtag_id="&rsQryAssoc("rtag_id")
579
                                             rsQryAssoc.Close
580
                                             Set rsQryAssoc = Nothing
581
                                          Else
582
                                             assocMASSREFName = "None."
583
                                          End If
183 brianf 584
                                       Else
157 ghuddy 585
                                          Dim UsedBy, rsQryUse, comment, linkB
586
                                          UsedBy =  rsQry("rtag_id")
587
                                          If UsedBy <> "" Then
588
                                             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)
589
 
590
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
591
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
592
                                                   linkB = "dependencies.asp?rtag_id="&rsQryUse("rtag_id")
593
                                                   If comment = "" Then
594
                                                      comment = rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
595
                                                   Else
596
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href="&linkB&">"& rsQryUse("rtag_name") &"</a>"
597
                                                   End If
598
                                                   rsQryUse.MoveNext
599
                                                End If
600
                                             WEnd
601
                                          End If
602
                                          %>
603
                                          <%If comment <> "" Then %>
604
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
605
                                          <%Else%>
606
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
607
                                          <%End If%>
608
                                       <%End If%>
609
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(rsQry("description"))%></td>
183 brianf 610
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
611
                                       <%
612
                                         ' Get daemon summary bar chart for current release
613
                                         Call objDmSts.RenderDaemonStatus(rsQry("rtag_id"),16)
614
                                       %>
615
                                       </td>
157 ghuddy 616
                                 </tr>
617
                                 <%
618
                                 lastLevel = currLevel
619
                                 rsQry.MoveNext
620
                                 comment = ""
621
                              WEnd
622
                              'Next
183 brianf 623
                              Set objDmSts = Nothing
157 ghuddy 624
                           End If
625
                           rsQry.Close
626
                           Set rsQry = Nothing
627
                           %>
628
                        </table>
629
 
630
                     <!-- LIST VIEW ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
631
                     <%Else%>
632
                        <%
633
                        Call GetListFilterValues ( dListFilter )
634
                        %>
635
 
636
                        <!-- RELEASE LIST FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
637
                        <fieldset style="width:200px;">
638
                           <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divListFilter');" ><%=GetIsListFilterInUseIcon() %>&nbsp;Show&nbsp;Release Types...</a></legend>
639
                           <div name="divListFilter" id="divListFilter" class="body_txt" style="display:none;">
640
                              <br>
641
                              <table width="100%"  border="0" cellspacing="1" cellpadding="3">
642
                                 <tr>
643
                                    <td width="10" background="images/bg_action_norm.gif">
644
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_OPEN_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_OPEN_MODE)%>>
645
                                    </td>
646
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
647
                                       <img src="images/i_rtag_open_mode.gif" width="15" height="13">&nbsp;Open&nbsp;Mode
648
                                    </td>
649
                                 </tr>
650
                                 <tr>
651
                                    <td width="10" background="images/bg_action_norm.gif">
652
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_RESTRICTIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_RESTRICTIVE_MODE)%>>
653
                                    </td>
654
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
655
                                       <img src="images/i_rtag_restrictive_mode.gif" width="15" height="13">&nbsp;Restrictive&nbsp;Mode
656
                                    </td>
657
                                 </tr>
658
                                 <tr>
659
                                    <td width="10" background="images/bg_action_norm.gif">
660
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CCB_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CCB_MODE)%>>
661
                                    </td>
662
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
663
                                       <img src="images/i_rtag_ccb_mode.gif" width="15" height="13">&nbsp;CCB&nbsp;Mode
664
                                    </td>
665
                                 </tr>
666
                                 <tr>
667
                                    <td width="10" background="images/bg_action_norm.gif">
668
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_CLOSED_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_CLOSED_MODE)%>>
669
                                    </td>
670
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
671
                                       <img src="images/i_rtag_closed_mode.gif" width="15" height="13">&nbsp;Closed&nbsp;Mode
672
                                    </td>
673
                                 </tr>
674
                                 <tr>
675
                                    <td width="10" background="images/bg_action_norm.gif">
676
                                       <input name="listFilter" type="checkbox" value="'<%=enumDB_RELEASE_IN_ARCHIVE_MODE%>'" <%=GetIsListFilterChecked(enumDB_RELEASE_IN_ARCHIVE_MODE)%>>
677
                                    </td>
678
                                    <td width="1" nowrap background="images/bg_action_norm.gif" class="form_field">
679
                                       <img src="images/i_rtag_archive_mode.gif" width="15" height="13">&nbsp;Archive&nbsp;Mode
680
                                    </td>
681
                                 </tr>
682
                                 <tr>
683
                                    <td background="images/bg_action_norm.gif">&nbsp;</td>
684
                                    <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Show"></td>
685
                                 </tr>
686
                              </table>
687
                           </div>
688
                        </fieldset>
689
 
690
                        <table width="100%"  border="0" cellspacing="1" cellpadding="3">
691
                           <tr>
692
                              <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
693
                              <td width="30%" bgcolor="#E4E9EC" class="body_txt">Release Name </td>
694
 
695
                              <%If parProjId <> 2 Then %>
183 brianf 696
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
697
                                 <td width="47%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
698
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 699
                              <%Else%>
183 brianf 700
                                 <td width="20%" bgcolor="#E4E9EC" class="body_txt">Created</td>
157 ghuddy 701
                                 <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
183 brianf 702
                                 <td width="24%" bgcolor="#E4E9EC" class="body_txt">Used By </td>
703
                                 <td width="22%" bgcolor="#E4E9EC" class="body_txt">Comments</td>
704
                                 <td width="3%" bgcolor="#E4E9EC" class="body_txt">Daemon Status</td>
157 ghuddy 705
                              <%End If%>
706
 
707
                           </tr>
708
                           <%
709
                           If NOT IsEmpty(parShowFilter) Then
710
                              OraDatabase.Parameters.Add "PROJ_ID",  parProjId,  ORAPARM_INPUT, ORATYPE_NUMBER
711
 
712
                              rsQryStr = GetQuery ("ReleaseVersionList.sql")
713
                              rsQryStr = Replace(rsQryStr, "/*SHOW_FILTER*/", parShowFilter)
714
 
715
                              Set rsQry = OraDatabase.DbCreateDynaset( rsQryStr, ORADYN_DEFAULT )
716
                              lastLevel = 0
717
 
718
                              OraDatabase.Parameters.Remove "PROJ_ID"
719
 
720
 
721
                              If rsQry.RecordCount > 0 Then
722
 
723
                                 aVersions = rsQry.GetRows()
724
                                 lastRow = UBound( aVersions, 2 )
725
 
183 brianf 726
                                 Set objDmSts = New DaemonStatus
727
                                 Call objDmSts.GetDaemonStatus(parProjId)
728
 
157 ghuddy 729
                                 'Set objSortHelper = New SortHelper
730
 
731
                                 ' Sort versions
732
                                 'Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("version") )
733
 
734
                                 For i = 0 To lastRow ' Ascending order
735
 
736
                                    'currLevel = GetLevel (  aVersions( rsQry.FieldIndex("rtag_version"), i )  )
737
                                    %>
738
                                    <tr>
739
                                       <td bgcolor="#F5F5F5" class="body_txt" valign="top">
740
                                          <input type="checkbox" name="rtag_id_list" value="<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>">
741
                                       </td>
742
                                       <td bgcolor="#F5F5F5" valign="top">
4078 dpurdie 743
                                          <a href="dependencies.asp?rtag_id=<%=aVersions( rsQry.FieldIndex("rtag_id"), i )%>" class="body_link" title="Open Release...">
157 ghuddy 744
                                          <%=ReleaseIcon( aVersions( rsQry.FieldIndex("official"), i ) )%>&nbsp;<%=aVersions( rsQry.FieldIndex("rtag_name"), i )%></a>
745
                                       </td>
185 brianf 746
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=aVersions( rsQry.FieldIndex("created_stamp"), i) & " by " & aVersions( rsQry.FieldIndex("creator"), i)%></td>
157 ghuddy 747
                                       <%
748
                                       If parProjId <> 2 Then
749
                                          assocMASSREF = aVersions( rsQry.FieldIndex("assoc_mass_ref"), i )
750
                                          If assocMASSREF <> "" Then
751
                                             Set rsQryAssoc = OraDatabase.DbCreateDynaset("SELECT RTAG_NAME, RTAG_ID FROM RELEASE_TAGS WHERE RTAG_ID="&assocMASSREF , ORADYN_DEFAULT)
752
                                             assocMASSREFName = rsQryAssoc("RTAG_NAME")
753
                                             link = rsQryAssoc("rtag_id")
754
                                             rsQryAssoc.Close
755
                                             Set rsQryAssoc = Nothing
756
                                          Else
757
                                             assocMASSREFName = "None."
758
                                          End If
183 brianf 759
                                       Else
157 ghuddy 760
                                          UsedBy = aVersions( rsQry.FieldIndex("rtag_id"), i )
761
                                          If UsedBy <> "" Then
762
                                          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)
763
 
764
                                             While ((NOT rsQryUse.BOF) AND (NOT rsQryUse.EOF))
765
                                                If rsQryUse("assoc_mass_ref") = UsedBy Then
766
                                                linkB = rsQryUse("rtag_id")
767
                                                   If comment = "" Then
768
                                                      comment = rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
769
                                                   Else
770
                                                   comment = comment &" <br> " & rsQryUse("proj_name") & " -> <a href=dependencies.asp?rtag_id="&linkB&">"& rsQryUse("rtag_name") &"</a>"
771
                                                   End If
772
                                                   rsQryUse.MoveNext
773
                                                End If
774
                                             WEnd
775
                                          End If
776
                                          %>
777
                                          <%If comment <> "" Then %>
778
                                             <td bgcolor="#F5F5F5" class="body_txt" valign="top">
779
                                                <input type="checkbox" name="rtag_id_list" value="<%=linkB%>">
780
                                                </td>
781
                                             <td bgcolor="#F5F5F5" class="body_rowg"><%=comment%></td>
782
                                          <%Else%>
783
                                             <td width="1" bgcolor="#E4E9EC">&nbsp;</td>
784
                                             <td bgcolor="#F5F5F5" class="body_rowg">None.</td>
785
                                          <%End If%>
786
                                       <%End If%>
787
                                       <td bgcolor="#F5F5F5" class="body_rowg"><%=NewLine_To_BR(  aVersions( rsQry.FieldIndex("description"), i )   )%></td>
183 brianf 788
                                       <td  bgcolor="#F5F5F5" class="body_rowg" valign=top>
789
                                       <%
790
                                         ' Get daemon summary bar chart for current release
791
                                         Call objDmSts.RenderDaemonStatus(aVersions( rsQry.FieldIndex("rtag_id"), i ),16)
792
                                       %>
793
                                       </td>
157 ghuddy 794
                                    </tr>
795
                                    <%
796
                                    'lastLevel = currLevel
797
                                    comment = ""
798
                                 Next
183 brianf 799
                                 Set objDmSts = Nothing
157 ghuddy 800
                              End If
801
 
802
                              rsQry.Close
803
                              Set rsQry = Nothing
804
                           End If
805
                           %>
806
                        </table>
807
                        <br>
808
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
809
                        <!--#include file="messages/_msg_inline.asp"-->
810
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
811
 
812
                     <%End If%>
813
                     <!-- LIST VIEW END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
814
 
815
                     <hr noshade color="#CAC5B8" width="100%" size="1">
816
                  </td>
817
               </tr>
818
               <%=objPMod.ComposeHiddenTags()%>
819
               <input type="hidden" name="action" value="true">
820
            </form>
821
         </table>
822
 
823
         <table width="118" border="0" align="left">
824
            <tr>
825
               <td bgcolor="#E4E9EC" width="26"><span class="body_txt">Icon</span></td>
826
               <td bgcolor="#E4E9EC" width="82"><span class="body_txt">Release State </span></td>
827
            </tr>
828
            <tr>
829
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_open_mode.gif" width="15" height="13"></td>
830
               <td bgcolor="#F5F5F5"><span class="body_txt">Open Mode</span></td>
831
            </tr>
832
            <tr>
833
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_restrictive_mode.gif" width="15" height="15"></td>
834
               <td bgcolor="#F5F5F5"><span class="body_txt">Restrictive Mode</span></td>
835
            </tr>
836
            <tr>
837
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_ccb_mode.gif" width="15" height="15"></td>
838
               <td bgcolor="#F5F5F5"><span class="body_txt">CCB Mode</span></td>
839
            </tr>
840
            <tr>
841
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_closed_mode.gif" width="15" height="14"></td>
842
               <td bgcolor="#F5F5F5"><span class="body_txt">Closed Mode</span></td>
843
            </tr>
844
            <tr>
845
               <td bgcolor="#F5F5F5"><img src="images/i_rtag_archive_mode.gif" width="15" height="14"></td>
846
               <td bgcolor="#F5F5F5"><span class="body_txt">Archive Mode</span></td>
847
            </tr>
848
         </table>
849
         <p>&nbsp;</p>
850
      </td>
851
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
852
   </tr>
853
   <tr>
854
      <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>
855
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
856
   </tr>
119 ghuddy 857
</table>
858
 
859
 
860
<!-- FOOTER -->
861
<!--#include file="_footer.asp"-->
862
<map name="mapviewtype">
863
  <area shape="rect" coords="2,2,69,23" href="<%=ScriptName%>?viewtype=1&<%=objPMod.ComposeURL()%>" title="Switch to List View">
864
  <area shape="rect" coords="73,2,143,23" href="<%=ScriptName%>?viewtype=2&<%=objPMod.ComposeURL()%>" title="Switch to Tree View">
865
</map>
866
</body>
867
</html>
868
<%
869
Call Destroy_All_Objects
157 ghuddy 870
%>