Subversion Repositories DevTools

Rev

Rev 7382 | Rev 7417 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7382 Rev 7395
Line 251... Line 251...
251
 
251
 
252
   ' Handle not logged in
252
   ' Handle not logged in
253
   Dim UserId : UserId = -1
253
   Dim UserId : UserId = -1
254
   If objAccessControl.UserLogedIn Then UserId = objAccessControl.UserId
254
   If objAccessControl.UserLogedIn Then UserId = objAccessControl.UserId
255
 
255
 
256
   Query_String = "SELECT rt.RTAG_ID ,rt.rtag_name, proj.proj_id, proj.proj_name,rt.lxr, rt.official, NVL(lx.lxrserver, 'N') as lxrserver," &_
256
   Query_String = "SELECT rt.RTAG_ID ,rt.rtag_name, proj.proj_id, proj.proj_name,rt.lxr, rt.official, NVL(lx.lxrserver, 'N') as lxrserver, NVL(rt.s3Sync, 'N') as s3Sync," &_
257
                  "  CASE when (TRUNC(SYSDATE - rt.created_stamp) <= 20) AND rt.creator_id = "& UserId & " THEN 1 ELSE 0 END as userCanDelete" &_
257
                  "  CASE when (TRUNC(SYSDATE - rt.created_stamp) <= 20) AND rt.creator_id = "& UserId & " THEN 1 ELSE 0 END as userCanDelete" &_
258
                  "  FROM Release_tags rt, projects proj, lxr_state lx" &_
258
                  "  FROM Release_tags rt, projects proj, lxr_state lx" &_
259
                  "  WHERE rt.RTAG_ID = lx.RTAG_ID(+)" &_
259
                  "  WHERE rt.RTAG_ID = lx.RTAG_ID(+)" &_
260
                  "  AND rt.proj_id = proj.proj_id" &_
260
                  "  AND rt.proj_id = proj.proj_id" &_
261
                  "  AND rt.RTAG_ID = " & NNrtag_id
261
                  "  AND rt.RTAG_ID = " & NNrtag_id
Line 693... Line 693...
693
   OraDatabase.Parameters.Remove "RTAG_ID"
693
   OraDatabase.Parameters.Remove "RTAG_ID"
694
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
694
   OraDatabase.Parameters.Remove "RETURN_NUMBER"
695
   OraDatabase.Parameters.Remove "OP_CODE_LIST"
695
   OraDatabase.Parameters.Remove "OP_CODE_LIST"
696
 
696
 
697
End Sub
697
End Sub
-
 
698
 
-
 
699
'-----------------------------------------------------------------------------------------------------------------------------
-
 
700
'	Add information to the pkgInfoHash describing the S3 Sync
-
 
701
'	Added only when required
-
 
702
'	Assumes that Get_Pkg_Info has already been called 
-
 
703
'	Calculate: 
-
 
704
'		s3Sync - This package in this release is marked for S3Sync
-
 
705
'   	s3SyncEnabled - This Release has s3 sync enabled
-
 
706
'		s3SyncContent - This version of the package appears to have S3Sync content
-
 
707
Sub Get_Pkg_Info_s3Sync ()
-
 
708
	Dim Query_String, rsTemp, pvidInRelease
-
 
709
 
-
 
710
	pkgInfoHash.Add "s3Sync", "N"
-
 
711
	pkgInfoHash.Add "s3SyncEnabled", "N"
-
 
712
	pkgInfoHash.Add "s3SyncContent", "N"
-
 
713
 
-
 
714
	If pkgInfoHash.Item ("isaRelease") Then
-
 
715
 
-
 
716
		'	Use the base package in a Release if this is a WIP or in Pending
-
 
717
		'	as the property will be inherited when the package is updated
-
 
718
		'
-
 
719
		pvidInRelease = pkgInfoHash.Item ("pv_id_InRelease")
-
 
720
		If pvidInRelease = "" Then
-
 
721
			pvidInRelease = pkgInfoHash.Item ("pv_id")
-
 
722
		End If
-
 
723
 
-
 
724
		OraDatabase.Parameters.Add "PV_ID",         pvidInRelease,    ORAPARM_INPUT, ORATYPE_NUMBER
-
 
725
		OraDatabase.Parameters.Add "RTAG_ID",       pkgInfoHash.Item ("rtag_id"),  ORAPARM_INPUT, ORATYPE_NUMBER
-
 
726
 
-
 
727
		  Query_String = _
-
 
728
			" SELECT NVL(rc.s3sync, 'N') as s3sync, NVL(rt.s3sync, 'N') AS s3syncenabled, nvl2(s3.file_path, 'Y', 'N') AS s3synccontent" &_
-
 
729
			" FROM release_content rc, release_tags rt, (" &_
-
 
730
			"     SELECT rcp.* FROM release_components rcp, release_content rc WHERE rc.rtag_id = :RTAG_ID" &_
-
 
731
			"           AND rc.pv_id = rcp.pv_id" &_
-
 
732
			"           AND rcp.file_name IS NULL" &_
-
 
733
			"           AND rcp.file_path LIKE 'pkg/S3TRANSFER'" &_
-
 
734
			" ) s3" &_
