Subversion Repositories DevTools

Rev

Rev 6566 | Rev 6610 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
5623 dpurdie 4
'
5
'  Build Status Information
6
'
5357 dpurdie 7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0  ' always load the page, dont store
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
<!--#include file="common/daemon_instructions.asp"-->
6166 dpurdie 23
<!--#include file="common/common_daemon.asp"-->
6048 dpurdie 24
<% '------------ ACCESS CONTROL ------------------ %>
6181 dpurdie 25
<!--#include file="_access_control_login_optional.asp"-->
6070 dpurdie 26
<!--#include file="_access_control_general.asp"-->
6052 dpurdie 27
<!--#include file="_access_control_action_project.asp"-->
5357 dpurdie 28
<% '------------ Scripts -------------------------- %>
29
<%
30
'------------ Variable Definition -------------
31
Dim objSortHelper
32
Dim rsQry
33
Dim parRtagId
34
Dim query_string
35
Dim rcon_id
36
Dim shref_base
37
'------------ Constants Declaration -----------
38
'------------ Variable Init -------------------
39
parRtagId = Request("rtag_id")
40
objPMod.PersistInQryString("rtag_id")
41
'----------------------------------------------
6545 dpurdie 42
Sub IncludePackages()
5357 dpurdie 43
 
44
   On Error Resume Next
45
   objEH.ErrorRedirect = TRUE
46
   OraDatabase.Parameters.Add "PV_ID_LIST",  Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
47
   OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
48
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
49
 
50
   objEH.TryORA ( OraSession )
6545 dpurdie 51
   OraDatabase.ExecuteSQL "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
5357 dpurdie 52
   objEH.CatchORA ( OraSession )
53
 
54
   OraDatabase.Parameters.Remove "PV_ID_LIST"
55
   OraDatabase.Parameters.Remove "RTAG_ID"
56
   OraDatabase.Parameters.Remove "USER_ID"
57
 
58
End Sub
59
'--------------------------------------------------------------------------------------------------------------------------
60
'------------ RUN BEFORE PAGE RENDER ----------
61
shref_base = "http://" & archive_server & "/devl/abtlog/"
62
 
63
'----------------------------------------------------
64
' --- RUN onPostBack ---
65
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
66
 
67
  If objEH.Finally Then
68
    If Request("action") = "include" Then
6559 dpurdie 69
      Call IncludePackages ()
5357 dpurdie 70
      ' Redirect to the current page so that a refesh will not
71
      ' cause a form re-submit.
5957 dpurdie 72
      Call Destroy_All_Objects
5357 dpurdie 73
      Response.Redirect(ScriptName & "?rtag_id=" & parRtagId)
74
    Else
75
      Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
76
    End If
77
  End If
78
 
79
End If
80
 
81
'----------------------------------------------
6546 dpurdie 82
Sub ShowBuildStatus
83
    <!-- FORM START -->
84
    objFormComponent.FormName = "FormName"
85
    objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
86
    Call objFormComponent.FormStart()
87
    %>
88
    <table class="embedded_table" style="margin-bottom:20px">
89
      <tr>
90
         <td>
91
            <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
92
                <tr>
93
                    <td nowrap class="form_ttl" align="left">BUILD STATUS INFORMATION</td>
94
                </tr>
95
            </table>
96
                <tr>
97
                    <td>
98
                        <table class="rounded_box embedded_table">
99
                            <tr>
6548 dpurdie 100
                                <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10"></td>
6546 dpurdie 101
                                <td bgcolor="#FFFFFF" valign="top">
102
                                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
103
                                <!--#include file="messages/_msg_inline.asp"-->
104
                                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
105
                                <table width="100%" border="0" cellspacing="2" cellpadding="0">
106
                                    <tr>
107
                                        <td colspan=4 class='err_alert'><font size='2'><b>Packages Excluded From Build</b></font></td>
108
                                    </tr>
109
                                    <tr>
110
                                    <td></td>
111
                                    <td  colspan=3 class="body_row">
112
                                       <fieldset class="fset" align="right" style=" border: 1px groove;">
113
                                            Show
114
                                            <input type="checkbox" checked value=0 name="showManual"   id="manualCause"   onClick="toggleDispClass('manualCause',1);">Manual Exclusions
115
                                            <input type="checkbox" checked value=0 name="showCause"    id="rootCause"     onClick="toggleDispClass('rootCause',1);">Config Errors
