Subversion Repositories DevTools

Rev

Rev 6676 | Rev 6786 | 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 rsQry
32
Dim parRtagId
33
Dim query_string
34
Dim rcon_id
35
Dim shref_base
36
'------------ Constants Declaration -----------
37
'------------ Variable Init -------------------
38
parRtagId = Request("rtag_id")
39
objPMod.PersistInQryString("rtag_id")
40
'----------------------------------------------
6545 dpurdie 41
Sub IncludePackages()
5357 dpurdie 42
 
43
   On Error Resume Next
44
   objEH.ErrorRedirect = TRUE
45
   OraDatabase.Parameters.Add "PV_ID_LIST",  Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
46
   OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
47
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
48
 
49
   objEH.TryORA ( OraSession )
6545 dpurdie 50
   OraDatabase.ExecuteSQL "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
5357 dpurdie 51
   objEH.CatchORA ( OraSession )
52
 
53
   OraDatabase.Parameters.Remove "PV_ID_LIST"
54
   OraDatabase.Parameters.Remove "RTAG_ID"
55
   OraDatabase.Parameters.Remove "USER_ID"
56
 
57
End Sub
58
'--------------------------------------------------------------------------------------------------------------------------
59
'------------ RUN BEFORE PAGE RENDER ----------
60
shref_base = "http://" & archive_server & "/devl/abtlog/"
61
 
62
'----------------------------------------------------
63
' --- RUN onPostBack ---
64
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
65
 
66
  If objEH.Finally Then
67
    If Request("action") = "include" Then
6559 dpurdie 68
      Call IncludePackages ()
5357 dpurdie 69
      ' Redirect to the current page so that a refesh will not
70
      ' cause a form re-submit.
5957 dpurdie 71
      Call Destroy_All_Objects
5357 dpurdie 72
      Response.Redirect(ScriptName & "?rtag_id=" & parRtagId)
73
    Else
74
      Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
75
    End If
76
  End If
77
 
78
End If
79
 
80
'----------------------------------------------
6546 dpurdie 81
Sub ShowBuildStatus
82
    <!-- FORM START -->
83
    objFormComponent.FormName = "FormName"
84
    objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
85
    Call objFormComponent.FormStart()
86
    %>
87
    <table class="embedded_table" style="margin-bottom:20px">
88
      <tr>
89
         <td>
90
                <tr>
91
                    <td>
92
                        <table class="rounded_box embedded_table">
6784 dpurdie 93
                          <caption nowrap class="form_ttl tleft">BUILD STATUS INFORMATION</caption>
6546 dpurdie 94
                            <tr>
6784 dpurdie 95
                                <td>
96
                                    <div class='round_box_pad'>
6546 dpurdie 97
                                <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
98
                                <!--#include file="messages/_msg_inline.asp"-->
99
                                <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
100
                                <table width="100%" border="0" cellspacing="2" cellpadding="0">
101
                                    <tr>
102
                                        <td colspan=4 class='err_alert'><font size='2'><b>Packages Excluded From Build</b></font></td>
103
                                    </tr>
104
                                    <tr>
105
                                    <td></td>
106
                                    <td  colspan=3 class="body_row">
107
                                       <fieldset class="fset" align="right" style=" border: 1px groove;">
108
                                            Show
109
                                            <input type="checkbox" checked value=0 name="showManual"   id="manualCause"   onClick="toggleDispClass('manualCause',1);">Manual Exclusions
110
                                            <input type="checkbox" checked value=0 name="showCause"    id="rootCause"     onClick="toggleDispClass('rootCause',1);">Config Errors
111
                                            <input type="checkbox" checked value=0 name="showNoEnv"    id="rootNoEnv"     onClick="toggleDispClass('rootNoEnv',1);">Env Errors
112
                                            <input type="checkbox" checked value=0 name="showFile"     id="rootFile"      onClick="toggleDispClass('rootFile',1);">Build Errors
113
                                            <input type="checkbox" checked value=0 name="showIndirect" id="rootIndirect"  onClick="toggleDispClass('rootIndirect',1);">Indirect Exclusions
114
                                       </fieldset>
115
                                       </td>
116
                                    </tr>
117
 
118
                                   <tr>
