Subversion Repositories DevTools

Rev

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

Rev 6676 Rev 6784
Line 85... Line 85...
85
    Call objFormComponent.FormStart()
85
    Call objFormComponent.FormStart()
86
    %>
86
    %>
87
    <table class="embedded_table" style="margin-bottom:20px">
87
    <table class="embedded_table" style="margin-bottom:20px">
88
      <tr>
88
      <tr>
89
         <td>
89
         <td>
90
            <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
-
 
91
                <tr>
-
 
92
                    <td nowrap class="form_ttl" align="left">BUILD STATUS INFORMATION</td>
-
 
93
                </tr>
-
 
94
            </table>
-
 
95
                <tr>
90
                <tr>
96
                    <td>
91
                    <td>
97
                        <table class="rounded_box embedded_table">
92
                        <table class="rounded_box embedded_table">
-
 
93
                          <caption nowrap class="form_ttl tleft">BUILD STATUS INFORMATION</caption>
98
                            <tr>
94
                            <tr>
99
                                <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10"></td>
95
                                <td>
100
                                <td bgcolor="#FFFFFF" valign="top">
96
                                    <div class='round_box_pad'>
101
                                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
97
                                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
102
                                <!--#include file="messages/_msg_inline.asp"-->
98
                                <!--#include file="messages/_msg_inline.asp"-->
103
                                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
99
                                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
104
                                <table width="100%" border="0" cellspacing="2" cellpadding="0">
100
                                <table width="100%" border="0" cellspacing="2" cellpadding="0">
105
                                    <tr>
101
                                    <tr>
Line 118... Line 114...
118
                                       </fieldset>
114
                                       </fieldset>
119
                                       </td>
115
                                       </td>
120
                                    </tr>
116
                                    </tr>
121
 
117
 
122
                                   <tr>
118
                                   <tr>
123
                                      <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
119
                                      <td class="err_alert body_lcol"><b>Directly</b></td>
124
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
120
                                      <td valign="top" nowrap class="body_lcol">Package</td>
125
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
121
                                      <td valign="top" nowrap class="body_lcol">Version</td>
126
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Root Cause</td>
122
                                      <td valign="top" nowrap class="body_lcol">Root Cause</td>
127
                                   </tr>
123
                                   </tr>
128
                                   <tr>
124
                                   <tr>
129
               <%
125
               <%
130
               query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description, dnr.root_pv_id"&_
126
               query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description, dnr.root_pv_id"&_
131
                              "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
127
                              "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
Line 174... Line 170...
174
                    checkBoxClass = ""    
170
                    checkBoxClass = ""    
175
                End If
171
                End If
176
 
172
 
177
               %>
173
               %>
178
                  <tr class="<%=rowClass%>">
174
                  <tr class="<%=rowClass%>">
179
                     <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
175
                     <td colspan="5" class=body_line></td>
180
                  </tr>
176
                  </tr>
181
                  <tr class="<%=rowClass%>">
177
                  <tr class="<%=rowClass%>">
182
                     <td nowrap width="1%">
178
                     <td nowrap width="1%">
183
                        <a name="PkgName_<%=rsQry("pkg_name")%>">
179
                        <a name="PkgName_<%=rsQry("pkg_name")%>">
184
                        <input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
180
                        <input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
Line 206... Line 202...
206
               ' -- DISPLAY INDIRECTLY EXCLUDED PACKAGES
202
               ' -- DISPLAY INDIRECTLY EXCLUDED PACKAGES
207
               '--- Render rows ---
203
               '--- Render rows ---
208
                If rsQry2.recordCount > 0    Then 
204
                If rsQry2.recordCount > 0    Then 
209
                %>
205
                %>
210
                  <tr>
206
                  <tr>
211
                  <td background="images/bg_table_col.gif" class="err_alert"><b>Indirectly</b></td>
207
                  <td class="body_lcol err_alert"><b>Indirectly</b></td>
212
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
208
                  <td valign="top" nowrap class="body_lcol">Package</td>
213
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
209
                  <td valign="top" nowrap class="body_lcol">Version</td>
214
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Root Cause Package</td>
210
                  <td valign="top" nowrap class="body_lcol">Root Cause Package</td>
215
                  </tr>
211
                  </tr>
216
               <%
212
               <%
217
                End If
213
                End If
218
               Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
214
               Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
219
                  <tr class="rootIndirect">
215
                  <tr class="rootIndirect">
220
                     <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
