| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| Build Order |
|
|
|
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 |
'To enable the script timeout to 20 mins
|
|
|
16 |
Server.ScriptTimeout=1200
|
|
|
17 |
%>
|
|
|
18 |
<!--#include file="common/conf.asp"-->
|
|
|
19 |
<!--#include file="common/globals.asp"-->
|
|
|
20 |
<!--#include file="common/formating.asp"-->
|
|
|
21 |
<!--#include file="common/qstr.asp"-->
|
|
|
22 |
<!--#include file="common/common_subs.asp"-->
|
|
|
23 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
24 |
<!--#include file="_tabs.asp"-->
|
|
|
25 |
<!--#include file="_action_buttons.asp"-->
|
|
|
26 |
<%
|
|
|
27 |
' Make sure rtag_id is always present
|
|
|
28 |
If Request("rtag_id") = "" Then
|
| 5957 |
dpurdie |
29 |
Call Destroy_All_Objects
|
| 5357 |
dpurdie |
30 |
Response.Redirect("index.asp")
|
|
|
31 |
End If
|
|
|
32 |
%>
|
|
|
33 |
<%
|
|
|
34 |
'------------ ACCESS CONTROL ------------------
|
|
|
35 |
%>
|
| 6181 |
dpurdie |
36 |
<!--#include file="_access_control_login_optional.asp"-->
|
| 5357 |
dpurdie |
37 |
<!--#include file="_access_control_general.asp"-->
|
|
|
38 |
<%
|
|
|
39 |
'------------ Variable Definition -------------
|
|
|
40 |
Dim rsOrder
|
|
|
41 |
Dim parPv_id
|
|
|
42 |
'Dim parMinEnv ' show/hide whole environment
|
|
|
43 |
'------------ Constants Declaration -----------
|
|
|
44 |
Const UP_THE_TREE = 1
|
|
|
45 |
Const DOWN_THE_TREE = -1
|
|
|
46 |
'------------ Variable Init -------------------
|
|
|
47 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
48 |
parPv_id = QStrPar("pv_id")
|
|
|
49 |
'parMinEnv = Get_parMinEnv ( QStrPar("minenv") )
|
|
|
50 |
'----------------------------------------------
|
|
|
51 |
%>
|
|
|
52 |
<%
|
|
|
53 |
Call Rebuild_Environment ( parRtag_id )
|
|
|
54 |
%>
|
|
|
55 |
<%
|
|
|
56 |
Function Get_Build_Order ( nRtag_id )
|
|
|
57 |
Get_Build_Order = _
|
|
|
58 |
" SELECT bo.step_num, pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, bo.UNRESOLVED "&_
|
|
|
59 |
" FROM build_order bo,"&_
|
|
|
60 |
" package_versions pv,"&_
|
|
|
61 |
" packages pkg"&_
|
|
|
62 |
" WHERE bo.RTAG_ID = "& nRtag_id &_
|
|
|
63 |
" AND bo.pv_id = pv.pv_id"&_
|
|
|
64 |
" AND pv.pkg_id = pkg.pkg_id"&_
|
|
|
65 |
" ORDER BY bo.STEP_NUM, UPPER(pkg.pkg_name)"
|
|
|
66 |
End Function
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
Function Indent
|
|
|
70 |
Indent = "<img src='images/rex_images/_corrner.gif' width='26' height='16' border='0' align='absmiddle'>"
|
|
|
71 |
End Function
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
Function TabsFromStart ( SStabs )
|
|
|
75 |
Dim widthimg
|
|
|
76 |
widthimg = SStabs * 27
|
|
|
77 |
TabsFromStart = "<img src='images/h_trsp_dot.gif' width='"& widthimg &"' height='16' border='0' align='absmiddle'>"
|
|
|
78 |
End Function
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
Sub Generate_Build_Tree ( nRtag_id, outSessionNum )
|
|
|
82 |
OraDatabase.Parameters.Add "RTAG_ID", nRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
83 |
OraDatabase.Parameters.Add "SESSION_NUM", 0, ORAPARM_OUTPUT, ORATYPE_NUMBER
|
|
|
84 |
|
|
|
85 |
objEH.TryORA ( OraSession )
|
|
|
86 |
On Error Resume Next
|
|
|
87 |
|
|
|
88 |
OraDatabase.ExecuteSQL _
|
|
|
89 |
" BEGIN Build_Tree ( :RTAG_ID, :SESSION_NUM ); END;"
|
|
|
90 |
|
|
|
91 |
objEH.CatchORA ( OraSession )
|
|
|
92 |
|
|
|
93 |
outSessionNum = OraDatabase.Parameters("SESSION_NUM").Value
|
|
|
94 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
95 |
OraDatabase.Parameters.Remove "SESSION_NUM"
|
|
|
96 |
End Sub
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
Sub Delete_Build_Tree ( nSessionNum )
|
|
|
100 |
objEH.TryORA ( OraSession )
|
|
|
101 |
On Error Resume Next
|
|
|
102 |
|
|
|
103 |
OraDatabase.ExecuteSQL _
|
|
|
104 |
" DELETE FROM TEMP_TREE_BROWSE WHERE session_num = "& nSessionNum
|
|
|
105 |
|
|
|
106 |
objEH.CatchORA ( OraSession )
|
|
|
107 |
End Sub
|
|
|
108 |
%>
|
|
|
109 |
<html>
|
|
|
110 |
<head>
|
|
|
111 |
<title>Release Manager</title>
|
|
|
112 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
113 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
114 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
115 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
116 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
117 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5983 |
dpurdie |
118 |
<!--#include file="_jquery_includes.asp"-->
|
| 5357 |
dpurdie |
119 |
<!-- DROPDOWN MENUS -->
|
|
|
120 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
121 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
122 |
</head>
|
|
|
123 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
124 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
125 |
<!--#include file="_header.asp"-->
|
|
|
126 |
<!-- BODY ---->
|
|
|
127 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
128 |
<tr>
|
|
|
129 |
<td valign="top" width="1" background="images/bg_bage.gif">
|
|
|
130 |
<!-- LEFT -->
|
|
|
131 |
</td>
|
|
|
132 |
<td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
133 |
<td valign="top" width="100%">
|
|
|
134 |
<!-- MIDDLE -->
|
|
|
135 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
136 |
<tr>
|
|
|
137 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
|
|
|
138 |
<td width="100%" background="images/bg_action_norm.gif"></td>
|
|
|
139 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
|
|
|
140 |
</tr>
|
|
|
141 |
<!-- PACKAGE PROPERTIES ---------------------------- -->
|
|
|
142 |
<%'Call RenderPackageProperties ()%>
|
|
|
143 |
<tr>
|
|
|
144 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
145 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
| 6873 |
dpurdie |
146 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 5357 |
dpurdie |
147 |
<tr>
|
|
|
148 |
<td><IMG height=1 src="images/spacer.gif" width=150></td>
|
|
|
149 |
<td>
|
|
|
150 |
<!-- TABS ------------------------------------->
|
|
|
151 |
<%'Call Generate_Tab_Menu ( TABarray1, "Build Order", "orange" )%>
|
|
|
152 |
</td>
|
|
|
153 |
</tr>
|
|
|
154 |
</table>
|
|
|
155 |
</td>
|
|
|
156 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
157 |
</tr>
|
| 6873 |
dpurdie |
158 |
<tr class='panel_bg' style="height:35px;">
|
|
|
159 |
<td></td>
|
|
|
160 |
<td>
|
|
|
161 |
<!-- TAB ACTION BUTTONS ------------------------------------->
|
|
|
162 |
</td>
|
|
|
163 |
<td></td>
|
|
|
164 |
</tr>
|
| 5357 |
dpurdie |
165 |
<tr>
|
|
|
166 |
<td></td>
|
|
|
167 |
<td valign="top">
|
|
|
168 |
<!-- BUILD ORDER --------------------------------------------->
|
|
|
169 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
170 |
<tr>
|
|
|
171 |
<td width="1%" align="center" background="images/bg_form_lightbluedark.gif" class="form_field">Steps</td>
|
|
|
172 |
<td width="100%" background="images/bg_form_lightbluedark.gif">
|
|
|
173 |
<%
|
|
|
174 |
Dim currLevel, SessionNum, link, stepNum
|
|
|
175 |
currLevel = 0
|
|
|
176 |
stepNum = 0
|
|
|
177 |
Call Generate_Build_Tree ( parRtag_id, SessionNum ) ' Generate Tree
|
|
|
178 |
|
|
|
179 |
%>
|
|
|
180 |
<!--------------- UP THE TREE ---------------->
|
|
|
181 |
<%Set rsOrder = OraDatabase.DbCreateDynaset( Get_Build_Order ( parRtag_id ), cint(0))%>
|
|
|
182 |
<%Do While ((NOT rsOrder.BOF) AND (NOT rsOrder.EOF))%>
|
|
|
183 |
<%link = "dependencies.asp?pv_id="& rsOrder("pv_id") &"&rtag_id="& parRtag_id%>
|
|
|
184 |
<%If currLevel <> CInt( rsOrder("step_num") ) Then%>
|
|
|
185 |
<%
|
|
|
186 |
currLevel = CInt( rsOrder("step_num") )
|
|
|
187 |
stepNum = stepNum + 1
|
|
|
188 |
%>
|
|
|
189 |
</td>
|
|
|
190 |
</tr>
|
|
|
191 |
<tr>
|
|
|
192 |
<%If IsNull(rsOrder("UNRESOLVED")) Then%>
|
|
|
193 |
<td colspan="2" background="images/bg_form_lightbluedark_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
194 |
<%Else%>
|
|
|
195 |
<td bgcolor="#FF3C3C"></td>
|
|
|
196 |
<td bgcolor="#FFECEC" align="center" class="err_alert" nowrap><b>Circular dependency detected!</b></td>
|
|
|
197 |
<%End If%>
|
|
|
198 |
</tr>
|
|
|
199 |
<tr>
|
|
|
200 |
<td align="center" <%If IsNull(rsOrder("UNRESOLVED")) Then%>background="images/bg_form_lightbluedark.gif"<%Else%>bgcolor="#FF3C3C"<%End If%> class="lbox_ttl"><%=stepNum%></td>
|
|
|
201 |
<td class="body_txt" <%If NOT IsNull(rsOrder("UNRESOLVED")) Then%>bgcolor="#FFECEC"<%End If%>><a href="<%=link%>" class="sublbox_item"><%=rsOrder("pkg_name") &" "& rsOrder("v_ext")%></a><br>
|
|
|
202 |
<%Else%>
|
|
|
203 |
<a href="<%=link%>" class="sublbox_item"><%=rsOrder("pkg_name") &" "& rsOrder("v_ext")%></a><br>
|
|
|
204 |
<%End If%>
|
|
|
205 |
<%rsOrder.MoveNext
|
|
|
206 |
Loop%>
|
|
|
207 |
<%
|
|
|
208 |
' Clean up temporary table
|
|
|
209 |
Call Delete_Build_Tree ( SessionNum ) ' Clean UP
|
|
|
210 |
%>
|
|
|
211 |
</td>
|
|
|
212 |
</tr>
|
|
|
213 |
<tr>
|
|
|
214 |
<td colspan="2" background="images/bg_form_lightbluedark_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
215 |
</tr>
|
|
|
216 |
</table>
|
|
|
217 |
<br><br>
|
|
|
218 |
<!------------------------------------------------------------>
|
|
|
219 |
</td>
|
|
|
220 |
<td> </td>
|
|
|
221 |
</tr>
|
|
|
222 |
</table>
|
|
|
223 |
<!-- END MIDDLE -------->
|
|
|
224 |
</td>
|
|
|
225 |
</tr>
|
|
|
226 |
</table>
|
|
|
227 |
<!-- FOOTER -->
|
|
|
228 |
<!--#include file="_footer.asp"-->
|
|
|
229 |
</body>
|
|
|
230 |
</html>
|
|
|
231 |
|