Subversion Repositories DevTools

Rev

Rev 4487 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4487 Rev 4525
Line 177... Line 177...
177
    Get_Package_Name = "<a class=""txt_linked"" href=""dependencies.asp?pv_id=" +  nPkgPvid + "&rtag_id=" + nRtagId + """>" + sPackageName + "</a>"
177
    Get_Package_Name = "<a class=""txt_linked"" href=""dependencies.asp?pv_id=" +  nPkgPvid + "&rtag_id=" + nRtagId + """>" + sPackageName + "</a>"
178
  End If
178
  End If
179
 
179
 
180
End Function
180
End Function
181
'--------------------------------------------------------------------------------------------------------------------------
181
'--------------------------------------------------------------------------------------------------------------------------
-
 
182
Function GetLastBuildAge( rtagid)
-
 
183
   Dim  query_string, rsQry
-
 
184
       query_string = "SELECT TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) as delta," &_
-
 
185
                      "       TO_CHAR(rl.LAST_BUILD, 'DD-MON-YYYY') as last_build," &_
-
 
186
                      "       TO_CHAR(rl.LAST_BUILD, 'HH:MM:SS PM') as last_build_hours," &_
-
 
187
                      "       TRUNC (SYSDATE - rl.LAST_BUILD) as last_build_days" &_
-
 
188
                      " FROM RELEASE_CONFIG rc, RUN_LEVEL rl, BUILD_MACHINE_CONFIG bm " &_
-
 
189
                      " WHERE rc.RTAG_ID =" &rtagid &_
-
 
190
                      "   AND rc.bmcon_id is not null" &_
-
 
191
                      "   AND rl.RCON_ID = rc.RCON_ID" &_
-
 
192
                      "   AND rc.bmcon_id = bm.bmcon_id(+)"
-
 
193
 
-
 
194
        Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
-
 
195
        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
-
 
196
            Dim delta, last_build, last_build_time, last_build_days
-
 
197
            If IsNull(rsQry("delta")) Then
-
 
198
                delta = 0
-
 
199
            Else
-
 
200
                delta = CLng(rsQry("delta"))
-
 
201
            End If
-
 
202
            last_build = rsQry("last_build")
-
 
203
            last_build_time = rsQry("last_build_hours")
-
 
204
            last_build_days = rsQry("last_build_days")
-
 
205
            If delta < (60*60*24) Then
-
 
206
                GetLastBuildAge = last_build_time  
-
 
207
            Else     
-
 
208
                GetLastBuildAge = last_build
-
 
209
            End If
-
 
210
        End If
-
 
211
        rsQry.Close()
-
 
212
        Set rsQry = nothing
182
 
213
 
-
 
214
End Function
183
 
215
 
-
 
216
'--------------------------------------------------------------------------------------------------------------------------
184
%>
217
%>
185
<%
218
<%
186
'------------ RUN BEFORE PAGE RENDER ----------
219
'------------ RUN BEFORE PAGE RENDER ----------
187
shref_base = "http://" & archive_server & "/devl/abtlog/"
220
shref_base = "http://" & archive_server & "/devl/abtlog/"
188
 
221
 
Line 221... Line 254...
221
 
254
 
222
function InitShow(e)
255
function InitShow(e)
223
{
256
{
224
    toggleDispClass('rootCause',0);
257
    toggleDispClass('rootCause',0);
225
    toggleDispClass('rootFile',0);
258
    toggleDispClass('rootFile',0);
-
 
259
    toggleDispClass('rootIndirect',0);
-
 
260
    toggleDispClass('manualCause',0);
226
}
261
}
227
 
262
 
