Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
121 hknight 5
'|              Build Status Information             |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
121 hknight 12
Response.Expires = 0  ' always load the page, dont store
119 ghuddy 13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/_form_window_common.asp"-->
20
<!--#include file="_action_buttons.asp"-->
21
<!--#include file="class/classActionButtonControl.asp"-->
22
<%
23
' Set rfile parameter. This is a return page after Login
24
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
25
objPMod.PersistInQryString("proj_id")
26
'------------ ACCESS CONTROL ------------------
27
%>
28
<!--#include file="_access_control_general.asp"-->
29
<%
30
'------------ Variable Definition -------------
31
Dim objSortHelper
32
Dim rsQry
33
Dim parRtagId
34
Dim parSourceRtagId
35
Dim query_string
36
Dim objBtnControl
121 hknight 37
Dim  rcon_id
119 ghuddy 38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
parRtagId = Request("rtag_id")
41
objPMod.PersistInQryString("rtag_id")
42
Set objBtnControl = New ActionButtonControl
43
'----------------------------------------------
44
%>
45
<%
46
'--------------------------------------------------------------------------------------------------------------------------
47
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
121 hknight 48
  Dim rsQry, query
49
  OraDatabase.Parameters.Add "RTAG_ID",   parRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER 
50
  query = _
51
  " SELECT * "&_
52
  "  FROM RELEASE_TAGS rt"&_
53
  " WHERE rt.RTAG_ID = :RTAG_ID"
54
 
55
  Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
56
 
57
  OraDatabase.Parameters.Remove "RTAG_ID"
58
 
59
  If rsQry.RecordCount > 0 Then
60
    outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
61
    outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
62
  Else
63
    Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
64
  End If
65
 
66
  rsQry.Close
67
  Set rsQry = Nothing
119 ghuddy 68
End Sub
69
'--------------------------------------------------------------------------------------------------------------------------
70
Sub RipplePackage (flag)
71
 
72
  On Error Resume Next
73
  objEH.ErrorRedirect = TRUE
121 hknight 74
  OraDatabase.Parameters.Add "PV_ID_LIST",     Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
75
  OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER 
76
  OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER 
119 ghuddy 77
 
121 hknight 78
  objEH.TryORA ( OraSession )
79
 
80
  If flag Then
81
    OraDatabase.ExecuteSQL _
82
    "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
83
  Else
84
    OraDatabase.ExecuteSQL _
85
    "BEGIN  UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
86
  End If
87
 
88
  objEH.CatchORA ( OraSession )
89
 
90
  OraDatabase.Parameters.Remove "PV_ID_LIST"
91
  OraDatabase.Parameters.Remove "RTAG_ID"
92
  OraDatabase.Parameters.Remove "USER_ID"
119 ghuddy 93
 
94
End Sub
95
'--------------------------------------------------------------------------------------------------------------------------
96
Function Get_Daemon_Mode( cMode )
97
 
121 hknight 98
  If cMode = "S" Then
99
    Get_Daemon_Mode = "Slave"
100
  ElseIf cMode = "M" Then
101
    Get_Daemon_Mode = "Master"
102
  End If
103
 
119 ghuddy 104
End Function
105
'--------------------------------------------------------------------------------------------------------------------------
106
Function Get_Run_Level( nLevel )
107
 
121 hknight 108
  If nLevel <= 1 Then
109
    Get_Run_Level = "Cannot Continue"
110
  ElseIf nLevel = 2 Then
111
    Get_Run_Level = "Paused"
112
  ElseIf nLevel = 3 Then 
113
    Get_Run_Level = "Actively engaged in a build"
114
  ElseIf nLevel = 4 Then
115
    Get_Run_Level = "Idle"
116
  ElseIf nLevel >= 5 Then
117
    Get_Run_Level = "Waiting"
118
  Else
119
    Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
120
  End If
119 ghuddy 121
 
122
End Function
123
'--------------------------------------------------------------------------------------------------------------------------
124
Function Get_Package_Name( sPackageName )
125
 
121 hknight 126
  If IsNull(sPackageName) Then
127
    Get_Package_Name = "None"
