Subversion Repositories DevTools

Rev

Rev 6559 | Rev 6579 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6559 Rev 6566
Line 322... Line 322...
322
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Est Duration<%=Quick_Help("h_buildtime")%></td>
322
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Est Duration<%=Quick_Help("h_buildtime")%></td>
323
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<%=Quick_Help("h_lastchange")%></td>
323
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<%=Quick_Help("h_lastchange")%></td>
324
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Control State</td>
324
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Control State</td>
325
           </tr>
325
           </tr>
326
           <%
326
           <%
327
           ' Get the number of release configurations for this RTAG_ID, and iterate through them
327
           ' Get Build Information for this Release
-
 
328
           query_string = _
328
           query_string = " select rc.rcon_id, display_name, gbe_value, daemon_mode, NVL(ACTIVE, 'U') as ACTIVE" &_
329
                "SELECT rc.rcon_id, display_name, gbe_value, daemon_mode, NVL(ACTIVE, 'U') AS ACTIVE," &_
-
 
330
                "       rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) AS delta," &_
-
 
331
                "       pk.pkg_name, rl.current_pv_id, pv.build_time, TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) AS build_delta" &_
-
 
332
                " FROM release_config rc," &_
-
 
333
                "   gbe_machtype gm," &_
329
                          " from release_config rc, gbe_machtype gm, build_machine_config bm"&_
334
                "   build_machine_config bm," &_
-
 
335
                "   run_level rl," &_
-
 
336
                "   packages pk," &_
-
 
337
                "   package_versions pv" &_
330
                          "  where rc.rtag_id = "& parRtagId &_
338
                " WHERE rc.rtag_id     = " & parRtagId &_
331
                          "    and gm.gbe_id = rc.gbe_id"&_
339
                "  AND gm.gbe_id        = rc.gbe_id" &_
-
 
340
                "  AND rl.rcon_id       = rc.rcon_id" &_
332
                          "    and rc.bmcon_id=bm.bmcon_id(+)" &_
341
                "  AND rc.bmcon_id      =bm.bmcon_id(+)" &_
-
 
342
                "  AND pk.pkg_id(+)     = rl.current_pkg_id_being_built" &_
-
 
343
                "  AND rl.current_pv_id = pv.pv_id(+)" &_
333
                          "  order by bm.display_name, rc.rcon_id"
344
                " ORDER BY bm.display_name, rc.rcon_id"
334
 
345
 
335
           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
346
           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
336
 
347
 
337
           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
348
           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
338
              rcon_id = rsQry("rcon_id")
-
 
339
 
-
 
340
              Dim pkgName
349
              Dim pkgName
341
              Dim pkgPvid
350
              Dim pkgPvid
342
              Dim pkgBuildTime
351
              Dim pkgBuildTime
343
              Dim currentRunLevel
352
              Dim currentRunLevel
344
              Dim daemonState
353
              Dim daemonState
345
              Dim delta
354
              Dim delta
-
 
355
              Dim PkgBuildDelta
346
              Dim pkgId
356
              Dim pkgId
347
              Dim bActive : bActive = rsQry("active")
-
 
348
              If bActive = "N" Then bInactiveMachine = true
-
 
349
 
-
 
350
              ' For this release configuration, get its entry from the run_level table. This table may not
-
 
351
              ' have an entry so we must handle that outcome too.
-
 
352
              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
-
 
353
                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
-
 
354
                             "   from run_level rl"&_
-
 
355
                             "  where rl.rcon_id = "& rcon_id
-
 
356
 
-
 
357
              Dim rsQry2
357
              Dim bActive
358
              Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
-
 
359
 
-
 
360
              currentRunLevel = -1
-
 
361
              pkgId = Null
-
 
362
              pkgName = NULL
-
 
363
              pkgPvid = NULL
358
              Dim estDuration
364
              pkgBuildTime = NULL
-
 
365
              daemonState = 0
359
              Dim daemonMode 
366
              delta = NULL
360
              Dim lastChange
367
 
-
 
368
              If (rsQry2.RecordCount > 0) Then
-
 
369
                ' Get the run level from the run_level table
-
 
370
                currentRunLevel = rsQry2("current_run_level")
-
 
371
                pkgId = rsQry2("current_pkg_id_being_built")
-
 
372
 
361
 
373
                daemonState = rsQry2("pause")
362
              rcon_id = rsQry("rcon_id")
374
                If IsNull(daemonState) Then daemonState = 0
363
              ' = rsQry("display_name")
-
 
364
              ' = rsQry("gbe_value")
375
                If daemonState = "2" Then pkgId = Null
365
              daemonMode = rsQry("daemon_mode")
376
 
-
 
377
                delta = rsQry2("delta")
