Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
121 hknight 5
'|              Build Status Information             |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
121 hknight 12
Response.Expires = 0  ' always load the page, dont store
119 ghuddy 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"-->
147 ghuddy 22
<!--#include file="common/daemon_instructions.asp"-->
119 ghuddy 23
<%
24
' Set rfile parameter. This is a return page after Login
25
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
26
objPMod.PersistInQryString("proj_id")
27
'------------ ACCESS CONTROL ------------------
133 ghuddy 28
'Let users view the build status without being logged in, but as soon as they try and submit the form, check
29
'their login status.
30
If Request("action") <> "" AND NOT objAccessControl.UserLogedIn Then%>
31
<!--#include file="_access_control_login.asp"-->
32
<!--#include file="_access_control_project.asp"-->
33
<%End If%>
119 ghuddy 34
<!--#include file="_access_control_general.asp"-->
35
<%
36
'------------ Variable Definition -------------
37
Dim objSortHelper
38
Dim rsQry
39
Dim parRtagId
40
Dim parSourceRtagId
41
Dim query_string
42
Dim objBtnControl
133 ghuddy 43
Dim rcon_id
119 ghuddy 44
'------------ Constants Declaration -----------
45
'------------ Variable Init -------------------
46
parRtagId = Request("rtag_id")
47
objPMod.PersistInQryString("rtag_id")
48
Set objBtnControl = New ActionButtonControl
49
'----------------------------------------------
50
%>
51
<%
52
'--------------------------------------------------------------------------------------------------------------------------
53
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
133 ghuddy 54
   Dim rsQry, query
55
   OraDatabase.Parameters.Add "RTAG_ID",   parRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
56
   query = _
57
   " SELECT * "&_
58
   "  FROM RELEASE_TAGS rt"&_
59
   " WHERE rt.RTAG_ID = :RTAG_ID"
127 ghuddy 60
 
133 ghuddy 61
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
127 ghuddy 62
 
133 ghuddy 63
   OraDatabase.Parameters.Remove "RTAG_ID"
127 ghuddy 64
 
133 ghuddy 65
   If rsQry.RecordCount > 0 Then
66
      outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
67
      outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
68
   Else
69
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
70
   End If
127 ghuddy 71
 
133 ghuddy 72
   rsQry.Close
73
   Set rsQry = Nothing
119 ghuddy 74
End Sub
75
'--------------------------------------------------------------------------------------------------------------------------
76
Sub RipplePackage (flag)
127 ghuddy 77
 
133 ghuddy 78
   On Error Resume Next
79
   objEH.ErrorRedirect = TRUE
80
   OraDatabase.Parameters.Add "PV_ID_LIST",  Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
81
   OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
82
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 83
 
133 ghuddy 84
   objEH.TryORA ( OraSession )
127 ghuddy 85
 
133 ghuddy 86
   If flag Then
87
      OraDatabase.ExecuteSQL _
88
      "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
89
   Else
90
      OraDatabase.ExecuteSQL _
91
      "BEGIN  UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
92
   End If
127 ghuddy 93
 
133 ghuddy 94
   objEH.CatchORA ( OraSession )
127 ghuddy 95
 
133 ghuddy 96
   OraDatabase.Parameters.Remove "PV_ID_LIST"
97
   OraDatabase.Parameters.Remove "RTAG_ID"
98
   OraDatabase.Parameters.Remove "USER_ID"
119 ghuddy 99
 
100
End Sub
101
'--------------------------------------------------------------------------------------------------------------------------
102
Function Get_Daemon_Mode( cMode )
103
 
127 ghuddy 104
   If cMode = "S" Then
105
      Get_Daemon_Mode = "Slave"
106
   ElseIf cMode = "M" Then
107
      Get_Daemon_Mode = "Master"
108
   End If
109
 
119 ghuddy 110
End Function
111
'--------------------------------------------------------------------------------------------------------------------------
127 ghuddy 112
Function Get_Run_Level( nLevel, indefinitePause )
119 ghuddy 113
 
127 ghuddy 114
   If indefinitePause Then
115
      Get_Run_Level = "<span class='err_alert'>Stopped</span>"
116
   Else
133 ghuddy 117
      If nLevel = 1 Then
