@@ -40,7 +40,7 @@ Usage: Select MDX2JSON.Dashboard_GetDashCover(bookCover) FROM %DeepSee_Dashboard
4040<Implementation ><![CDATA[
4141 do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(bookCover,,.obj,1)
4242 return:$isobject(obj) obj.background.src
43- return ""
43+ return ""
4444]]> </Implementation >
4545</Method >
4646
@@ -55,8 +55,8 @@ Usage: Select fullname, MDX2JSON.IsItemVisible(fullname) FROM %DeepSee_Dashboard
5555<SqlProc >1</SqlProc >
5656<Implementation ><![CDATA[
5757 set visible = ##class(%DeepSee.UserLibrary.Utils).%FolderItemExists(fullName)
58- return:visible=1 1
59- return 0
58+ return:visible=1 1
59+ return 0
6060]]> </Implementation >
6161</Method >
6262
@@ -74,7 +74,7 @@ Usage: Select MDX2JSON.Dashboard_ResolveText(title) FROM %DeepSee_Dashboard.Defi
7474<ReturnType >%String</ReturnType >
7575<SqlName >ResolveText</SqlName >
7676<SqlProc >1</SqlProc >
77- <Implementation ><![CDATA[ return ##class(%DeepSee.UserPortal.Utils).%ResolveText(Text)
77+ <Implementation ><![CDATA[ return ##class(%DeepSee.UserPortal.Utils).%ResolveText(Text)
7878]]> </Implementation >
7979</Method >
8080
@@ -89,12 +89,12 @@ Opens DeepSee dashboard by it's name. Returns status of aatempt to locate and op
8989<Implementation ><![CDATA[
9090 kill Dashboard
9191 &sql(
92- SELECT TOP 1 ID into :tDashId
93- FROM %DeepSee_Dashboard.Definition
94- WHERE fullName=:DashName
95- )
96- return:(SQLCODE'=0) $$$ERROR($$$SQLError, SQLCODE)
97-
92+ SELECT TOP 1 ID into :tDashId
93+ FROM %DeepSee_Dashboard.Definition
94+ WHERE fullName=:DashName
95+ )
96+ return:(SQLCODE'=0) $$$ERROR($$$SQLError, SQLCODE)
97+
9898 set Dashboard = ##class(%DeepSee.Dashboard.Definition).%OpenId(tDashId,,.st)
9999 return st
100100]]> </Implementation >
@@ -107,22 +107,22 @@ Converts %DeepSee.Dashboard.Definition widgets into %ZEN.proxyObject.</Descripti
107107<FormalSpec >Dashboard:%DeepSee.Dashboard.Definition,*Widgetlist:%ZEN.proxyObject</FormalSpec >
108108<ReturnType >%Status</ReturnType >
109109<Implementation ><![CDATA[
110- #Dim widget As %DeepSee.Dashboard.Widget
111- set Widgetlist = $$$NewDynObj
112- set Widgetlist.children = $$$NewDynObjList
113- set Widgetlist.displayInfo = ..GetDashboardDisplayInfo(Dashboard)
114- set Widgetlist.info = ..GetDashboardInfo(Dashboard)
115-
116- set st = $$$OK
117- try {
118- for i=1:1:Dashboard.widgets.Count() {
110+ #Dim widget As %DeepSee.Dashboard.Widget
111+ set Widgetlist = $$$NewDynObj
112+ set Widgetlist.children = $$$NewDynObjList
113+ set Widgetlist.displayInfo = ..GetDashboardDisplayInfo(Dashboard)
114+ set Widgetlist.info = ..GetDashboardInfo(Dashboard)
115+
116+ set st = $$$OK
117+ try {
118+ for i=1:1:Dashboard.widgets.Count() {
119119 $$$Insert(Widgetlist.children,..WidgetToProxyObject(Dashboard.widgets.GetAt(i)))
120- }
121- } catch ex {
122- set st = ex.AsStatus()
123- do ex.Log()
124- }
125- return st
120+ }
121+ } catch ex {
122+ set st = ex.AsStatus()
123+ do ex.Log()
124+ }
125+ return st
126126]]> </Implementation >
127127</Method >
128128
@@ -134,11 +134,11 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
134134<FormalSpec >Widget:%DeepSee.Dashboard.Widget</FormalSpec >
135135<ReturnType >%ZEN.proxyObject</ReturnType >
136136<Implementation ><![CDATA[
137- set obj = $$$NewDynObj
138-
139- &sql(SELECT cubeName into :cube FROM %DeepSee_Dashboard.Pivot WHERE fullName=:Widget.dataSource)
137+ set obj = $$$NewDynObj
138+
139+ &sql(SELECT cubeName into :cube FROM %DeepSee_Dashboard.Pivot WHERE fullName=:Widget.dataSource)
140140 set:(SQLCODE'=0) cube=""
141-
141+
142142 if (Widget.dataSource'="") {
143143 set st = ..GetMdx(Widget.dataSource, .mdx, .basemdx)
144144 } else {
@@ -147,13 +147,13 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
147147 set basemdx = ""
148148 set obj.Link = Widget.dataLink
149149 }
150-
150+
151151 set obj.mdx = mdx
152152 set obj.name = Widget.name
153153 set obj.basemdx = basemdx
154154 set obj.type =Widget.subtype
155155 set obj.title = ##class(%DeepSee.UserPortal.Utils).%ResolveText(Widget.title) /// $$$ support
156- set obj.key = Widget.key
156+ set obj.key = Widget.key
157157 set obj.dataSource = Widget.dataSource
158158 set obj.drillDownDataSource = Widget.drillDownDataSource
159159 set obj.cube = cube
@@ -167,20 +167,20 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
167167 $$$Insert(obj.controls,control)
168168 }
169169 }
170-
170+
171171 if ##class(%Dictionary.CompiledMethod).%ExistsId("MDX2JSON.Dashboard||Process"_Widget.subtype) {
172172 do $ClassMethod("MDX2JSON.Dashboard", "Process"_Widget.subtype, Widget, obj)
173173 }
174-
174+
175175 if (Widget.properties.Count()>0) {
176176 set obj.properties = $$$NewDynObj //##class(%ArrayOfDataTypes).%New()
177177 do {
178- set property = Widget.properties.GetNext(.key)
178+ set property = Widget.properties.GetNext(.key)
179179 //do:(key'="") obj.properties.SetAt(property,key)
180180 do:(key'="") obj.properties.%DispatchSetProperty(key,property)
181181 } while key'=""
182182 }
183-
183+
184184 return obj
185185]]> </Implementation >
186186</Method >
@@ -189,30 +189,30 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
189189<ClassMethod >1</ClassMethod >
190190<FormalSpec >Widget:%DeepSee.Dashboard.Widget,Obj:%ZEN.proxyObject</FormalSpec >
191191<Implementation ><![CDATA[
192-
192+
193193 set Obj.seriesTypes = $$$NewDynDTList
194194 for i=1:1:Widget.dataSeries.Count()
195195 {
196196 $$$Insert(Obj.seriesTypes,Widget.dataSeries.GetAt(i).type)
197197 }
198-
198+
199199 set Obj.overrides = $$$NewDynObjList
200200 do {
201201 set overridestr = Widget.overrides.GetNext(.key) // we take DeepSee widget override string (in "json" format)
202202 return:key=""
203-
204-
203+
204+
205205 do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(overridestr,,.override,1) // convert it into %ZEN.proxyObject
206206
207207 #if $$$IsNewJSON // if we are on new versions
208- set overridestr = ##class(MDX2JSON.AbstractREST).OutputToStr(override,"%ToJSON") // convert it into valid json
208+ set overridestr = ##class(MDX2JSON.AbstractREST).OutputToStr(override,"%ToJSON") // convert it into valid json
209209 set override = ##class(%Object).$fromJSON(overridestr) // and into %Object
210210 #endif
211-
211+
212212 if $IsObject(override) {
213213 $$$Insert(Obj.overrides,override)
214214 }
215-
215+
216216 } while key'=""
217217]]> </Implementation >
218218</Method >
@@ -241,11 +241,11 @@ Converts %DeepSee.Dashboard.Control object into %ZEN.proxyObject, handles run-ti
241241<Implementation ><![CDATA[
242242 set obj = $$$NewDynObj
243243 set st = Widget.controls.GetAt(Number).%CopyTo(obj) // copy widget control properties to proxyObj
244-
244+
245245 set obj.label = ##class(%DeepSee.UserPortal.Utils).%ResolveText(obj.label)
246246 set obj.source = Widget.name
247-
248- set:(obj.target="") obj.target = Widget.name
247+
248+ set:(obj.target="") obj.target = Widget.name
249249
250250 if ($e(obj.value)="@") {
251251 set name = $e(obj.value,2,*)
@@ -256,8 +256,8 @@ Converts %DeepSee.Dashboard.Control object into %ZEN.proxyObject, handles run-ti
256256 set obj.value = "&[" _ value _ "]"
257257 }
258258 }
259-
260- set:((obj.action="applyFilter") || (obj.action="setFilter")) obj.values = ..GetMembersForFilter(Cube,obj.targetProperty)
259+
260+ set:((obj.action="applyFilter") || (obj.action="setFilter")) obj.values = ..GetMembersForFilter(Cube,obj.targetProperty)
261261 return obj
262262]]> </Implementation >
263263</Method >
@@ -275,16 +275,16 @@ Returns MDX string used to create pivot.<br>
275275 #dim tPivotTable As %DeepSee.Component.pivotTable
276276 set MDX = ""
277277 set BaseMDX = ""
278-
279- set tPivot = ##class(%DeepSee.UserLibrary.Utils).%OpenFolderItem(pPivotName,.pStatus)
280- return:'$IsObject(tPivot) $$$OK
281- return:$$$ISERR(pStatus) pStatus
282-
283- set tPivotTable = ##class(%DeepSee.Component.pivotTable).%New()
284- set pStatus = tPivot.%CopyToComponent(tPivotTable)
285- return:$$$ISERR(pStatus) pStatus
286-
287- set rs = tPivotTable.%CreateResultSet(.pStatus,.tParms,.tFilterInfo,.tAdvancedFilters,.BaseMDX) // returns tQueryText - mdx without filters
278+
279+ set tPivot = ##class(%DeepSee.UserLibrary.Utils).%OpenFolderItem(pPivotName,.pStatus)
280+ return:'$IsObject(tPivot) $$$OK
281+ return:$$$ISERR(pStatus) pStatus
282+
283+ set tPivotTable = ##class(%DeepSee.Component.pivotTable).%New()
284+ set pStatus = tPivot.%CopyToComponent(tPivotTable)
285+ return:$$$ISERR(pStatus) pStatus
286+
287+ set rs = tPivotTable.%CreateResultSet(.pStatus,.tParms,.tFilterInfo,.tAdvancedFilters,.BaseMDX) // returns tQueryText - mdx without filters
288288 return:$$$ISERR(pStatus) pStatus
289289
290290 set pStatus = tPivotTable.%GetFilterInfo(.tFilterInfo,.tAdvancedFilters)
@@ -294,14 +294,14 @@ Returns MDX string used to create pivot.<br>
294294 set MDX = BaseMDX // no filters, so we're good
295295 } else {
296296 set rs = tPivotTable.%CreateResultSet(.pStatus,.tParms,.tFilterInfo,.tAdvancedFilters,.MDX) // returns tQueryText - mdx with filters
297- return:$$$ISERR(pStatus) pStatus
298- }
299-
297+ return:$$$ISERR(pStatus) pStatus
298+ }
299+
300300 // Remove \n
301- set MDX = $TR(MDX,$C(10),"")
302- set BaseMDX = $TR(MDX,$C(10),"")
303-
304- return pStatus
301+ set MDX = $TR(MDX,$C(10),"")
302+ set BaseMDX = $TR(MDX,$C(10),"")
303+
304+ return pStatus
305305]]> </Implementation >
306306</Method >
307307
@@ -315,8 +315,8 @@ Returns list of %ZEN.proxyObject:<br/>]]></Description>
315315<Implementation ><![CDATA[
316316 set st = ##class(%DeepSee.Dashboard.Utils).%GetMembersForFilter(DataSource,Filter,.tMembers,.tDefaultFilterValue,,.tRelatedFilters,0,,.tValueList)
317317 set members = $$$NewDynObjList
318-
319- set key = $order(tMembers(""))
318+
319+ set key = $order(tMembers(""))
320320 while (key '= "") {
321321 set member = $$$NewDynObj
322322 set member.name = $lg(tMembers(key),1)
@@ -336,12 +336,12 @@ Converts %DeepSee.Dashboard.Definition display information into %ZEN.proxyObject
336336<FormalSpec >Dashboard:%DeepSee.Dashboard.Definition</FormalSpec >
337337<ReturnType >%ZEN.proxyObject</ReturnType >
338338<Implementation ><![CDATA[
339- set DisplayInfo = $$$NewDynObj
340- set DisplayInfo.snapToGrid = Dashboard.snapTo // Dashboard is in "snap to grid" mode.
341- set DisplayInfo.gridMode = Dashboard.snapGrid // Dashboard uses the new snapGrid layout mode.
342- set DisplayInfo.gridRows = Dashboard.gridRows
343- set DisplayInfo.gridCols = Dashboard.gridCols
344- return DisplayInfo
339+ set DisplayInfo = $$$NewDynObj
340+ set DisplayInfo.snapToGrid = Dashboard.snapTo // Dashboard is in "snap to grid" mode.
341+ set DisplayInfo.gridMode = Dashboard.snapGrid // Dashboard uses the new snapGrid layout mode.
342+ set DisplayInfo.gridRows = Dashboard.gridRows
343+ set DisplayInfo.gridCols = Dashboard.gridCols
344+ return DisplayInfo
345345]]> </Implementation >
346346</Method >
347347
@@ -352,7 +352,7 @@ Converts %DeepSee.Dashboard.Widget display information into %ZEN.proxyObject.</D
352352<FormalSpec >Widget:%DeepSee.Dashboard.Widget</FormalSpec >
353353<ReturnType >%ZEN.proxyObject</ReturnType >
354354<Implementation ><![CDATA[
355- set DisplayInfo = $$$NewDynObj
355+ set DisplayInfo = $$$NewDynObj
356356
357357 set DisplayInfo.top = Widget.top
358358 set DisplayInfo.left = Widget.left
@@ -361,9 +361,9 @@ Converts %DeepSee.Dashboard.Widget display information into %ZEN.proxyObject.</D
361361 set DisplayInfo.topCol = Widget.homeColL
362362 set DisplayInfo.leftRow = Widget.homeRowL
363363 set DisplayInfo.colWidth = Widget.colSpanL
364- set DisplayInfo.rowHeight = Widget.rowSpanL
365-
366- return DisplayInfo
364+ set DisplayInfo.rowHeight = Widget.rowSpanL
365+
366+ return DisplayInfo
367367]]> </Implementation >
368368</Method >
369369
@@ -374,10 +374,10 @@ Converts %DeepSee.Dashboard.Definition display information into %ZEN.proxyObject
374374<FormalSpec >Dashboard:%DeepSee.Dashboard.Definition</FormalSpec >
375375<ReturnType >%ZEN.proxyObject</ReturnType >
376376<Implementation ><![CDATA[
377- set Info = $$$NewDynObj
378- set Info.title = Dashboard.title
377+ set Info = $$$NewDynObj
378+ set Info.title = Dashboard.title
379379
380- return Info
380+ return Info
381381]]> </Implementation >
382382</Method >
383383
0 commit comments