Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 5e3cff5

Browse files
committed
Possible fix for issue #890
- added additional check to ensure sampling of data only applies to search result chart widgets
1 parent 69342c0 commit 5e3cff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/api/DashboardsApiController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Result widgetValue(String dashboardId, String widgetId, int resolution) {
136136
DashboardWidget widget = dashboard.getWidget(widgetId);
137137
DashboardWidgetValueResponse widgetValue = widget.getValue(api());
138138

139-
Object resultValue = filterValuesByResolution(resolution, widgetValue.result);
139+
Object resultValue = (widget instanceof SearchResultChartWidget) ? filterValuesByResolution(resolution, widgetValue.result) : widgetValue.result;
140140
Map<String, Object> result = Maps.newHashMap();
141141
result.put("result", resultValue);
142142
result.put("took_ms", widgetValue.tookMs);

0 commit comments

Comments
 (0)