Blame | Last modification | View Log | RSS feed
<%'===================================================================' Package Common'===================================================================%><!--#include file="../class/classTemplateManager.asp"--><!--#include file="../class/classTabControl.asp"--><!--#include file="../class/classActionButtonControl.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"><SPAN id="spanShowDetails" name="spanShowDetails"><a href="javascript:;" class="body_scol" onClick="DisplaySPAN(true);" style="display:block">Show Details...</a></SPAN><SPAN id="spanHideDetails" name="spanHideDetails" style="display:none;"><a href="javascript:;" class="body_colb" onClick="DisplaySPAN(false);">Hide Details</a></SPAN><SPAN id="spanPkgInfo" name="spanPkgInfo" style="display:none;"><table width="400" border="0" cellspacing="0" cellpadding="3"><tr><td background="images/bg_form_lightbluedark.gif" nowrap class="body_txt"><%Call Print_Pkg_Info()%></td></tr></table></SPAN><br></td><td background="images/bg_lght_gray.gif"></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 Print_Pkg_Info()' Status:If IsNull(pkgInfoHash.Item ("is_patch")) ThenIf objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPackage")) ThenIf (pkgInfoHash.Item ("dlocked") = "Y") OR (pkgInfoHash.Item ("dlocked") = "A")Then' Unlock package.Response.write "<a href='_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"' class='body_txt' title='Unlock the package.'><b>Status:</b><img src='images/i_edit.gif' width='12' height='12' border='0' ></a> Released<br>"Else' Lock PackageResponse.write "<a href='_s_lock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"' class='body_txt' title='Lock the package. Release requirements are not applied.'><b>Status:</b><img src='images/i_edit.gif' width='12' height='12' border='0'></a> Not Released<br>"End IfElseCall RenderPackageState ()End IfElseIf objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND (objAccessControl.IsActive("UnlockPatch")) ThenIf (pkgInfoHash.Item ("dlocked") = "Y") OR (pkgInfoHash.Item ("dlocked") = "A")Then' Unlock package.Response.write "<a href='_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"' class='body_txt' title='Unlock the package.'><b>Status:</b><img src='images/i_edit.gif' width='12' height='12' border='0' ></a> Released<br>"Else' Lock PackageResponse.write "<a href='_s_lock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"' class='body_txt' title='Lock the package. Release requirements are not applied.'><b>Status:</b><img src='images/i_edit.gif' width='12' height='12' border='0'></a> Not Released<br>"End IfElseCall RenderPackageState ()End IfEnd If' Base View:Response.write "<b>Base View: </b>"& Get_Pkg_Base_View ( parPv_id, parRtag_id ) &"<br>"' Previous Version:If IsNull(pkgInfoHash.Item ("is_patch")) ThenIf objAccessControl.IsActive("ChangePreviousVersion") ThenIf IsNull(pkgInfoHash.Item ("previous_version")) ThenResponse.write "<a href='javascript:;' onClick='MM_openBrWindow(""_wform_change_previous_version.asp?rfile="& scriptName &"&pv_id="& parPv_id &"&rtag_id="& parRtag_id &""",""ChangeOwner"",""resizable=yes,width=400,height=200"")' class='body_txt'><b>Previous Version:</b><img src='images/i_edit.gif' width='12' height='12' border='0' alt='Edit'></a> Unknown!<br>"ElseResponse.write "<a href='javascript:;' onClick='MM_openBrWindow(""_wform_change_previous_version.asp?rfile="& scriptName &"&pv_id="& parPv_id &"&rtag_id="& parRtag_id &""",""ChangeOwner"",""resizable=yes,width=400,height=200"")' class='body_txt'><b>Previous Version:</b><img src='images/i_edit.gif' width='12' height='12' border='0' alt='Edit'> "& pkgInfoHash.Item ("previous_version") &"</a><br>"End IfElseIf IsNull(pkgInfoHash.Item ("previous_version")) ThenResponse.write "<b>Previous Version:</b><img src='images/i_edit_disable.gif' width='12' height='12' border='0' alt='Edit'></a> Unknown!<br>"ElseResponse.write "<b>Previous Version:</b><img src='images/i_edit_disable.gif' width='12' height='12' border='0' alt='Edit'> "& pkgInfoHash.Item ("previous_version") &"</a><br>"End IfEnd IfEnd IfResponse.write "<br>"Response.write "<table width='100' border='0' cellspacing='0' cellpadding='1'>"' Owner:Response.write "<tr>"If objAccessControl.UserLogedIn() ThenResponse.write "<td nowrap><a href='javascript:;' onClick='MM_openBrWindow(""_wform_change_owner.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &""",""ChangeOwner"",""resizable=yes,width=400,height=200"")' class='body_txt'><b>Owner:</b><img src='images/i_edit.gif' width='12' height='12' border='0' alt='Change owner'></a> </td>"ElseResponse.write "<td nowrap class='body_txt'><b>Owner:</b><img src='images/i_edit_disable.gif' width='12' height='12' border='0' alt='Change owner'></td>"End IfResponse.write "<td nowrap class='body_txt'>"& pkgInfoHash.Item ("owner") &"</td>"Response.write "<td><a href='mailto:"& pkgInfoHash.Item ("owner_email") &"' class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align='absmiddle' alt='"& pkgInfoHash.Item ("owner_email") &"'></a></td>"Response.write "</tr>"' Created:Response.write "<tr>"Response.write "<td nowrap class='body_txt'><b>Created: </b></td>"Response.write "<td nowrap class='body_txt'>"& EuroDate(pkgInfoHash.Item ("created_stamp")) &" by "& pkgInfoHash.Item ("creator") &"</td>"Response.write "<td><a href='mailto:"& pkgInfoHash.Item ("creator_email") &"' class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align='absmiddle' alt='"& pkgInfoHash.Item ("creator_email") &"'></a></td>"Response.write "</tr>"' Last Modified:Response.write "<tr>"Response.write "<td nowrap class='body_txt'><b>Last Modified: </b></td>"Response.write "<td nowrap class='body_txt'>"& EuroDateTime(pkgInfoHash.Item ("modified_stamp")) &" by "& pkgInfoHash.Item ("modifier") &"</td>"Response.write "<td><a href='mailto:"& pkgInfoHash.Item ("modifier_email") &"' class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align='absmiddle' alt='"& pkgInfoHash.Item ("modifier_email") &"'></a></td>"Response.write "</tr>"If IsNull(pkgInfoHash.Item ("is_patch")) AND (Request("rtag_id") <> "") ThenResponse.write "<tr>"If pkgInfoHash.Item ("insertor") <> "" ThenResponse.write "<td nowrap class='body_txt'><b>Added to Release: </b></td>"Response.write "<td nowrap class='body_txt'>"& EuroDate(pkgInfoHash.Item ("insert_stamp")) &" by "& pkgInfoHash.Item ("insertor") &"</td>"Response.write "<td><a href='mailto:"& pkgInfoHash.Item ("insertor_email") &"' class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align='absmiddle' alt='"& pkgInfoHash.Item ("insertor_email") &"'></a></td>"End IfResponse.write "</tr>"End If' Config Specs:Call Config_Spec (Request("rtag_id"), Request("pv_id"))Call Config_Spec_Template (pkgInfoHash.Item("dlocked"), rsQry("config_spec_branch"), rsQry("pkg_label"), rsQry("src_path"))' Jats commandsCall Jats_Commands (pkgInfoHash.Item("dlocked"), rsQry("config_spec_branch"), rsQry("pkg_label"), rsQry("src_path"))rsQry.Close()Set rsQry = nothingResponse.write "</table>"End 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'-----------------------------------------------------------------------------------------------------------------------------%>