116
                                            <input type="checkbox" checked value=0 name="showNoEnv"    id="rootNoEnv"     onClick="toggleDispClass('rootNoEnv',1);">Env Errors
117
                                            <input type="checkbox" checked value=0 name="showFile"     id="rootFile"      onClick="toggleDispClass('rootFile',1);">Build Errors
118
                                            <input type="checkbox" checked value=0 name="showIndirect" id="rootIndirect"  onClick="toggleDispClass('rootIndirect',1);">Indirect Exclusions
119
                                       </fieldset>
120
                                       </td>
121
                                    </tr>
122
 
123
                                   <tr>
124
                                      <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
125
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
126
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
127
                                      <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Root Cause</td>
128
                                   </tr>
129
                                   <tr>
130
               <%
131
               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"&_
132
                              "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
133
                              "  where dnr.rtag_id = "& parRtagId &_
134
                              "    and pv.pv_id    = dnr.pv_id"&_
135
                              "    and pkg.pkg_id  = pv.pkg_id"&_
136
                              "    and nvl(dnr.root_pv_id, -1) < 0 " &_
137
                              "  order by pkg_name"
138
               Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
139
               '--- Render rows ---
140
               Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
141
                Dim rowClass
142
                Dim rowData
143
                '
144
                ' Manually excluded packages have no root_cause or root_file or root_pv_id
145
                '
146
                ' root_file, if supplied, indicates a build failure log file exists
147
                ' this should always prevail over the textual root_cause
148
                '
149
                If (IsNull(rsQry("root_file")) AND IsNull(rsQry("root_cause"))) Then
150
                    rowData = "Manually Excluded"
151
                    rowClass = "manualCause"
152
 
153
                ElseIf IsNull(rsQry("root_file")) Then
154
                   rowData = rsQry("root_cause")
155
                   If InStr(rowData, "no build env") Then
156
                       rowClass = "rootNoEnv"
157
                   Else
158
                       rowClass = "rootCause"
159
                   End If
160
 
161
                Else
162
                    rowClass = "rootFile"
163
                    rowData = "<a class=""txt_linked"" title=""" & rsQry("root_file") &_
164
                              " Log file may have expired."" " &_
165
                              "href=""" & shref_base & rsQry("root_file") & """>" &_
166
                              "Build Failure Log File</a>"
167
                End If
168
 
169
                Dim checkBoxData, checkBoxClass
170
                If NiceInt(rsQry("root_pv_id"), -1) = -1   Then
171
                    checkBoxData = ""
172
                    checkBoxClass = "directInclude"
173
                Else
174
                    checkBoxData = "disabled"
175
                    checkBoxClass = ""    
176
                End If
177
 
178
               %>
179
                  <tr class="<%=rowClass%>">
180
                     <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
181
                  </tr>
182
                  <tr class="<%=rowClass%>">
183
                     <td nowrap width="1%">
184
                        <a name="PkgName_<%=rsQry("pkg_name")%>">
185
                        <input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
186
                        </a>
187
                     </td>
188
                     <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>
189
                     <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
190
                     <td nowrap class="body_rowg"><%=rowData%></td>
191
                  </tr>
192
               <%
193
                rsQry.MoveNext
194
               Loop
195
 
196
               query_string = " select pv.pv_id, pkg.pkg_name, pv.pkg_version, qkg.pkg_name, dnr.rtag_id, pv.pv_description"&_
197
                              "   from do_not_ripple dnr, package_versions pv, package_versions qv, packages pkg, packages qkg"&_
198
                              "  where dnr.rtag_id = "& parRtagId &_
199
                              "    and pv.pv_id    = dnr.pv_id"&_
200
                              "    and pkg.pkg_id  = pv.pkg_id"&_
201
                              "    and qv.pv_id    = dnr.root_pv_id"&_
202
                              "    and qkg.pkg_id  = qv.pkg_id"&_
203
                              "    and nvl(dnr.root_pv_id, -1) > 0"&_
204
                              "  order by pkg.pkg_name"
205
               Dim rsQry2
206
               Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
207
               ' -- DISPLAY INDIRECTLY EXCLUDED PACKAGES
208
               '--- Render rows ---
209
                If rsQry2.recordCount > 0    Then 
210
                %>
211
                  <tr>
212
                  <td background="images/bg_table_col.gif" class="err_alert"><b>Indirectly</b></td>
213
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
214
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
215
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Root Cause Package</td>
216
                  </tr>
217
               <%
218
                End If
219
               Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
220
                  <tr class="rootIndirect">
221
                     <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
222
                  </tr>
223
                  <tr class="rootIndirect">
224
 
225
                     <td nowrap><input type="checkbox" value=0 disabled=true name="notused"></td>
226
                     <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>
227
                     <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
228
                     <td nowrap class="body_rowg"><a href="#PkgName_<%=rsQry2(3)%>" style="text-decoration: none;">&raquo;&nbsp;<%=rsQry2(3)%></a></td>
229
                  </tr>
230
                  <%
231
                  rsQry2.MoveNext
232
               Loop%>
233
            </table>
234
         </td>
235
         <td background="images/lbox_bgside_white.gif">&nbsp;</td>
236
      </tr>
237
      <tr background="images/bg_action_norm.gif">
238
         <td></td>
239
         <td>
240
         <table class="full_table">
241
             <tr>
242
                 <td><input id="toggleDirect" 
243
                            <%=Iif(rsQry.RecordCount > 0, "", " disabled ")%>
244
                            type="checkbox" title="Toggle all visible directly excluded packages"></td>
245
                 <td align="right">
246
                    <%
247
                    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'})""" ))
