Subversion Repositories DevTools

Rev

Rev 6877 | Rev 7063 | 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
                      estDuration = NULL
6546 dpurdie 347
 
6874 dpurdie 348
                      If bActive = "N" Then bInactiveMachine = true
349
                      If IsNull(daemonState) Then daemonState = 0
350
                      If daemonState = "2" Then pkgId = Null
351
                      If IsNull(currentRunLevel) Then currentRunLevel = -1
352
                      If daemonMode = "M" AND not IsNull(pkgName) Then estDuration = pkgBuildTime & "[" & PkgBuildDelta & "]"
353
                      If bActive <> "U" Then lastChange = PrettyDelta(delta, daemonState,pkgName )
6546 dpurdie 354
 
6874 dpurdie 355
                      ' --- Now render HTML for this release configuration ---
356
                      %>
357
                      <tr class=border>
358
                         <td><%=rsQry("display_name")%></td>
359
                         <td><%=rsQry("gbe_value")%></td>
360
                         <td><%=Get_Daemon_Mode(daemonMode)%></td>
361
                         <td><%=Get_Run_Level(currentRunLevel, indefinitelyPaused, daemonState, bActive)%></td>
362
                         <td><%=Get_Package_Name(pkgName,parRtagId,pkgPvid, daemonState, bActive)%></td>
363
                         <td><%=estDuration%></td>
364
                         <td><%=lastChange%></td>
365
                         <td>
366
                            <%
367
                            If NOT indefinitelyPaused  Then
368
                                If bActive = "U" Then
369
                                ElseIf bActive = "N" Then
370
                                    Call Action_Buttons ( "Daemon Unavailable" )
371
                                ElseIf daemonState = 0 Then
372
                                    Call Action_Buttons_State ( "Daemon Pause", canControl )
373
                                ElseIf daemonState = 1 Then
374
                                    Call Action_Buttons_State ( "Daemon Resume", canControl )
375
                                ElseIf daemonState = 2 Then
376
                                    Call Action_Buttons_State ( "Daemon Start", canControl )
377
                                Else
378
                                    Call Action_Buttons_State ( "Daemon Resume", canControl )
379
                              End If
380
                            Else
381
                               %>Unavailable<%
382
                            End If
383
                            %>
384
                         </td>
385
                      </tr>
386
                      <%
387
                      rsQry.MoveNext
388
                   Loop
389
                   %>
390
                   <tr class=foot>
391
                     <td colspan=7>
392
                     <%If CheckConfigErrors(parRtagId) OR bInactiveMachine Then%><span class="err_alert">&nbsp;Daemon configuration errors detected</span>
393
                        <a class="txt_linked" href="release_config.asp?rtag_id=<%=parRtagId%>">
394
                            <img src="images/i_link.gif" hspace="2" border="0" align="absmiddle" title="Goto Configuration">
395
                        </a>
396
                     <%End If%>
397
                     </td>
398
                     <td>
399
                     <%
400
                       If (rsQry.RecordCount > 0) AND NOT indefinitelyPaused Then
401
                           Call Action_Buttons_State ( "Daemon Control All", objAccessControl.UserLogedIn AND canControl )
402
                       Else
403
                         %>&nbsp<%
404
                       End If
405
                     %>
406
                     </td>
407
                   </tr>
408
                   <%
409
                     rsQry.Close()
410
                     Set rsQry = nothing
411
                   %>
412
                </table>
413
            </div>
414
        </div>
415
    </div>
416
</div>
6546 dpurdie 417
<%
418
End Sub
419
'-------------------------------------------------
420
'
421
Sub ShowDaemonInstructions
422
%>
423
<!-- Daemon Instructions Display -->
6874 dpurdie 424
<div>
425
    <div class=panel>
426
        <div class=rounded_box_caption>
427
            DAEMON INSTRUCTIONS FOR THIS RELEASE
428
        </div>
429
            <div class='rounded_box'>
430
                <div class=listPanel>
431
                    <table width="100%" border="0" cellspacing="2" cellpadding="0">
432
                       <thead>
433
                          <th>Operation</th>
434
                          <th>Package</th>
435
                          <th>Version</th>
436
                          <th>Scheduled Time<%=Quick_Help("SchedTime")%>