128
  Else
129
    Get_Package_Name = sPackageName
130
  End If
119 ghuddy 131
 
132
End Function
133
'--------------------------------------------------------------------------------------------------------------------------
134
%>
135
<%
136
'------------ RUN BEFORE PAGE RENDER ----------
137
' --- Get Form details from DB ---
138
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
139
 
140
' --- Load Validation Rules ---
121 hknight 141
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )    ' Load Validation Rules
119 ghuddy 142
 
143
' --- Enter Form Validation Rule Changes here... ----
144
'----------------------------------------------------
145
 
146
' --- RUN onPostBack ---
147
If Request("action") <> "" Then
148
 
121 hknight 149
  If objEH.Finally Then
150
    If Request("action") = "include" Then
151
      Call RipplePackage (True)
152
    Else
153
      Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
154
    End If
155
  End If
156
 
119 ghuddy 157
End If
158
 
159
'----------------------------------------------
160
%>
161
<html>
121 hknight 162
  <head>
163
    <title>Release Manager</title>
164
    <meta http-equiv="Pragma" content="no-cache">
165
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
166
    <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
167
    <link rel="stylesheet" href="images/navigation.css" type="text/css">
168
    <script language="JavaScript" src="images/common.js"></script>
169
    <!-- DROPDOWN MENUS -->
170
    <!--#include file="_menu_def.asp"-->
171
    <script language="JavaScript1.2" src="images/popup_menu.js"></script>
172
  </head>
173
  <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="isChecked('pv_id_list','submit');">
174
    <!-- MENU LAYERS -------------------------------------->
175
    <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
176
    <!-- TIPS LAYERS -------------------------------------->
177
    <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
178
    <!----------------------------------------------------->
179
    <!-- HEADER -->
180
    <!--#include file="_header.asp"-->
181
    <!-- BODY ---->
182
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
183
<%
184
'-- FORM START ---------------------------------------------------------------------------------------------------------
185
objFormComponent.FormName = "FormName"
186
objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
187
Call objFormComponent.FormStart()
188
%>
189
      <tr>
190
        <td width="1" background="images/bg_home_orange.gif" valign="top">
191
        </td>
192
        <td width="100%" rowspan="1" align="center" valign="top" bgcolor="#EEEFEF">
193
          <table width="10" border="0" cellspacing="0" cellpadding="0">
194
            <tr>
195
              <td width="1%"></td>
196
              <td width="100%">
197
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
198
                  <tr>
199
                    <td nowrap class="body_txt">
200
                    </td>
201
                  </tr>
202
                </table>
203
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
204
                  <tr>
205
                    <td nowrap class="form_ttl"><p>&nbsp;</p>
206
                      <p>BUILD STATUS INFORMATION</p>
207
                    </td>
208
                    <td align="right" valign="bottom"></td>
209
                  </tr>
210
                </table>
211
              </td>
212
              <td width="1%"></td>
213
            </tr>
214
            <tr>
215
              <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
216
              <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
217
              <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
218
            </tr>
219
            <tr>
220
              <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
221
              <td bgcolor="#FFFFFF" valign="top">
222
                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
223
                <!--#include file="messages/_msg_inline.asp"-->
224
                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
225
                <br>
226
                <!-- BUTTONS CONTROL +++++++++++++++++++ -->
227
                <!-- +++++++++++++++++++++++++++++++++++ -->
228
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
229
                  <span class='err_alert'>
230
                    <font size='2'><b>Packages Excluded From Build (Daemon Build Failure)</b></font>
231
                  </span>
232
                  <tr>
233
                    <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
234
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
235
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
236
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE</td>
237
                  </tr>
238
<%
239
query_string = "select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description from do_not_ripple dnr, package_versions pv, packages pkg "&_
240
" where dnr.rtag_id = "& parRtagId &" and pv.pv_id = dnr.pv_id and pkg.pkg_id = pv.pkg_id and dnr.root_pv_id is null order by pkg_name"
241
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
242
'--- Render rows ---
243
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
244
%>
245
                  <tr>
246
                    <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
247
                  </tr>
248
                  <tr>