216
                     <td colspan="5" class=body_line></td>
221
                  </tr>
217
                  </tr>
222
                  <tr class="rootIndirect">
218
                  <tr class="rootIndirect">
223
 
219
 
224
                     <td nowrap><input type="checkbox" value=0 disabled=true name="notused"></td>
220
                     <td nowrap><input type="checkbox" value=0 disabled=true name="notused"></td>
225
                     <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>
221
                     <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>
Line 228... Line 224...
228
                  </tr>
224
                  </tr>
229
                  <%
225
                  <%
230
                  rsQry2.MoveNext
226
                  rsQry2.MoveNext
231
               Loop%>
227
               Loop%>
232
            </table>
228
            </table>
-
 
229
             <table class="full_table form_bg_light">
-
 
230
                 <tr>
-
 
231
                     <td><input id="toggleDirect" 
-
 
232
                                <%=Iif(rsQry.RecordCount > 0, "", " disabled ")%>
-
 
233
                                type="checkbox" title="Toggle all visible directly excluded packages"></td>
-
 
234
                     <td align="right">
-
 
235
                        <%
-
 
236
                        Response.Write(objFormComponent.SubmitButton ( "Include", "name='IncludeSubmit' id='IncludeSubmit' class='form_btn' disabled style='color:silver' onClick=""return vixConfirm('Are you sure you want to include these packages for building?',{title:'Include Packages', post : 'FormName'})""" ))
-
 
237
                        Response.Write(objPMod.ComposeHiddenTags())
-
 
238
                        %>
-
 
239
                     </td>
-
 
240
                 </tr>
-
 
241
             </table>
-
 
242
            </div>
233
         </td>
243
         </td>
234
         <td background="images/lbox_bgside_white.gif">&nbsp;</td>
-
 
235
      </tr>
-
 
236
      <tr background="images/bg_action_norm.gif">
-
 
237
         <td></td>
-
 
238
         <td>
-
 
239
         <table class="full_table">
-
 
240
             <tr>
-
 
241
                 <td><input id="toggleDirect" 
-
 
242
                            <%=Iif(rsQry.RecordCount > 0, "", " disabled ")%>
-
 
243
                            type="checkbox" title="Toggle all visible directly excluded packages"></td>
-
 
244
                 <td align="right">
-
 
245
                    <%
-
 
246
                    Response.Write(objFormComponent.SubmitButton ( "Include", "name='IncludeSubmit' id='IncludeSubmit' class='form_btn' disabled style='color:silver' onClick=""return vixConfirm('Are you sure you want to include these packages for building?',{title:'Include Packages', post : 'FormName'})""" ))
-
 
247
                    Response.Write(objPMod.ComposeHiddenTags())
-
 
248
                    %>
-
 
249
                 </td>
-
 
250
             </tr>
-
 
251
         </table>
-
 
252
         </td>
-
 
253
         <td background="images/bg_action_norm.gif"><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
-
 
254
      </tr>
244
      </tr>
255
    </table>
245
    </table>
256
    </td>
246
    </td>
257
    </tr>
247
    </tr>
258
    </table>
248
    </table>
Line 270... Line 260...
270
'-------------------------------------------------
260
'-------------------------------------------------
271
' 
261
' 
272
Sub ShowDaemonStatus
262
Sub ShowDaemonStatus
273
%>
263
%>
274
<table class="embedded_table" style="margin-bottom:20px">
264
<table class="embedded_table" style="margin-bottom:20px">
275
  <tr>
265
    <tr>
276
     <td>
266
        <td>
-
 
267
            <table class="rounded_box embedded_table">
-
 
268
                <caption>
277
        <table width="95%" align="center" class="embedded_table">
269
                    <table align="center" class="full_table">
278
           <tr>
270
                       <tr>
279
              <td nowrap class="form_ttl"><p>DAEMON STATUS INFORMATION</p>
271
                          <td nowrap class="form_ttl"><p>DAEMON STATUS INFORMATION</p>
280
              </td>
272
                          </td>
281
              <td  valign="bottom" class="body_rowg">
273
                          <td  valign="bottom" class="body_rowg">
282
                Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
274
                            Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
283
              </td>
275
                          </td>
284
              <td align="right" valign="bottom">
276
                          <td align="right" valign="bottom">
285
                <a class="txt_linked" href="<%=scriptName%>?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a>
277
                            <a class="txt_linked" href="<%=scriptName%>?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a>
-
 
278
                          </td>
