Rev 6181 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| RequestViewCointent.asp |'| |'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsViewDim sURLDim IMG_lockedDim relContentsSTRDim parScriptNameDim parRtagIdDim parViewIdDim parEnvtabDim parDview ' enable/disable deployment view.Dim nOperationDim checkedDim disabledDim ReleaseMode'------------ Constants Declaration -----------Const LIMG_LOCKED = "<img src='images/i_locked.gif' width='7' height='10' border='0' hspace='2'>"Const imgAdded = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Added'>"Const imgRemoved = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Removed'>"'------------ Variable Init -------------------parScriptName = Request("script_name")parRtagId = Request("rtag_id")parViewId = Request("view_id")parEnvtab = CInt( Request("envtab") )parDview = "disabled"'----------------------------------------------%><%'------------------------------------------------------------------------------------------------------------------------'------------------------------------------------------------------------------------------------------------------------%><%'------------------------ MAIN LINE ---------------------------------If (Request("envtab") = "") OR (Request("rtag_id") = "") OR (Request("view_id") = "") OR (Request("script_name") = "") ThenResponse.write "ERROR: Missing Parameters at "& ScriptNameCall Destroy_All_ObjectsResponse.EndEnd IfReleaseMode = GetReleaseMode(parRtagId)'--------------------------------------------------------------------%><%OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "VIEW_ID", parViewId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "RECORD_SET",NULL, ORAPARM_OUTPUT,ORATYPE_CURSOR' Decide which environment list is to be displayedSelect Case parEnvtabCase enumENVTAB_WORK_IN_PROGRESSOraDatabase.ExecuteSQL "BEGIN PK_WORK_IN_PROGRESS.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case enumENVTAB_PLANNEDOraDatabase.ExecuteSQL "BEGIN PK_PLANNED.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case enumENVTAB_RELEASEDOraDatabase.ExecuteSQL "BEGIN PK_RELEASE.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"Case ElseOraDatabase.ExecuteSQL "BEGIN PK_ENVIRONMENT.GET_VIEW_CONTENT ( :RTAG_ID, :VIEW_ID, :RECORD_SET ); END;"End SelectSet rsView = OraDatabase.Parameters("RECORD_SET").ValueOraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "VIEW_ID"OraDatabase.Parameters.Remove "RECORD_SET"' Retrun if no records foundIf rsView.RecordCount < 1 ThenrelContentsSTR = "No packages found."End If' Get view contentWhile ((NOT rsView.BOF) AND (NOT rsView.EOF))sURL = parScriptName &"?pv_id="& rsView("pv_id") &"&rtag_id="& parRtagIdIMG_locked = ""If rsView.Fields("dlocked") = "Y" Then IMG_locked = LIMG_LOCKED' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate' what the intended action is to be, once the pending item is approved.' Obviously, this functionality only applies if viewing the PENDING or ALL environment tabs.' With regard to the operation value, A = Added, S = SubtractednOperation = " "If (parEnvtab = enumENVTAB_PLANNED OR parEnvtab = enumENVTAB_ALL) ThennOperation = rsView.Fields("operation") ' NB. this field is only availble if earlier query was PK_PLANNED.GET_VIEW_CONTENT or PK_ENVIRONMENT.GET_VIEW_CONTENTIf nOperation = "A" ThenIMG_locked = imgAddedElseIf nOperation = "S" ThenIMG_locked = imgRemovedEnd IfEnd IfrelContentsSTR = relContentsSTR & "<tr>" & VBNewLineIf rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" ThenrelContentsSTR = relContentsSTR & " <td width='1%'>" & DefineStateIcon ( rsView("deprecated_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) & "</td>" & VBNewLineElseIf ((parDview <> "enable") AND parEnvtab = enumENVTAB_PLANNED) Then' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), thenIf (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Thenchecked = NULLdisabled = NULL' disable check box if not logged in, or if not in open mode and user has no permission to approve pendingIf objAccessControl.UserLogedIn ThenIf ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) ThenIf NOT canActionControlInProject("ApproveForAutoBuild") Thendisabled = "disabled"End IfEnd IfElsedisabled = "disabled"End IfrelContentsSTR = relContentsSTR & " <td class=tcenter width='1%'><input name='pv_id_list' id='pv_id_list' type=checkbox value="&rsView.Fields("pv_id")&" "&checked&" "&disabled&"></td>"& VBNewLineElse ' always check and disable the checkboxchecked = "checked"disabled = "disabled"relContentsSTR = relContentsSTR & " <td class=tcenter width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &"</td>"& VBNewLineEnd IfElserelContentsSTR = relContentsSTR & " <td class=tcenter width='1%'>"& DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, rsView("build_type"), TRUE ) &"</td>"& VBNewLineEnd IfEnd IfrelContentsSTR = relContentsSTR & " <td width='100%' nowrap><a href='"& sURL &"' class='body_txt_drk' title="""& HTMLEncode( rsView("pv_description") ) &""">"& rsView.Fields("pkg_name") &"</a></td>" & VBNewLinerelContentsSTR = relContentsSTR & " <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLinerelContentsSTR = relContentsSTR & " <td class=tcenter width='1%'>"& IMG_locked &"</td>"relContentsSTR = relContentsSTR & "</tr>" & VBNewLinersView.MoveNextWEndrsView.CloseSet rsView = nothingrelContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"' Response the contentResponse.write relContentsSTR%><%Call Destroy_All_Objects%>