From dab5802f41958d78931191e2b70935ff11a0e1cc Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Mon, 30 Oct 2023 12:05:09 -0400 Subject: [PATCH] Add new method stub to KPI classes created via command --- src/commands/newFile.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/commands/newFile.ts b/src/commands/newFile.ts index d7a15972..b6472069 100644 --- a/src/commands/newFile.ts +++ b/src/commands/newFile.ts @@ -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 {