Subversion Repositories DevTools

Rev

Rev 5513 | Rev 5642 | 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
22
Dim strRelativePath             ' Rel Path from script to URL
23
Dim managerSuiteBase            ' Url to the base of the Manager Suite
24
Dim FavIcon                     ' Favorite Icon
25
Dim RmDebug                     ' Debug Display
26
 
13 rsolanki 27
' -----------------------------------------------------
28
%>
29
<%
30
' -- DATABASE CONNECTIONS -----------------------------
31
'Set OraSession = CreateObject("OracleInProcServer.XOraSession")
31 ghuddy 32
'OraSession.CreateDatabasePool 1,10,100, Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), 0
13 rsolanki 33
'Set OraDatabase = OraSession.GetDatabaseFromPool(10)
34
 
35
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
36
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), Cint(0))
37
' -----------------------------------------------------
38
%>
39
<%
5355 dpurdie 40
' -- Basic Functions ----------------------------------
41
' --------------------------------------------------------------------------------------
42
' Determine if a variable or Const exists and is not empty
43
'   Use to check if a vbscript variable has been declared and contains a non-empty value
44
Function isDefined( var)
45
    If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then
46
        isDefined = TRUE
47
    Else
48
        isDefined = FALSE
49
   End If
50
End Function
51
 
4807 dpurdie 52
'--------------------------------------------------------------------------------------
53
'Returns the server of the package archive
54
Function Get_Mail_Server()
55
   Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='MAIL SERVER'"
56
   Dim rsTemp
57
   Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )
58
   Get_Mail_Server = rsTemp("config")
59
   rsTemp.Close()
60
   Set rsTemp = Nothing
61
End Function
5355 dpurdie 62
'--------------------------------------------------------------------------------------
5634 dpurdie 63
'Returns the server of the package archive
64
Function Get_Archive_Server()
65
   Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='ARCHIVE SERVER'"
66
   Dim rsTemp
67
   Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )
68
   Get_Archive_Server = rsTemp("config")
69
   rsTemp.Close()
70
   Set rsTemp = Nothing
71
End Function
72
'--------------------------------------------------------------------------------------
5355 dpurdie 73
'Return a relative path to the server base. Used for relative pathing to 'images'
74
'Assumes server base is two directores below the web serve root (ManageSuite/Release_Manager)
75
Function GetPathToBase()
76
    Dim url,depth,rv,ii
77
    url = request.servervariables("URL")
78
    depth =  len(url) - len(replace(url, "/", ""))
79
    rv = ""
80
    For ii = 4 To depth
81
        rv = rv & "../"
82
    Next
83
    GetPathToBase = rv
84
End Function
85
 
86
' Return a URL to the base of the Manager suite
87
' Assumes this is one directory down from the web server root
88
Function GetManagerSuiteBase
89
    Dim data
90
    data = Split(request.servervariables("URL"),"/")
91
    GetManagerSuiteBase =  "/" & data(1)
92
End Function
93
 
