Subversion Repositories DevTools

Rev

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

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