Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
5355 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				        MESSAGE					     |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
13
%>
14
<%
15
'------------ Variable Definition -------------
16
Dim parMsg, reqParam, ERRlog, ERRlogFULL, AdditionalParams
17
Dim MSG, msgFile, i, parArr, parJustemplate, parLinksON
18
'------------ Constants Declaration -----------
19
'------------ Variable Init -------------------
20
parMsg = QStrPar("msg")							' message template
21
reqParam = Session("reqParam")					' parameters passed for processing
22
ERRlog = Session("ERRlog")						' pkgs with errors + error type
23
ERRlogFULL = Session("ERRlogFULL") 				' full list of submitted packages
24
AdditionalParams = Session("AdditionalParams")	' additional parameters populating message template
25
parJustemplate = QStrPar("justemplate")
26
parLinksON = QStrPar("linksON")
27
'----------------------------------------------
28
%>
29
<!--#include file="common/config.asp"-->
30
<!--#include file="common/globals.asp"-->
31
<!--#include file="common/formating.asp"-->
32
<!--#include file="common/qstr.asp"-->
33
<!--#include file="common/common_subs.asp"-->
34
<%
35
Function Format_ERRlog( SSerrLog, SSerrFull )
36
	' SSerrLog = "|pkgn,pkgv,errtype||pkgn,pkgv,errtype||pkgn,pkgv,errtype|"
37
	' SSerrFull	  = "|pkgn,pkgv||pkgn,pkgv|"   contains all submitted items
38
 
39
 
40
	Dim errDetSTR, errlistARR, fullARR, pkgpair, pkgdetailsARR, errDetARR, errItem, errTypesUsed
41
	Dim item, i, tempARR, tmpStr, errcolumnsARR, columnDrawn, mypkgname, mypkgversion
42
 
43
	Set errTypesUsed = CreateObject("Scripting.Dictionary")
44
 
45
	errlistARR = SplitPipes( SSerrLog ) 		'split  |pkgn,pkgv,errtype||pkgn,pkgv,errtype|
46
	fullARR = SplitPipes( SSerrFull ) 			'split  |pkgpair1||pkgpair2|
47
 
48
	errDetSTR = ""
49
	errDetSTR =  errDetSTR & "<table width='100%' border='0' cellspacing='1' cellpadding='3' >"
50
	'==== Error Column Names ================
51
	For Each item In errlistARR
52
		tempARR = Split (item, ",")		'split  pkgn,pkgv,errtype
53
		If NOT errTypesUsed.Exists (tempARR(2)) Then errTypesUsed.ADD Cstr(tempARR(2)),""
54
	Next
55
	errcolumnsARR = errTypesUsed.Keys
56
	Set errTypesUsed = nothing
57
 
58
	' draw error columns
59
	errDetSTR =  errDetSTR & "<tr><td><img src='images/h_trsp_dot.gif' width='40' height='1'></td><td></td>"
60
	For Each item In errcolumnsARR
61
		errDetSTR =  errDetSTR & "<td nowrap class='err_alert' background='images/bg_lght_gray.gif'>"& Error_Details ( item ) &" <a href='javascript:;' onMouseOver=""formTips.show('err"& item &"')"" onMouseOut=""formTips.hide()""><img src='images/i_help.gif' width='12' height='12' hspace='2' align='absmiddle' border='0' ></a></td>"
62
	Next
63
	errDetSTR =  errDetSTR & "</tr>"
64
 
65
 
66
	'==== Error Details =====================
67
	For Each pkgpair In fullARR
68
		pkgdetailsARR = Split(pkgpair, ",")		'split  pkg_name,pkg_version
69
 
70
		errItem = Filter(errlistARR, pkgdetailsARR(0) &",", True)
71
		errItem = Join(errItem, ",")
72
 
73
		mypkgname = pkgdetailsARR(0)
74
		mypkgversion = pkgdetailsARR(1)
75
 
76
		If errItem <> "" Then
77
			'error FOUND for pkg_name
78
			errDetARR = Split(errItem, ",")		'split  pkgn,pkgv,errtype
79
 
80
			errDetSTR = errDetSTR &_
81
					"<tr>"&_
82
		            "<td nowrap background='images/bg_lght_gray.gif' class='err_sol'>"& mypkgname &"</td>"&_