-
 
279
                       </tr>
-
 
280
                    </table>
-
 
281
                </caption>
-
 
282
            <tr>
-
 
283
                <td>
-
 
284
                    <div class='round_box_pad'>
-
 
285
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
286
                        <!--#include file="messages/_msg_inline.asp"-->
-
 
287
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
288
                        <br>
-
 
289
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
-
 
290
                           <%
-
 
291
                           Dim bInactiveMachine : bInactiveMachine = false
-
 
292
                           Dim indefinitelyPaused : indefinitelyPaused = Indefinitely_Paused()
-
 
293
                           ' Insert a warning into the page if the build daemons are indefintely paused.
-
 
294
                           If indefinitelyPaused Then %>
-
 
295
                              <tr>
-
 
296
                                 <span class='err_alert'>
-
 
297
                                    <font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
-
 
298
                                 </span>
-
 
299
                              </tr>
-
 
300
                           <%End If
-
 
301
                           %>
-
 
302
                           <td width="9%" valign="top"></td>
-
 
303
                           <tr>
-
 
304
                              <td valign="top" nowrap class="body_lcol">Daemon Host</td>
-
 
305
                              <td valign="top" nowrap class="body_lcol">Machine Type</td>
-
 
306
                              <td valign="top" nowrap class="body_lcol">Mode</td>
-
 
307
                              <td valign="top" nowrap class="body_lcol">Run Level</td>
-
 
308
                              <td valign="top" nowrap class="body_lcol">Current Package</td>
-
 
309
                              <td valign="top" nowrap class="body_lcol">Est Duration<%=Quick_Help("h_buildtime")%></td>
-
 
310
                              <td valign="top" nowrap class="body_lcol">Last Change<%=Quick_Help("h_lastchange")%></td>
-
 
311
                              <td valign="top" nowrap class="body_lcol">Control State</td>
-
 
312
                           </tr>
-
 
313
                           <%
-
 
314
                           ' Get Build Information for this Release
-
 
315
                           query_string = _
-
 
316
                                "SELECT rc.rcon_id, display_name, gbe_value, daemon_mode, NVL(ACTIVE, 'U') AS ACTIVE," &_
-
 
317
                                "       rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) AS delta," &_
-
 
318
                                "       pk.pkg_name, rl.current_pv_id, pv.build_time, TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) AS build_delta" &_
-
 
319
                                " FROM release_config rc," &_
-
 
320
                                "   gbe_machtype gm," &_
-
 
321
                                "   build_machine_config bm," &_
-
 
322
                                "   run_level rl," &_
-
 
323
                                "   packages pk," &_
-
 
324
                                "   package_versions pv" &_
-
 
325
                                " WHERE rc.rtag_id     = " & parRtagId &_
-
 
326
                                "  AND gm.gbe_id        = rc.gbe_id" &_
-
 
327
                                "  AND rl.rcon_id       = rc.rcon_id" &_
-
 
328
                                "  AND rc.bmcon_id      =bm.bmcon_id(+)" &_
-
 
329
                                "  AND pk.pkg_id(+)     = rl.current_pkg_id_being_built" &_
-
 
330
                                "  AND rl.current_pv_id = pv.pv_id(+)" &_
-
 
331
                                " ORDER BY bm.display_name, rc.rcon_id"
-
 
332
 
-
 
333
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
-
 
334
 
-
 
335
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
336
                              Dim pkgName
-
 
337
                              Dim pkgPvid
-
 
338
                              Dim pkgBuildTime
-
 
339
                              Dim currentRunLevel
-
 
340
                              Dim daemonState
-
 
341
                              Dim delta
-
 
342
                              Dim PkgBuildDelta
-
 
343
                              Dim pkgId
-
 
344
                              Dim bActive
-
 
345
                              Dim estDuration
-
 
346
                              Dim daemonMode 
-
 
347
                              Dim lastChange
-
 
348
 
-
 
349
                              rcon_id = rsQry("rcon_id")
-
 
350
                              ' = rsQry("display_name")
-
 
351
                              ' = rsQry("gbe_value")
-
 
352
                              daemonMode = rsQry("daemon_mode")
-
 
353
                              bActive = rsQry("ACTIVE")
-
 
354
                              daemonState = rsQry("pause")
-
 
355
                              currentRunLevel = rsQry("current_run_level")
-
 
356
                              pkgId = rsQry("current_pkg_id_being_built")
-
 
