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>
413
                              <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Hostname</td>
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
423
                           query_string = " select * from release_config rc, gbe_machtype gm"&_
127 ghuddy 424
                                          "  where rc.rtag_id = "& parRtagId &_
425
                                          "    and gm.gbe_id = rc.gbe_id"&_
426
                                          "  order by rc.daemon_hostname"
133 ghuddy 427
 
127 ghuddy 428
                           Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
133 ghuddy 429
 
127 ghuddy 430
                           Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
431
                              rcon_id = rsQry("rcon_id")
133 ghuddy 432
 
433
                              Dim pkgName
434
                              Dim currentRunLevel
435
 
436
                              ' For this release configuration, get its entry from the run_level table. This table may not
437
                              ' have an entry so we must handle that outcome too.
147 ghuddy 438
                              query_string = " select rl.pause, rl.current_run_level, rl.current_pkg_id_being_built, "&_
439
                                             "        TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta" &_
440
                                             "   from run_level rl"&_
133 ghuddy 441
                                             "  where rl.rcon_id = "& rcon_id
442
 
443
                              Set rsQry2 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
444
 
445
                              currentRunLevel = -1
446
                              If (rsQry2.RecordCount > 0) Then
447
                                 ' Get the run level from the run_level table
448
                                 currentRunLevel = rsQry2("current_run_level")
449
                              End If
450
 
451
                              ' If we got an entry from the run_level table, try and use the pkg_id it contains, to obtain a
452
                              ' package name from the packages table
453
                              Dim rsQry3
454
                              pkgName = NULL
455
                              If (rsQry2.RecordCount > 0) AND NOT IsNull(rsQry2("current_pkg_id_being_built")) Then
456
 
457
                                 query_string = " select pkg_name from run_level rl, packages pk"&_
458
                                                "  where rl.rcon_id = "& rcon_id &_
459
                                                "   and  rl.current_pkg_id_being_built = pk.pkg_id"
460
 
461
                                 Set rsQry3 = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
462
                                 If (rsQry3.RecordCount > 0) Then
463
                                    pkgName = rsQry3("pkg_name")
464
                                 End If
465
                                 rsQry3.Close()
466
                                 Set rsQry3 = nothing
467
                              End If
468
 
469
                              ' --- Now render HTML for this release configuration ---
127 ghuddy 470
                              %>
471
                              <tr>
472
                                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
473
                              </tr>
474
                              <tr>
475
                                 <td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
476
                                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
477
                                 <td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
133 ghuddy 478
                                 <td nowrap class="body_rowg"><%=Get_Run_Level(currentRunLevel, indefinitelyPaused)%></td>
479
                                 <td nowrap class="body_rowg"><%=Get_Package_Name(pkgName)%></td>
147 ghuddy 480
                                 <td nowrap class="body_rowg"><%=rsQry2("delta")%></td>
127 ghuddy 481
                                 <td nowrap class="body_rowg">
482
                                    <%
133 ghuddy 483
                                    If (rsQry2.RecordCount > 0) AND NOT indefinitelyPaused  Then
127 ghuddy 484
                                       If objAccessControl.UserLogedIn Then
133 ghuddy 485
                                          If IsNull(rsQry2("pause")) Then
127 ghuddy 486
                                             Call Action_Buttons ( "Daemon Pause" )
487
                                          Else
488
                                             Call Action_Buttons ( "Daemon Resume" )
489
                                          End If
490
                                       Else
133 ghuddy 491
                                          If IsNull(rsQry2("pause")) Then
127 ghuddy 492
                                             Call Action_Buttons ( "Daemon Pause Disabled" )
493
                                          Else
494
                                             Call Action_Buttons ( "Daemon Resume Disabled" )
495
                                          End If
496
                                       End If
497
                                    Else
498
                                       %>Unavailable<%
499
                                    End If
500
                                    %>
501
                                 </td>
502
                              </tr>
503
                              <%
133 ghuddy 504
                              rsQry2.Close()
505
                              Set rsQry2 = nothing
506
 
507
 
127 ghuddy 508
                              rsQry.MoveNext
509
                           Loop
510
                           rsQry.Close()
511
                           Set rsQry = nothing
133 ghuddy 512
 
513
 
127 ghuddy 514
                           %>
515
                        </table>
516
                     </td>
517
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
121 hknight 518
                  </tr>
519
                  <tr>
127 ghuddy 520
                     <input type="hidden" name="action" value="true">
521
                     <%=objPMod.ComposeHiddenTags()%>
522
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
523
                     <td background="images/lbox_bg_blue.gif"></td>
524
                     <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 525
                  </tr>
127 ghuddy 526
               </table>
147 ghuddy 527
 
528
               <table width="10" border="0" cellspacing="0" cellpadding="0">
529
                  <tr>
530
                     <td width="1%"></td>
531
                     <td width="100%">
532
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
533
                           <tr>
534
                              <td nowrap class="form_ttl"><p>&nbsp;</p>
535
                                 <p>DAEMON INSTRUCTIONS FOR THIS RELEASE</p>
536
                              </td>
537
                              <td align="right" valign="bottom"></td>
538
                           </tr>
539
                        </table>
540
                     </td>
541
                     <td width="1%"></td>
542
                  </tr>
543
                  <tr>
544
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
545
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
546
                     <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
