【发布时间】:2016-12-30 05:35:19
【问题描述】:
我有一个插件,它使用我自己的 es REST 服务来获取数据,我可以使用“ui/filter_manager”根据 timroes 插件使用 add 方法将过滤器添加到仪表板:
filterManager.add(
// The field to filter for, we can get it from the config
//$scope.vis.aggs.bySchemaName['tags'][0].params.field,
$scope.fieldName,
// The value to filter for, we will read out the bucket key from the tag
tag.label,
// Whether the filter is negated. If you want to create a negated filter pass '-' here
null,
// The index pattern for the filter
$scope.vis.indexPattern.title
);
如https://github.com/Prazzy/tr-k4p-tagcloud/blob/master/public/tagcloudController.js
但是通过这个,我可以将我的可视化过滤器应用到仪表板,但我还需要将从其他可视化应用到我的可视化的过滤器应用。所以,我期望的是一些变量 那将保存我到目前为止无法找到的过滤器。 或者最后一种方法可能是从浏览器 url 中提取过滤器并在 url 中的过滤器更改时触发查询???
【问题讨论】:
-
我尝试访问 var queryFilter = Private(require('ui/filter_bar/query_filter'));但是得到了 getAppFilters/getFilters/getGlobalFilters 函数的空白列表。
-
kibana 论坛上的相同链接:discuss.elastic.co/t/…
-
哦,如果有人在这方面寻找解决方案,我的最后一条评论应该可以工作,就我而言,我遇到了一些控制器问题。
标签: angularjs elasticsearch plugins kibana-4