Subversion Repositories DevTools

Rev

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