-
 
735
			" WHERE rc.rtag_id = rt.rtag_id" &_
-
 
736
			"       AND rc.pv_id = :PV_ID" &_
-
 
737
			"       AND rt.rtag_id = :RTAG_ID" &_
-
 
738
			"       AND s3.pv_id (+) = rc.pv_id"
-
 
739
 
-
 
740
		  Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
741
		  If rsTemp.RecordCount > 0 Then
-
 
742
			pkgInfoHash.Item ("s3Sync") = (rsTemp.Fields("s3Sync"))
-
 
743
			pkgInfoHash.Item ("s3SyncEnabled") = (rsTemp.Fields("s3SyncEnabled"))
-
 
744
			pkgInfoHash.Item ("s3SyncContent") = (rsTemp.Fields("s3SyncContent"))
-
 
745
		  End If
-
 
746
 
-
 
747
		OraDatabase.Parameters.Remove "PV_ID"
-
 
748
		OraDatabase.Parameters.Remove "RTAG_ID"
-
 
749
 
-
 
750
		rsTemp.Close
-
 
751
		Set rsTemp = nothing
-
 
752
	End If
-
 
753
 
-
 
754
End Sub
-
 
755
 
698
'-----------------------------------------------------------------------------------------------------------------------------
756
'-----------------------------------------------------------------------------------------------------------------------------
699
' Get Package Info - when we don't have a package
757
' Get Package Info - when we don't have a package
700
Sub Get_NoPkg_Info(NNrtag)
758
Sub Get_NoPkg_Info(NNrtag)
701
	Dim rsTemp, Query_String
759
	Dim rsTemp, Query_String
702
	OraDatabase.Parameters.Add "RTAG_ID", 		NNrtag,		ORAPARM_INPUT, ORATYPE_NUMBER
760
	OraDatabase.Parameters.Add "RTAG_ID", 		NNrtag,		ORAPARM_INPUT, ORATYPE_NUMBER
Line 2508... Line 2566...
2508
                hover = "LXR no longer available. Release is no longer open"
2566
                hover = "LXR no longer available. Release is no longer open"
2509
            Case Else
2567
            Case Else
2510
                image = "LXRlogo64_progress.jpeg"
2568
                image = "LXRlogo64_progress.jpeg"
2511
                hover = "LXR Requested, unknown State:(" & lxrState &")"
2569
                hover = "LXR Requested, unknown State:(" & lxrState &")"
2512
        End Select
2570
        End Select
2513
        RenderLxrStateString = "<a class=mmItem href='"&lxrUrl&"'><img src=""images/"&image&""" height=16 border=0 vspace=0 hspace=0 style='vertical-align : bottom' title='"&hover&"'>" & txt &"</a>"
2571
        RenderLxrStateString = "<a class=mmItem href='"&lxrUrl&"' title='"&hover&"'><img src=""images/"&image&""" height=16 border=0 vspace=0 hspace=0 style='vertical-align : bottom'>" & txt &"</a>"
-
 
2572
    End If
-
 
2573
End Function
-
 
2574
 
-
 
2575
'-------------------------------------------------
-
 
2576
' Function:         RenderS3SyncStateString   
-
 
2577
' Description:      Return a string to show the current S3 Sync state
-
 
2578
Function RenderS3SyncStateString(rtagid, s3Sync, official, txt)
-
 
2579
    If s3Sync = "N" Then
-
 
2580
        RenderS3SyncStateString = ""
-
 
2581
    Else
-
 
2582
        Dim image, hover, iClass
-
 
2583
		iClass = ""
-
 
2584
        If releaseIsClosed(official) Then s3Sync = "A"
-
 
2585
 
-
 
2586
        Select Case s3Sync
-
 
2587
            Case "Y"
-
 
2588
                image = "AmazonS3.png"
-
 
2589
                hover = "S3 Sync Active"
-
 
2590
            Case "N"
-
 
2591
                image = "AmazonS3.png"
-
 
2592
                hover = "S3 Sync not enabled"
-
 
2593
            Case "A"
-
 
2594
                image = "AmazonS3.png"
-
 
2595
                hover = "S3 Sync not active. Release is no longer open"
-
 
2596
                iClass = "class=lessOpacity"
-
 
2597
            Case Else
-
 
2598
                image = "LXRlogo64_progress.jpeg"
-
 
2599
                hover = "S3Sync unknown State:(" & s3Sync &")"
-
 
2600
        End Select
-
 
2601
        RenderS3SyncStateString = "<span title='"&hover&"'><img "& iClass &" src=""images/"&image&""" height=16 border=0 vspace=0 hspace=0 style='vertical-align : bottom'>" & txt & "</span>"
2514
    End If
2602
    End If
2515
End Function 
2603
End Function 
-
 
2604
 
2516
 
2605
 
2517
'-------------------------------------------------
2606
'-------------------------------------------------
2518
' Function:         rippleFieldName   
2607
' Function:         rippleFieldName   
2519
' Description:      Return a string to convert a ripple field state to a text name
2608
' Description:      Return a string to convert a ripple field state to a text name
2520
'                   bFlag is set to false if the state is unknown.
2609
'                   bFlag is set to false if the state is unknown.