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