Subversion Repositories DevTools

Rev

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