Rev 161 | Rev 165 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%'===================================================================' Package Common'===================================================================%><!--#include file="../class/classTemplateManager.asp"--><!--#include file="../class/classTabControl.asp"--><!--#include file="../class/classActionButtonControl.asp"--><!--#include file="daemon_instructions.asp"--><%'------------ VARIABLE DEFINITION -------------Dim parPv_idDim nEnvTab ' remember environment tabDim objBtnControlDim aTabBtnsDef'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------parPv_id = Request("pv_id")Set objBtnControl = New ActionButtonControl'------------ CONDITIONS ----------------------'----------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------'--- Make sure rtag_id is always presentIf (Request("rtag_id") = "") AND (Request("pv_id") = "") Then Response.Redirect("index.asp")'--- Rebuild EnvironmentIf (Request("rtag_id") <> "") ThenCall Rebuild_Environment ( parRtag_id )End If'--- Persist following parameters between postbacksobjPMod.PersistInQryString ( aPersistList(enumPAR_RTAG_ID) )objPMod.PersistInQryString ( aPersistList(enumPAR_PV_ID) )'--- Get Environment (lefthand side menu) tabnEnvTab = GetEnvTab ( Request("envtab") )'--- Get Package General InformationSet pkgInfoHash = CreateObject("Scripting.Dictionary")If Request("pv_id") <> "" ThenCall Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )' Make sure pv_id exists as it may be removedIf pkgInfoHash.Item("pv_id") = "" Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))ElseIf (ScriptName <> "dependencies.asp") AND (ScriptName <> "find.asp")Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))End If'----------------------------------------------%><%'-----------------------------------------------------------------------------------------------------------------------------Sub RenderPackageProperties ()%><tr><td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td><td valign="bottom" background="images/bg_lght_gray.gif" nowrap class="body_txt"><%If pkgInfoHash.Item ("is_patch") = "Y" Then'--- PATCH ---Response.write "<br><a href='patches.asp?pv_id="& pkgInfoHash.Item ("patch_parent_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked'><img src='icons/i_caretone.gif' hspace='2' border='0' align='absmiddle'>Back To "& pkgInfoHash.Item ("pkg_name") &"</a><br><br>"If pkgInfoHash.Item ("is_obsolete") = "Y" ThenDim rsTempSet rsTemp = OraDatabase.DbCreateDynaset( "select patch_obsoleted_by from package_patches where patch_id ="&pkgInfoHash.Item ("pv_id"), cint(0))If rsTemp("patch_obsoleted_by") <> "" ThenSet rsTemp = OraDatabase.DbCreateDynaset( "select pkg_version from package_versions where pv_id ="&rsTemp("patch_obsoleted_by"), cint(0))Call Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( "<b>Obsoleted by patch "& rsTemp("pkg_version") & ". </b> " ) & NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )rsTemp.Close()Set rsTemp = nothingElseCall Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )End IfResponse.write enum_imgPatchObsoleteElseResponse.write enum_imgPatchEnd IfIf pkgInfoHash.Item ("dlocked") = "Y" ThenResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'></SPAN>"ElseResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"</SPAN>"End IfElse'--- PACKAGE ---If pkgInfoHash.Item ("dlocked") = "Y" ThenIf pkgInfoHash.Item ("deprecated_state") = 6 ThenResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'>"&enum_imgDeprecated&"</SPAN>"ElseIf pkgInfoHash.Item ("product_state") = 4 ThenResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'>"&enum_imgProductRejected&"</SPAN>"ElseResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'></SPAN>"End IfElseResponse.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"</SPAN>"End IfEnd If%><br><br></td><td background="images/bg_lght_gray.gif"> </td></tr><tr><td background="images/bg_lght_gray.gif"></td><td background="images/bg_lght_gray.gif" style=color:Red><%=GetOpCodeListForRtagIdAndPvId( "NOTE: '", Request("rtag_id"), pkgInfoHash.Item("pv_id"), "' has been requested" )%><td></tr><%End Sub'-----------------------------------------------------------------------------------------------------------------------------Sub RenderPackageState ()If (pkgInfoHash.Item ("dlocked") = "Y") ThenResponse.write "<b>Status:</b> Released<br>"ElseResponse.write "<b>Status: </b>Not released<br>"End IfEnd Sub'---------------------------------------------------------------Sub Config_Spec (NNRtag_id, NNPv_id)OraDatabase.Parameters.Add "RTAG_ID", NNRtag_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PV_ID", NNPv_id, ORAPARM_INPUT, ORATYPE_NUMBERIf NNRtag_id <> "" ThenIf pkgInfoHash.Item ("dlocked") <> "Y" ThenSet rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec.sql"), cint(0))ElseSet rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))End IfElseIf pkgInfoHash.Item ("dlocked") <> "Y" ThenSet rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec_nortag.sql"), cint(0))ElseSet rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec_nortag.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))End IfEnd IfOraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "PV_ID"End Sub'---------------------------------------------------------------' Function: Config_Spec_Template'' Purpose: Generates HTML to display the config spec to use' to create a view loaded with the particular package version.'' Arguments: dlocked : dlocked state of the package version' config_branch : The branch, or null' pkg_label : The package label' src_path : The source path for the package' Notes:'Sub Config_Spec_Template (dlocked, config_branch, pkg_label, src_path)Dim TemplateIf (pkg_label <> "" AND src_path <> "") ThenIf (dlocked <> "Y" AND NOT IsNull(config_branch) AND config_branch <> "" ) ThenTemplate = "element * CHECKEDOUT <br>" & _"element .../lost+found -none <br>" & _"element * .../" & config_branch & "/LATEST <br>" & _"element * " & pkg_label & " -mkbranch " & config_branch & "<br>" & _"element * /main/0 -mkbranch " & config_branch & "<br>" & _"load " & chr(34) & src_path & chr(34)ElseTemplate = "element * CHECKEDOUT <br>" & _"element .../lost+found -none <br>" & _"element * " & pkg_label &"<br>" & _"load " & chr(34) & src_path & chr(34)End IfElseTemplate = "UNAVAILABLE - missing label and/or source path"End IfResponse.write "<tr>"Response.write "<td nowrap class='body_txt'><b>Config Specs: </b></td>"Response.write "<td nowrap class='body_txt'>"& Template &"</td>"Response.write "<td nowrap class='body_txt'></td>"Response.write "</tr>"End Sub'---------------------------------------------------------------' Function: Jats_Commands'' Purpose: Generates HTML for displaying the JATS commands for extracting' a view for the package version, and for building the targets' within a previously extracted view for the package version.'' Arguments: dlocked : dlocked state of the package version' config_branch : The branch, or null' pkg_label : The package label' src_path : The source path for the package' Notes:'Sub Jats_Commands (dlocked, config_branch, pkg_label, src_path)Dim Template1, Template2If (pkg_label <> "" AND src_path <> "") ThenIf (dlocked <> "Y" AND NOT IsNull(config_branch) AND config_branch <> "" ) ThenTemplate1 = "jats release -extract " & pkg_label & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34) &" -branch "& config_branchElseTemplate1 = "jats release -extract " & pkg_label & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34)End IfTemplate2 = "jats release -test " & pkgInfoHash.Item("pkg_label") & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34)ElseTemplate1 = "UNAVAILABLE - missing label and/or source path"Template2 = "UNAVAILABLE - missing label and/or source path"End IfResponse.write "<tr>"Response.write "<td nowrap class='body_txt'><b>JATS Extract: </b></td>"Response.write "<td nowrap class='body_txt'>" & Template1 & "</td>"Response.write "<td nowrap class='body_txt'></td>"Response.write "</tr>"Response.write "<tr>"Response.write "<td nowrap class='body_txt'><b>JATS Test: </b></td>"Response.write "<td nowrap class='body_txt'>" & Template2 & "</td>"Response.write "<td nowrap class='body_txt'></td>"Response.write "</tr>"End Sub'-----------------------------------------------------------------------------------------------------------------------------%>