" & vbCrLf)
Response.Write("Run "& run & "" & vbCrLf)
Else
response.write("" & vbCrLf)
response.write("" & vbCrLf)
Response.Write("| Run ")
Response.write( run & " | " & vbCrLf)
End If
run_old=run ' new run becomes old run from now on
End If
'
' write info for one sequence now. We know how many entries are for this sequence
' a priori so we can rely on For loop in advancing the records.
'
'
For i=0 To nactions-1
action_results(0,i)=CInt(RS("naction"))
RS.MoveNext
Next
'
' Find location of this group
'
igroup=actiongroup("NEW_SEQUENCE")
If igroup>-1 Then
dim s_start
dim s_end
dim s_old
s_start=false
s_end=false
s_old=false
For i=0 to nactions-1
If actions(2,i)="NEW_SEQUENCE" Then
If actions(0,i)="START_SEQ" Then
If CInt(action_results(0,i))>0 Then
s_start=true
End If
Elseif actions(0,i)="END_SEQ" Then
If CInt(action_results(0,i))>0 Then
s_end=true
End If
Elseif actions(0,i)="NEW_RUN_SEQUENCE" Then
If CInt(action_results(0,i))>0 Then
s_old=true
End If
End If
End If
Next
If (s_start and s_end) Or (s_old) Then
action_groups(1,igroup)=color(0)'green ,ok
Elseif (s_start and (Not s_end)) Then
If (run=last_run And sequence=last_sequence) Then
action_groups(1,igroup)=color(1)'yellow, still running
Else
action_groups(1,igroup)=color(2)'red, crash
End If
Else
action_groups(1,igroup)=color(3) 'blue, unknown
End If
End If
'
'PEDCALC analysis
'
igroup=actiongroup("PEDCALC")
If igroup>-1 Then
Dim st_pedcalc
dim ed_pedcalc
st_pedcalc=false
ed_pedcalc=false
For i=0 to nactions-1
If actions(2,i)="PEDCALC" then
If actions(0,i)="START_PEDCALC" then
If Cint(action_results(0,i))>0 then
st_pedcalc=true
end if
Elseif actions(0,i)="END_PEDCALC" then
If Cint(action_results(0,i))>0 then
ed_pedcalc=true
End if
End if
End if
Next
If (st_pedcalc and ed_pedcalc) then
action_groups(1,igroup)=color(0)'ok
Elseif (st_pedcalc and (not ed_pedcalc)) then
action_groups(1,igroup)=color(5)' in progress
else
action_groups(1,igroup)=color(4)'not done
End if
end if
'
'Sink analysis
'
igroup=actiongroup("SINKING")
If igroup>-1 Then
dim s_wait
s_wait=false
s_start=false
s_end=false'
For i=0 to nactions-1
If actions(2,i)="SINKING" then
If actions(0,i)="SINK_WAIT_SEQ" then
If Cint(action_results(0,i))>0 then
s_wait=true
end if
Elseif actions(0,i)="SINK_START_SEQ" then
If Cint(action_results(0,i))>0 then
s_start=true
end if
Elseif actions(0,i)="SINK_END_SEQ" then
If Cint(action_results(0,i))>0 then
s_end=true
end if
end if
end if
Next
If ((not s_wait) and (not s_start) and (not s_end)) then
action_groups(1,igroup)=color(4) ' not done
Elseif (s_wait and (not s_start) and (not s_end)) then
action_groups(1,igroup)=color(6)' waiting
Elseif ( s_wait and s_start and (not s_end) ) then
action_groups(1,igroup)=color(5) ' in progress
Elseif ((not s_wait) and s_start and (not s_end)) then
action_groups(1,igroup)=color(5) 'in progress
' add the condition of long time here
Elseif (s_wait and s_start and s_end) then
action_groups(1,igroup)=color(0) ' ok
Elseif ((not s_wait) and s_start and s_end) then
action_groups(1,igroup)=color(0) ' ok
Elseif ((not s_wait) and (not s_start) and s_end) then
action_groups(1,igroup)=color(0) ' ok
else
action_groups(1,igroup)=color(3) ' unknown or error
end if
End if
'
'Pass analysis
'
igroup=actiongroup("PASS0")
If igroup>-1 Then
s_wait=false
s_start=false
s_end=false'
For i=0 to nactions-1
If actions(2,i)="PASS0" then
If actions(0,i)="P0_SUBMIT_SEQ" then
If Cint(action_results(0,i))>0 then
s_wait=true
end if
Elseif actions(0,i)="P0_START_SEQ" then
If Cint(action_results(0,i))>0 then
s_start=true
end if
Elseif actions(0,i)="P0_END_SEQ" then
If Cint(action_results(0,i))>0 then
s_end=true
end if
end if
end if
Next
If ((not s_wait) and (not s_start) and (not s_end)) then
action_groups(1,igroup)=color(4) ' not done
Elseif (s_wait and (not s_start) and (not s_end)) then
action_groups(1,igroup)=color(6)' waiting
Elseif ( s_wait and s_start and (not s_end) ) then
'if time(now)-time(s_start)>5hrs (convert in seconds) then crash
'else in progress
action_groups(1,igroup)=color(5) ' in progress
Elseif ((not s_wait) and s_start and (not s_end)) then
'if time(now)-time(s_start)>5hrs (convert in seconds) then crash
'else in progress
action_groups(1,igroup)=color(5) 'in progress
Elseif (s_wait and s_start and s_end) then
action_groups(1,igroup)=color(0) ' ok
Elseif ((not s_wait) and s_start and s_end) then
action_groups(1,igroup)=color(0) ' ok
Elseif ((not s_wait) and (not s_start) and s_end) then
action_groups(1,igroup)=color(0) ' ok
else
action_groups=color(3) ' unknown or error
end if
End if
'
' DV analysis
' find if has been processed by DV, this is run only if run type is ALLBEAM
' loop through the action_groups array to see if DV present
'
igroup=actiongroup("DV")
If igroup>-1 Then
s_start=false
For i=0 to nactions-1
If actions(2,i)="DV" Then
If actions(0,i)="DV_PLOT_SEQ" Then
If CInt(action_results(0,i))>0 Then
s_start=true
End If
End If
End If
Next
'
' make the final decision
'
If s_start Then
action_groups(1,igroup)=color(0)'green ,ok
Else
action_groups(1,igroup)=color(4) 'grey, not done
End If
End if
'
' Print the full row
'
response.write("" & sequence & " | " & vbCrLf)
For igroup=0 To ngroups-1
If text_only then
Response.write("" & action_groups(1,igroup) & " | " &vbCrLf)
Else
Response.write(" " & vbCrLf)
Response.write( action_groups(1,igroup) & vbCrLf)
Response.write(" alt=""" & action_groups(0,igroup) & """> | " & vbCrLf)
End if
Next
' close row for this sequence
'
If 0= (sequence+1) Mod 4 then
Response.write(" | | " & vbCrLf)
else response.write(" | | | | " & vbCrLf)
end if
Loop
'
' close table for last run/sequence
'
Response.write(" " & vbCrLf)
%>
Legend
<%
For i=0 To ngroups-1
%>
-
<%
Response.write (action_groups(0,i))
%>
<%
Next
%>
<%
'
' CLose database connection
'
Set RS=nothing
Connection.Close
Set Connection=nothing
time_stop=Now()
time_tot=Round(24*60*60*(time_stop-time_start),1)
%>
<%=time_tot%>
|