248
                    Response.Write(objPMod.ComposeHiddenTags())
249
                    %>
250
                 </td>
251
             </tr>
252
         </table>
253
         </td>
254
         <td background="images/bg_action_norm.gif"><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
255
      </tr>
256
    </table>
257
    </td>
258
    </tr>
259
    </table>
260
    <!-- ACTION BUTTONS ---------------------------------------------->
261
    <input type="hidden" name="action" value="include">
262
    <!-- ACTION BUTTONS END  ------------------------------------------>
263
    <%Call objFormComponent.FormEnd()%>
264
    <!-- FORM END ----------------------------------------------------->
265
    <%
266
    rsQry.Close()
267
    Set rsQry = nothing
268
    rsQry2.Close()
269
    Set rsQry2 = nothing
270
End Sub
271
'-------------------------------------------------
272
' 
273
Sub ShowDaemonStatus
5357 dpurdie 274
%>
6546 dpurdie 275
<table class="embedded_table" style="margin-bottom:20px">
276
  <tr>
277
     <td>
278
        <table width="95%" align="center" class="embedded_table">
279
           <tr>
280
              <td nowrap class="form_ttl"><p>DAEMON STATUS INFORMATION</p>
281
              </td>
282
              <td  valign="bottom" class="body_rowg">
283
                Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
284
              </td>
285
              <td align="right" valign="bottom">
286
                <a class="txt_linked" href="<%=scriptName%>?rtag_id=<%=parRtagId%>" title="Refresh Page">[Refresh]</a>
287
              </td>
288
           </tr>
289
        </table>
290
     </td>
291
  </tr>
292
  <tr>
293
   <td>
294
   <table class="rounded_box embedded_table">
295
  <tr>
296
     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
297
     <td bgcolor="#FFFFFF" valign="top">
298
        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
299
        <!--#include file="messages/_msg_inline.asp"-->
300
        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
301
        <br>
302
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
303
           <%
304
           Dim bInactiveMachine : bInactiveMachine = false
305
           Dim indefinitelyPaused : indefinitelyPaused = Indefinitely_Paused()
306
           ' Insert a warning into the page if the build daemons are indefintely paused.
307
           If indefinitelyPaused Then %>
308
              <tr>
309
                 <span class='err_alert'>
310
                    <font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
311
                 </span>
312
              </tr>
313
           <%End If
314
           %>
315
           <td width="9%" valign="top"></td>
316
           <tr>
317
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
318
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Machine Type</td>
319
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
320
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
321
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</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>
324
              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Control State</td>
325
           </tr>
326
           <%
6566 dpurdie 327
           ' Get Build Information for this Release
328
           query_string = _
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," &_
334
                "   build_machine_config bm," &_
335
                "   run_level rl," &_
336
                "   packages pk," &_
337
                "   package_versions pv" &_
338
                " WHERE rc.rtag_id     = " & parRtagId &_
339
                "  AND gm.gbe_id        = rc.gbe_id" &_
340
                "  AND rl.rcon_id       = rc.rcon_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(+)" &_
344
                " ORDER BY bm.display_name, rc.rcon_id"
6546 dpurdie 345
 
346
           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
347
 
348
           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
349
              Dim pkgName
350
              Dim pkgPvid