249
                    <td nowrap width="1%">
250
                      <input type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" id="pv_id_list" onClick="isChecked('pv_id_list','submit');">
251
                    </td>
252
                    <td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry("pv_id")%>&rtag_id=<%=rsQry("rtag_id")%>" title="<%=rsQry("pv_description")%>"><%=rsQry("pkg_name")%></a></td>
253
                    <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
254
<%
255
' root_file, if supplied, indicates a build failure log file exists
256
' this should always prevail over the textual root_cause
257
If IsNull(rsQry("root_file")) Then
258
%>
259
                    <td nowrap class="body_rowg"><%=rsQry("root_cause")%></td>
260
<%
261
Else
262
%>
263
                    <td nowrap class="body_rowg"><a class="txt_linked" title="<%=rsQry("root_file")%> Log file may have expired." href="file://///auperaunx26/abtlog/<%=rsQry("root_file")%>">Build Failure Log File</a></td>
264
<%
265
End If
266
%>
267
                  </tr>
268
<%
269
  rsQry.MoveNext
270
  Loop
271
%>
272
                  <tr>
273
                    <td background="images/bg_table_col.gif" class="err_alert"><b>Indirectly</b></td>
274
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
275
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
276
                    <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE PACKAGE NAME</td>
277
                  </tr>
278
<%
279
query_string = "select pv.pv_id, pkg.pkg_name, pv.pkg_version, qkg.pkg_name, dnr.rtag_id, pv.pv_description from do_not_ripple dnr, package_versions pv, package_versions qv, packages pkg, packages qkg "&_
280
" where dnr.rtag_id = "& parRtagId &" and pv.pv_id = dnr.pv_id and pkg.pkg_id = pv.pkg_id and dnr.root_pv_id is not null and qv.pv_id=dnr.root_pv_id and qkg.pkg_id=qv.pkg_id order by pkg.pkg_name"
281
Dim rsQry2
282
Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
283
'--- Render rows ---
284
Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)
285
%>
286
                  <tr>
287
                    <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
288
                  </tr>
289
                  <tr>
290
                    <td nowrap width="1%">
291
                      <input type="checkbox" value=0 disabled=true name="notused" id="notused">
292
                    </td>
293
                    <td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry2(0)%>&rtag_id=<%=rsQry2(4)%>" title="<%=rsQry2(5)%>"><%=rsQry2(1)%></a></td>
294
                    <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
295
                    <td nowrap class="body_rowg"><%=rsQry2(3)%></td>
296
                  </tr>
297
<%
298
  rsQry2.MoveNext
299
  Loop
300
%>
301
                </table>
302
              </td>
303
              <td background="images/lbox_bgside_white.gif">&nbsp;</td>
304
            </tr>
305
<%
306
If rsQry.RecordCount > 0 Then
307
%>
308
            <tr>
309
              <td background="images/bg_action_norm.gif"></td>
310
              <td align="right" background="images/bg_action_norm.gif">
311
<%
312
  Response.Write(objFormComponent.SubmitButton ( "Include", "name='submit' id='submit' class='form_btn' disabled style='color:silver' onClick='return confirmAction(""Are you sure you want to include these packages for building?"")'" ))
313
  Response.Write(objPMod.ComposeHiddenTags())
314
%>
315
              </td>
316
              <td background="images/bg_action_norm.gif"><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
317
            </tr>
318
<%
319
End If
320
%>
321
            <tr>
322
              <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
323
              <td background="images/lbox_bg_blue.gif"></td>
324
              <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
325
            </tr>
326
          </table>
327
    <!-- ACTION BUTTONS ---------------------------------------------->
328
          <input type="hidden" name="action" value="include"> 
329
    <!-- ACTION BUTTONS END  ------------------------------------------>
330
        </td>
331
        <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
332
      </tr>
333
  <%
334
  Call objFormComponent.FormEnd()
335
  rsQry.Close()
336
  Set rsQry = nothing  
337
  rsQry2.Close()
338
  Set rsQry2 = nothing  
339
  '-- FORM END ----------------------------------------------------------------------------------------------------------------
