Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
129 ghuddy 5
'|                  Build Order                      |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
129 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 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
129 ghuddy 29
   Response.Redirect("index.asp")
119 ghuddy 30
End If
31
%>
32
<%
33
'------------ ACCESS CONTROL ------------------
34
%>
35
<!--#include file="_access_control_general.asp"-->
36
<%
37
'------------ Variable Definition -------------
38
Dim rsOrder
39
Dim parPv_id
129 ghuddy 40
'Dim parMinEnv      ' show/hide whole environment
119 ghuddy 41
'------------ Constants Declaration -----------
42
Const UP_THE_TREE = 1
43
Const DOWN_THE_TREE = -1
44
'------------ Variable Init -------------------
45
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
46
parPv_id = QStrPar("pv_id")
47
'parMinEnv = Get_parMinEnv ( QStrPar("minenv") )
48
'----------------------------------------------
49
%>
50
<%
51
Call Rebuild_Environment ( parRtag_id )
52
%>
53
<%
54
Function Get_Build_Order ( nRtag_id )
129 ghuddy 55
   Get_Build_Order = _
56
   "   SELECT bo.step_num, pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, bo.UNRESOLVED "&_
57
   "     FROM build_order bo,"&_
58
   "         package_versions pv,"&_
59
   "         packages pkg"&_
60
   "    WHERE bo.RTAG_ID = "& nRtag_id &_
61
   "      AND bo.pv_id = pv.pv_id"&_
62
   "      AND pv.pkg_id = pkg.pkg_id"&_
63
   "   ORDER BY bo.STEP_NUM, UPPER(pkg.pkg_name)"
119 ghuddy 64
End Function
65
 
66
 
67
Function Indent
129 ghuddy 68
   Indent = "<img src='images/rex_images/_corrner.gif' width='26' height='16' border='0' align='absmiddle'>"
119 ghuddy 69
End Function
70
 
71
 
72
Function TabsFromStart ( SStabs )
129 ghuddy 73
   Dim widthimg
74
   widthimg = SStabs * 27
75
   TabsFromStart = "<img src='images/h_trsp_dot.gif' width='"& widthimg &"' height='16' border='0' align='absmiddle'>"
119 ghuddy 76
End Function
77
 
78
 
79
Sub Generate_Build_Tree ( nRtag_id, outSessionNum )
129 ghuddy 80
   OraDatabase.Parameters.Add "RTAG_ID",       nRtag_id,   ORAPARM_INPUT,    ORATYPE_NUMBER
81
   OraDatabase.Parameters.Add "SESSION_NUM",    0,          ORAPARM_OUTPUT, ORATYPE_NUMBER
119 ghuddy 82
 
129 ghuddy 83
   objEH.TryORA ( OraSession )
84
   On Error Resume Next
85
 
86
   OraDatabase.ExecuteSQL _
87
   " BEGIN Build_Tree ( :RTAG_ID, :SESSION_NUM ); END;"
88
 
89
   objEH.CatchORA ( OraSession )
90
 
91
   outSessionNum = OraDatabase.Parameters("SESSION_NUM").Value
92
   OraDatabase.Parameters.Remove "RTAG_ID"
93
   OraDatabase.Parameters.Remove "SESSION_NUM"
119 ghuddy 94
End Sub
95
 
96
 
97
Sub Delete_Build_Tree ( nSessionNum )
129 ghuddy 98
   objEH.TryORA ( OraSession )
99
   On Error Resume Next
100
 
101
   OraDatabase.ExecuteSQL _
102
   " DELETE FROM TEMP_TREE_BROWSE WHERE session_num = "& nSessionNum
103
 
104
   objEH.CatchORA ( OraSession )
119 ghuddy 105
End Sub
106
%>
107
<html>
108
<head>
109
<title>Release Manager</title>
110
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
111
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
112
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
113
<link rel="stylesheet" href="images/navigation.css" type="text/css">
114
<script language="JavaScript" src="images/common.js"></script>
115
<!-- DROPDOWN MENUS -->
116
<!--#include file="_menu_def.asp"-->
117
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
118
</head>
119
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
120
<!-- MENU LAYERS -------------------------------------->
129 ghuddy 121
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 122
  <!----------------------------------------------------->
123
</div>
124
<!-- HEADER -->
125
<!--#include file="_header.asp"-->
126
<!-- BODY ---->
127
<table width="100%" border="0" cellspacing="0" cellpadding="0">
129 ghuddy 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">&nbsp;</td>
145
          <td valign="bottom" background="images/bg_lght_gray.gif">
146
            <table width="100" border="0" cellspacing="0" cellpadding="0">
119 ghuddy 147
              <tr>
129 ghuddy 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">&nbsp;</td>
157
        </tr>
158
        <tr>
159
          <td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
160
          <td background="images/lbox_bg_orange.gif">
161
         <!-- TAB ACTION BUTTONS ------------------------------------->
162
         </td>
163
          <td background="images/lbox_bg_orange.gif">&nbsp;</td>
164
        </tr>
165
        <tr>
166
          <td></td>
167
          <td valign="top">
168
         <!-- BUILD ORDER --------------------------------------------->
169
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
170
              <tr>
119 ghuddy 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">&nbsp;
129 ghuddy 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") &"&nbsp;&nbsp;"& rsOrder("v_ext")%></a><br>
202
           <%Else%>
203
               <a href="<%=link%>" class="sublbox_item"><%=rsOrder("pkg_name") &"&nbsp;&nbsp;"& 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>
119 ghuddy 212
              </tr>
129 ghuddy 213
           <tr>
119 ghuddy 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>
129 ghuddy 217
         <br><br>
218
         <!------------------------------------------------------------>
219
         </td>
220
          <td>&nbsp;</td>
221
        </tr>
222
      </table>
223
      <!-- END MIDDLE -------->
224
      </td>
225
   </tr>
119 ghuddy 226
</table>
227
<!-- FOOTER -->
228
<!--#include file="_footer.asp"-->
229
</body>
129 ghuddy 230
</html>
119 ghuddy 231