351
              Dim pkgBuildTime
352
              Dim currentRunLevel
353
              Dim daemonState
354
              Dim delta
6566 dpurdie 355
              Dim PkgBuildDelta
6546 dpurdie 356
              Dim pkgId
6566 dpurdie 357
              Dim bActive
358
              Dim estDuration
359
              Dim daemonMode 
360
              Dim lastChange
6546 dpurdie 361
 
6566 dpurdie 362
              rcon_id = rsQry("rcon_id")
363
              ' = rsQry("display_name")
364
              ' = rsQry("gbe_value")
365
              daemonMode = rsQry("daemon_mode")
366
              bActive = rsQry("ACTIVE")
367
              daemonState = rsQry("pause")
368
              currentRunLevel = rsQry("current_run_level")
369
              pkgId = rsQry("current_pkg_id_being_built")
370
              delta = rsQry("delta")
371
              pkgName = rsQry("pkg_name")
372
              pkgPvid = rsQry("current_pv_id")
373
              pkgBuildTime = rsQry("build_time")
374
              PkgBuildDelta = rsQry("build_delta")
375
              lastChange = NULL
376
              bInactiveMachine = FALSE
377
              estDuration = NULL
6546 dpurdie 378
 
6566 dpurdie 379
              If bActive = "N" Then bInactiveMachine = true
380
              If IsNull(daemonState) Then daemonState = 0
381
              If daemonState = "2" Then pkgId = Null
382
              If IsNull(currentRunLevel) Then currentRunLevel = -1
383
              If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
384
              If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
6546 dpurdie 385
 
386
              ' --- Now render HTML for this release configuration ---
387
              %>
388
              <tr>
389
                 <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
390
              </tr>
391
              <tr>
392
                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
393
                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
6566 dpurdie 394
                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(daemonMode)%></td>
6546 dpurdie 395
                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
396
                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, bActive)%></td>
6566 dpurdie 397
                 <td nowrap class="body_rowg"><%=estDuration%></td>
398
                 <td nowrap class="body_rowg"><%=lastChange%></td>
6546 dpurdie 399
                 <td nowrap class="body_rowg">
400
                    <%
6566 dpurdie 401
                    If NOT indefinitelyPaused  Then
6546 dpurdie 402
                       If canActionControlInProject("BuildControl") Then
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" )
408
                          ElseIf daemonState = 1 Then
409
                             Call Action_Buttons ( "Daemon Resume" )
410
                          ElseIf daemonState = 2 Then
411
                             Call Action_Buttons ( "Daemon Start" )
412
                          Else
413
                             Call Action_Buttons ( "Daemon Resume" )
414
                          End If
415
                       Else
416
                          If bActive = "U" Then
417
                          ElseIf bActive = "N" Then
418
                             Call Action_Buttons ( "Daemon Unavailable" )
419
                          ElseIf daemonState = 0 Then
420
                             Call Action_Buttons ( "Daemon Pause Disabled" )
421
                          ElseIf daemonState = 1 Then
422
                             Call Action_Buttons ( "Daemon Resume Disabled" )
423
                          ElseIf daemonState = 2 Then
424
                             Call Action_Buttons ( "Daemon Start Disabled" )
425
                          Else
426
                             Call Action_Buttons ( "Daemon Resume Disabled" )
427
                          End If
428
                       End If
429
                    Else
430
                       %>Unavailable<%
431
                    End If
432
                    %>
433
                 </td>
434
              </tr>
435
              <%
436
              rsQry.MoveNext
437
           Loop
438
           %>
439
           <tr>
440
             <td nowrap background="images/bg_table_col.gif" class="body_col" colspan=7>
441
             <%If CheckConfigErrors(parRtagId) OR bInactiveMachine Then%><span class="err_alert">&nbsp;Daemon configuration errors detected</span>
442
                <a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
443
                    <img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
444
                </a>
445
             <%End If%>
446
             </td>
447
             <td valign="bottom" nowrap background="images/bg_table_col.gif" class="body_col">
448
             <%
449
               If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
450
                 If objAccessControl.UserLogedIn AND canActionControlInProject("BuildControl") Then
451
                   Call Action_Buttons ( "Daemon Control All" )
452
                 Else 
453
                   Call Action_Buttons ( "Daemon Control All Disabled" )
454
                 End If
455
               Else
456
                 %>&nbsp<%
457
               End If
458
             %>
459
             </td>
460
           </tr>
461
           <%