437
                          <th>Repeat</th>
438
                          <th>In Progress</th>
439
                       </thead>
440
                       <%
441
                       Dim PkgVersion
442
                       Dim UserName
443
                       Dim UserEmail
444
                       Dim bInProgress
445
                       Dim bIsOverdue
446
                       Dim bIsReady
6546 dpurdie 447
 
6874 dpurdie 448
                       Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
449
                                                              "       OP_CODE,"&_
450
                                                              "       RTAG_ID,"&_
451
                                                              "       PV_ID,"&_
452
                                                              "       SCHEDULED_DATETIME,"&_
453
                                                              "       REPEAT_SECS,"&_
454
                                                              "       ADDED_DATETIME,"&_
455
                                                              "       USER_ID,"&_
456
                                                              "       IN_PROGRESS,"&_
457
                                                              "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
458
                                                              "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
459
                                                              "  FROM DAEMON_INSTRUCTIONS "&_
460
                                                              "  WHERE RTAG_ID = "& parRtagId &_
461
                                                              "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
462
                       While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
6546 dpurdie 463
 
6874 dpurdie 464
                          If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
465
                             bInProgress = False
466
                          Else
467
                             bInProgress = True
468
                          End If
6546 dpurdie 469
 
6874 dpurdie 470
                          ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
471
                          If rsQry("OVERDUE") AND NOT bInProgress Then
472
                             bIsOverdue = True
473
                          Else
474
                             bIsOverdue = False
475
                          End If
6546 dpurdie 476
 
6874 dpurdie 477
                          If rsQry("READY") Then
478
                             bIsReady = True
479
                          Else
480
                             bIsReady = False
481
                          End If
6546 dpurdie 482
 
6874 dpurdie 483
                          ' Get as much info about the package as we can
484
                          Dim PkgId: PkgId = 0
485
                          Dim PkgName : PkgName = "N/A"
486
                          If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
487
                             Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
488
                          End If
489
                          %>
490
                          <tr class=border>
491
                             <td>
492
                                <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
493
                             </td>
6546 dpurdie 494
 
6874 dpurdie 495
                             <td>
496
                                <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
497
                                   <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
498
                                <%Else%>
499
                                   <%=PkgName%>
500
                                <%End If%>
501
                             </td>
6546 dpurdie 502
 
6874 dpurdie 503
                             <td >
504
                                <%=PkgVersion%>
505
                             </td>
6546 dpurdie 506
 
6874 dpurdie 507
                             <td <%If bIsOverdue Then%>style=color:Red<%Elseif bIsReady Then%>style=color:Green<%End If%>><%=DisplayDateTime(rsQry("SCHEDULED_DATETIME"))%></td>
6546 dpurdie 508
 
6874 dpurdie 509
                             <td><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
6546 dpurdie 510
 
6874 dpurdie 511
                             <td>
512
                                <%If bInProgress Then%>
513
                                   YES
514
                                <%Else%>
515
                                   NO
516
                                <%End If%>
517
                             </td>
518
                          </tr>
519
                          <%
520
                          rsQry.MoveNext()
521
                       Wend
522
                       rsQry.Close()
523
                       Set rsQry = nothing
524
                       %>
525
                    </table>
526
                </div>
527
            </div>
528
    </div>
529
</div>
6546 dpurdie 530
<%
531
End Sub
532
%>
5357 dpurdie 533
<html>
534
   <head>
535
      <title>Release Manager</title>
536
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
537
      <meta http-equiv="Pragma" content="no-cache">
538
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 539
      <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
540
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
541
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 542
      <!--#include file="_jquery_includes.asp"-->
543
      <!-- TIPS -->
6676 dpurdie 544
      <script type="text/javascript" src="scripts/json2.js?ver=<%=VixVerNum%>"></script>
6579 dpurdie 545
      <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
546
      <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 547
      <script language="JavaScript" type="text/JavaScript">
6538 dpurdie 548
      formTips.tips.h_buildtime       = stdTip(300, 'Est. Build Duration', 'Estimated build duration in seconds. Based simply on the last build duration for this package');
549
 
5623 dpurdie 550
      formTips.tips.h_lastchange       = stdTip(300, 'Last Change', 'This is an indication of the time since the daemon interogated the database.' +
551
                                                                  '<p>Short times will be shown as seconds. Longer times will be shown as a time within ' + 
552
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
553
                                                                  );