357
                              delta = rsQry("delta")
-
 
358
                              pkgName = rsQry("pkg_name")
-
 
359
                              pkgPvid = rsQry("current_pv_id")
-
 
360
                              pkgBuildTime = rsQry("build_time")
-
 
361
                              PkgBuildDelta = rsQry("build_delta")
-
 
362
                              lastChange = NULL
-
 
363
                              bInactiveMachine = FALSE
-
 
364
                              estDuration = NULL
-
 
365
 
-
 
366
                              If bActive = "N" Then bInactiveMachine = true
-
 
367
                              If IsNull(daemonState) Then daemonState = 0
-
 
368
                              If daemonState = "2" Then pkgId = Null
-
 
369
                              If IsNull(currentRunLevel) Then currentRunLevel = -1
-
 
370
                              If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
-
 
371
                              If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
-
 
372
 
-
 
373
                              ' --- Now render HTML for this release configuration ---
-
 
374
                              %>
-
 
375
                              <tr>
-
 
376
                                 <td colspan="8" class=body_line></td>
-
 
377
                              </tr>
-
 
378
                              <tr>
-
 
379
                                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
-
 
380
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
-
 
381
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(daemonMode)%></td>
-
 
382
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
-
 
383
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, daemonState, bActive)%></td>
-
 
384
                                 <td nowrap class="body_rowg"><%=estDuration%></td>
-
 
385
                                 <td nowrap class="body_rowg"><%=lastChange%></td>
-
 
386
                                 <td nowrap class="body_rowg">
-
 
387
                                    <%
-
 
388
                                    If NOT indefinitelyPaused  Then
-
 
389
                                       If canActionControlInProject("BuildControl") Then
-
 
390
                                          If bActive = "U" Then
-
 
391
                                          ElseIf bActive = "N" Then
-
 
392
                                             Call Action_Buttons ( "Daemon Unavailable" )
-
 
393
                                          ElseIf daemonState = 0 Then
-
 
394
                                             Call Action_Buttons ( "Daemon Pause" )
-
 
395
                                          ElseIf daemonState = 1 Then
-
 
396
                                             Call Action_Buttons ( "Daemon Resume" )
-
 
397
                                          ElseIf daemonState = 2 Then
-
 
398
                                             Call Action_Buttons ( "Daemon Start" )
-
 
399
                                          Else
-
 
400
                                             Call Action_Buttons ( "Daemon Resume" )
-
 
401
                                          End If
-
 
402
                                       Else
-
 
403
                                          If bActive = "U" Then
-
 
404
                                          ElseIf bActive = "N" Then
-
 
405
                                             Call Action_Buttons ( "Daemon Unavailable" )
-
 
406
                                          ElseIf daemonState = 0 Then
-
 
407
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
-
 
408
                                          ElseIf daemonState = 1 Then
-
 
409
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
-
 
410
                                          ElseIf daemonState = 2 Then
-
 
411
                                             Call Action_Buttons ( "Daemon Start Disabled" )
-
 
412
                                          Else
-
 
413
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
-
 
414
                                          End If
-
 
415
                                       End If
-
 
416
                                    Else
-
 
417
                                       %>Unavailable<%
-
 
418
                                    End If
-
 
419
                                    %>
-
 
420
                                 </td>
-
 
421
                              </tr>
-
 
422
                              <%
-
 
423
                              rsQry.MoveNext
-
 
424
                           Loop
-
 
425
                           %>
-
 
426
                           <tr class=form_bg_light>
-
 
427
                             <td nowrap class="body_col" colspan=7>
-
 
428
                             <%If CheckConfigErrors(parRtagId) OR bInactiveMachine Then%><span class="err_alert">&nbsp;Daemon configuration errors detected</span>
-
 
429
                                <a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
-
 
430
                                    <img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
-
 
431
                                </a>
-
 
432
                             <%End If%>
-
 
433
                             </td>
-
 
434
                             <td valign="bottom" nowrap class="body_col">
-
 
435
                             <%
-
 
436
                               If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
-
 
437
                                 If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
-
 
438
                                   Call Action_Buttons ( "Daemon Control All" )
-
 
439
                                 Else 
-
 
440
                                   Call Action_Buttons ( "Daemon Control All Disabled" )
-
 
441
                                 End If
-
 
442
                               Else
-
 
443
                                 %>&nbsp<%
-
 
444
                               End If
-
 
445
                             %>
-
 
446
                             </td>
-
 
