Skip to content

FEAT: add audit system #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions MDX2JSON/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ ClassMethod WriteJSONfromMDX(MDX As %String, Timeout As %Integer = 0) As %Status

set obj = RS.ToProxyObject(.tSC)
return:$$$ISERR(tSC) tSC

// check if audit global hold something and execute it
try {xecute ^DeepSee.AuditQueryCode} catch {}

$$$DynObjToJSON(obj)

}else{ // if cube is not compound execute the query in usual way
Expand All @@ -85,8 +89,13 @@ ClassMethod WriteJSONfromMDX(MDX As %String, Timeout As %Integer = 0) As %Status

set obj = RS.ToProxyObject(.tSC)
return:$$$ISERR(tSC) tSC

// check if audit global hold something and execute it
try {xecute ^DeepSee.AuditQueryCode} catch {}

$$$DynObjToJSON(obj)
}

return $$$OK
}

Expand All @@ -108,7 +117,6 @@ ClassMethod WriteJSONfromQuery(CubeKey As %String, QueryKey As %String, Timeout
return $$$OK
}


/// Execute SQL query taken from KPI and extract column values by name of column
/// Output array with list of values like so pValue(n) = $LB(sNameList(i)...)
ClassMethod GetSQLValues(pSQL, Output pValues As %String, Output tResultSet As %SQL.Statement) As %Status
Expand All @@ -133,7 +141,6 @@ ClassMethod GetSQLValues(pSQL, Output pValues As %String, Output tResultSet As %
return st
}


/// This method provides listing execution for KPI.
/// <b>tKPI<b> as a name of KPI class. <b>pFilters<b> not yet implemented
/// as a <b>pSelection<b>. Thats for future use.
Expand Down Expand Up @@ -309,7 +316,7 @@ ClassMethod GetDataSource(pDataSource As %String)

set st = $$$OK
try {

if ($FIND(pDataSource, ".pivot") = ($LENGTH(pDataSource) + 1) && pDataSource '="") {
set st = ..OpenPivotByName(pDataSource, .dataSource)
return:($$$ISERR(st)) st
Expand All @@ -322,6 +329,7 @@ ClassMethod GetDataSource(pDataSource As %String)
set st = ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(dataSource, .out)

}


} catch ex {
set st = ex.AsStatus()
Expand Down Expand Up @@ -415,6 +423,10 @@ ClassMethod GetDashboard(pDashName As %String) As %Status
set st = ##class(MDX2JSON.DashboardFilters).WidgetsToProxyObject(dash, .widgetlist)
return:($$$ISERR(st)) st
w "" // weird hack required for 15.3

// check if audit global hold something and execute it
try {xecute ^DeepSee.AuditCode} catch {}

$$$DynObjToJSON(widgetlist)
} catch ex {
set st = ex.AsStatus()
Expand Down Expand Up @@ -672,7 +684,6 @@ ClassMethod DeleteWidget(wName As %String, sDashboard As %String) As %Status
return st
}


/// the collection of necessary parameters for building widget
ClassMethod UpdateWidget(widgetToUpdate As %DeepSee.Dashboard.Widget, data As %ZEN.proxyObject) As %Status
{
Expand Down
Loading