462
             rsQry.Close()
463
             Set rsQry = nothing
464
           %>
465
        </table>
466
     </td>
467
     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
468
  </tr>
469
  <tr>
470
     <input type="hidden" name="action" value="true">
471
     <%=objPMod.ComposeHiddenTags()%>
472
  </tr>
473
</table>
474
</td>
475
</table>
476
<%
477
End Sub
478
'-------------------------------------------------
479
'
480
Sub ShowDaemonInstructions
481
%>
482
<!-- Daemon Instructions Display -->
483
<table class="embedded_table" style="margin-bottom:10px">
484
  <tr>
485
     <td>
486
        <table align="center" width="95%" class="embedded_table">
487
           <tr>
488
              <td nowrap class="form_ttl">DAEMON INSTRUCTIONS FOR THIS RELEASE</td>
489
           </tr>
490
        </table>
491
     </td>
492
  </tr>
493
  <tr>
494
   <td>
495
   <table class="rounded_box embedded_table">
496
  <tr>
497
     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" ></td>
498
     <td bgcolor="#FFFFFF" valign="top">
499
        <table width="100%" border="0" cellspacing="2" cellpadding="0">
500
           <tr>
501
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Operation</td>
502
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
503
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
504
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Scheduled Time<%=Quick_Help("SchedTime")%>
505
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Repeat</td>
506
              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">In Progress</td>
507
           </tr>
508
           <%
509
           Dim PkgVersion
510
           Dim UserName
511
           Dim UserEmail
512
           Dim bInProgress
513
           Dim bIsOverdue
514
           Dim bIsReady
515
 
516
           Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
517
                                                  "       OP_CODE,"&_
518
                                                  "       RTAG_ID,"&_
519
                                                  "       PV_ID,"&_
520
                                                  "       SCHEDULED_DATETIME,"&_
521
                                                  "       REPEAT_SECS,"&_
522
                                                  "       ADDED_DATETIME,"&_
523
                                                  "       USER_ID,"&_
524
                                                  "       IN_PROGRESS,"&_
525
                                                  "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
526
                                                  "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
527
                                                  "  FROM DAEMON_INSTRUCTIONS "&_
528
                                                  "  WHERE RTAG_ID = "& parRtagId &_
529
                                                  "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
530
           While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
531
 
532
              If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
533
                 bInProgress = False
534
              Else
535
                 bInProgress = True
536
              End If
537
 
538
              ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
539
              If rsQry("OVERDUE") AND NOT bInProgress Then
540
                 bIsOverdue = True
541
              Else
542
                 bIsOverdue = False
543
              End If
544
 
545
              If rsQry("READY") Then
546
                 bIsReady = True
547
              Else
548
                 bIsReady = False
549
              End If
550
 
551
              ' Get as much info about the package as we can
552
              Dim PkgId: PkgId = 0
553
              Dim PkgName : PkgName = "N/A"
554
              If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
555
                 Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
556
              End If
557
              %>
558
              <tr>
559
                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
560
              </tr>
561
              <tr>
562
                 <td align="left" valign="top" class="body_rowg nowrap">
563
                    <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
564
                 </td>
565
 
566
                 <td align="left" valign="top" class="body_rowg">
567
                    <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
568
                       <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
569
                    <%Else%>
570
                       <%=PkgName%>
571
                    <%End If%>
572
                 </td>
573
 
574
                 <td align="left" valign="top" class="body_rowg">
575
                    <%=PkgVersion%>
576
                 </td>
577
 
578
                 <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>
579
 
580
                 <td align="left" valign="top" class="body_rowg"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
581
 
582
                 <td align="left" valign="top" class="body_rowg">
583
                    <%If bInProgress Then%>
584
                       YES
585
                    <%Else%>
586
                       NO
587
                    <%End If%>
588
                 </td>
589
              </tr>
590
              <%
591
              rsQry.MoveNext()
592
           Wend
593
           rsQry.Close()
594
           Set rsQry = nothing
595
           %>
596
        </table>
597
     </td>
598
     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
599
  </td>
600
  </tr>
601
  </table>
602
  </td>
603
   </tr>
604
</table>
605
<%
606
End Sub
607
%>
5357 dpurdie 608
<html>
609
   <head>
610
      <title>Release Manager</title>
611
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
612
      <meta http-equiv="Pragma" content="no-cache">
613
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 614
      <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
615
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
616
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 617
      <!--#include file="_jquery_includes.asp"-->