447
                           </tr>
-
 
448
                           <%
-
 
449
                             rsQry.Close()
-
 
450
                             Set rsQry = nothing
-
 
451
                           %>
-
 
452
                        </table>
-
 
453
                    </div>
286
              </td>
454
                </td>
287
           </tr>
455
            </tr>
288
        </table>
456
        </table>
289
     </td>
-
 
290
  </tr>
-
 
291
  <tr>
-
 
292
   <td>
-
 
293
   <table class="rounded_box embedded_table">
-
 
294
  <tr>
-
 
295
     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
-
 
296
     <td bgcolor="#FFFFFF" valign="top">
-
 
297
        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
298
        <!--#include file="messages/_msg_inline.asp"-->
-
 
299
        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
300
        <br>
-
 
301
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
-
 
302
           <%
-
 
303
           Dim bInactiveMachine : bInactiveMachine = false
-
 
304
           Dim indefinitelyPaused : indefinitelyPaused = Indefinitely_Paused()
-
 
305
           ' Insert a warning into the page if the build daemons are indefintely paused.
-
 
306
           If indefinitelyPaused Then %>
-
 
307
              <tr>
-
 
308
                 <span class='err_alert'>
-
 
309
                    <font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
-
 
310
                 </span>
-
 
311
              </tr>
-
 
312
           <%End If
-
 
313
           %>
-
 
314
           <td width="9%" valign="top"></td>
-
 
315
           <tr>
-
 
316
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
-
 
317
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Machine Type</td>
-
 
318
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
-
 
319
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
-
 
320
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
-
 
321
              <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">Last Change<%=Quick_Help("h_lastchange")%></td>
-
 
323
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Control State</td>
-
 
324
           </tr>
-
 
325
           <%
-
 
326
           ' Get Build Information for this Release
-
 
327
           query_string = _
-
 
328
                "SELECT rc.rcon_id, display_name, gbe_value, daemon_mode, NVL(ACTIVE, 'U') AS ACTIVE," &_
-
 
329
                "       rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) AS delta," &_
-
 
330
                "       pk.pkg_name, rl.current_pv_id, pv.build_time, TRUNC (86400*(SYSDATE - rl.LAST_BUILD)) AS build_delta" &_
-
 
331
                " FROM release_config rc," &_
-
 
332
                "   gbe_machtype gm," &_
-
 
333
                "   build_machine_config bm," &_
-
 
334
                "   run_level rl," &_
-
 
335
                "   packages pk," &_
-
 
336
                "   package_versions pv" &_
-
 
337
                " WHERE rc.rtag_id     = " & parRtagId &_
-
 
338
                "  AND gm.gbe_id        = rc.gbe_id" &_
-
 
339
                "  AND rl.rcon_id       = rc.rcon_id" &_
-
 
340
                "  AND rc.bmcon_id      =bm.bmcon_id(+)" &_
-
 
341
                "  AND pk.pkg_id(+)     = rl.current_pkg_id_being_built" &_
-
 
342
                "  AND rl.current_pv_id = pv.pv_id(+)" &_
-
 
343
                " ORDER BY bm.display_name, rc.rcon_id"
-
 
344
 
-
 
345
           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
-
 
346
 
-
 
347
           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
348
              Dim pkgName
-
 
349
              Dim pkgPvid
-
 
350
              Dim pkgBuildTime
-
 
351
              Dim currentRunLevel
-
 
352
              Dim daemonState
-
 
353
              Dim delta
-
 
354
              Dim PkgBuildDelta
-
 
355
              Dim pkgId
-
 
356
              Dim bActive
-
 
357
              Dim estDuration
-
 
358
              Dim daemonMode 
-
 
359
              Dim lastChange
-
 
360
 
-
 
361
              rcon_id = rsQry("rcon_id")
-
 
362
              ' = rsQry("display_name")
-
 
363
              ' = rsQry("gbe_value")
-
 
364
              daemonMode = rsQry("daemon_mode")
-
 
365
              bActive = rsQry("ACTIVE")
-
 
366
              daemonState = rsQry("pause")
-
 
367
              currentRunLevel = rsQry("current_run_level")
-
 
368
              pkgId = rsQry("current_pkg_id_being_built")
-
 
369
              delta = rsQry("delta")
-
 
370
              pkgName = rsQry("pkg_name")
-
 
371
              pkgPvid = rsQry("current_pv_id")
-
 
372
              pkgBuildTime = rsQry("build_time")
