Skip to content

Commit 030427c

Browse files
authored
FIX: change the way how dataProperties are processed for text meters
Deleted assign format to kpi style widget the solution do not worked for multiple text meters on one dash. Replaced %CopyTo on GetAt() in ClassMethod ProcesstextMeter(). For some reason %CopyTo ignored "format" propertie.
1 parent 0152111 commit 030427c

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

MDX2JSON/Dashboard.cls

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ ClassMethod WidgetToProxyObject(Widget As %DeepSee.Dashboard.Widget, CubeName As
115115
if $piece(Widget.dataSource, ".", *) = "kpi" {
116116
set kpiClass = ##class(%DeepSee.Utils).%GetKPIClass(Widget.dataSource)
117117
set obj.kpitype = $classmethod(kpiClass, "%GetSourceType")
118-
if (Widget.dataProperties.GetAt(1)) { // check if KPI have dataProperies
119-
set widgetData = Widget.dataProperties.GetAt(1)
120-
set obj.format = widgetData.format // duplicating format data in case of KPI
121-
}
118+
122119
}
123120

124121
// Widget is a portlet
@@ -234,8 +231,16 @@ ClassMethod ProcesstextMeter(Widget As %DeepSee.Dashboard.Widget, Obj As %ZEN.pr
234231
for i=1:1:Widget.dataProperties.Count()
235232
{
236233
set dataProperty = $$$NewDynObj
237-
do Widget.dataProperties.GetAt(i).%CopyTo(dataProperty)
238-
$$$Insert(Obj.dataProperties,dataProperty)
234+
if (Widget.dataProperties.GetAt(i)) // check if widget have dataProperties
235+
{
236+
set widgetData = Widget.dataProperties.GetAt(i)
237+
set dataProperty = ..WidgetDataPropertyToProxyObject(widgetData)
238+
if $IsObject(dataProperty)
239+
{
240+
$$$Insert(Obj.dataProperties,dataProperty)
241+
}
242+
243+
}
239244
}
240245
}
241246

0 commit comments

Comments
 (0)