366
              bActive = rsQry("ACTIVE")
378
 
-
 
379
              End If
367
              daemonState = rsQry("pause")
380
 
-
 
381
              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
368
              currentRunLevel = rsQry("current_run_level")
382
              ' package name from the packages table
369
              pkgId = rsQry("current_pkg_id_being_built")
383
              Dim rsQry3
370
              delta = rsQry("delta")
384
              If NOT IsNull(pkgId) Then
371
              pkgName = rsQry("pkg_name")
385
                 query_string = " select pkg_name,rl.current_pv_id, pv.build_time from run_level rl, packages pk, package_versions pv"&_
372
              pkgPvid = rsQry("current_pv_id")
386
                                "  where rl.rcon_id = "& rcon_id &_
373
              pkgBuildTime = rsQry("build_time")
387
                                "   and  rl.current_pkg_id_being_built = pk.pkg_id" &_
374
              PkgBuildDelta = rsQry("build_delta")
-
 
375
              lastChange = NULL
388
                                "   and  rl.current_pv_id = pv.pv_id"
376
              bInactiveMachine = FALSE
-
 
377
              estDuration = NULL
389
 
378
 
390
                 Set rsQry3 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
379
              If bActive = "N" Then bInactiveMachine = true
391
                 If (rsQry3.RecordCount > 0) Then
380
              If IsNull(daemonState) Then daemonState = 0
392
                    pkgName = rsQry3("pkg_name")
381
              If daemonState = "2" Then pkgId = Null
393
                    pkgPvid = rsQry3("current_pv_id")
382
              If IsNull(currentRunLevel) Then currentRunLevel = -1
394
                    pkgBuildTime = rsQry3("build_time")
383
              If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
395
                 End If
-
 
396
                 rsQry3.Close()
-
 
397
                 Set rsQry3 = nothing
384
              If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
398
              End If
-
 
399
 
385
 
400
              ' --- Now render HTML for this release configuration ---
386
              ' --- Now render HTML for this release configuration ---
401
              %>
387
              %>
402
              <tr>
388
              <tr>
403
                 <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
389
                 <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
404
              </tr>
390
              </tr>
405
              <tr>
391
              <tr>
406
                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
392
                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
407
                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
393
                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
408
                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
394
                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(daemonMode)%></td>
409
                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
395
                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
410
                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, bActive)%></td>
396
                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, bActive)%></td>
411
                 <td nowrap class="body_rowg"><%=IIF(rsQry("daemon_mode") = "M", pkgBuildTime, "")%></td>
397
                 <td nowrap class="body_rowg"><%=estDuration%></td>
412
                 <td nowrap class="body_rowg"><%=PrettyDelta(delta, daemonState,pkgName )%></td>
398
                 <td nowrap class="body_rowg"><%=lastChange%></td>
413
                 <td nowrap class="body_rowg">
399
                 <td nowrap class="body_rowg">
414
                    <%
400
                    <%
415
                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
401
                    If NOT indefinitelyPaused  Then
416
                       If canActionControlInProject("BuildControl") Then
402
                       If canActionControlInProject("BuildControl") Then
417
                          If bActive = "U" Then
403
                          If bActive = "U" Then
418
                          ElseIf bActive = "N" Then
404
                          ElseIf bActive = "N" Then
419
                             Call Action_Buttons ( "Daemon Unavailable" )
405
                             Call Action_Buttons ( "Daemon Unavailable" )
420
                          ElseIf daemonState = 0 Then
406
                          ElseIf daemonState = 0 Then
Line 445... Line 431...
445
                    End If
431
                    End If
446
                    %>
432
                    %>
447
                 </td>
433
                 </td>
448
              </tr>
434
              </tr>
449
              <%
435
              <%
450
              rsQry2.Close()
-
 
451
              Set rsQry2 = nothing
-
 
452
              rsQry.MoveNext
436
              rsQry.MoveNext
453
           Loop
437
           Loop
454
           %>
438
           %>
455
           <tr>
439
           <tr>
456
             <td nowrap background="images/bg_table_col.gif" class="body_col" colspan=7>
440
             <td nowrap background="images/bg_table_col.gif" class="body_col" colspan=7>
Line 487... Line 471...
487
     <%=objPMod.ComposeHiddenTags()%>
471
     <%=objPMod.ComposeHiddenTags()%>
488
  </tr>
472
  </tr>
489
</table>
473
</table>
490
</td>
474
</td>
491
</table>
475
</table>
492
 
-
 
493
<%
476
<%
494
End Sub
477
End Sub
495
'-------------------------------------------------
478
'-------------------------------------------------
496
'
479
'
497
Sub ShowDaemonInstructions
480
Sub ShowDaemonInstructions