Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5008 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   Build Release Log
5
'   Display the Build Instances for the specified release
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0  ' always load the page, dont store
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<!--#include file="_action_buttons.asp"-->
20
<!--#include file="class/classActionButtonControl.asp"-->
21
<%'------------ ACCESS CONTROL ------------------ %>
22
<% '------------ Scripts -------------------------- %>
23
<%
24
'------------ Variable Definition -------------
25
Dim parRtagId
26
Dim parPage
27
Dim parRefresh
28
Dim rsQry
29
Dim nextPage, lastPage, maxPage
30
 
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parRtagId = Request("rtag_id")
34
parPage = NiceInt(Request("page"),0)
35
parRefresh = NiceInt(Request("refresh"),0) 
36
 
37
'----------------------------------------------
38
Sub GetFormDetails ( parRtagId, page, ByRef rsQry )
39
   Dim query, qwrapper, perPage
40
   Dim qCount, rsQryCount
41
   Dim rtagQuery, rtagQuery1
42
 
43
   perPage = 40
44
 
45
   rtagQuery = ""
46
   rtagQuery1 = ""
47
   If parRtagId <> "" Then
48
       rtagQuery = " where bi.RTAG_ID = :RTAG_ID"
49
       rtagQuery1 = " and bi.RTAG_ID = :RTAG_ID"
50
   End If
51
 
52
   query = _
53
        "select bi.PV_ID, bi.RTAG_ID,pv.pkg_id," &_
54
        "  SUBSTR(pj.PROJ_NAME, 0, 30) as PROJ_NAME, " &_
55
        "  pj.PROJ_ID, " &_
56
        "  SUBSTR(rt.RTAG_NAME, 0, 30) as RTAG_NAME, " &_
57
        "  p.PKG_NAME, " &_
58
        "  pv.PKG_VERSION, " &_
59
        "  pv.PV_DESCRIPTION, " &_
60
        "  pv.COMMENTS, " &_
61
        "  NVL(pv.V_EXT, '') as V_EXT, " &_
62
        "  TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMP, " &_
63
        "  DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'Unknown') as REASON" &_
64
        " from BUILD_INSTANCES bi, " &_
65
        "     projects pj, " &_
66
        "     RELEASE_TAGS rt, " &_
67
        "     packages p, " &_
68
        "     PACKAGE_VERSIONS pv" &_
69
        " where bi.PV_ID = pv.pv_id " &_
70
        "  and pv.PKG_ID = p.PKG_ID" &_
71
        "  and bi.RTAG_ID = rt.RTAG_ID" &_
72
        "  and rt.proj_id = pj.proj_id" &_
73
        rtagQuery1 &_
74
        " order by bi.BUILD_ID desc"
75
 
76
    qwrapper = _
77
        "select * " &_
78
        "  from ( select /*+ FIRST_ROWS(n) */ " &_
79
        "  a.*, ROWNUM rnum " &_
80
        "      from ( "&query&" ) a " &_
81
        "      where ROWNUM <= :MAX_ROW_TO_FETCH) " &_
82
        "where rnum  >= :MIN_ROW_TO_FETCH"
83
 
84
    qCount = "select count(*) as count from BUILD_INSTANCES bi" & rtagQuery
85
 
86
   OraDatabase.Parameters.Add "MIN_ROW_TO_FETCH",   page * perPage,    ORAPARM_INPUT, ORATYPE_NUMBER
87
   OraDatabase.Parameters.Add "MAX_ROW_TO_FETCH",   (page +1 )*perPage,    ORAPARM_INPUT, ORATYPE_NUMBER
88
   OraDatabase.Parameters.Add "RTAG_ID",   parRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
89
   Set rsQryCount = OraDatabase.DbCreateDynaset( qCount, ORADYN_DEFAULT )
90
   Set rsQry = OraDatabase.DbCreateDynaset( qwrapper, ORADYN_DEFAULT )
91
   OraDatabase.Parameters.Remove "RTAG_ID"
92
   OraDatabase.Parameters.Remove "MAX_ROW_TO_FETCH"
93
   OraDatabase.Parameters.Remove "MIN_ROW_TO_FETCH"
94
 
95
   ' Calculate next and last page numbers
96
   maxPage = Int((rsQryCount("count")-1) / perPage)
97
 
98
   If (page + 1) <= maxPage Then
99
       nextPage = page + 1
100
   End If
101
   If parPage > 0 Then
102
       lastPage = page - 1
103
   End If
104
 
105
   rsQryCount.Close()
106
   Set rsQryCount = nothing
107
 
108
End Sub
109
 