6784 dpurdie 119
                                      <td class="err_alert body_lcol"><b>Directly</b></td>
120
                                      <td valign="top" nowrap class="body_lcol">Package</td>
121
                                      <td valign="top" nowrap class="body_lcol">Version</td>
122
                                      <td valign="top" nowrap class="body_lcol">Root Cause</td>
6546 dpurdie 123
                                   </tr>
124
                                   <tr>
125
               <%
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"&_
127
                              "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
128
                              "  where dnr.rtag_id = "& parRtagId &_
129
                              "    and pv.pv_id    = dnr.pv_id"&_
130
                              "    and pkg.pkg_id  = pv.pkg_id"&_
131
                              "    and nvl(dnr.root_pv_id, -1) < 0 " &_
132
                              "  order by pkg_name"
133
               Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
134
               '--- Render rows ---
135
               Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
136
                Dim rowClass
137
                Dim rowData
138
                '
139
                ' Manually excluded packages have no root_cause or root_file or root_pv_id
140
                '
141
                ' root_file, if supplied, indicates a build failure log file exists
142
                ' this should always prevail over the textual root_cause
143
                '
144
                If (IsNull(rsQry("root_file")) AND IsNull(rsQry("root_cause"))) Then
145
                    rowData = "Manually Excluded"
146
                    rowClass = "manualCause"
147
 
148
                ElseIf IsNull(rsQry("root_file")) Then
149
                   rowData = rsQry("root_cause")
150
                   If InStr(rowData, "no build env") Then
151
                       rowClass = "rootNoEnv"
152
                   Else
153
                       rowClass = "rootCause"
154
                   End If
155
 
156
                Else
157
                    rowClass = "rootFile"
158
                    rowData = "<a class=""txt_linked"" title=""" & rsQry("root_file") &_
159
                              " Log file may have expired."" " &_
