|
@@ -23,7 +23,7 @@ define([
|
|
|
'jquery',
|
|
'jquery',
|
|
|
'kbn',
|
|
'kbn',
|
|
|
'config'
|
|
'config'
|
|
|
-], function (angular, app, _, $, kbn, config) {
|
|
|
|
|
|
|
+], function (angular, app, _, $, kbn) {
|
|
|
'use strict';
|
|
'use strict';
|
|
|
|
|
|
|
|
var module = angular.module('kibana.panels.pie', []);
|
|
var module = angular.module('kibana.panels.pie', []);
|
|
@@ -32,6 +32,17 @@ define([
|
|
|
module.controller('pie', function($scope, $rootScope, querySrv, dashboard, filterSrv) {
|
|
module.controller('pie', function($scope, $rootScope, querySrv, dashboard, filterSrv) {
|
|
|
|
|
|
|
|
$scope.panelMeta = {
|
|
$scope.panelMeta = {
|
|
|
|
|
+ editorTabs : [
|
|
|
|
|
+ {title:'Queries', src:'app/partials/querySelect.html'}
|
|
|
|
|
+ ],
|
|
|
|
|
+ modals : [
|
|
|
|
|
+ {
|
|
|
|
|
+ description: "Inspect",
|
|
|
|
|
+ icon: "icon-info-sign",
|
|
|
|
|
+ partial: "app/partials/inspector.html",
|
|
|
|
|
+ show: $scope.panel.spyable
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
status : "Deprecated",
|
|
status : "Deprecated",
|
|
|
description : "Uses an Elasticsearch terms facet to create a pie chart. You should really only"+
|
|
description : "Uses an Elasticsearch terms facet to create a pie chart. You should really only"+
|
|
|
" point this at not_analyzed fields for that reason. This panel is going away soon, it has"+
|
|
" point this at not_analyzed fields for that reason. This panel is going away soon, it has"+
|
|
@@ -40,9 +51,6 @@ define([
|
|
|
|
|
|
|
|
// Set and populate defaults
|
|
// Set and populate defaults
|
|
|
var _d = {
|
|
var _d = {
|
|
|
- editorTabs : [
|
|
|
|
|
- {title:'Queries', src:'app/partials/querySelect.html'}
|
|
|
|
|
- ],
|
|
|
|
|
query : { field:"_type", goal: 100},
|
|
query : { field:"_type", goal: 100},
|
|
|
queries : {
|
|
queries : {
|
|
|
mode : 'all',
|
|
mode : 'all',
|
|
@@ -123,7 +131,7 @@ define([
|
|
|
filterSrv.getBoolFilter(filterSrv.ids)
|
|
filterSrv.getBoolFilter(filterSrv.ids)
|
|
|
)))).size(0);
|
|
)))).size(0);
|
|
|
|
|
|
|
|
- $scope.populate_modal(request);
|
|
|
|
|
|
|
+ $scope.inspector = angular.toJson(JSON.parse(request.toString()),true);
|
|
|
|
|
|
|
|
results = request.doSearch();
|
|
results = request.doSearch();
|
|
|
|
|
|
|
@@ -148,7 +156,7 @@ define([
|
|
|
.filter(filterSrv.getBoolFilter(filterSrv.ids))
|
|
.filter(filterSrv.getBoolFilter(filterSrv.ids))
|
|
|
.size(0);
|
|
.size(0);
|
|
|
|
|
|
|
|
- $scope.populate_modal(request);
|
|
|
|
|
|
|
+ $scope.inspector = angular.toJson(JSON.parse(request.toString()),true);
|
|
|
|
|
|
|
|
results = request.doSearch();
|
|
results = request.doSearch();
|
|
|
|
|
|
|
@@ -165,17 +173,6 @@ define([
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- // I really don't like this function, too much dom manip. Break out into directive?
|
|
|
|
|
- $scope.populate_modal = function(request) {
|
|
|
|
|
- $scope.modal = {
|
|
|
|
|
- title: "Inspector",
|
|
|
|
|
- body : "<h5>Last Elasticsearch Query</h5><pre>"+
|
|
|
|
|
- 'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
|
|
|
|
|
- angular.toJson(JSON.parse(request.toString()),true)+
|
|
|
|
|
- "'</pre>",
|
|
|
|
|
- };
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
module.directive('pie', function(querySrv, filterSrv, dashboard) {
|
|
module.directive('pie', function(querySrv, filterSrv, dashboard) {
|