110
' Write out a pagination indication
111
' Supress the link iff there is no page
112
Sub writePageTag( pageNum, text, parm )
113
    If pageNum <> "" Then Response.Write "<a class=""txt_linked"" href=""build_release_log.asp?rtag_id=" & parRtagId & "&page=" & pageNum & parm & """>"
114
    Response.Write text
115
    If pageNum <> "" Then Response.Write "</a>"
116
End Sub
117
%>
118
<%
119
'--------------------------------------------------------------------------------------------------------------------------
120
%>
121
<%
122
'------------ RUN BEFORE PAGE RENDER ----------
123
 
124
'----------------------------------------------
125
%>
126
<html>
127
   <head>
128
      <title>Release Manager</title>
129
      <meta http-equiv="Pragma" content="no-cache">
130
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
131
      <%If parRefresh > 0 Then%>
132
         <META HTTP-EQUIV=REFRESH CONTENT=<%=parRefresh * 60%>>
133
      <%End If%>
134
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
135
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
136
      <script language="JavaScript" src="images/common.js"></script>
137
      <!-- TIPS -->
138
      <script type="text/javascript" src="scripts/json2.js"></script>
139
      <script language="JavaScript" src="images/tipster.js"></script>
140
      <script language="JavaScript" src="images/_help_tips.js"></script>
141
      <!-- DROPDOWN MENUS -->
142
      <!--#include file="_menu_def.asp"-->
143
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
144
   </head>
145
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="isChecked('pv_id_list','submit');">
146
      <!-- MENU LAYERS -------------------------------------->
147
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
148
      <!-- TIPS LAYERS -------------------------------------->
149
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
150
      <!----------------------------------------------------->
151
      <!-- HEADER -->
152
      <!--#include file="_header.asp"-->
153
      <!-- BODY ---->
154
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
155
         <tr>
156
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
157
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
158
 
159
               <!-- Build Instances Display -->
160
               <table width="10" border="0" cellspacing="0" cellpadding="0">
161
                  <!-- Display Title -->
162
                  <tr>
163
                     <td width="1%"></td>
164
                     <td width="100%">
165
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
166
                           <tr>
167
                              <%If parRtagId = "" Then %>
168
                              <td nowrap class="form_ttl">SYSTEM BUILD LOG</td>
169
                              <%Else%>
170
                              <td nowrap class="form_ttl">RELEASE BUILD LOG</td>
171
                              <%End If%>
172
                              <td align="right" valign="bottom"></td>
173
                           </tr>
174
                        </table>
175
                     </td>
176
                     <td width="1%"></td>
177
                  </tr>
178
                  <!-- Display Top Border -->
179
                  <tr>
180
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
181
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
182
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
183
                  </tr>
184
                  <!-- Display Body -->
185
                  <tr>
186
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
187
                     <td bgcolor="#FFFFFF" valign="top">
188
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
189
                           <!-- Column Headings -->
190
                           <tr align="left" nowrap class="body_col" background="images/bg_table_col.gif">
191
                              <%If parRtagId = "" Then %>
192
                                <td>PROJECT</td>
193
                                <td>RELEASE</td>
194
                              <%End If%>
195
                              <td>PACKAGE</td>
196
                              <td>VERSION</td>
197
                              <td>TIME</td>
198
                              <td>REASON</td>
199
                           </tr>
200
                           <tr>
201
                                 <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
202
                           </tr>
203
                           <!-- Column Data -->
204
                           <%
205
                            Call GetFormDetails( parRtagId, parPage, rsQry )
206
                            Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
207
                           %>
208
                           <tr class="body_rowg" align="left" nowrap>
209
                              <%If parRtagId = "" Then %>
210
                               <td nowrap >
211
                                    <a class="txt_linked" href="rtree.asp?proj_id=<%=rsQry("proj_id")%>">
212
                                        <%=rsQry("PROJ_NAME")%>&nbsp;
213
                                    </a>
214
                               <td nowrap ><%=rsQry("RTAG_NAME")%>&nbsp;
215
                              <%End If%>
216
                               <td nowrap >
217
                                    <a class="txt_linked" href="view_by_version.asp?pkg_id=<%=rsQry("pkg_id")%>&fpkgversion=*<%=rsQry("v_ext")%>" title="<%=rsQry("pv_description")%>">
218
                                        <%=rsQry("PKG_NAME")%>&nbsp;
219
                                    </a>
220
                               <td nowrap >
221
                                    <a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry("pv_id")%>&rtag_id=<%=rsQry("rtag_id")%>" title="<%=rsQry("comments")%>">
222
                                        <%=rsQry("PKG_VERSION")%>&nbsp;
223
                                    </a>
224
                               <td nowrap ><%=rsQry("TIMESTAMP")%>&nbsp;
225
                               <td nowrap ><%=rsQry("REASON")%>
226
                           </tr>
227
                           <%
228
                            rsQry.MoveNext
229
                           Loop
230
                           rsQry.Close()
231
                           Set rsQry = nothing
232
 
233
                           %>
234
                        </table>
235
                     </td>
236
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
237
                  </tr>
238
                  <tr>
239
                    <td colspan="3">
240
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
241
                          <tr class="body_row">
242
                            <td align="left">   <%Call writePageTag(0 ,"&lt;&lt;First", "" )%> </td>
243
                            <td align="center"> Page:<%=parPage + 1%> of <%=maxPage + 1%> </td>
244
                            <td align="center"> <%Call writePageTag(lastPage ,"&lt;Previous" ,"")%> </td>
245
                            <td align="center"> <%Call writePageTag(parPage ,"[Auto]", "&refresh=1" )%>
246
                            <%Call writePageTag(parPage ,"[Refresh]", "" )%> </td>
247
                            <td align="center"> <%Call writePageTag(nextPage ,"Next&gt;","" )%> </td>
248
                            <td align="right">  <%Call writePageTag(maxPage ,"Last&gt;&gt;","" )%> </td>
249
                          </tr>
250
                          </table>    
251
                    </td>
252
                    </tr>
253
                  <!-- Display Bottom Border -->
254
                  <tr>
255
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
256
                     <td background="images/lbox_bg_blue.gif"></td>
257
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
258
                  </tr>
259
               </table>
260
            </td>
261
         </tr>
262
         <tr>
263
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
264
                <img src="images/img_gear.gif" width="86" height="99" vspace="20" hspace="30">
265
            </td>
266
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350">
267
            </td>
268
         </tr>
269
      </table>
270
      <!-- FOOTER -->
271
      <!--#include file="_footer.asp"-->
272
   </body>
273
</html>
274
<%
275
Call Destroy_All_Objects
276
%>