127 ghuddy 118
         Get_Run_Level = "Cannot Continue"
119
      ElseIf nLevel = 2 Then
120
         Get_Run_Level = "Paused"
121
      ElseIf nLevel = 3 Then
122
         Get_Run_Level = "Actively engaged in a build"
123
      ElseIf nLevel = 4 Then
124
         Get_Run_Level = "Idle"
133 ghuddy 125
      ElseIf nLevel = 5 Then
127 ghuddy 126
         Get_Run_Level = "Waiting"
135 mhunt 127
      ElseIf nLevel = 6 Then
128
         Get_Run_Level = "Publishing"
127 ghuddy 129
      Else
130
         Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
131
      End If
132
   End If
119 ghuddy 133
 
134
End Function
135
'--------------------------------------------------------------------------------------------------------------------------
136
Function Get_Package_Name( sPackageName )
137
 
121 hknight 138
  If IsNull(sPackageName) Then
139
    Get_Package_Name = "None"
140
  Else
141
    Get_Package_Name = sPackageName
142
  End If
119 ghuddy 143
 
144
End Function
145
'--------------------------------------------------------------------------------------------------------------------------
146
%>
147
<%
148
'------------ RUN BEFORE PAGE RENDER ----------
149
' --- Get Form details from DB ---
150
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
151
 
152
' --- Load Validation Rules ---
121 hknight 153
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )    ' Load Validation Rules
119 ghuddy 154
 
155
' --- Enter Form Validation Rule Changes here... ----
156
'----------------------------------------------------
157
 
158
' --- RUN onPostBack ---
133 ghuddy 159
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
119 ghuddy 160
 
121 hknight 161
  If objEH.Finally Then
162
    If Request("action") = "include" Then
163
      Call RipplePackage (True)
164
    Else
165
      Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
166
    End If
167
  End If
127 ghuddy 168
 
119 ghuddy 169
End If
170
 
171
'----------------------------------------------
172
%>
173
<html>
127 ghuddy 174
   <head>
175
      <title>Release Manager</title>
176
      <meta http-equiv="Pragma" content="no-cache">
177
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
178
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
179
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
180
      <script language="JavaScript" src="images/common.js"></script>
157 ghuddy 181
      <!-- TIPS -->
182
      <script language="JavaScript" src="images/tipster.js"></script>
183
      <script language="JavaScript" src="images/_help_tips.js"></script>
127 ghuddy 184
      <!-- DROPDOWN MENUS -->
185
      <!--#include file="_menu_def.asp"-->
186
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
187
   </head>
188
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="isChecked('pv_id_list','submit');">
189
      <!-- MENU LAYERS -------------------------------------->
190
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
191
      <!-- TIPS LAYERS -------------------------------------->
192
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
193
      <!----------------------------------------------------->
194
      <!-- HEADER -->
195
      <!--#include file="_header.asp"-->
196
      <!-- BODY ---->
197
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
198
         <%
199
         '-- FORM START ---------------------------------------------------------------------------------------------------------
200
         objFormComponent.FormName = "FormName"
201
         objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
202
         Call objFormComponent.FormStart()
203
         %>
204
         <tr>
205
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
206
            <td width="100%" rowspan="1" align="center" valign="top" bgcolor="#EEEFEF">
207
               <table width="10" border="0" cellspacing="0" cellpadding="0">
121 hknight 208
                  <tr>
127 ghuddy 209
                     <td width="1%"></td>
210
                     <td width="100%">
211
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
212
                           <tr>
213
                              <td nowrap class="body_txt"></td>
214
                           </tr>
215
                        </table>
216
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
217
                           <tr>
218
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
219
                                 <p>BUILD STATUS INFORMATION</p>
220
                              </td>
221
                              <td align="right" valign="bottom"></td>
222
                           </tr>
223
                        </table>
224
                     </td>
225
                     <td width="1%"></td>
121 hknight 226
                  </tr>
227
                  <tr>
127 ghuddy 228
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
229
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
230
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
121 hknight 231
                  </tr>
232
                  <tr>
127 ghuddy 233
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
234
                     <td bgcolor="#FFFFFF" valign="top">
235
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
236
                        <!--#include file="messages/_msg_inline.asp"-->
237
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
238
                        <br>