-
 
373
              PkgBuildDelta = rsQry("build_delta")
-
 
374
              lastChange = NULL
-
 
375
              bInactiveMachine = FALSE
-
 
376
              estDuration = NULL
-
 
377
 
-
 
378
              If bActive = "N" Then bInactiveMachine = true
-
 
379
              If IsNull(daemonState) Then daemonState = 0
-
 
380
              If daemonState = "2" Then pkgId = Null
-
 
381
              If IsNull(currentRunLevel) Then currentRunLevel = -1
-
 
382
              If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
-
 
383
              If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
-
 
384
 
-
 
385
              ' --- Now render HTML for this release configuration ---
-
 
386
              %>
-
 
387
              <tr>
-
 
388
                 <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
389
              </tr>
-
 
390
              <tr>
-
 
391
                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
-
 
392
                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
-
 
393
                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(daemonMode)%></td>
-
 
394
                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
-
 
395
                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, daemonState, bActive)%></td>
-
 
396
                 <td nowrap class="body_rowg"><%=estDuration%></td>
-
 
397
                 <td nowrap class="body_rowg"><%=lastChange%></td>
-
 
398
                 <td nowrap class="body_rowg">
-
 
399
                    <%
-
 
400
                    If NOT indefinitelyPaused  Then
-
 
401
                       If canActionControlInProject("BuildControl") Then
-
 
402
                          If bActive = "U" Then
-
 
403
                          ElseIf bActive = "N" Then
-
 
404
                             Call Action_Buttons ( "Daemon Unavailable" )
-
 
405
                          ElseIf daemonState = 0 Then
-
 
406
                             Call Action_Buttons ( "Daemon Pause" )
-
 
407
                          ElseIf daemonState = 1 Then
-
 
408
                             Call Action_Buttons ( "Daemon Resume" )
-
 
409
                          ElseIf daemonState = 2 Then
-
 
410
                             Call Action_Buttons ( "Daemon Start" )
-
 
411
                          Else
-
 
412
                             Call Action_Buttons ( "Daemon Resume" )
-
 
413
                          End If
-
 
414
                       Else
-
 
415
                          If bActive = "U" Then
-
 
416
                          ElseIf bActive = "N" Then
-
 
417
                             Call Action_Buttons ( "Daemon Unavailable" )
-
 
418
                          ElseIf daemonState = 0 Then
-
 
419
                             Call Action_Buttons ( "Daemon Pause Disabled" )
-
 
420
                          ElseIf daemonState = 1 Then
-
 
421
                             Call Action_Buttons ( "Daemon Resume Disabled" )
-
 
422
                          ElseIf daemonState = 2 Then
-
 
423
                             Call Action_Buttons ( "Daemon Start Disabled" )
-
 
424
                          Else
-
 
425
                             Call Action_Buttons ( "Daemon Resume Disabled" )
-
 
426
                          End If
-
 
427
                       End If
-
 
428
                    Else
-
 
429
                       %>Unavailable<%
-
 
430
                    End If
-
 
431
                    %>
-
 
432
                 </td>
-
 
433
              </tr>
-
 
434
              <%
-
 
435
              rsQry.MoveNext
-
 
436
           Loop
-
 
437
           %>
-
 
438
           <tr>
-
 
439
             <td nowrap background="images/bg_table_col.gif" class="body_col" colspan=7>
-
 
440
             <%If CheckConfigErrors(parRtagId) OR bInactiveMachine Then%><span class="err_alert">&nbsp;Daemon configuration errors detected</span>
-
 
441
                <a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
-
 
442
                    <img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
-
 
443
                </a>
-
 
444
             <%End If%>
-
 
445
             </td>
-
 
446
             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
-
 
447
             <%
-
 
448
               If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
-
 
449
                 If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
-
 
450
                   Call Action_Buttons ( "Daemon Control All" )
-
 
451
                 Else 
-
 
452
                   Call Action_Buttons ( "Daemon Control All Disabled" )
-
 
453
                 End If
-
 
454
               Else
-
 
455
                 %>&nbsp<%
-
 
456
               End If
-
 
457
             %>
-
 
458
             </td>
-
 
459
           </tr>
-
 
460
           <%
-
 
461
             rsQry.Close()
-
 
462
             Set rsQry = nothing
-
 
463
           %>
-
 
464
        </table>
-
 
465
     </td>
457
    </td>
466
     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
-
 
467
  </tr>
-
 
