forked from eduard93/Cache-MDX2JSON
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDashboardFilters.cls.xml
More file actions
88 lines (83 loc) · 3.21 KB
/
DashboardFilters.cls.xml
File metadata and controls
88 lines (83 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="IRIS" version="26">
<Class name="MDX2JSON.DashboardFilters">
<Description>
Class with methods related to DeepSee Dashboard and Widget processing.</Description>
<IncludeCode>MDX2JSON.MDX2JSON</IncludeCode>
<Super>MDX2JSON.Dashboard</Super>
<TimeCreated>63644,52893.543838</TimeCreated>
<Method name="WidgetsToProxyObject">
<Description>
Converts %DeepSee.Dashboard.Definition widgets into %ZEN.proxyObject.</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>Dashboard:%DeepSee.Dashboard.Definition,*Widgetlist:%ZEN.proxyObject</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
#Dim widget As %DeepSee.Dashboard.Widget
set Widgetlist = $$$NewDynObj
set Widgetlist.widgets = $$$NewDynObjList
set Widgetlist.filters = $$$NewDynObjList
set Widgetlist.displayInfo = ..GetDashboardDisplayInfo(Dashboard)
set Widgetlist.info = ..GetDashboardInfo(Dashboard)
set st = $$$OK
try {
for i=1:1:Dashboard.widgets.Count() {
$$$Insert(Widgetlist.widgets,..WidgetToProxyObject(Dashboard.widgets.GetAt(i), ..GetWidgetCube(Dashboard, i)))
#dim filters As %ListOfObjects
set filters = ..WidgetFiltersToProxyObject(Dashboard.widgets.GetAt(i), ..GetWidgetCube(Dashboard, i))
for j=1:1:$$$ListSize(filters) {
$$$Insert(Widgetlist.filters,$$$ListGet(filters,j))
}
}
} catch ex {
set st = ex.AsStatus()
do ex.Log()
}
return st
]]></Implementation>
</Method>
<Method name="WidgetFiltersToProxyObject">
<Description>
Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObject.</Description>
<Internal>1</Internal>
<ClassMethod>1</ClassMethod>
<FormalSpec>Widget:%DeepSee.Dashboard.Widget,CubeName:%String</FormalSpec>
<ReturnType>%ZEN.proxyObject</ReturnType>
<Implementation><![CDATA[
set obj = $$$NewDynObjList
for i=1:1:Widget.controls.Count()
{
set filter = ..WidgetFilterToProxyObject(Widget, i, CubeName)
if $IsObject(filter){
$$$Insert(obj,filter)
}
}
return obj
]]></Implementation>
</Method>
<Method name="WidgetControlToProxyObject">
<Description>
Converts %DeepSee.Dashboard.Control object into %ZEN.proxyObject, handles run-time DeepSee variables.</Description>
<Internal>1</Internal>
<ClassMethod>1</ClassMethod>
<FormalSpec>Widget:%DeepSee.Dashboard.Widget,Number:%Integer,Cube:%String</FormalSpec>
<ReturnType>%ZEN.proxyObject</ReturnType>
<Implementation><![CDATA[
return:((Widget.controls.GetAt(Number).action="applyFilter") || (Widget.controls.GetAt(Number).action="setFilter")) ""
return ##class(MDX2JSON.Dashboard).WidgetControlToProxyObject(Widget,Number,Cube)
]]></Implementation>
</Method>
<Method name="WidgetFilterToProxyObject">
<Description>
Converts %DeepSee.Dashboard.Control object into %ZEN.proxyObject, handles run-time DeepSee variables.</Description>
<Internal>1</Internal>
<ClassMethod>1</ClassMethod>
<FormalSpec>Widget:%DeepSee.Dashboard.Widget,Number:%Integer,Cube:%String</FormalSpec>
<ReturnType>%ZEN.proxyObject</ReturnType>
<Implementation><![CDATA[
return:'((Widget.controls.GetAt(Number).action="applyFilter") || (Widget.controls.GetAt(Number).action="setFilter")) ""
return ##class(MDX2JSON.Dashboard).WidgetControlToProxyObject(Widget,Number,Cube)
]]></Implementation>
</Method>
</Class>
</Export>