use of org.graylog.plugins.views.search.views.WidgetConfigDTO in project graylog2-server by Graylog2.
the class DashboardWidgetConverter method createHistogramWidget.
private List<WidgetEntity> createHistogramWidget() {
final WidgetConfigDTO widgetConfigDTO = defaultWidgetConfig();
final WidgetEntity.Builder widgetEntityBuilder = aggregationWidgetBuilder().config(widgetConfigDTO);
final Optional<String> query = config.getOptionalString("query");
query.ifPresent(s -> widgetEntityBuilder.query(ElasticsearchQueryString.of(s)));
return ImmutableList.of(widgetEntityBuilder.build());
}
Aggregations