<% '===================================================== ' CONFIG FILE '===================================================== %> <% ' -- VARIABLE DEFINITION ------------------------------ Dim OraSession, OraDatabase ' DB connection Dim QUERIES_PATH Dim SCRIPT_NAME Dim TNS_NAME, DB_AUTHENTICATION Dim APP_ROOT Dim rootPath Dim scriptName Dim SMTP_HOST Dim archive_server ' Machine name Dim HTTP_PKG_ARCHIVE ' http and Machine name Dim dpkg_archiveURL ' http path to dpkg_archive with / Dim release_archiveURL ' http path to releases with / Dim ACCESS_MANAGER_URL Dim RELEASE_MANAGER_URL Dim DEPLOYMENT_MANAGER_URL Dim PRODUCTION_MANAGER_URL Dim strRelativePath ' Rel Path from script to URL Dim managerSuiteBase ' Url to the base of the Manager Suite Dim FavIcon ' Favorite Icon Dim RmDebug ' Debug Display Dim VixVerNum : VixVerNum = 1 ' Bump to force cache reload of many resources ' ----------------------------------------------------- %> <% ' -- 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 value Function isDefined( var) If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then isDefined = TRUE Else isDefined = FALSE End If End Function '-------------------------------------------------------------------------------------- 'Returns the server of the package archive Function Get_Mail_Server() Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='MAIL SERVER'" Dim rsTemp Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) ) Get_Mail_Server = rsTemp("config") rsTemp.Close() Set rsTemp = Nothing End Function '-------------------------------------------------------------------------------------- 'Returns the server of the package archive Function Get_Archive_Server() Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='ARCHIVE SERVER'" Dim rsTemp Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) ) Get_Archive_Server = rsTemp("config") rsTemp.Close() Set rsTemp = Nothing End 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,ii url = request.servervariables("URL") depth = len(url) - len(replace(url, "/", "")) rv = "" For ii = 4 To depth rv = rv & "../" Next GetPathToBase = rv End Function ' Return a URL to the base of the Manager suite ' Assumes this is one directory down from the web server root Function GetManagerSuiteBase Dim data data = 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.asp Sub Destroy_All_Objects On Error Resume Next ' Some global objects Set objAccessControl = Nothing Set objPMod = Nothing Set objEH = Nothing Set oEnumStateTypeNames = Nothing Set objTabControl = Nothing Set objCrumbs = Nothing Set objBtnControl = Nothing Set objFormCollector = Nothing ' Global package info Set pkgInfoHash = Nothing ' Delete ALL Oracle bound variables ' Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leak If TypeName(OraDatabase) = "IOraDatabase" Then While OraDatabase.Parameters.Count > 0 OraDatabase.Parameters.Remove(0) Wend End If ' Some commonly used database objects rsTemp.Close Set rsTemp = Nothing rsRep.Close Set rsRep = Nothing rsQry.Close Set rsQry = Nothing ' Database objects set OraDatabase = Nothing set OraSession = Nothing End Sub ' -- CONFIGURATIONS ----------------------------------- Const APPLICATION_ID = 1 ' Stored in Deployment Manager, [APPLICATIONS] table APP_ROOT = Server.MapPath(".") TNS_NAME = Application("TNS_NAME") '"RELEASEM" DB_AUTHENTICATION = Application("DEPLOYMENT_MANAGER_LOGIN") '"release_manager_devl/release_manager_devl" ' DEVL schema QUERIES_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] table Const enumDB_PERMISSION_TYPE_ACTIVE = 2 ' Stored in Access Manager, [Permission_Types] table Const enumRELEASES_DAYS_BACK_IN_TIME = 7 ' Number of days back in time searching for released products strRelativePath = 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_server dpkg_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 = 0 Const enumDB_DIFF_UPDATED = 2 Const enumDB_DIFF_NEW = 1 Const enumDB_DIFF_REMOVED = -1 Const enumDB_FILTER_COMMENTS = "Filter Comments" Const enumDB_FILTER_ISSUES = "Filter Issues" Const enumPRODUCTS_BASE_VIEW_ID = 5 ' Release Manager products base view id Const enumAUTOPRODUCTS_BASE_VIEW_ID = 2602 ' Release Manager auto_products base view id ' ----------------------------------------------------- %> <% ' -- CONSTANTS ---------------------------------------- Const enumDB_DEFAULT_EMPTY = -1 Const enumISSUES_STATE_FIXED = 1 Const enumCLEARQUEST_DEVI_ID = 4 Const enumJIRA_ID = 6 Const enumISSUES_STATE_IMPORTED = 0 Const enumDB_YES = "Y" Const enumDB_NO = "N" Const enumDEFAULT = "default" Const enumCOOKIE_NAME = "DeploymentManager" Const enumSEPARATOR_LABEL = "SEPARATOR_LABLE" Const enumDB_ALL_DATA = 0 Const SPACER = "" Const enumMSSQL_ERROR = "Information not currently available." 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 = 0 Const enumAT_EVENT_ADDED = 1 Const enumAT_EVENT_MODIFIED = 2 Const enumAT_EVENT_REMOVED = 3 ' ----------------------------------------------------- %> <% ' -- OO4O --------------------------------------------- const ORATYPE_VARCHAR2 = 1 const ORATYPE_NUMBER = 2 const ORATYPE_SINT = 3 const ORATYPE_FLOAT = 4 const ORATYPE_STRING = 5 const ORATYPE_VARCHAR = 9 const ORATYPE_DATE = 12 const ORATYPE_UINT = 68 const ORATYPE_RAW = 95 const ORATYPE_CHAR = 96 const ORATYPE_CHARZ = 97 const ORATYPE_MLSLABEL = 105 const ORATYPE_OBJECT = 108 const ORATYPE_REF = 110 const ORATYPE_CLOB = 112 const ORATYPE_BLOB = 113 const ORATYPE_BFILE = 114 const ORATYPE_VARRAY = 247 const ORATYPE_TABLE = 248 const ORATYPE_CURSOR = 102 const ORALOB_ONE_PIECE = 0 const ORALOB_FIRST_PIECE = 1 const ORALOB_NEXT_PIECE = 2 const ORALOB_LAST_PIECE = 3 Const ORALOB_SUCCESS = 0 Const ORALOB_NEED_DATA = 99 Const ORALOB_NODATA = 100 const ORAPARM_INPUT=1 const ORAPARM_OUTPUT=2 const ORAPARM_BOTH=3 const 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" %>