160
                              "href=""" & shref_base & rsQry("root_file") & """>" &_
161
                              "Build Failure Log File</a>"
162
                End If
163
 
164
                Dim checkBoxData, checkBoxClass
165
                If NiceInt(rsQry("root_pv_id"), -1) = -1   Then
166
                    checkBoxData = ""
167
                    checkBoxClass = "directInclude"
168
                Else
169
                    checkBoxData = "disabled"
170
                    checkBoxClass = ""    
171
                End If
172
 
173
               %>
174
                  <tr class="<%=rowClass%>">
6784 dpurdie 175
                     <td colspan="5" class=body_line></td>
6546 dpurdie 176
                  </tr>
177
                  <tr class="<%=rowClass%>">
178
                     <td nowrap width="1%">
179
                        <a name="PkgName_<%=rsQry("pkg_name")%>">
180
                        <input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
181
                        </a>
182
                     </td>
183
                     <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>
184
                     <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
185
                     <td nowrap class="body_rowg"><%=rowData%></td>
186
                  </tr>
187
               <%
188
                rsQry.MoveNext
189
               Loop
190
 
191
               query_string = " select pv.pv_id, pkg.pkg_name, pv.pkg_version, qkg.pkg_name, dnr.rtag_id, pv.pv_description"&_
192
                              "   from do_not_ripple dnr, package_versions pv, package_versions qv, packages pkg, packages qkg"&_
193
                              "  where dnr.rtag_id = "& parRtagId &_
194
                              "    and pv.pv_id    = dnr.pv_id"&_
195
                              "    and pkg.pkg_id  = pv.pkg_id"&_
196
                              "    and qv.pv_id    = dnr.root_pv_id"&_
197
                              "    and qkg.pkg_id  = qv.pkg_id"&_
198
                              "    and nvl(dnr.root_pv_id, -1) > 0"&_
199
                              "  order by pkg.pkg_name"
200
               Dim rsQry2
201
               Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
202
               ' -- DISPLAY INDIRECTLY EXCLUDED PACKAGES
203
               '--- Render rows ---
204
                If rsQry2.recordCount > 0    Then 
205
                %>
206
                  <tr>
6784 dpurdie 207
                  <td class="body_lcol err_alert"><b>Indirectly</b></td>
208
                  <td valign="top" nowrap class="body_lcol">Package</td>
209
                  <td valign="top" nowrap class="body_lcol">Version</td>
210
                  <td valign="top" nowrap class="body_lcol">Root Cause Package</td>
6546 dpurdie 211
                  </tr>
212
               <%
213
                End If
214
               Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
215
                  <tr class="rootIndirect">
6784 dpurdie 216
                     <td colspan="5" class=body_line></td>
6546 dpurdie 217
                  </tr>
218
                  <tr class="rootIndirect">
219
 
220
                     <td nowrap><input type="checkbox" value=0 disabled=true name="notused"></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>
222
                     <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
223
                     <td nowrap class="body_rowg"><a href="#PkgName_<%=rsQry2(3)%>" style="text-decoration: none;">&raquo;&nbsp;<%=rsQry2(3)%></a></td>
224
                  </tr>
225
                  <%
226
                  rsQry2.MoveNext
227
               Loop%>
228
            </table>
6784 dpurdie 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>
6546 dpurdie 243
         </td>
244
      </tr>
245
    </table>
246
    </td>
247
    </tr>
248
    </table>
249
    <!-- ACTION BUTTONS ---------------------------------------------->
250
    <input type="hidden" name="action" value="include">
251
    <!-- ACTION BUTTONS END  ------------------------------------------>
252
    <%Call objFormComponent.FormEnd()%>
253
    <!-- FORM END ----------------------------------------------------->
254
    <%
255
    rsQry.Close()
256
    Set rsQry = nothing
257
    rsQry2.Close()
258
    Set rsQry2 = nothing
259
End Sub
260
'-------------------------------------------------
261
' 
262
Sub ShowDaemonStatus
5357 dpurdie 263
%>
6546 dpurdie 264
<table class="embedded_table" style="margin-bottom:20px">
6784 dpurdie 265
    <tr>
266
        <td>
267
            <table class="rounded_box embedded_table">
268
                <caption>
269
                    <table align="center" class="full_table">
270
                       <tr>
271
                          <td nowrap class="form_ttl"><p>DAEMON STATUS INFORMATION</p>
272
                          </td>
273
                          <td  valign="bottom" class="body_rowg">
274
                            Last Build: <%=GetLastBuildAge(parRtagId)%> [<%=GetModifiedSeqNo(parRtagId)%>]
275
                          </td>
276
                          <td align="right" valign="bottom">
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"
6546 dpurdie 332
 
6784 dpurdie 333
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
6546 dpurdie 334
 
6784 dpurdie 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
6546 dpurdie 348
 
6784 dpurdie 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
6546 dpurdie 365
 
6784 dpurdie 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 )
6546 dpurdie 372
 
6784 dpurdie 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>
454
                </td>
455
            </tr>
6546 dpurdie 456
        </table>
6784 dpurdie 457
    </td>
6546 dpurdie 458
</table>
459
<%
460
End Sub
461
'-------------------------------------------------
462
'
463
Sub ShowDaemonInstructions
464
%>
465
<!-- Daemon Instructions Display -->
466
<table class="embedded_table" style="margin-bottom:10px">
6784 dpurdie 467
    <tr>
468
        <td>
469
            <table class="rounded_box embedded_table">
470
                <caption nowrap class="form_ttl tleft">DAEMON INSTRUCTIONS FOR THIS RELEASE</caption>
471
                <tr>
472
                    <td>
473
                        <div class='round_box_pad'>
474
                            <table width="100%" border="0" cellspacing="2" cellpadding="0">
475
                               <tr>
476
                                  <td align="left" nowrap class="body_lcol">Operation</td>
477
                                  <td align="left" nowrap class="body_lcol">Package</td>
478
                                  <td align="left" nowrap class="body_lcol">Version</td>
479
                                  <td align="left" nowrap class="body_lcol">Scheduled Time<%=Quick_Help("SchedTime")%>
480
                                  <td align="left" nowrap class="body_lcol">Repeat</td>
481
                                  <td align="left" nowrap class="body_lcol">In Progress</td>
482
                               </tr>
483
                               <%
484
                               Dim PkgVersion
485
                               Dim UserName
486
                               Dim UserEmail
487
                               Dim bInProgress
488
                               Dim bIsOverdue
489
                               Dim bIsReady
6546 dpurdie 490
 
6784 dpurdie 491
                               Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
492
                                                                      "       OP_CODE,"&_
493
                                                                      "       RTAG_ID,"&_
494
                                                                      "       PV_ID,"&_
495
                                                                      "       SCHEDULED_DATETIME,"&_
496
                                                                      "       REPEAT_SECS,"&_
497
                                                                      "       ADDED_DATETIME,"&_
498
                                                                      "       USER_ID,"&_
499
                                                                      "       IN_PROGRESS,"&_
500
                                                                      "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
501
                                                                      "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
502
                                                                      "  FROM DAEMON_INSTRUCTIONS "&_
503
                                                                      "  WHERE RTAG_ID = "& parRtagId &_
504
                                                                      "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
505
                               While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
6546 dpurdie 506
 
6784 dpurdie 507
                                  If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
508
                                     bInProgress = False
509
                                  Else
510
                                     bInProgress = True
511
                                  End If
6546 dpurdie 512
 
6784 dpurdie 513
                                  ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
514
                                  If rsQry("OVERDUE") AND NOT bInProgress Then
515
                                     bIsOverdue = True
516
                                  Else
517
                                     bIsOverdue = False
518
                                  End If
6546 dpurdie 519
 
6784 dpurdie 520
                                  If rsQry("READY") Then
521
                                     bIsReady = True
522
                                  Else
523
                                     bIsReady = False
524
                                  End If
6546 dpurdie 525
 
6784 dpurdie 526
                                  ' Get as much info about the package as we can
527
                                  Dim PkgId: PkgId = 0
528
                                  Dim PkgName : PkgName = "N/A"
529
                                  If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
530
                                     Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
531
                                  End If
532
                                  %>
533
                                  <tr>
534
                                     <td colspan="6" class=body_line></td>
535
                                  </tr>
536
                                  <tr>
537
                                     <td align="left" valign="top" class="body_rowg nowrap">
538
                                        <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
539
                                     </td>
6546 dpurdie 540
 
6784 dpurdie 541
                                     <td align="left" valign="top" class="body_rowg">
542
                                        <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
543
                                           <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
544
                                        <%Else%>
545
                                           <%=PkgName%>
546
                                        <%End If%>
547
                                     </td>
6546 dpurdie 548
 
6784 dpurdie 549
                                     <td align="left" valign="top" class="body_rowg">
550
                                        <%=PkgVersion%>
551
                                     </td>
6546 dpurdie 552
 
6784 dpurdie 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>
6546 dpurdie 554
 
6784 dpurdie 555
                                     <td align="left" valign="top" class="body_rowg"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
6546 dpurdie 556
 
6784 dpurdie 557
                                     <td align="left" valign="top" class="body_rowg">
558
                                        <%If bInProgress Then%>
559
                                           YES
560
                                        <%Else%>
561
                                           NO
562
                                        <%End If%>
563
                                     </td>
564
                                  </tr>
565
                                  <%
566
                                  rsQry.MoveNext()
567
                               Wend
568
                               rsQry.Close()
569
                               Set rsQry = nothing
570
                               %>
571
                            </table>
572
                        </div>
573
                    </td>
574
                </tr>
575
            </table>
576
        </td>
577
    </tr>
6546 dpurdie 578
</table>
579
<%
580
End Sub
581
%>
5357 dpurdie 582
<html>
583
   <head>
584
      <title>Release Manager</title>
585
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
586
      <meta http-equiv="Pragma" content="no-cache">
587
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 588
      <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
589
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
590
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 591
      <!--#include file="_jquery_includes.asp"-->
592
      <!-- TIPS -->
6676 dpurdie 593
      <script type="text/javascript" src="scripts/json2.js?ver=<%=VixVerNum%>"></script>
6579 dpurdie 594
      <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
595
      <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 596
      <script language="JavaScript" type="text/JavaScript">
6538 dpurdie 597
      formTips.tips.h_buildtime       = stdTip(300, 'Est. Build Duration', 'Estimated build duration in seconds. Based simply on the last build duration for this package');
598
 
5623 dpurdie 599
      formTips.tips.h_lastchange       = stdTip(300, 'Last Change', 'This is an indication of the time since the daemon interogated the database.' +
600
                                                                  '<p>Short times will be shown as seconds. Longer times will be shown as a time within ' + 
601
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
602
                                                                  );
5357 dpurdie 603
      </script>
6544 dpurdie 604
    <script language="JavaScript" type="text/JavaScript">
605
    $(document).ready(function() {
6545 dpurdie 606
        //
607
        //  Init the check boxes
608
        InitShow();
6546 dpurdie 609
        isChecked('pv_id_list','IncludeSubmit');
6545 dpurdie 610
 
6610 dpurdie 611
<% If objAccessControl.UserLogedIn Then %>
6544 dpurdie 612
        // Attach function to toggle checkbox
613
        // toggle all visible checkboxes
614
         $('#toggleDirect').click(function(){
615
            var state = this.checked;
6545 dpurdie 616
            var list = $('.directInclude:visible:enabled');
6544 dpurdie 617
            list.prop('checked', state);
618
            isChecked('pv_id_list','IncludeSubmit');
619
         });
6545 dpurdie 620
 
621
         $('.directInclude').click(function(){
622
             isChecked('pv_id_list','IncludeSubmit');
623
         });
6610 dpurdie 624
<%Else%>
625
        {
626
        // Not logged in - disable boxes
627
        var list = $('.directInclude');
628
            list.prop('disabled', true);
629
         $('#toggleDirect').prop('disabled', true);    
630
        }
631
<%End If%>
6545 dpurdie 632
 
6544 dpurdie 633
    });
6545 dpurdie 634
 
635
    function InitShow(e)
636
    {
637
        toggleDispClass('rootCause',0);
638
        toggleDispClass('rootNoEnv',0);
639
        toggleDispClass('rootFile',0);
640
        toggleDispClass('rootIndirect',0);
641
        toggleDispClass('manualCause',0);
642
    }
643
 
644
    function toggleDispClass(cname,flip)
645
    {
646
        var cookieName = 'RELMGR_BUILDSTATUS';
647
        var cv = JSON.parse(getCookie(cookieName));
648
        if (!cv)
649
            cv = new Object;
650
        if (!cv.BuildStatus)
651
            cv.BuildStatus = new Object;
652
 
653
        var state = cv.BuildStatus[cname];
654
        if (state === undefined)
655
            state = true;
656
 
657
        if (flip>0)
658
            state = !state;
659
 
660
        cv.BuildStatus[cname] = state;
661
 
662
        // Reflect the current state in the checkbox
663
        var de = document.getElementById(cname);
664
        if (de)
665
            de.checked = state;
666
 
667
        var elements = new Array();
668
        elements = getElementsByClassName(cname);
669
        for(i in elements ){
670
            if (state) {
671
                elements[i].style.display = "";
672
            }
673
            else {
674
                elements[i].style.display = "none";
675
            }
676
        }
677
        setCookie(cookieName, JSON.stringify(cv), 365 );
678
    }
679
 
6544 dpurdie 680
    </script>
5357 dpurdie 681
      <!-- DROPDOWN MENUS -->
682
      <!--#include file="_menu_def.asp"-->
6579 dpurdie 683
      <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 684
   </head>
6546 dpurdie 685
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
5357 dpurdie 686
      <!-- HEADER -->
687
      <!--#include file="_header.asp"-->
688
      <!-- BODY ---->
6546 dpurdie 689
      <table class="full_table">
5357 dpurdie 690
         <tr>
6546 dpurdie 691
            <td width="146px" class="panel_bg" valign="top">
692
                <%Call BuildMenuPane%>
5357 dpurdie 693
            </td>
694
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
6546 dpurdie 695
                <%Call ShowBuildStatus%>
696
                <%Call ShowDaemonStatus%>
697
                <%Call ShowDaemonInstructions%>
5357 dpurdie 698
            </td>
699
         </tr>
700
         <tr>
6546 dpurdie 701
            <td class="panel_bg" valign="bottom" align="center" height="350">
702
                <img src="images/img_gears.png" vspace="20" hspace="30"></td>
5357 dpurdie 703
         </tr>
704
      </table>
705
      <!-- FOOTER -->
706
      <!--#include file="_footer.asp"-->
707
   </body>
708
</html>
6546 dpurdie 709