239
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
240
                           <span class='err_alert'>
241
                              <font size='2'><b>Packages Excluded From Build (Daemon Build Failure)</b></font>
242
                           </span>
243
                           <tr>
244
                              <td background="images/bg_table_col.gif" class="err_alert"><b>Directly</b></td>
245
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
246
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
157 ghuddy 247
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE
248
                                 (<a class="txt_linked" title="" href="messages/msg_firefox_unc_downloading.asp">firefox users</a>
249
                                 <%=Quick_Help("firefox_root_cause")%>)
250
                              </td>
127 ghuddy 251
                           </tr>
252
                           <%
253
                           query_string = " select pkg.pkg_name, pv.pkg_version, pv.pv_id, dnr.rtag_id, dnr.root_cause, dnr.root_file, pv.pv_description"&_
254
                                          "   from do_not_ripple dnr, package_versions pv, packages pkg"&_
255
                                          "  where dnr.rtag_id = "& parRtagId &_
256
                                          "    and pv.pv_id    = dnr.pv_id"&_
257
                                          "    and pkg.pkg_id  = pv.pkg_id"&_
258
                                          "    and dnr.root_pv_id is null"&_
259
                                          "  order by pkg_name"
260
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
261
                           '--- Render rows ---
262
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
263
                           %>
264
                              <tr>
265
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
266
                              </tr>
267
                              <tr>
268
                                 <td nowrap width="1%">
269
                                    <!-- The use of the isChecked() javascript function below, enables the submit button if any checkboxes are checked, -->
270
                                    <!-- else it will disable the submit button. The function is badly named, but nevertheless, that is what it does.   -->
271
                                    <input type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" id="pv_id_list" onClick="isChecked('pv_id_list','submit');">
272
                                 </td>
273
                                 <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>
274
                                 <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
275
                                 <%
276
                                 ' root_file, if supplied, indicates a build failure log file exists
277
                                 ' this should always prevail over the textual root_cause
278
                                 If IsNull(rsQry("root_file")) Then%>
279
                                    <td nowrap class="body_rowg"><%=rsQry("root_cause")%></td>
280
                                 <%Else%>
281
                                    <td nowrap class="body_rowg">
282
                                       <a class="txt_linked" title="<%=rsQry("root_file")%> Log file may have expired." href="file://///auperaunx26/abtlog/<%=rsQry("root_file")%>">
283
                                          Build Failure Log File
284
                                       </a>
285
                                    </td>
286
                                 <%End If%>
287
                              </tr>
288
                              <%
289
                              rsQry.MoveNext
290
                           Loop%>
291
                           <tr>
292
                              <td background="images/bg_table_col.gif" class="err_alert"><b>Indirectly</b></td>
293
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
294
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
295
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ROOT CAUSE PACKAGE NAME</td>
296
                           </tr>
297
                           <%
298
                           query_string = " select pv.pv_id, pkg.pkg_name, pv.pkg_version, qkg.pkg_name, dnr.rtag_id, pv.pv_description"&_
299
                                          "   from do_not_ripple dnr, package_versions pv, package_versions qv, packages pkg, packages qkg"&_
300
                                          "  where dnr.rtag_id = "& parRtagId &_
301
                                          "    and pv.pv_id    = dnr.pv_id"&_
302
                                          "    and pkg.pkg_id  = pv.pkg_id"&_
303
                                          "    and qv.pv_id    = dnr.root_pv_id"&_
304
                                          "    and qkg.pkg_id  = qv.pkg_id"&_
305
                                          "    and dnr.root_pv_id is not null"&_
306
                                          "  order by pkg.pkg_name"
307
                           Dim rsQry2
308
                           Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
309
                           '--- Render rows ---
310
                           Do While (NOT rsQry2.BOF) AND (NOT rsQry2.EOF)%>
311
                              <tr>
312
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
313
                              </tr>
314
                              <tr>
315
                                 <td nowrap width="1%">
316
                                    <input type="checkbox" value=0 disabled=true name="notused" id="notused">
317
                                 </td>
318
                                 <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>
319
                                 <td nowrap class="body_rowg"><%=rsQry2(2)%></td>
320
                                 <td nowrap class="body_rowg"><%=rsQry2(3)%></td>
321
                              </tr>
322
                              <%