83
		            "<td nowrap background='images/bg_lght_gray.gif' class='err_sol'>"& mypkgversion &"</td>"
84
 
85
			'run through all error types if multiple pkgs found
86
			columnDrawn = FALSE
87
			For Each item In errcolumnsARR
88
 
89
				For i = 0 To UBound(errDetARR) Step 3
90
					If item = errDetARR(i+2) Then
91
						If (parLinksON <> "") AND (item = 4) Then
92
							errDetSTR = errDetSTR & "<td background='images/bg_lght_gray.gif' align='center' class='err_sol'>"&_
93
													"<a href='#' onClick=""MM_openBrWindow('see_circular_dependencies.asp?pkgN="& mypkgname &"&pkgV="& mypkgversion & QSTR &"','ReleaseManager','scrollbars=yes,resizable=yes,width=500,height=300')"" class='txt_linked'><b>x</b></a></td>"
94
						Else
95
							errDetSTR = errDetSTR & "<td background='images/bg_lght_gray.gif' align='center' class='err_sol'>x</td>"
96
						End If
97
						columnDrawn = TRUE
98
						Exit For
99
					End If
100
				Next
101
 
102
				If NOT columnDrawn Then errDetSTR = errDetSTR & "<td background='images/bg_lght_gray.gif'>&nbsp;</td>"
103
				columnDrawn = FALSE
104
 
105
			Next
106
			errDetSTR = errDetSTR & "</tr>"
107
 
108
		Else
109
			'error NOT FOUND for pkg_name
110
			errDetSTR = errDetSTR &_
111
						"<tr>"&_
112
			            "<td nowrap background='images/bg_lght_gray.gif' class='err_sol'>"& mypkgname &"</td>"&_
113
			            "<td nowrap background='images/bg_lght_gray.gif' class='err_sol'>"& mypkgversion &"</td>"
114
						For Each item In errcolumnsARR
115
							errDetSTR = errDetSTR & "<td background='images/bg_lght_gray.gif'>&nbsp;</td>"
116
						Next
117
						errDetSTR = errDetSTR & "</tr>"
118
		End If
119
 
120
		errItem = ""	'clean errItem
121
	Next
122
	errDetSTR = errDetSTR & "</table>"
123
 
124
	Format_ERRlog = errDetSTR
125
End Function
126
 
127
 
128
Function Format_reqParam( SSreqParam )
129
	' SSreqParam = "|parname=parvalue||parname=parvalue|"
130
	Dim errReqSTR, reqParamARR, tempARR, item
131
 
132
	'==== Required Parameters ===============
133
	errReqSTR = ""
134
	reqParamARR = SplitAmpasans( SSreqParam )	'split  &par=value&&par=value&
135
 
136
	For Each item In reqParamARR
137
		tempARR = Split(item, "=")			'split par=value
138
		errReqSTR = errReqSTR & "<input type='hidden' name='"& tempARR(0) &"' value='"& URLEncode(tempARR(1)) &"'>" & VBNewLine
139
	Next
140
 
141
	Format_reqParam = errReqSTR
142
End Function
143
 
144
 
145
Private Function Error_Details ( NNerrnum )
146
	Dim errorType
147
	Set errorType = CreateObject("Scripting.Dictionary")
148
	'--- load error definition ------------------
149
	errorType.ADD		"1","VERSION NOT FOUND"
150
	errorType.ADD		"2","VERSION EXISTS"
151
	errorType.ADD		"3","DUPLICATE PACKAGE NAME"
152
	errorType.ADD		"4","CIRCULAR DEPENDENCY"
153
	errorType.ADD		"5","EXISTS IN THIS RELEASE"
154
	'this must match descriptions in images/_help_tips.js	e.g. errorType 1 has decsription err1
155
	'--------------------------------------------
156
	Error_Details = errorType.Item (Cstr( NNerrnum ))
