Rev 5207 | Blame | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='|'| wAddDaemonInstructionSimple.asp'| Either ripple or terstbuild the current package'| This window has few options'|'=====================================================%><%Option explicitResponse.Expires = 0%><!--#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="common/_form_window_common.asp"--><!--#include file="common/common_dbedit.asp"--><!--#include file="common/daemon_instructions.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><!--#include file="_access_control_login.asp"--><%'------------ VARIABLE DEFINITION -------------Dim sMessageDim parPv_idDim parOp_codeDim parRfileDim bPreventSubmitDim ripplePresent, rippleDisable, rippleCheckedDim testPresent, testDisable, testChecked'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------sMessage = NULLbPreventSubmit = False' collect all parameters from query stringparPv_id = Request("pv_id")parOp_code = Request("op_code")parRfile = Request("rfile")Set objFormCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'------------------------------------------------------------------------------------------------------------------------------------------' For the specified Release, get a list of all that release's daemon configurations.' Return True if at least one daemon configuration was found, else False'------------------------------------------------------------------------------------------------------------------------------------------Function DaemonsAvailable(NNrtag_id)Dim rsTemp, Query_StringDaemonsAvailable = TrueQuery_String = "SELECT * "&_" FROM release_config rc"&_" WHERE rc.rtag_id = "& NNrtag_idSet rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))If rsTemp.RecordCount = 0 ThenDaemonsAvailable = FalseEnd IfrsTemp.CloseSet rsTemp = nothingEnd Function%><%'------------ RUN BEFORE PAGE RENDER ----------' Make sure we dont have any null strings or empty strings for our parametersIf IsNull(parOp_code) OR parOp_code = "" ThenparOp_code = "-1"End IfIf IsNull(parRtag_id) OR parRtag_id = "" ThenparRtag_id = "0"End IfIf IsNull(parRfile) OR parRfile = "" ThenparRfile = "dependencies.asp"End If' Check if form submit is happeningIf CBool(Request("action")) ThenIf CInt(parOp_code) >= 0 ThenDim RepeatSecondsDim ScheduledDateTimeDim ReleaseModeReleaseMode = GetReleaseMode(parRtag_id)' determine if insert/update is enabled by permissionsif NOT UserCanAddOrEditThisDaemonInst(DB_PROJ_ID, ReleaseMode, parOp_code) Then' redirect to an error messageCall RaiseMsg(enum_MSG_ERROR, "You have been denied permission to add/update daemon instructions for the specified release.")End If' do daemon instruction validation, continuing only if it passesIf ValidateDaemonInstruction(parOp_code, parRtag_id, parPv_id) = True ThenRepeatSeconds = 0ScheduledDateTime = ORA_SYSDATETIME' We are adding a new recordobjEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.insert_daemon_inst( "& parOp_code & ", " &_parRtag_id & ", " &_parPv_id & ", " &_ScheduledDateTime & ", " &_CStr(RepeatSeconds) & ", " &_ORA_SYSDATETIME & ", " &_objAccessControl.UserId & "); END;"objEH.CatchORA ( OraSession )If objEH.Finally ThenCall OpenInParentWindow (parRfile & "?rtag_id=" & parRtag_id & "&pv_id=" & parPv_id)Call CloseWindow()End IfElsesMessage = "Invalid Request. "End IfElsesMessage = "No action selected. "End IfEnd If' Prevent editing if build instruction is already presenttestPresent = DaemonInstructionPresent(parRtag_id, parPv_id, 1 )ripplePresent = DaemonInstructionPresent(parRtag_id, parPv_id, 0 )If ripplePresent ThenrippleDisable = " disabled"ElserippleChecked = " checked"End IfIf testPresent ThentestDisable = " disabled"End IfIf ripplePresent OR testPresent ThensMessage = sMessage & "Build Instruction already present"End IfIf ripplePresent AND testPresent ThenbPreventSubmit = trueEnd If'----------------------------------------------%><html><head><title>Release Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="images/release_manager_style.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script></head><body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" ><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Ripple or Test Build current Package</span><br>Add a new Daemon Instruction to Ripple or Test Build current Package</td></tr><%'-- FROM START --------------------------------------------------------------------------------------------------------------objFormComponent.FormName = "DaemonInstruction"objFormComponent.Action = ScriptName &_"?proj_id="& DB_PROJ_ID &_"&rtag_id="& parRtag_id &_"&pv_id=" & parPv_id &_"&rfile=" & parRfileobjFormComponent.OnSubmit = "ShowProgress();"Call objFormComponent.FormStart()%><tr><td background="images/bg_login.gif"><table class="embedded_table"><tr><td><%=ProgressBar()%></td></tr></table></td></tr><tr><td><!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><%Call Messenger ( sMessage , 3, "100%" )%><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><table class="embedded_table form_item"><tr><td class="nowrap form_align" ><input type="radio" name="op_code" value="0" <%=rippleChecked%><%=rippleDisable%>>Ripple the current package.<td>This will cause a new package version to be created.<br>All packages that depend on this package will also be rippled.<tr><td class="nowrap form_align"><input type="radio" name="op_code" value="1" <%=testChecked%><%=testDisable%>>Test Build the current package.<td>No new version will be created, nor will a build ripple be propagated.<br>This will simply ensure that the current package can be built with<br>the current build machine configuration.</td></tr><td align="right" colspan=2 class=top_border background="images/bg_login.gif"><p> <p><%If DaemonsAvailable(parRtag_id) AND NOT bPreventSubmit Then%><input name="btn" type="submit" class="form_btn" value="Add/Update"><%Else%><input name="btn" type="submit" class="form_btn_disabled" value="Add/Update" disabled="disabled" ><%End If%><input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"><tr></tr><tr><td><input type="hidden" id="rtag_id" name="rtag_id" value="<%=parRtag_id%>"><input type="hidden" id="pv_id" name="pv_id" value="<%=parPv_id%>"><input type="hidden" id="rfile" name="rfile" value="<%=parRfile%>"></td></tr></table></td></tr><%=objPMod.ComposeHiddenTags()%><input type="hidden" name="action" value="true"><%Call objFormComponent.FormEnd()'-- FROM END ----------------------------------------------------------------------------------------------------------------%></table></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objFormCollector = Nothing'----------------------------------------------Call Destroy_All_Objects%>