%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'| |
'| wAddDaemon |
'| |
'=====================================================
%>
<%
Option explicit
Response.Expires = 0
%>
<%
'------------ ACCESS CONTROL ------------------
%>
<%
'------------ VARIABLE DEFINITION -------------
Dim rsQry, healthTag, cmdInterface, pkgOwner, isInterface, package, procDesc
Dim sMessage
Dim Query_String
Dim RecordCount
Dim bmcon_id
Dim daemon_mode
Dim gbe_buildfilter
Dim bShowEmpty
Dim bAdd
'------------ CONSTANTS DECLARATION -----------
'------------ VARIABLE INIT -------------------
sMessage = NULL
parRtag_id = Request("rtag_id")
bmcon_id = RequestDefault("bmcon_id",Request("base_bmcon_id"))
bAdd = (Request("rcon_id") = "")
Set objFormCollector = CreateObject("Scripting.Dictionary")
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
' Function: GetData
' Description: Determine the basic data for the edit session
Sub GetData
' Determine if any daemons have been configured in this release
' Will be used to determine if a new entry should be a MASTER or a SLAVE
'
Query_String = "select * " &_
" from release_config rc," &_
" gbe_machtype gbe " &_
" where rc.rtag_id = "& parRtag_id &_
" and gbe.gbe_id = rc.gbe_id"
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
RecordCount = rsQry.RecordCount
If RecordCount = 0 Then
daemon_mode = "M"
else
daemon_mode = "S"
End If
rsQry.Close()
Set rsQry = Nothing
' Edit an existing entry
' May have a link into the build_machine_config - or it may not
' Check first
bShowEmpty = TRUE
If NOT bAdd Then
Query_String = "SELECT * " &_
" FROM RELEASE_CONFIG rc," &_
" gbe_machtype gb" &_
" WHERE rc.rcon_id = "& Request("rcon_id") &_
" AND rc.gbe_id = gb.gbe_id"
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
If rsQry.RecordCount > 0 Then
bmcon_id = rsQry("bmcon_id")
daemon_mode = rsQry("daemon_mode")
gbe_buildfilter = NiceCStr(rsQry("gbe_buildfilter"),"")
End If
rsQry.Close()
Set rsQry = Nothing
End If
If NOT isNULL(bmcon_id) AND bmcon_id <> "" Then
' Extract information from the machine config
Query_String = "SELECT * " &_
" FROM build_machine_config bc, " &_
" gbe_machtype gb " &_
"WHERE bc.bmcon_id = " & bmcon_id &_
" AND bc.gbe_id = gb.gbe_id"
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
If rsQry.RecordCount > 0 Then
bmcon_id = rsQry("bmcon_id")
bShowEmpty = FALSE
End If
rsQry.Close()
Set rsQry = Nothing
End If
' Cleanup gbe_buildfilter
Dim regEx
Set regEx = New RegExp
regEx.Global = true
regEx.IgnoreCase = True
regEx.Pattern = "\s{2,}"
gbe_buildfilter = Replace(gbe_buildfilter,","," ")
gbe_buildfilter = Trim(regEx.Replace(gbe_buildfilter, " "))
End Sub
Sub InsertXrefData
'
' Create a data structure (javascript) to map build machine (bmcon_id) to available platforms
'
Query_String = "SELECT bp.bp_name, bp.bp_id, bc2.bmcon_id" &_
" FROM release_manager.build_platforms bp, release_manager.build_platforms_config2 bc2 " &_
" WHERE bp.bp_id = bc2.bp_id " &_
" ORDER BY upper(bp.bp_name)"
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
Response.Write "AddXrefEntry('" & rsQry("bp_name") &"',"& rsQry("bmcon_id") & ");" & vbCrLf
rsQry.MoveNext
Wend
rsQry.Close()
Set rsQry = Nothing
End Sub
'-------------------------------------------------
' Gnerate a table of build machine information
Sub DisplayBuildMachines
Dim rsQry, query
Response.Write "
<%=objPMod.ComposeHiddenTags()%>
<%If NOT bAdd Then%>
">
<% End If %>
<%
Call objFormComponent.FormEnd()
'-- FROM END ----------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN AFTER PAGE RENDER -----------
Set objFormCollector = Nothing
'----------------------------------------------
Call Destroy_All_Objects
%>