157
End Function
158
%>
159
<%
160
'-----------------------  MAIN LINE  ---------------------------
161
'Read the message template
162
MSG = ReadFile( rootPath &"messages\"& parMsg &".html" )
163
 
164
'== $TABLE$ parameter ================
165
If ERRlog <> "" Then
166
	MSG = Replace( MSG, "$TABLE$", Format_ERRlog( ERRlog, ERRlogFULL) )
167
End If
168
 
169
'== $HIDDEN$ =========================
170
If reqParam <> "" Then
171
	MSG = Replace( MSG, "$HIDDEN$", Format_reqParam( reqParam ) )
172
End If
173
 
174
'== AdditionalParams =================
175
If AdditionalParams <> "" Then
176
	parArr = Split(AdditionalParams, ",")
177
	For i = 0 To UBound(parArr) Step 2
178
		MSG = Replace( MSG, parArr(i), parArr(i+1) )
179
	Next
180
End If
181
 
182
'== Query String parameter ===========
183
MSG = Replace( MSG, "$QSTR$", QSTR_All )
184
 
185
'== Clean the session variables ======
186
Session("reqParam") = ""
187
Session("ERRlog") = ""
188
Session("ERRlogFULL") = ""
189
Session("AdditionalParams") = ""
190
%>
191
<%If parJustemplate <> "" Then%>
192
	<%Response.write MSG%>
193
<%Else%>
194
<html>
195
<head>
196
<title>Deployment Manager</title>
197
<link rel="shortcut icon" href="<%=FavIcon%>"/>
198
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
199
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6663 dpurdie 200
<link href="scripts/deployment_manager.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
201
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
202
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
203
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
5355 dpurdie 204
<!-- TIPS -->
6663 dpurdie 205
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
5355 dpurdie 206
<script language="JavaScript" src="images/_help_tips.js"></script>
207
</head>
208
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
209
<!-- MENU LAYERS -------------------------------------->
210
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
211
</div>
212
<!-- TIPS LAYERS -------------------------------------->
213
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
214
<!----------------------------------------------------->
215
<!-- HEADER -->
216
<!--#include file="_header.asp"-->
217
<!-- BODY ---->
218
<table width="100%" border="0" cellspacing="0" cellpadding="0">
219
  <tr>
220
    <td background="images/bg_lght_gray.gif" align="left" valign="top"> 
221
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
222
        <tr> 
223
          <td valign="top" width="1%"><img src="images/h_trsp_dot.gif" width="10" height="10"></td>
224
          <td valign="top" width="1%">
225
		  <!-- LEFT -->
226
		  </td>
227
          <td valign="top" width="1%"><img src="images/h_trsp_dot.gif" width="30" height="550"></td>
228
          <td valign="top" width="100%">
229
		  <!-- MIDDLE -->
230
			<table width="650" border="0" cellspacing="0" cellpadding="0">
231
			  <tr> 
232
			    <td> 
233
			      <table width="100%" border="0" cellspacing="0" cellpadding="0">
234
			        <tr> 
235
			          <td width="1%">&nbsp;</td>
236
			          <td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
237
			          <td width="1%">&nbsp;</td>
238
			        </tr>
239
			        <tr> 
240
			          <td width="1%">&nbsp;</td>
241
			          <td> 
242
			            <table width="100%" border="0" cellspacing="0" cellpadding="0">
243
			              <tr> 
244
			                <td nowrap class="form_ttl"></td>
245
			                <td align="right" valign="bottom">
246
			                  <!-- TABS -->
247
							  &nbsp;
248
			                </td>
249
			              </tr>
250
			            </table>
251
			          </td>
252
			          <td width="1%">&nbsp;</td>
253
			        </tr>
254
			        <tr> 
255
			          <td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
256
			          <td background="images/lbox_bg_blue.gif"></td>
257
			          <td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
258
			        </tr>
259
			        <tr> 
260
			          <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
261
			          <td bgcolor="#FFFFFF" valign="top"> 
262
			            <!-- Body -->
263
						<%Response.Write MSG%>
264
			            <!-- END Body-->
265
			          </td>
266
			          <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
267
			        </tr>
268
			        <tr> 
269
			          <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
270
			          <td background="images/lbox_bg_blue.gif"></td>
271
			          <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
272
			        </tr>
273
			      </table>
274
			    </td>
275
			  </tr>
276
			</table>		  
277
		  </td>
278
        </tr>
279
      </table>
280
    </td>
281
  </tr>
282
</table>
283
<!-- FOOTER -->
284
<!--#include file="_footer.asp"-->
285
</body>
286
</html>
4217 dpurdie 287
<%End If%>