Subversion Repositories DevTools

Rev

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