468
  <tr>
-
 
469
     <input type="hidden" name="action" value="true">
-
 
470
     <%=objPMod.ComposeHiddenTags()%>
-
 
471
  </tr>
-
 
472
</table>
-
 
473
</td>
-
 
474
</table>
458
</table>
475
<%
459
<%
476
End Sub
460
End Sub
477
'-------------------------------------------------
461
'-------------------------------------------------
478
'
462
'
479
Sub ShowDaemonInstructions
463
Sub ShowDaemonInstructions
480
%>
464
%>
481
<!-- Daemon Instructions Display -->
465
<!-- Daemon Instructions Display -->
482
<table class="embedded_table" style="margin-bottom:10px">
466
<table class="embedded_table" style="margin-bottom:10px">
483
  <tr>
467
    <tr>
484
     <td>
468
        <td>
485
        <table align="center" width="95%" class="embedded_table">
469
            <table class="rounded_box embedded_table">
486
           <tr>
470
                <caption nowrap class="form_ttl tleft">DAEMON INSTRUCTIONS FOR THIS RELEASE</caption>
487
              <td nowrap class="form_ttl">DAEMON INSTRUCTIONS FOR THIS RELEASE</td>
471
                <tr>
488
           </tr>
472
                    <td>
489
        </table>
473
                        <div class='round_box_pad'>
490
     </td>
474
                            <table width="100%" border="0" cellspacing="2" cellpadding="0">
491
  </tr>
475
                               <tr>
492
  <tr>
476
                                  <td align="left" nowrap class="body_lcol">Operation</td>
493
   <td>
477
                                  <td align="left" nowrap class="body_lcol">Package</td>
494
   <table class="rounded_box embedded_table">
478
                                  <td align="left" nowrap class="body_lcol">Version</td>
495
  <tr>
479
                                  <td align="left" nowrap class="body_lcol">Scheduled Time<%=Quick_Help("SchedTime")%>
496
     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" ></td>
480
                                  <td align="left" nowrap class="body_lcol">Repeat</td>
497
     <td bgcolor="#FFFFFF" valign="top">
481
                                  <td align="left" nowrap class="body_lcol">In Progress</td>
498
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
482
                               </tr>
499
           <tr>
483
                               <%
500
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Operation</td>
484
                               Dim PkgVersion
501
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
485
                               Dim UserName
502
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
486
                               Dim UserEmail
503
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Scheduled Time<%=Quick_Help("SchedTime")%>
487
                               Dim bInProgress
504
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Repeat</td>
488
                               Dim bIsOverdue
505
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">In Progress</td>
489
                               Dim bIsReady
506
           </tr>
490
 
507
           <%
491
                               Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
508
           Dim PkgVersion
492
                                                                      "       OP_CODE,"&_
509
           Dim UserName
493
                                                                      "       RTAG_ID,"&_
510
           Dim UserEmail
494
                                                                      "       PV_ID,"&_
511
           Dim bInProgress
495
                                                                      "       SCHEDULED_DATETIME,"&_
512
           Dim bIsOverdue
496
                                                                      "       REPEAT_SECS,"&_
513
           Dim bIsReady
497
                                                                      "       ADDED_DATETIME,"&_
514
 
498
                                                                      "       USER_ID,"&_
515
           Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
499
                                                                      "       IN_PROGRESS,"&_
516
                                                  "       OP_CODE,"&_
500
                                                                      "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
517
                                                  "       RTAG_ID,"&_
501
                                                                      "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
518
                                                  "       PV_ID,"&_
502
                                                                      "  FROM DAEMON_INSTRUCTIONS "&_
519
                                                  "       SCHEDULED_DATETIME,"&_
503
                                                                      "  WHERE RTAG_ID = "& parRtagId &_
520
                                                  "       REPEAT_SECS,"&_
504
                                                                      "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
521
                                                  "       ADDED_DATETIME,"&_
505
                               While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
522
                                                  "       USER_ID,"&_
506
 
523
                                                  "       IN_PROGRESS,"&_
507
                                  If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
524
                                                  "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
508
                                     bInProgress = False
525
                                                  "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
509
                                  Else
526
                                                  "  FROM DAEMON_INSTRUCTIONS "&_
510
                                     bInProgress = True
527
                                                  "  WHERE RTAG_ID = "& parRtagId &_
511
                                  End If
528
                                                  "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
512
 
529
           While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
513
                                  ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
530
 
