Rev 5958 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%'=====================================================' CONFIG FILE'=====================================================%><%' -- VARIABLE DEFINITION ------------------------------Dim OraSession, OraDatabase ' DB connectionDim QUERIES_PATHDim SCRIPT_NAMEDim TNS_NAME, DB_AUTHENTICATIONDim APP_ROOTDim rootPathDim scriptNameDim SMTP_HOSTDim archive_server ' Machine nameDim HTTP_PKG_ARCHIVE ' http and Machine nameDim dpkg_archiveURL ' http path to dpkg_archive with /Dim release_archiveURL ' http path to releases with /Dim ACCESS_MANAGER_URLDim RELEASE_MANAGER_URLDim DEPLOYMENT_MANAGER_URLDim PRODUCTION_MANAGER_URLDim strRelativePath ' Rel Path from script to URLDim managerSuiteBase ' Url to the base of the Manager SuiteDim FavIcon ' Favorite IconDim RmDebug ' Debug Display' -----------------------------------------------------%><%' -- DATABASE CONNECTIONS -----------------------------'Set OraSession = CreateObject("OracleInProcServer.XOraSession")'OraSession.CreateDatabasePool 1,10,100, Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), 0'Set OraDatabase = OraSession.GetDatabaseFromPool(10)Set OraSession = CreateObject("OracleInProcServer.XOraSession")Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), Cint(0))' -----------------------------------------------------%><%' -- Basic Functions ----------------------------------' --------------------------------------------------------------------------------------' Determine if a variable or Const exists and is not empty' Use to check if a vbscript variable has been declared and contains a non-empty valueFunction isDefined( var)If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") ThenisDefined = TRUEElseisDefined = FALSEEnd IfEnd Function'--------------------------------------------------------------------------------------'Returns the server of the package archiveFunction Get_Mail_Server()Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='MAIL SERVER'"Dim rsTempSet rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )Get_Mail_Server = rsTemp("config")rsTemp.Close()Set rsTemp = NothingEnd Function'--------------------------------------------------------------------------------------'Returns the server of the package archiveFunction Get_Archive_Server()Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='ARCHIVE SERVER'"Dim rsTempSet rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )Get_Archive_Server = rsTemp("config")rsTemp.Close()Set rsTemp = NothingEnd Function'--------------------------------------------------------------------------------------'Return a relative path to the server base. Used for relative pathing to 'images''Assumes server base is two directores below the web serve root (ManageSuite/Release_Manager)Function GetPathToBase()Dim url,depth,rv,iiurl = request.servervariables("URL")depth = len(url) - len(replace(url, "/", ""))rv = ""For ii = 4 To depthrv = rv & "../"NextGetPathToBase = rvEnd Function' Return a URL to the base of the Manager suite' Assumes this is one directory down from the web server rootFunction GetManagerSuiteBaseDim datadata = Split(request.servervariables("URL"),"/")GetManagerSuiteBase = "/" & data(1)End Function'-----------------------------------------------------------------------------------------------------------------------------' Destroy_All_Objects' Should be used by ALL pages and error handling code in order to reduce memory and handle leaks' May be used directly or via _footer.asp or globals_destructor.aspSub Destroy_All_ObjectsOn Error Resume Next' Some global objectsSet objAccessControl = NothingSet objPMod = NothingSet objEH = NothingSet oEnumStateTypeNames = NothingSet objTabControl = NothingSet objCrumbs = NothingSet objBtnControl = NothingSet objFormCollector = Nothing' Global package infoSet pkgInfoHash = Nothing' Delete ALL Oracle bound variables' Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leakIf TypeName(OraDatabase) = "IOraDatabase" ThenWhile OraDatabase.Parameters.Count > 0OraDatabase.Parameters.Remove(0)WendEnd If' Some commonly used database objectsrsTemp.CloseSet rsTemp = NothingrsRep.CloseSet rsRep = NothingrsQry.CloseSet rsQry = Nothing' Database objectsset OraDatabase = Nothingset OraSession = NothingEnd Sub' -- CONFIGURATIONS -----------------------------------Const APPLICATION_ID = 1 ' Stored in Deployment Manager, [APPLICATIONS] tableAPP_ROOT = Server.MapPath(".")TNS_NAME = Application("TNS_NAME") '"RELEASEM"DB_AUTHENTICATION = Application("DEPLOYMENT_MANAGER_LOGIN") '"release_manager_devl/release_manager_devl" ' DEVL schemaQUERIES_PATH = APP_ROOT &"\queries"scriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )rootPath = Left( Server.MapPath( scriptName ), InStrRev(Server.MapPath( scriptName ), "\") )SMTP_HOST = Get_Mail_Server()Const ADMIN_EMAIL = "VixIT@vixtechnology.com"Const enumDB_PERMISSION_TYPE_VISIBLE = 1 ' Stored in Access Manager, [Permission_Types] tableConst enumDB_PERMISSION_TYPE_ACTIVE = 2 ' Stored in Access Manager, [Permission_Types] tableConst enumRELEASES_DAYS_BACK_IN_TIME = 7 ' Number of days back in time searching for released productsstrRelativePath = GetPathToBase()managerSuiteBase = GetManagerSuiteBase()ACCESS_MANAGER_URL = ManagerSuiteBase & "/Access_Manager"RELEASE_MANAGER_URL = ManagerSuiteBase & "/Release_Manager"DEPLOYMENT_MANAGER_URL = ManagerSuiteBase & "/Deployment_Manager"PRODUCTION_MANAGER_URL = ManagerSuiteBase & "/Production_Manager"archive_server = Get_Archive_Server()HTTP_PKG_ARCHIVE = "http://" & archive_serverdpkg_archiveURL = HTTP_PKG_ARCHIVE & "/dpkg_archive/"release_archiveURL = HTTP_PKG_ARCHIVE & "/releases/"FavIcon = strRelativePath & "favicons/DM" & Application("FavIconSuffix") & ".png"' -----------------------------------------------------%><%' -- VARIABLE INITIALISATION --------------------------SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )Const enumDB_DIFF_NO_CHANGE = 0Const enumDB_DIFF_UPDATED = 2Const enumDB_DIFF_NEW = 1Const enumDB_DIFF_REMOVED = -1Const enumDB_FILTER_COMMENTS = "Filter Comments"Const enumDB_FILTER_ISSUES = "Filter Issues"Const enumPRODUCTS_BASE_VIEW_ID = 5 ' Release Manager products base view idConst enumAUTOPRODUCTS_BASE_VIEW_ID = 2602 ' Release Manager auto_products base view id' -----------------------------------------------------%><%' -- CONSTANTS ----------------------------------------Const enumDB_DEFAULT_EMPTY = -1Const enumISSUES_STATE_FIXED = 1Const enumCLEARQUEST_DEVI_ID = 4Const enumJIRA_ID = 6Const enumISSUES_STATE_IMPORTED = 0Const enumDB_YES = "Y"Const enumDB_NO = "N"Const enumDEFAULT = "default"Const enumCOOKIE_NAME = "DeploymentManager"Const enumSEPARATOR_LABEL = "SEPARATOR_LABLE"Const enumDB_ALL_DATA = 0Const SPACER = "<img src='images/spacer.gif' width='1' height='1'>"Const enumMSSQL_ERROR = "<img src='icons/i_no_db_connection.gif' width='16' height='17' hspace='2' border='0' align='absmiddle' title='3rd party database is off-line'><SPAN class='body_txtr'>Information not currently available.</SPAN>"Const enumSESSION_COPY_TYPE = "COPY_TYPE"Const enumSESSION_COPY_ITEMS = "COPY_ITEMS"Const enumSESSION_COPY_FROM = "COPY_FROM"Const enumLOADING = "Loading..."Const enum_MSG_ERROR = "msg_error.asp"Const enum_RELMGR_ERRDESCRIPTION = "RELMGR_ERRDESCRIPTION" ' session variable where long error message is stored before display to user' -- ACTION TRAIL -------------------------------------Const enumAT_EVENT_COMMENT = 0Const enumAT_EVENT_ADDED = 1Const enumAT_EVENT_MODIFIED = 2Const enumAT_EVENT_REMOVED = 3' -----------------------------------------------------%><%' -- OO4O ---------------------------------------------const ORATYPE_VARCHAR2 = 1const ORATYPE_NUMBER = 2const ORATYPE_SINT = 3const ORATYPE_FLOAT = 4const ORATYPE_STRING = 5const ORATYPE_VARCHAR = 9const ORATYPE_DATE = 12const ORATYPE_UINT = 68const ORATYPE_RAW = 95const ORATYPE_CHAR = 96const ORATYPE_CHARZ = 97const ORATYPE_MLSLABEL = 105const ORATYPE_OBJECT = 108const ORATYPE_REF = 110const ORATYPE_CLOB = 112const ORATYPE_BLOB = 113const ORATYPE_BFILE = 114const ORATYPE_VARRAY = 247const ORATYPE_TABLE = 248const ORATYPE_CURSOR = 102const ORALOB_ONE_PIECE = 0const ORALOB_FIRST_PIECE = 1const ORALOB_NEXT_PIECE = 2const ORALOB_LAST_PIECE = 3Const ORALOB_SUCCESS = 0Const ORALOB_NEED_DATA = 99Const ORALOB_NODATA = 100const ORAPARM_INPUT=1const ORAPARM_OUTPUT=2const ORAPARM_BOTH=3const ORADYN_DEFAULT=&H0&' -----------------------------------------------------%><%' -- ERROR MESSAGES -----------------------------------' -----------------------------------------------------%><%' -- ICONS --------------------------------------------' -- ICONS SMALL --------------------------------------' -----------------------------------------------------' -- Other Configuration -----------------------------Const enum_RELMGR_COOKIE_DOMAIN = "RELMGR_USER_COOKIES"Const COOKIE_HIDE_FILES_FILTER = "COOKIE_HIDE_FILES_FILTER"Const COOKIE_HIDE_DEPS_FILTER = "COOKIE_HIDE_DEPS_FILTER"Const COOKIE_HIDE_DIFF_FILTER = "COOKIE_HIDE_DIFF_FILTER"Const COOKIE_RELMGR_SHOW_VIEW = "COOKIE_RELMGR_SHOW_VIEW"Const COOKIE_RELEASE_MANAGER_MEMORY = "RELEASE_MANAGER_MEMORY"Const COOKIE_PATCH_OPTIONS_FILTER = "COOKIE_PATCH_OPTIONS_FILTER"%>