323
                              rsQry2.MoveNext
324
                           Loop%>
325
                        </table>
326
                     </td>
327
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
121 hknight 328
                  </tr>
127 ghuddy 329
                  <%If rsQry.RecordCount > 0 Then%>
330
                     <tr>
331
                        <td background="images/bg_action_norm.gif"></td>
332
                        <td align="right" background="images/bg_action_norm.gif">
333
                           <%
334
                           Response.Write(objFormComponent.SubmitButton ( "Include", "name='submit' id='submit' class='form_btn' disabled style='color:silver' onClick='return confirmAction(""Are you sure you want to include these packages for building?"")'" ))
335
                           Response.Write(objPMod.ComposeHiddenTags())
336
                           %>
337
                        </td>
338
                        <td background="images/bg_action_norm.gif"><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
339
                     </tr>
340
                  <%End If%>
121 hknight 341
                  <tr>
127 ghuddy 342
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
343
                     <td background="images/lbox_bg_blue.gif"></td>
344
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
121 hknight 345
                  </tr>
127 ghuddy 346
               </table>
347
               <!-- ACTION BUTTONS ---------------------------------------------->
348
               <input type="hidden" name="action" value="include">
349
               <!-- ACTION BUTTONS END  ------------------------------------------>
350
            </td>
351
            <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
352
         </tr>
353
         <%
354
         Call objFormComponent.FormEnd()
355
         rsQry.Close()
356
         Set rsQry = nothing
357
         rsQry2.Close()
358
         Set rsQry2 = nothing
359
         '-- FORM END ----------------------------------------------------------------------------------------------------------------
360
         %>
361
         <tr>
362
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
363
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
364
               <table width="10" border="0" cellspacing="0" cellpadding="0">
121 hknight 365
                  <tr>
127 ghuddy 366
                     <td width="1%"></td>
367
                     <td width="100%">
368
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
369
                           <tr>
370
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
371
                                 <p>DAEMON STATUS INFORMATION</p>
372
                              </td>
373
                              <td align="right" valign="bottom"></td>
374
                           </tr>
375
                        </table>
376
                     </td>
377
                     <td width="1%"></td>
121 hknight 378
                  </tr>
379
                  <tr>
127 ghuddy 380
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
381
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
382
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
121 hknight 383
                  </tr>
384
                  <tr>
127 ghuddy 385
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
386
                     <td bgcolor="#FFFFFF" valign="top">
387
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
388
                        <!--#include file="messages/_msg_inline.asp"-->
389
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
390
                        <br>
391
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
392
                           <%
393
                           Dim indefinitelyPaused
394
                           indefinitelyPaused = FALSE
395
                           ' Insert a warning into the page if the build daemons are indefintely paused.
396
                           query_string = " select * from run_level_schedule rls where rls.indefinite_pause = 'P'"
397
 
398
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
399
                           If rsQry.RecordCount > 0 Then
400
                              indefinitelyPaused = TRUE %>
401
                              <tr>
402
                                 <span class='err_alert'>
403
                                    <font size='2'><b>WARNING: Build Daemons are all stopped - please contact an administrator</b></font>
404
                                 </span>
405
                              </tr>
406
                           <%End If
407
 
408
                           rsQry.Close()
409
                           Set rsQry = nothing
410
                           %>
411
                           <td width="9%" valign="top"></td>
412
                           <tr>
163 brianf 413
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Daemon Host</td>
127 ghuddy 414
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE Machtype</td>
415
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
416
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
417
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
147 ghuddy 418
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<br>Delta (secs)</td>
127 ghuddy 419
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Switch State</td>
420
                           </tr>
421
                           <%
133 ghuddy 422
                           ' Get the number of release configurations for this RTAG_ID, and iterate through them
163 brianf 423
                           query_string = " select * from release_config rc, gbe_machtype gm, build_machine_config bm"&_
127 ghuddy 424
                                          "  where rc.rtag_id = "& parRtagId &_
425
                                          "    and gm.gbe_id = rc.gbe_id"&_
163 brianf 426
                                          "    and rc.daemon_hostname = bm.machine_hostname(+)" &_
127 ghuddy 427
                                          "  order by rc.daemon_hostname"
133 ghuddy 428
 