340
  %>
341
      <tr>
342
        <td width="1" background="images/bg_home_orange.gif" valign="top">
343
        </td>
344
        <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
345
          <table width="10" border="0" cellspacing="0" cellpadding="0">
346
            <tr>
347
              <td width="1%"></td>
348
              <td width="100%">
349
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
350
                  <tr>
351
                    <td nowrap class="form_ttl"><p>&nbsp;</p>
352
                      <p>DAEMON STATUS INFORMATION
353
                      </p>
354
                    </td>
355
                    <td align="right" valign="bottom"></td>
356
                  </tr>
357
                </table>
358
              </td>
359
              <td width="1%"></td>
360
            </tr>
361
            <tr>
362
              <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
363
              <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
364
              <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
365
            </tr>
366
            <tr>
367
              <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
368
              <td bgcolor="#FFFFFF" valign="top">
369
                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
370
                <!--#include file="messages/_msg_inline.asp"-->
371
                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
372
                <br>
373
                <!-- BUTTONS CONTROL +++++++++++++++++++ -->
374
                <!-- +++++++++++++++++++++++++++++++++++ -->
375
                <table width="100%" border="0" cellspacing="2" cellpadding="0">
376
              </td>
377
              <td width="9%" valign="top"></td>
378
            </tr>
379
            <tr>
380
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Hostname</td>
381
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE Machtype</td>
382
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
383
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
384
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
385
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Switch State</td>
386
            </tr>
387
<%
388
query_string = "select * from release_config rc, run_level rl, packages pkg, gbe_machtype gm "&_
389
" where rc.rtag_id = "& parRtagId &" and rc.rcon_id = rl.rcon_id(+) and "&_
390
" pkg.pkg_id(+) = rl.current_pkg_id_being_built and gm.gbe_id = rc.gbe_id order by rc.daemon_hostname"
391
Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
392
'--- Render rows ---
393
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
394
  rcon_id = rsQry("rcon_id")
395
%>
396
            <tr>
397
              <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
398
            </tr>
399
            <tr>
400
              <td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
401
              <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
402
              <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
403
              <td nowrap class="body_rowg"><%=Get_Run_Level(rsQry("current_run_level"))%></td>
404
              <td nowrap class="body_rowg"><%=Get_Package_Name(rsQry("pkg_name"))%></td>
405
              <td nowrap class="body_rowg">
406
<%
407
  If NOT IsNull(rsQry("current_run_level")) Then
408
    If objAccessControl.UserLogedIn Then
409
      If IsNull(rsQry("pause")) Then
410
        Call Action_Buttons ( "Daemon Pause" )
411
      Else
412
        Call Action_Buttons ( "Daemon Resume" )
413
      End If
414
    Else
415
      If IsNull(rsQry("pause")) Then
416
        Call Action_Buttons ( "Daemon Pause Disabled" )
417
      Else
418
        Call Action_Buttons ( "Daemon Resume Disabled" )
419
      End If
420
    End If
421
  Else
422
%>Unavailable<%
423
  End If
424
%>
425
              </td>
426
            </tr>
427
<%
428
  rsQry.MoveNext
429
  Loop  
430
rsQry.Close()
431
Set rsQry = nothing  
432
%>
433
          </table>
434
        </td>
435
        <td background="images/lbox_bgside_white.gif">&nbsp;</td>
436
      </tr>
437
      <tr>
438
        <input type="hidden" name="action" value="true">
439
        <%=objPMod.ComposeHiddenTags()%>
440
        <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
441
        <td background="images/lbox_bg_blue.gif"></td>
442
        <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
443
      </tr>
444
    </table> 
445
    <!-- ACTION BUTTONS ---------------------------------------------->
446
    <!-- ACTION BUTTONS END  ------------------------------------------> </td>
447
    <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
448
    </tr>
449
    <tr>
450
      <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
451
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350"></td>
452
    </tr>
453
    </table> 
454
    <!-- FOOTER -->
455
    <!--#include file="_footer.asp"-->
456
  </body>
119 ghuddy 457
</html>
458
<%
459
Call Destroy_All_Objects
460
%>