Subversion Repositories DevTools

Rev

Rev 5962 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
64 jtweddle 1
<%
2
'=====================================================
3
'					CONFIG FILE
4
'=====================================================
5
%>
6
<%
7
' -- VARIABLE DEFINITION ------------------------------
8
Dim OraSession, OraDatabase		' DB connection
9
Dim QUERIES_PATH
10
Dim SCRIPT_NAME
11
Dim TNS_NAME, DB_AUTHENTICATION
12
Dim APP_ROOT
13
Dim rootPath
14
Dim scriptName
4808 dpurdie 15
Dim SMTP_HOST
5356 dpurdie 16
Dim ACCESS_MANAGER_URL
6671 dpurdie 17
Dim DEPLOYMENT_MANAGER_URL
18
Dim PRODUCTION_MANAGER_URL
19
Dim RELEASE_MANAGER_URL
5356 dpurdie 20
Dim strRelativePath             ' Rel Path from script to URL
21
Dim managerSuiteBase            ' Url to the base of the Manager Suite
22
Dim FavIcon                     ' Favorite Icon
23
Dim RmDebug                     ' Debug Display
6671 dpurdie 24
Dim VixVerNum : VixVerNum = 1   ' Bump to force cache reload of many resources
5356 dpurdie 25
 
64 jtweddle 26
' -----------------------------------------------------
27
%>
28
<%
29
' -- DATABASE CONNECTIONS -----------------------------
30
'Set OraSession = CreateObject("OracleInProcServer.XOraSession")
66 ghuddy 31
'OraSession.CreateDatabasePool 1,10,100, Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), 0
64 jtweddle 32
'Set OraDatabase = OraSession.GetDatabaseFromPool(10)
33
 
34
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
35
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), Cint(0))
36
' -----------------------------------------------------
37
%>
38
<%
5356 dpurdie 39
' -- Basic Functions ----------------------------------
40
' --------------------------------------------------------------------------------------
41
' Determine if a variable or Const exists and is not empty
42
'   Use to check if a vbscript variable has been declared and contains a non-empty value
43
Function isDefined( var)
44
    If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then
45
        isDefined = TRUE
46
    Else
47
        isDefined = FALSE
48
   End If
49
End Function
50
 
4808 dpurdie 51
'--------------------------------------------------------------------------------------
52
'Returns the server of the package archive
53
Function Get_Mail_Server()
54
   Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='MAIL SERVER'"
55
   Dim rsTemp
56
   Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )
57
   Get_Mail_Server = rsTemp("config")
58
   rsTemp.Close()
59
   Set rsTemp = Nothing
60
End Function
61
 
5356 dpurdie 62
'--------------------------------------------------------------------------------------
63
'Return a relative path to the server base. Used for relative pathing to 'images'
64
'Assumes server base is two directores below the web serve root (ManageSuite/Release_Manager)
65
Function GetPathToBase()
66
    Dim url,depth,rv,ii
67
    url = request.servervariables("URL")
68
    depth =  len(url) - len(replace(url, "/", ""))
69
    rv = ""
70
    For ii = 4 To depth
71
        rv = rv & "../"
72
    Next
73
    GetPathToBase = rv
74
End Function
75
 
76
' Return a URL to the base of the Manager suite
77
' Assumes this is one directory down from the web server root
78
Function GetManagerSuiteBase
79
    Dim data
80
    data = Split(request.servervariables("URL"),"/")
81
    GetManagerSuiteBase =  "/" & data(1)
82
End Function
5962 dpurdie 83
'-----------------------------------------------------------------------------------------------------------------------------
84
'   Destroy_All_Objects
85
'   Should be used by ALL pages and error handling code in order to reduce memory and handle leaks
86
'   May be used directly or via _footer.asp or globals_destructor.asp
87
Sub Destroy_All_Objects
88
    On Error Resume Next
89
    '   Some global objects
90
    Set objAccessControl = Nothing
91
    Set objPMod = Nothing
92
    Set objEH = Nothing
93
    Set oEnumStateTypeNames = Nothing
94
    Set objTabControl = Nothing
95
    Set objCrumbs = Nothing
96
    Set objBtnControl = Nothing
97
    Set objFormCollector = Nothing