127 ghuddy 429
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
133 ghuddy 430
 
127 ghuddy 431
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
432
                              rcon_id = rsQry("rcon_id")
133 ghuddy 433
 
434
                              Dim pkgName
435
                              Dim currentRunLevel
436
 
437
                              ' For this release configuration, get its entry from the run_level table. This table may not
438
                              ' have an entry so we must handle that outcome too.
147 ghuddy 439
                              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
440
                                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
441
                                             "   from run_level rl"&_
133 ghuddy 442
                                             "  where rl.rcon_id = "& rcon_id
443
 
444
                              Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
445
 
446
                              currentRunLevel = -1
447
                              If (rsQry2.RecordCount > 0) Then
448
                                 ' Get the run level from the run_level table
449
                                 currentRunLevel = rsQry2("current_run_level")
450
                              End If
451
 
452
                              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
453
                              ' package name from the packages table
454
                              Dim rsQry3
455
                              pkgName = NULL
456
                              If (rsQry2.RecordCount > 0) AND NOT IsNull(rsQry2("current_pkg_id_being_built")) Then
457
 
458
                                 query_string = " select pkg_name from run_level rl, packages pk"&_
459
                                                "  where rl.rcon_id = "& rcon_id &_
460
                                                "   and  rl.current_pkg_id_being_built = pk.pkg_id"
461
 
462
                                 Set rsQry3 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
463
                                 If (rsQry3.RecordCount > 0) Then
464
                                    pkgName = rsQry3("pkg_name")
465
                                 End If
466
                                 rsQry3.Close()
467
                                 Set rsQry3 = nothing
468
                              End If
469
 
470
                              ' --- Now render HTML for this release configuration ---
127 ghuddy 471
                              %>
472
                              <tr>
473
                                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
474
                              </tr>
475
                              <tr>
163 brianf 476
                                 <td nowrap class="body_rowg"><%=rsQry("display_name")%></td>
127 ghuddy 477
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
478
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
133 ghuddy 479
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused)%></td>
480
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName)%></td>
147 ghuddy 481
                                 <td nowrap class="body_rowg"><%=rsQry2("delta")%></td>
127 ghuddy 482
                                 <td nowrap class="body_rowg">
483
                                    <%
133 ghuddy 484
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
127 ghuddy 485
                                       If objAccessControl.UserLogedIn Then
133 ghuddy 486
                                          If IsNull(rsQry2("pause")) Then
127 ghuddy 487
                                             Call Action_Buttons ( "Daemon Pause" )
488
                                          Else
489
                                             Call Action_Buttons ( "Daemon Resume" )
490
                                          End If
491
                                       Else
133 ghuddy 492
                                          If IsNull(rsQry2("pause")) Then
127 ghuddy 493
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
494
                                          Else
495
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
496
                                          End If
497
                                       End If
498
                                    Else
499
                                       %>Unavailable<%
500
                                    End If
501
                                    %>
502
                                 </td>
503
                              </tr>
504
                              <%
133 ghuddy 505
                              rsQry2.Close()
506
                              Set rsQry2 = nothing
507
 
508
 
127 ghuddy 509
                              rsQry.MoveNext
510
                           Loop
511
                           rsQry.Close()
512
                           Set rsQry = nothing
133 ghuddy 513
 
514
 
127 ghuddy 515
                           %>
516
                        </table>
517
                     </td>
518
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
121 hknight 519
                  </tr>
520
                  <tr>
127 ghuddy 521
                     <input type="hidden" name="action" value="true">
522
                     <%=objPMod.ComposeHiddenTags()%>
523
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
524
                     <td background="images/lbox_bg_blue.gif"></td>
525
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
121 hknight 526
                  </tr>
127 ghuddy 527
               </table>
147 ghuddy 528
 
529
               <table width="10" border="0" cellspacing="0" cellpadding="0">
530
                  <tr>
531
                     <td width="1%"></td>
532
                     <td width="100%">
533
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
534
                           <tr>
535
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
536
                                 <p>DAEMON INSTRUCTIONS FOR THIS RELEASE</p>
537
                              </td>
538
                              <td align="right" valign="bottom"></td>
539
                           </tr>
540
                        </table>
541
                     </td>
542
                     <td width="1%"></td>
