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