| 5357 |
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/conf.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
|
| 6827 |
dpurdie |
61 |
errDetSTR = errDetSTR & "<td nowrap class='err_alert' background='images/bg_lght_gray.gif'>"& Error_Details ( item ) &" <span class=pointer onMouseOver=""formTips.show('err"& item &"')"" onMouseOut=""formTips.hide()""><img src='images/i_help.gif' width='12' height='12' hspace='2' align='absmiddle' border='0' ></span></td>"
|
| 5357 |
dpurdie |
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'> </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'> </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"
|
| 6579 |
dpurdie |
154 |
'this must match descriptions in images/_help_tips.js?ver=<%=VixVerNum%> e.g. errorType 1 has decsription err1
|
| 5357 |
dpurdie |
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>Release 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">
|
| 6579 |
dpurdie |
200 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
201 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
202 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
203 |
<!-- TIPS -->
|
| 6579 |
dpurdie |
204 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
205 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
206 |
</head>
|
|
|
207 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
208 |
<!-- HEADER -->
|
|
|
209 |
<!--#include file="_header.asp"-->
|
|
|
210 |
<!-- BODY ---->
|
|
|
211 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
212 |
<tr>
|
|
|
213 |
<td background="images/bg_lght_gray.gif" align="left" valign="top">
|
|
|
214 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
215 |
<tr>
|
|
|
216 |
<td valign="top" width="1%"><img src="images/h_trsp_dot.gif" width="10" height="10"></td>
|
|
|
217 |
<td valign="top" width="1%">
|
|
|
218 |
<!-- LEFT -->
|
|
|
219 |
</td>
|
|
|
220 |
<td valign="top" width="1%"><img src="images/h_trsp_dot.gif" width="30" height="550"></td>
|
|
|
221 |
<td valign="top" width="100%">
|
|
|
222 |
<!-- MIDDLE -->
|
|
|
223 |
<table width="650" border="0" cellspacing="0" cellpadding="0">
|
|
|
224 |
<tr>
|
|
|
225 |
<td>
|
|
|
226 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
227 |
<tr>
|
|
|
228 |
<td width="1%"> </td>
|
|
|
229 |
<td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
|
|
|
230 |
<td width="1%"> </td>
|
|
|
231 |
</tr>
|
|
|
232 |
<tr>
|
|
|
233 |
<td width="1%"> </td>
|
|
|
234 |
<td>
|
|
|
235 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
236 |
<tr>
|
|
|
237 |
<td nowrap class="form_ttl"></td>
|
|
|
238 |
<td align="right" valign="bottom">
|
|
|
239 |
<!-- TABS -->
|
|
|
240 |
|
|
|
241 |
</td>
|
|
|
242 |
</tr>
|
|
|
243 |
</table>
|
|
|
244 |
</td>
|
|
|
245 |
<td width="1%"> </td>
|
|
|
246 |
</tr>
|
|
|
247 |
<tr>
|
|
|
248 |
<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>
|
|
|
249 |
<td background="images/lbox_bg_blue.gif"></td>
|
|
|
250 |
<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>
|
|
|
251 |
</tr>
|
|
|
252 |
<tr>
|
|
|
253 |
<td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
|
|
254 |
<td bgcolor="#FFFFFF" valign="top">
|
|
|
255 |
<!-- Body -->
|
|
|
256 |
<%Response.Write MSG%>
|
|
|
257 |
<!-- END Body-->
|
|
|
258 |
</td>
|
|
|
259 |
<td width="1%" background="images/lbox_bgside_white.gif"> </td>
|
|
|
260 |
</tr>
|
|
|
261 |
<tr>
|
|
|
262 |
<td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
|
|
|
263 |
<td background="images/lbox_bg_blue.gif"></td>
|
|
|
264 |
<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>
|
|
|
265 |
</tr>
|
|
|
266 |
</table>
|
|
|
267 |
</td>
|
|
|
268 |
</tr>
|
|
|
269 |
</table>
|
|
|
270 |
</td>
|
|
|
271 |
</tr>
|
|
|
272 |
</table>
|
|
|
273 |
</td>
|
|
|
274 |
</tr>
|
|
|
275 |
</table>
|
|
|
276 |
<!-- FOOTER -->
|
|
|
277 |
<!--#include file="_footer.asp"-->
|
|
|
278 |
</body>
|
|
|
279 |
</html>
|
| 119 |
ghuddy |
280 |
<%End If%>
|