618
      <!-- TIPS -->
619
      <script type="text/javascript" src="scripts/json2.js"></script>
6579 dpurdie 620
      <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
621
      <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 622
      <script language="JavaScript" type="text/JavaScript">
6538 dpurdie 623
      formTips.tips.h_buildtime       = stdTip(300, 'Est. Build Duration', 'Estimated build duration in seconds. Based simply on the last build duration for this package');
624
 
5623 dpurdie 625
      formTips.tips.h_lastchange       = stdTip(300, 'Last Change', 'This is an indication of the time since the daemon interogated the database.' +
626
                                                                  '<p>Short times will be shown as seconds. Longer times will be shown as a time within ' + 
627
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
628
                                                                  );
5357 dpurdie 629
      </script>
6544 dpurdie 630
    <script language="JavaScript" type="text/JavaScript">
631
    $(document).ready(function() {
6545 dpurdie 632
        //
633
        //  Init the check boxes
634
        InitShow();
6546 dpurdie 635
        isChecked('pv_id_list','IncludeSubmit');
6545 dpurdie 636
 
6544 dpurdie 637
        // Attach function to toggle checkbox
638
        // toggle all visible checkboxes
639
         $('#toggleDirect').click(function(){
640
            var state = this.checked;
6545 dpurdie 641
            var list = $('.directInclude:visible:enabled');
6544 dpurdie 642
            list.prop('checked', state);
643
            isChecked('pv_id_list','IncludeSubmit');
644
         });
6545 dpurdie 645
 
646
         $('.directInclude').click(function(){
647
             isChecked('pv_id_list','IncludeSubmit');
648
         });
649
 
6544 dpurdie 650
    });
6545 dpurdie 651
 
652
    function InitShow(e)
653
    {
654
        toggleDispClass('rootCause',0);
655
        toggleDispClass('rootNoEnv',0);
656
        toggleDispClass('rootFile',0);
657
        toggleDispClass('rootIndirect',0);
658
        toggleDispClass('manualCause',0);
659
    }
660
 
661
    function toggleDispClass(cname,flip)
662
    {
663
        var cookieName = 'RELMGR_BUILDSTATUS';
664
        var cv = JSON.parse(getCookie(cookieName));
665
        if (!cv)
666
            cv = new Object;
667
        if (!cv.BuildStatus)
668
            cv.BuildStatus = new Object;
669
 
670
        var state = cv.BuildStatus[cname];
671
        if (state === undefined)
672
            state = true;
673
 
674
        if (flip>0)
675
            state = !state;
676
 
677
        cv.BuildStatus[cname] = state;
678
 
679
        // Reflect the current state in the checkbox
680
        var de = document.getElementById(cname);
681
        if (de)
682
            de.checked = state;
683
 
684
        var elements = new Array();
685
        elements = getElementsByClassName(cname);
686
        for(i in elements ){
687
            if (state) {
688
                elements[i].style.display = "";
689
            }
690
            else {
691
                elements[i].style.display = "none";
692
            }
693
        }
694
        setCookie(cookieName, JSON.stringify(cv), 365 );
695
    }
696
 
6544 dpurdie 697
    </script>
5357 dpurdie 698
      <!-- DROPDOWN MENUS -->
699
      <!--#include file="_menu_def.asp"-->
6579 dpurdie 700
      <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 701
   </head>
6546 dpurdie 702
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
5357 dpurdie 703
      <!-- HEADER -->
704
      <!--#include file="_header.asp"-->
705
      <!-- BODY ---->
6546 dpurdie 706
      <table class="full_table">
5357 dpurdie 707
         <tr>
6546 dpurdie 708
            <td width="146px" class="panel_bg" valign="top">
709
                <%Call BuildMenuPane%>
5357 dpurdie 710
            </td>
711
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
6546 dpurdie 712
                <%Call ShowBuildStatus%>
713
                <%Call ShowDaemonStatus%>
714
                <%Call ShowDaemonInstructions%>
5357 dpurdie 715
            </td>
716
         </tr>
717
         <tr>
6546 dpurdie 718
            <td class="panel_bg" valign="bottom" align="center" height="350">
719
                <img src="images/img_gears.png" vspace="20" hspace="30"></td>
5357 dpurdie 720
         </tr>
721
      </table>
722
      <!-- FOOTER -->
723
      <!--#include file="_footer.asp"-->
724
   </body>
725
</html>
6546 dpurdie 726