5356 dpurdie 98
 
5962 dpurdie 99
    '   Global package info
100
    Set pkgInfoHash = Nothing
101
 
102
    '   Delete ALL Oracle bound variables
103
    '   Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leak
104
    If TypeName(OraDatabase) = "IOraDatabase" Then
105
        While OraDatabase.Parameters.Count > 0
106
            OraDatabase.Parameters.Remove(0)
107
        Wend
108
    End  If
109
 
110
    '   Some commonly used database objects
111
    rsTemp.Close
112
    Set rsTemp = Nothing
113
 
114
    rsRep.Close
115
    Set rsRep = Nothing
116
 
117
    rsQry.Close
118
    Set rsQry = Nothing
119
 
120
    '   Database objects
121
    set OraDatabase = Nothing
122
    set OraSession = Nothing
123
End Sub
124
 
64 jtweddle 125
' -- CONFIGURATIONS -----------------------------------
126
Const DOC_FOLDER = "doc"
127
Const TEMP_FOLDER = "temp"
128
Const APPLICATION_ID = 10  			' Stored in Deployment Manager, [APPLICATIONS] table
129
APP_ROOT = Server.MapPath(".")
66 ghuddy 130
TNS_NAME = Application("TNS_NAME") '"RELEASEM"
64 jtweddle 131
DB_AUTHENTICATION = Application("DEPLOYMENT_MANAGER_LOGIN") '"release_manager_devl/release_manager_devl"								' DEVL schema
132
QUERIES_PATH = APP_ROOT &"\queries"
133
scriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
134
rootPath = Left( Server.MapPath( scriptName ), InStrRev(Server.MapPath( scriptName ), "\") )
4808 dpurdie 135
SMTP_HOST = Get_Mail_Server()
4014 dpurdie 136
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
64 jtweddle 137
Const enumDB_PERMISSION_TYPE_VISIBLE = 1		' Stored in Access Manager, [Permission_Types] table
138
Const enumDB_PERMISSION_TYPE_ACTIVE = 2			' Stored in Access Manager, [Permission_Types] table
139
Const enumRELEASES_DAYS_BACK_IN_TIME = 7		' Number of days back in time searching for released products
5356 dpurdie 140
 
141
strRelativePath = GetPathToBase()
142
managerSuiteBase = GetManagerSuiteBase()
143
ACCESS_MANAGER_URL      = ManagerSuiteBase & "/Access_Manager"
6671 dpurdie 144
DEPLOYMENT_MANAGER_URL  = ManagerSuiteBase & "/Deployment_Manager"
145
PRODUCTION_MANAGER_URL  = ManagerSuiteBase & "/Production_Manager"
146
RELEASE_MANAGER_URL     = ManagerSuiteBase & "/Release_Manager"
5370 dpurdie 147
FavIcon = strRelativePath & "favicons/PM" & Application("FavIconSuffix") & ".png"
5356 dpurdie 148
 
64 jtweddle 149
' -----------------------------------------------------
150
%>
151
<%
152
' -- VARIABLE INITIALISATION --------------------------
153
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
154
Const enumDB_DIFF_NO_CHANGE = 0
155
Const enumDB_DIFF_UPDATED = 2
156
Const enumDB_DIFF_NEW = 1
157
Const enumDB_DIFF_REMOVED = -1
158
Const enumPRODUCTS_BASE_VIEW_ID = 5					' Release Manager products base view id
159
Const enumAUTOPRODUCTS_BASE_VIEW_ID = 2602					' Release Manager auto_products base view id
160
' -----------------------------------------------------
161
%>
162
<%
66 ghuddy 163
' -- CONSTANTS --------------------------------------
64 jtweddle 164
Const enumDB_DEFAULT_EMPTY = -1
165
Const enumISSUES_STATE_FIXED = 1
166
Const enumCLEARQUEST_TDSE_ID = 3
167
Const enumCLEARQUEST_DEVI_ID = 4
168
Const enumCLEARQUEST_VT5DM_ID = 5
169
Const enumCLEARQUEST_VTSUP_ID = 7
170
Const enumISSUES_STATE_IMPORTED = 0
171
Const enumDB_YES = "Y"
172
Const enumDB_NO = "N"
173
Const enumDEFAULT = "default"
174
Const enumCOOKIE_NAME = "DeploymentManager"
175
Const enumSEPARATOR_LABEL = "SEPARATOR_LABLE"
176
Const enumDB_ALL_DATA = 0
177
Const SPACER = "<img src='images/spacer.gif' width='1' height='1'>"
178
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>"
179
Const enumSESSION_COPY_TYPE = "COPY_TYPE"
180
Const enumSESSION_COPY_ITEMS = "COPY_ITEMS"
181
Const enumSESSION_COPY_FROM = "COPY_FROM"
182
Const enumLOADING = "Loading..."
183
'----- TESTS ------------------------------------------
184
Const enumTEST_TYPE_SANITY = 2
185
Const enumTEST_TYPE_NOT_DONE = 1
186
' -- ACTION TRAIL -------------------------------------
187
Const enumAT_EVENT_COMMENT 	= 0
188
Const enumAT_EVENT_ADDED 	= 1
189
Const enumAT_EVENT_MODIFIED = 2
190
Const enumAT_EVENT_REMOVED 	= 3
191
Const enum_MSG_PROCESS_EXISTS = "msg_process_exists.asp"
192
' -----------------------------------------------------
193
%>
194
<%
195
' -- OO4O ---------------------------------------------
196
const ORATYPE_VARCHAR2 = 1
197
const ORATYPE_NUMBER = 2
198
const ORATYPE_SINT = 3
199
const ORATYPE_FLOAT = 4
200
const ORATYPE_STRING = 5
201
const ORATYPE_VARCHAR = 9
202
const ORATYPE_DATE = 12
203
const ORATYPE_UINT = 68
204
const ORATYPE_RAW = 95
205
const ORATYPE_CHAR = 96
206
const ORATYPE_CHARZ = 97
207
const ORATYPE_MLSLABEL = 105
208
const ORATYPE_OBJECT = 108
209
const ORATYPE_REF = 110
210
const ORATYPE_CLOB = 112
211
const ORATYPE_BLOB = 113
212
const ORATYPE_BFILE = 114
213
const ORATYPE_VARRAY = 247
214
const ORATYPE_TABLE = 248
215
const ORATYPE_CURSOR = 102
216
 
5962 dpurdie 217
const ORALOB_ONE_PIECE = 0 
218
const ORALOB_FIRST_PIECE = 1 
219
const ORALOB_NEXT_PIECE = 2 
220
const ORALOB_LAST_PIECE = 3
64 jtweddle 221
 
5962 dpurdie 222
Const ORALOB_SUCCESS = 0
223
Const ORALOB_NEED_DATA = 99
224
Const ORALOB_NODATA = 100
225
 
66 ghuddy 226
const ORAPARM_INPUT=1
227
const ORAPARM_OUTPUT=2
64 jtweddle 228
const ORAPARM_BOTH=3
229
 
230
const ORADYN_DEFAULT=&H0&
231
' -----------------------------------------------------
232
%>
233
<%
234
' -- ERROR MESSAGES -----------------------------------
235
' -----------------------------------------------------
236
%>
237
<%
238
' -- ICONS --------------------------------------------
239
' -- ICONS SMALL --------------------------------------
240
' -----------------------------------------------------
241
' -- Other Configuration -----------------------------
242
Const enum_RELMGR_COOKIE_DOMAIN = "RELMGR_USER_COOKIES"
243
Const COOKIE_HIDE_FILES_FILTER = "COOKIE_HIDE_FILES_FILTER"
244
Const COOKIE_HIDE_DEPS_FILTER = "COOKIE_HIDE_DEPS_FILTER"
245
Const COOKIE_HIDE_DIFF_FILTER = "COOKIE_HIDE_DIFF_FILTER"
246
Const COOKIE_RELMGR_SHOW_VIEW = "COOKIE_RELMGR_SHOW_VIEW"
247
Const COOKIE_RELEASE_MANAGER_MEMORY = "RELEASE_MANAGER_MEMORY"
248
Const COOKIE_PATCH_OPTIONS_FILTER = "COOKIE_PATCH_OPTIONS_FILTER"
249
%>