514
                                  If rsQry("OVERDUE") AND NOT bInProgress Then
531
              If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
515
                                     bIsOverdue = True
532
                 bInProgress = False
516
                                  Else
533
              Else
517
                                     bIsOverdue = False
534
                 bInProgress = True
518
                                  End If
535
              End If
519
 
536
 
520
                                  If rsQry("READY") Then
537
              ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
521
                                     bIsReady = True
538
              If rsQry("OVERDUE") AND NOT bInProgress Then
522
                                  Else
539
                 bIsOverdue = True
523
                                     bIsReady = False
540
              Else
524
                                  End If
541
                 bIsOverdue = False
525
 
542
              End If
526
                                  ' Get as much info about the package as we can
543
 
527
                                  Dim PkgId: PkgId = 0
544
              If rsQry("READY") Then
528
                                  Dim PkgName : PkgName = "N/A"
545
                 bIsReady = True
529
                                  If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
546
              Else
530
                                     Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
547
                 bIsReady = False
531
                                  End If
548
              End If
532
                                  %>
549
 
533
                                  <tr>
550
              ' Get as much info about the package as we can
534
                                     <td colspan="6" class=body_line></td>
551
              Dim PkgId: PkgId = 0
535
                                  </tr>
552
              Dim PkgName : PkgName = "N/A"
536
                                  <tr>
553
              If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
537
                                     <td align="left" valign="top" class="body_rowg nowrap">
554
                 Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
538
                                        <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
555
              End If
539
                                     </td>
556
              %>
540
 
557
              <tr>
541
                                     <td align="left" valign="top" class="body_rowg">
558
                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
542
                                        <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
559
              </tr>
543
                                           <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
560
              <tr>
544
                                        <%Else%>
561
                 <td align="left" valign="top" class="body_rowg nowrap">
545
                                           <%=PkgName%>
562
                    <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
546
                                        <%End If%>
563
                 </td>
547
                                     </td>
564
 
548
 
565
                 <td align="left" valign="top" class="body_rowg">
549
                                     <td align="left" valign="top" class="body_rowg">
566
                    <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
550
                                        <%=PkgVersion%>
567
                       <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
551
                                     </td>
568
                    <%Else%>
552
 
569
                       <%=PkgName%>
553
                                     <td align="left" valign="top" class="body_rowg" <%If bIsOverdue Then%>style=color:Red<%Elseif bIsReady Then%>style=color:Green<%End If%>><%=DisplayDateTime(rsQry("SCHEDULED_DATETIME"))%></td>
570
                    <%End If%>
554
 
571
                 </td>
555
                                     <td align="left" valign="top" class="body_rowg"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
572
 
556
 
573
                 <td align="left" valign="top" class="body_rowg">
557
                                     <td align="left" valign="top" class="body_rowg">
574
                    <%=PkgVersion%>
558
                                        <%If bInProgress Then%>
575
                 </td>
559
                                           YES
576
 
560
                                        <%Else%>
577
                 <td align="left" valign="top" class="body_rowg" <%If bIsOverdue Then%>style=color:Red<%Elseif bIsReady Then%>style=color:Green<%End If%>><%=DisplayDateTime(rsQry("SCHEDULED_DATETIME"))%></td>
561
                                           NO
578
 
562
                                        <%End If%>
579
                 <td align="left" valign="top" class="body_rowg"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
563
                                     </td>
580
 
564
                                  </tr>
581
                 <td align="left" valign="top" class="body_rowg">
565
                                  <%
582
                    <%If bInProgress Then%>
566
                                  rsQry.MoveNext()
583
                       YES
567
                               Wend
584
                    <%Else%>
568
                               rsQry.Close()
585
                       NO
569
                               Set rsQry = nothing
586
                    <%End If%>
570
                               %>
587
                 </td>
571
                            </table>
588
              </tr>
572
                        </div>
589
              <%
573
                    </td>
590
              rsQry.MoveNext()
574
                </tr>
591
           Wend
575
            </table>
592
           rsQry.Close()
576
        </td>
593
           Set rsQry = nothing
577
    </tr>
594
           %>
-
 
595
        </table>
-
 
596
     </td>
-
 
597
     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
-
 
598
  </td>
-
 
599
  </tr>
-
 
600
  </table>
-
 
601
  </td>
-
 
602
   </tr>
-
 
603
</table>
578
</table>
604
<%
579
<%
605
End Sub
580
End Sub
606
%>
581
%>
607
<html>
582
<html>