Subversion Repositories DevTools

Rev

Rev 5957 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5957 Rev 7063
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'                  NEW VERSION
-
 
5
'       Build Daemon enquiries
4
'       Build Daemon enquiries
6
'       Designed to be called via AJAX and to return
5
'       Designed to be called via AJAX and to return
7
'       JSON formatted data to dynamic page
6
'       JSON formatted data to dynamic page
8
'=====================================================
7
'=====================================================
9
%>
8
%>
Line 40... Line 39...
40
'   
39
'   
41
'   Perform the body of the operations within a Sub and use
40
'   Perform the body of the operations within a Sub and use
42
'   On Error Resule Next to catch errors that accur in the code
41
'   On Error Resule Next to catch errors that accur in the code
43
'
42
'
44
On Error Resume Next
43
On Error Resume Next
45
If (parOpr = "indefPause") Then
44
If (parOpr = "dynaHead") Then
46
    indefPause
45
    dynaHead
47
 
46
 
48
Else
47
Else
49
    oJSON.data("error") = 1
48
    oJSON.data("error") = 1
50
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
49
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
51
    oJSON.data("emsgDetails") = "The Requested JSON operation is not supported: " & parOpr
50
    oJSON.data("emsgDetails") = "The Requested JSON operation is not supported: " & parOpr
Line 103... Line 102...
103
Set oJSON = Nothing
102
Set oJSON = Nothing
104
Call Destroy_All_Objects
103
Call Destroy_All_Objects
105
%>
104
%>
106
<%
105
<%
107
'-------------------------------------------------
106
'-------------------------------------------------
108
' Function:    indefPause
107
' Function:    dynaHead
109
' Description: Determine if daemons are paused
108
' Description: Return data to update the dynamic header
110
Sub indefPause
-
 
111
    '   Get Data for an existing entry
109
'              Indef paused, user logged out, current (Perth Time)
112
    '   Setup for the database access
110
Sub dynaHead
113
 
111
 
114
    SqlQry = "select * from run_level_schedule rls where rls.indefinite_pause = 'P'"
112
    objAccessControl.objOraSession = OraSession	    ' Create database link for orasession
-
 
113
    objAccessControl.objOraDatabase = OraDatabase	' Create database link for oradatabase
115
 
114
 
116
    objEH.ErrorRedirect = FALSE
115
    oJSON.data("indefPause") = IndefPause
117
    objEH.TryORA ( OraSession )
-
 
118
    On Error Resume Next
-
 
119
    Set rsQry = OraDatabase.DbCreateDynaset( SqlQry, ORADYN_DEFAULT )
-
 
120
    objEH.CatchORA ( OraSession )
116
    oJSON.data("now") = Now & " (AWST)"
121
 
-
 
122
    oJSON.data("indefPause") = rsQry.RecordCount
117
    oJSON.data("loggedIn") = objAccessControl.UserLogedIn
123
    result = 0
118
    result = 0
124
    rsQry.Close
-
 
125
    Set rsQry = Nothing
-
 
126
 
119
 
127
End Sub
120
End Sub
128
%>
121
%>