228
function toggleDispClass(cname,flip)
263
function toggleDispClass(cname,flip)
229
{
264
{
230
    var cookieName = 'RELMGR_BUILDSTATUS';
265
    var cookieName = 'RELMGR_BUILDSTATUS';
Line 329... Line 364...
329
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
364
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
330
                        <!--#include file="messages/_msg_inline.asp"-->
365
                        <!--#include file="messages/_msg_inline.asp"-->
331
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
366
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
332
                        <br>
367
                        <br>
333
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
368
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
334
                           <span class='err_alert'>
369
                        <tr><td colspan=4 class='err_alert'>
335
                              <font size='2'><b>Packages Excluded From Build (Daemon Build Failure)</b></font>
370
                              <font size='2'><b>Packages Excluded From Build</b></font>
-
 
371
                           </td>
-
 
372
                           </tr>
-
 
373
                           <td></td>
-
 
374
                           <td  colspan=3 class="body_row">
-
 
375
                           <fieldset class="fset" align="right" style=" border: 1px groove; ">
-
 
376
                                Show
-
 
377
                                <input type="checkbox" checked value=0 name="showManual"   id="manualCause"   onClick="toggleDispClass('manualCause',1);">Manual Exclusions
-
 
378
                                <input type="checkbox" checked value=0 name="showCause"    id="rootCause"     onClick="toggleDispClass('rootCause',1);">Config Errors
-
 
379
                                <input type="checkbox" checked value=0 name="showFile"     id="rootFile"      onClick="toggleDispClass('rootFile',1);">Build Errors
-
 
380
                                <input type="checkbox" checked value=0 name="showIndirect" id="rootIndirect"  onClick="toggleDispClass('rootIndirect',1);">Indirect Exclusions
-
 
381
                           </fieldset>
336
                           </span>
382
                           </td>
-
 
383
                           </tr>
-
 
384
 
337
                           <tr>
385
                           <tr>
338
                              <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
386
                              <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
339
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
387
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
340
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
388
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
341
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE</td>
389
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE</td>
342
                           </tr>
390
                           </tr>
343
                           <tr>
391
                           <tr>
344
                           <td colspan=3></td>
-
 
345
                           <td class="body_row">
-
 
346
                           <fieldset class="fset" align="right">
-
 
347
                                Show
-
 
348
                                <input type="checkbox" checked value=0 name="showCause" id="rootCause" onClick="toggleDispClass('rootCause',1);">Config Errors
-
 
349
                                <input type="checkbox" checked value=0 name="showFile"  id="rootFile"  onClick="toggleDispClass('rootFile',1);">Build Errors
-
 
350
                           </fieldset>
-
 
351
                           </td>
-
 
352
                           </tr>
-
 
353
                           <%
392
                           <%
354
                           query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description"&_
393
                           query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description"&_
355
                                          "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
394
                                          "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
356
                                          "  where dnr.rtag_id = "& parRtagId &_
395
                                          "  where dnr.rtag_id = "& parRtagId &_
357
                                          "    and pv.pv_id    = dnr.pv_id"&_
396
                                          "    and pv.pv_id    = dnr.pv_id"&_
Line 361... Line 400...
361
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
400
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
362
                           '--- Render rows ---
401
                           '--- Render rows ---
363
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
402
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
364
                            Dim rowClass
403
                            Dim rowClass
365
                            Dim rowData
404
                            Dim rowData
-
 
405
                            '
-
 
406
                            ' Manually excluded packages have no root_cause or root_file or root_pv_id
-
 
407
                            '
366
                            ' root_file, if supplied, indicates a build failure log file exists
408
                            ' root_file, if supplied, indicates a build failure log file exists
367
                            ' this should always prevail over the textual root_cause
409
                            ' this should always prevail over the textual root_cause
368
                           
410
                            '
-
 
411
                            If (IsNull(rsQry("root_file")) AND IsNull(rsQry("root_cause"))) Then
-
 
412
                                rowData = "Manually Excluded"
-
 
413
                                rowClass = "manualCause"
-
 
414
 
369
                            If IsNull(rsQry("root_file")) Then
415
                            ElseIf IsNull(rsQry("root_file")) Then
370
                               rowClass = "rootCause"
416
                               rowClass = "rootCause"
371
                               rowData = rsQry("root_cause")
417
                               rowData = rsQry("root_cause")
-
 
418
 
372
                            Else
419
                            Else
373
                                rowClass = "rootFile"
420
                                rowClass = "rootFile"
374
                                rowData = "<a class=""txt_linked"" title=""" & rsQry("root_file") &_
421
                                rowData = "<a class=""txt_linked"" title=""" & rsQry("root_file") &_
375
                                          " Log file may have expired."" " &_
422
                                          " Log file may have expired."" " &_
376
                                          "href=""" & shref_base & rsQry("root_file") & """>" &_
423
                                          "href=""" & shref_base & rsQry("root_file") & """>" &_
Line 416... Line 463...
416
                           '--- Render rows ---
463
                           '--- Render rows ---
417
                           Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
464
                           Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
418
                              <tr>
465
                              <tr>
419
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
466
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
420
                              </tr>
467
                              </tr>
421
                              <tr>
468
                              <tr class="rootIndirect">
-
 
469
 
422
                                 <td nowrap width="1%">
470
                                 <td nowrap width="1%">
423
                                    <input type="checkbox" value=0 disabled=true name="notused" id="notused">
471
                                    <input type="checkbox" value=0 disabled=true name="notused" id="notused">
424
                                 </td>
472
                                 </td>
425
                                 <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>
473
                                 <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>
426
                                 <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
474
                                 <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
Line 475... Line 523...
475
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
523
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
476
                           <tr>
524
                           <tr>
477
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
525
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
478
                                 <p>DAEMON STATUS INFORMATION</p>
526
                                 <p>DAEMON STATUS INFORMATION</p>
479
                              </td>
527
                              </td>
-
 
528
                              <td  valign="bottom" class="body_rowg">
-
 
529
                                Last Build: <%=GetLastBuildAge(parRtagId)%>
-
 
530
                              </td>
480
                              <td align="right" valign="bottom">
531
                              <td align="right" valign="bottom">
481
                                <a class="txt_linked" href="build_status.asp?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a></td>
532
                                <a class="txt_linked" href="build_status.asp?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a></td>
482
                              </td>
533
                              </td>
483
                           </tr>
534
                           </tr>
484
                        </table>
535
                        </table>
Line 606... Line 657...
606
                                 <td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
657
                                 <td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
607
                                 <td nowrap class="body_rowg">
658
                                 <td nowrap class="body_rowg">
608
                                    <%
659
                                    <%
609
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
660
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
610
                                       If objAccessControl.UserLogedIn AND objAccessControl.IsActive("BuildControl") Then
661
                                       If objAccessControl.UserLogedIn AND objAccessControl.IsActive("BuildControl") Then
611
                                          If IsNull(daemonState) Then
662
                                          If daemonState = 0 Then
612
                                             Call Action_Buttons ( "Daemon Pause" )
663
                                             Call Action_Buttons ( "Daemon Pause" )
613
                                          ElseIf daemonState = 1 Then
664
                                          ElseIf daemonState = 1 Then
614
                                             Call Action_Buttons ( "Daemon Resume" )
665
                                             Call Action_Buttons ( "Daemon Resume" )
615
                                          ElseIf daemonState = 2 Then
666
                                          ElseIf daemonState = 2 Then
616
                                             Call Action_Buttons ( "Daemon Start" )
667
                                             Call Action_Buttons ( "Daemon Start" )
617
                                          Else
668
                                          Else
618
                                             Call Action_Buttons ( "Daemon Resume" )
669
                                             Call Action_Buttons ( "Daemon Resume" )
619
                                          End If
670
                                          End If
620
                                       Else
671
                                       Else
621
                                          If IsNull(daemonState) Then
672
                                          If daemonState = 0 Then
622
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
673
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
623
                                          ElseIf daemonState = 1 Then
674
                                          ElseIf daemonState = 1 Then
624
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
675
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
625
                                          ElseIf daemonState = 2 Then
676
                                          ElseIf daemonState = 2 Then
626
                                             Call Action_Buttons ( "Daemon Start Disabled" )
677
                                             Call Action_Buttons ( "Daemon Start Disabled" )