543
                  </tr>
544
                  <tr>
545
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
546
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
547
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
548
                  </tr>
549
                  <tr>
550
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
551
                     <td bgcolor="#FFFFFF" valign="top">
552
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
553
                           <tr>
554
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">OPERATION</td>
555
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE</td>
556
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">VERSION</td>
557
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED TIME<br>(<SPAN style=color:Red>Red</SPAN> = overdue)<br>(<SPAN style=color:Green>Green</SPAN> = ready)</td>
558
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">REPEAT</td>
559
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">IN PROGRESS</td>
560
                           </tr>
561
                           <%
562
                           Dim PkgId
563
                           Dim PkgVersion
564
                           Dim UserName
565
                           Dim UserEmail
566
                           Dim bInProgress
567
                           Dim bIsOverdue
568
                           Dim bIsReady
569
 
570
                           Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
571
                                                                  "       OP_CODE,"&_
572
                                                                  "       RTAG_ID,"&_
573
                                                                  "       PV_ID,"&_
574
                                                                  "       SCHEDULED_DATETIME,"&_
575
                                                                  "       REPEAT_SECS,"&_
576
                                                                  "       ADDED_DATETIME,"&_
577
                                                                  "       USER_ID,"&_
578
                                                                  "       IN_PROGRESS,"&_
579
                                                                  "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
580
                                                                  "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
581
                                                                  "  FROM DAEMON_INSTRUCTIONS "&_
582
                                                                  "  WHERE RTAG_ID = "& parRtagId &_
583
                                                                  "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
584
                           While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
585
 
586
                              If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
587
                                 bInProgress = False
588
                              Else
589
                                 bInProgress = True
590
                              End If
591
 
592
                              ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
593
                              If rsQry("OVERDUE") AND NOT bInProgress Then
594
                                 bIsOverdue = True
595
                              Else
596
                                 bIsOverdue = False
597
                              End If
598
 
599
                              If rsQry("READY") Then
600
                                 bIsReady = True
601
                              Else
602
                                 bIsReady = False
603
                              End If
604
 
605
                              ' Get as much info about the package as we can
606
                              PkgId = 0
607
                              PkgName = "N/A"
608
                              PkgVersion = "N/A"
609
                              If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
610
                                 Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
611
                              End If
612
 
613
                              %>
614
                              <tr>
615
 
616
                                 <td align="left" valign="top" class="body_txt">
617
                                    <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
618
                                 </td>
619
 
620
                                 <td align="left" valign="top" class="body_txt">
621
                                    <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
622
                                       <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
623
                                    <%Else%>
624
                                       <%=PkgName%>
625
                                    <%End If%>
626
                                 </td>
627
 
628
                                 <td align="left" valign="top" class="body_txt">
629
                                    <%=PkgVersion%>
630
                                 </td>
631
 
632
                                 <td align="left" valign="top" class="body_txt" <%If bIsOverdue Then%>style=color:Red<%Elseif bIsReady Then%>style=color:Green<%End If%>><%=EuroDateTime(rsQry("SCHEDULED_DATETIME"))%></td>
633
 
634
                                 <td align="left" valign="top" class="body_txt"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
635
 
636
                                 <td align="left" valign="top" class="body_txt">
637
                                    <%If bInProgress Then%>
638
                                       YES
639
                                    <%Else%>
640
                                       NO
641
                                    <%End If%>
642
                                 </td>
643
                              </tr>
644
                              <tr>
645
                                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
646
                              </tr>
647
                              <%
648
                              rsQry.MoveNext()
649
                           Wend
650
                           rsQry.Close()
651
                           Set rsQry = nothing
652
                           %>
653
                        </table>
654
                     </td>
655
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
656
                  </tr>
657
                  <tr>
658
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
659
                     <td background="images/lbox_bg_blue.gif"></td>
660
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
661
                  </tr>
662
               </table>
663
 
127 ghuddy 664
            </td>
665
            <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
666
         </tr>
667
         <tr>
668
            <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
669
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350"></td>
670
         </tr>
671
      </table>
672
      <!-- FOOTER -->
673
      <!--#include file="_footer.asp"-->
674
   </body>
119 ghuddy 675
</html>
676
<%
677
Call Destroy_All_Objects
678
%>