547
                  </tr>
548
                  <tr>
549
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
550
                     <td bgcolor="#FFFFFF" valign="top">
551
                        <table width="100%" border="0" cellspacing="2" cellpadding="0">
552
                           <tr>
553
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">OPERATION</td>
554
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE</td>
555
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">VERSION</td>
556
                              <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>
557
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">REPEAT</td>
558
                              <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">IN PROGRESS</td>
559
                           </tr>
560
                           <%
561
                           Dim PkgId
562
                           Dim PkgVersion
563
                           Dim UserName
564
                           Dim UserEmail
565
                           Dim bInProgress
566
                           Dim bIsOverdue
567
                           Dim bIsReady
568
 
569
                           Set rsQry = OraDatabase.DbCreateDynaset( "SELECT DAEMON_INSTRUCTIONS_ID,"&_
570
                                                                  "       OP_CODE,"&_
571
                                                                  "       RTAG_ID,"&_
572
                                                                  "       PV_ID,"&_
573
                                                                  "       SCHEDULED_DATETIME,"&_
574
                                                                  "       REPEAT_SECS,"&_
575
                                                                  "       ADDED_DATETIME,"&_
576
                                                                  "       USER_ID,"&_
577
                                                                  "       IN_PROGRESS,"&_
578
                                                                  "       (CASE WHEN SCHEDULED_DATETIME <= SYSDATE THEN 1 ELSE 0 END) AS READY,"&_
579
                                                                  "       (CASE WHEN (SCHEDULED_DATETIME + (1/144)) < SYSDATE THEN 1 ELSE 0 END) AS OVERDUE"&_
580
                                                                  "  FROM DAEMON_INSTRUCTIONS "&_
581
                                                                  "  WHERE RTAG_ID = "& parRtagId &_
582
                                                                  "  ORDER BY PV_ID, SCHEDULED_DATETIME, DAEMON_INSTRUCTIONS_ID", ORADYN_DEFAULT )
583
                           While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
584
 
585
                              If IsNull(rsQry("IN_PROGRESS")) OR rsQry("IN_PROGRESS") = "0" Then
586
                                 bInProgress = False
587
                              Else
588
                                 bInProgress = True
589
                              End If
590
 
591
                              ' only flag as overdue if time threshold has been met but the daemon has not marked the instruction as being in progress.
592
                              If rsQry("OVERDUE") AND NOT bInProgress Then
593
                                 bIsOverdue = True
594
                              Else
595
                                 bIsOverdue = False
596
                              End If
597
 
598
                              If rsQry("READY") Then
599
                                 bIsReady = True
600
                              Else
601
                                 bIsReady = False
602
                              End If
603
 
604
                              ' Get as much info about the package as we can
605
                              PkgId = 0
606
                              PkgName = "N/A"
607
                              PkgVersion = "N/A"
608
                              If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then
609
                                 Call Get_Pkg_Short_Info(rsQry("PV_ID"), PkgId, PkgName, PkgVersion, NULL, NULL, NULL)
610
                              End If
611
 
612
                              %>
613
                              <tr>
614
 
615
                                 <td align="left" valign="top" class="body_txt">
616
                                    <%=DaemonInstructionOperationName(rsQry("OP_CODE"))%>
617
                                 </td>
618
 
619
                                 <td align="left" valign="top" class="body_txt">
620
                                    <%If (NOT IsNull(rsQry("PV_ID"))) AND (rsQry("PV_ID") <> "") Then%>
621
                                       <a href='fixed_issues.asp?rtag_id=<%=rsQry("RTAG_ID")%>&pv_id=<%=rsQry("PV_ID")%>'><%=PkgName%>
622
                                    <%Else%>
623
                                       <%=PkgName%>
624
                                    <%End If%>
625
                                 </td>
626
 
627
                                 <td align="left" valign="top" class="body_txt">
628
                                    <%=PkgVersion%>
629
                                 </td>
630
 
631
                                 <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>
632
 
633
                                 <td align="left" valign="top" class="body_txt"><%=DaemonInstructionRepeatString(rsQry("OP_CODE"), rsQry("REPEAT_SECS"))%></td>
634
 
635
                                 <td align="left" valign="top" class="body_txt">
636
                                    <%If bInProgress Then%>
637
                                       YES
638
                                    <%Else%>
639
                                       NO
640
                                    <%End If%>
641
                                 </td>
642
                              </tr>
643
                              <tr>
644
                                 <td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
645
                              </tr>
646
                              <%
647
                              rsQry.MoveNext()
648
                           Wend
649
                           rsQry.Close()
650
                           Set rsQry = nothing
651
                           %>
652
                        </table>
653
                     </td>
654
                     <td background="images/lbox_bgside_white.gif">&nbsp;</td>
655
                  </tr>
656
                  <tr>
657
                     <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
658
                     <td background="images/lbox_bg_blue.gif"></td>
659
                     <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
660
                  </tr>
661
               </table>
662
 
127 ghuddy 663
            </td>
664
            <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
665
         </tr>
666
         <tr>
667
            <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>
668
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350"></td>
669
         </tr>
670
      </table>
671
      <!-- FOOTER -->
672
      <!--#include file="_footer.asp"-->
673
   </body>
119 ghuddy 674
</html>
675
<%
676
Call Destroy_All_Objects
677
%>