Skip to content
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

Add new method stub to KPI classes created via command #1260

Merged
Merged
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
11 changes: 11 additions & 0 deletions src/commands/newFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,17 @@ Method %OnLoadKPI() As %Status
Return $$$OK
}

${
kpiType == "sql"
? `/// Return a SQL statement to execute.\nMethod %OnGetSQL(ByRef pSQL As %String)`
: kpiType == "mdx"
? `/// Return an MDX statement to execute.\nMethod %OnGetMDX(ByRef pMDX As %String)`
: `/// Get the data for this KPI manually.\nMethod %OnExecute()`
} As %Status
{
Return $$$OK
}

/// This callback is invoked from a dashboard when an action defined by this dashboard is invoked.
ClassMethod %OnDashboardAction(pAction As %String, pContext As %ZEN.proxyObject) As %Status
{
Expand Down