Skip to content

Commit af2b039

Browse files
authored
Add new method stub to KPI classes created via command (#1260)
1 parent 9809670 commit af2b039

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/commands/newFile.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,17 @@ Method %OnLoadKPI() As %Status
835835
Return $$$OK
836836
}
837837
838+
${
839+
kpiType == "sql"
840+
? `/// Return a SQL statement to execute.\nMethod %OnGetSQL(ByRef pSQL As %String)`
841+
: kpiType == "mdx"
842+
? `/// Return an MDX statement to execute.\nMethod %OnGetMDX(ByRef pMDX As %String)`
843+
: `/// Get the data for this KPI manually.\nMethod %OnExecute()`
844+
} As %Status
845+
{
846+
Return $$$OK
847+
}
848+
838849
/// This callback is invoked from a dashboard when an action defined by this dashboard is invoked.
839850
ClassMethod %OnDashboardAction(pAction As %String, pContext As %ZEN.proxyObject) As %Status
840851
{

0 commit comments

Comments
 (0)