5357 dpurdie 554
      </script>
6544 dpurdie 555
    <script language="JavaScript" type="text/JavaScript">
556
    $(document).ready(function() {
6545 dpurdie 557
        //
558
        //  Init the check boxes
559
        InitShow();
6546 dpurdie 560
        isChecked('pv_id_list','IncludeSubmit');
6545 dpurdie 561
 
6610 dpurdie 562
<% If objAccessControl.UserLogedIn Then %>
6544 dpurdie 563
        // Attach function to toggle checkbox
564
        // toggle all visible checkboxes
565
         $('#toggleDirect').click(function(){
566
            var state = this.checked;
6545 dpurdie 567
            var list = $('.directInclude:visible:enabled');
6544 dpurdie 568
            list.prop('checked', state);
569
            isChecked('pv_id_list','IncludeSubmit');
570
         });
6545 dpurdie 571
 
572
         $('.directInclude').click(function(){
573
             isChecked('pv_id_list','IncludeSubmit');
574
         });
6610 dpurdie 575
<%Else%>
576
        {
577
        // Not logged in - disable boxes
578
        var list = $('.directInclude');
579
            list.prop('disabled', true);
580
         $('#toggleDirect').prop('disabled', true);    
581
        }
582
<%End If%>
6545 dpurdie 583
 
6544 dpurdie 584
    });
6545 dpurdie 585
 
586
    function InitShow(e)
587
    {
588
        toggleDispClass('rootCause',0);
589
        toggleDispClass('rootNoEnv',0);
590
        toggleDispClass('rootFile',0);
591
        toggleDispClass('rootIndirect',0);
592
        toggleDispClass('manualCause',0);
593
    }
594
 
595
    function toggleDispClass(cname,flip)
596
    {
597
        var cookieName = 'RELMGR_BUILDSTATUS';
598
        var cv = JSON.parse(getCookie(cookieName));
599
        if (!cv)
600
            cv = new Object;
601
        if (!cv.BuildStatus)
602
            cv.BuildStatus = new Object;
603
 
604
        var state = cv.BuildStatus[cname];
605
        if (state === undefined)
606
            state = true;
607
 
608
        if (flip>0)
609
            state = !state;
610
 
611
        cv.BuildStatus[cname] = state;
612
 
613
        // Reflect the current state in the checkbox
614
        var de = document.getElementById(cname);
615
        if (de)
616
            de.checked = state;
617
 
618
        var elements = new Array();
619
        elements = getElementsByClassName(cname);
620
        for(i in elements ){
621
            if (state) {
622
                elements[i].style.display = "";
623
            }
624
            else {
625
                elements[i].style.display = "none";
626
            }
627
        }
628
        setCookie(cookieName, JSON.stringify(cv), 365 );
629
    }
630
 
6544 dpurdie 631
    </script>
5357 dpurdie 632
      <!-- DROPDOWN MENUS -->
633
      <!--#include file="_menu_def.asp"-->
6579 dpurdie 634
      <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 635
   </head>
6546 dpurdie 636
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
5357 dpurdie 637
      <!-- HEADER -->
638
      <!--#include file="_header.asp"-->
639
      <!-- BODY ---->
6546 dpurdie 640
      <table class="full_table">
5357 dpurdie 641
         <tr>
6876 dpurdie 642
            <td width="146px" class="bg_panel" valign="top">
6546 dpurdie 643
                <%Call BuildMenuPane%>
5357 dpurdie 644
            </td>
645
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
6546 dpurdie 646
                <%Call ShowBuildStatus%>
647
                <%Call ShowDaemonStatus%>
648
                <%Call ShowDaemonInstructions%>
5357 dpurdie 649
            </td>
650
         </tr>
651
         <tr>
6877 dpurdie 652
            <td class="bg_panel_btm" height="350">
6546 dpurdie 653
                <img src="images/img_gears.png" vspace="20" hspace="30"></td>
5357 dpurdie 654
         </tr>
655
      </table>
656
      <!-- FOOTER -->
657
      <!--#include file="_footer.asp"-->
658
   </body>
659
</html>
6546 dpurdie 660