13 rsolanki 94
' -- CONFIGURATIONS -----------------------------------
95
Const APPLICATION_ID = 1  			' Stored in Deployment Manager, [APPLICATIONS] table
96
APP_ROOT = Server.MapPath(".")
31 ghuddy 97
TNS_NAME = Application("TNS_NAME") '"RELEASEM"
15 rsolanki 98
DB_AUTHENTICATION = Application("DEPLOYMENT_MANAGER_LOGIN") '"release_manager_devl/release_manager_devl"								' DEVL schema
13 rsolanki 99
QUERIES_PATH = APP_ROOT &"\queries"
17 rsolanki 100
scriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
101
rootPath = Left( Server.MapPath( scriptName ), InStrRev(Server.MapPath( scriptName ), "\") )
4807 dpurdie 102
SMTP_HOST = Get_Mail_Server()
3947 dpurdie 103
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
13 rsolanki 104
Const enumDB_PERMISSION_TYPE_VISIBLE = 1		' Stored in Access Manager, [Permission_Types] table
105
Const enumDB_PERMISSION_TYPE_ACTIVE = 2			' Stored in Access Manager, [Permission_Types] table
106
Const enumRELEASES_DAYS_BACK_IN_TIME = 7		' Number of days back in time searching for released products
5355 dpurdie 107
 
108
strRelativePath = GetPathToBase()
109
managerSuiteBase = GetManagerSuiteBase()
110
ACCESS_MANAGER_URL      = ManagerSuiteBase & "/Access_Manager"
111
RELEASE_MANAGER_URL     = ManagerSuiteBase & "/Release_Manager"
5634 dpurdie 112
 
113
archive_server = Get_Archive_Server()
114
HTTP_PKG_ARCHIVE        = "http://" & archive_server
115
dpkg_archiveURL         = HTTP_PKG_ARCHIVE & "/dpkg_archive/"
116
release_archiveURL      = HTTP_PKG_ARCHIVE & "/releases/"
117
 
5371 dpurdie 118
FavIcon = strRelativePath & "favicons/DM" & Application("FavIconSuffix") & ".png"
5355 dpurdie 119
 
13 rsolanki 120
' -----------------------------------------------------
121
%>
122
<%
123
' -- VARIABLE INITIALISATION --------------------------
124
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
125
Const enumDB_DIFF_NO_CHANGE = 0
126
Const enumDB_DIFF_UPDATED = 2
127
Const enumDB_DIFF_NEW = 1
128
Const enumDB_DIFF_REMOVED = -1
29 jtweddle 129
Const enumDB_FILTER_COMMENTS = "Filter Comments"
130
Const enumDB_FILTER_ISSUES = "Filter Issues"
13 rsolanki 131
Const enumPRODUCTS_BASE_VIEW_ID = 5					' Release Manager products base view id
23 rsolanki 132
Const enumAUTOPRODUCTS_BASE_VIEW_ID = 2602					' Release Manager auto_products base view id
13 rsolanki 133
' -----------------------------------------------------
134
%>
135
<%
136
' -- CONSTANTS ----------------------------------------
137
Const enumDB_DEFAULT_EMPTY = -1
138
Const enumISSUES_STATE_FIXED = 1
139
Const enumCLEARQUEST_DEVI_ID = 4
23 rsolanki 140
Const enumJIRA_ID = 6
13 rsolanki 141
Const enumISSUES_STATE_IMPORTED = 0
142
Const enumDB_YES = "Y"
143
Const enumDB_NO = "N"
144
Const enumDEFAULT = "default"
145
Const enumCOOKIE_NAME = "DeploymentManager"
146
Const enumSEPARATOR_LABEL = "SEPARATOR_LABLE"
147
Const enumDB_ALL_DATA = 0
148
Const SPACER = "<img src='images/spacer.gif' width='1' height='1'>"
149
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>"
150
Const enumSESSION_COPY_TYPE = "COPY_TYPE"
151
Const enumSESSION_COPY_ITEMS = "COPY_ITEMS"
152
Const enumSESSION_COPY_FROM = "COPY_FROM"
153
Const enumLOADING = "Loading..."
4807 dpurdie 154
Const enum_MSG_ERROR    = "msg_error.asp"
155
Const enum_RELMGR_ERRDESCRIPTION = "RELMGR_ERRDESCRIPTION"		' session variable where long error message is stored before display to user
13 rsolanki 156
' -- ACTION TRAIL -------------------------------------
157
Const enumAT_EVENT_COMMENT 	= 0
158
Const enumAT_EVENT_ADDED 	= 1
159
Const enumAT_EVENT_MODIFIED = 2
160
Const enumAT_EVENT_REMOVED 	= 3
161
' -----------------------------------------------------
162
%>
163
<%
164
' -- OO4O ---------------------------------------------
165
const ORATYPE_VARCHAR2 = 1
166
const ORATYPE_NUMBER = 2
167
const ORATYPE_SINT = 3
168
const ORATYPE_FLOAT = 4
169
const ORATYPE_STRING = 5
170
const ORATYPE_VARCHAR = 9
171
const ORATYPE_DATE = 12
172
const ORATYPE_UINT = 68
173
const ORATYPE_RAW = 95
174
const ORATYPE_CHAR = 96
175
const ORATYPE_CHARZ = 97
176
const ORATYPE_MLSLABEL = 105
177
const ORATYPE_OBJECT = 108
178
const ORATYPE_REF = 110
179
const ORATYPE_CLOB = 112
180
const ORATYPE_BLOB = 113
181
const ORATYPE_BFILE = 114
182
const ORATYPE_VARRAY = 247
183
const ORATYPE_TABLE = 248
184
const ORATYPE_CURSOR = 102
185
 
4807 dpurdie 186
const ORALOB_ONE_PIECE = 0 
187
const ORALOB_FIRST_PIECE = 1 
188
const ORALOB_NEXT_PIECE = 2 
189
const ORALOB_LAST_PIECE = 3
13 rsolanki 190
 
4807 dpurdie 191
Const ORALOB_SUCCESS = 0
192
Const ORALOB_NEED_DATA = 99
193
Const ORALOB_NODATA = 100
194
 
31 ghuddy 195
const ORAPARM_INPUT=1
196
const ORAPARM_OUTPUT=2
13 rsolanki 197
const ORAPARM_BOTH=3
198
 
199
const ORADYN_DEFAULT=&H0&
200
' -----------------------------------------------------
201
%>
202
<%
203
' -- ERROR MESSAGES -----------------------------------
204
' -----------------------------------------------------
205
%>
206
<%
207
' -- ICONS --------------------------------------------
208
' -- ICONS SMALL --------------------------------------
209
' -----------------------------------------------------
210
' -- Other Configuration -----------------------------
211
Const enum_RELMGR_COOKIE_DOMAIN = "RELMGR_USER_COOKIES"
212
Const COOKIE_HIDE_FILES_FILTER = "COOKIE_HIDE_FILES_FILTER"
213
Const COOKIE_HIDE_DEPS_FILTER = "COOKIE_HIDE_DEPS_FILTER"
214
Const COOKIE_HIDE_DIFF_FILTER = "COOKIE_HIDE_DIFF_FILTER"
215
Const COOKIE_RELMGR_SHOW_VIEW = "COOKIE_RELMGR_SHOW_VIEW"
216
Const COOKIE_RELEASE_MANAGER_MEMORY = "RELEASE_MANAGER_MEMORY"
217
Const COOKIE_PATCH_OPTIONS_FILTER = "COOKIE_PATCH_OPTIONS_FILTER"
218
%>