Last Elasticsearch Query
"+
'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
- "'
",
- };
+ "'",
+ };
};
$scope.build_search = function(field,value) {
@@ -137,12 +137,12 @@ angular.module('kibana.map', [])
// Using LABjs, wait until all scripts are loaded before rendering panel
var scripts = $LAB.script("panels/map/lib/jquery.jvectormap.min.js").wait()
.script("panels/map/lib/map."+scope.panel.map+".js");
-
+
// Populate element. Note that jvectormap appends, does not replace.
scripts.wait(function(){
elem.text('');
$('.jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label').remove();
- var map = elem.vectorMap({
+ var map = elem.vectorMap({
map: scope.panel.map,
regionStyle: {initial: {fill: '#8c8c8c'}},
zoomOnScroll: false,
diff --git a/panels/pie/module.js b/panels/pie/module.js
index fb8386b823072..2a19cfca2ba1e 100644
--- a/panels/pie/module.js
+++ b/panels/pie/module.js
@@ -14,7 +14,7 @@
* legend :: Show the legend?
* labels :: Label the slices of the pie?
* mode :: 'terms' or 'goal'
- * default_field :: LOL wat? A dumb fail over field if for some reason the query object
+ * default_field :: LOL wat? A dumb fail over field if for some reason the query object
doesn't have a field
* spyable :: Show the 'eye' icon that displays the last ES query for this panel
*/
@@ -36,7 +36,7 @@ angular.module('kibana.pie', [])
editorTabs : [
{title:'Queries', src:'partials/querySelect.html'}
],
- query : { field:"_type", goal: 100},
+ query : { field:"_type", goal: 100},
queries : {
mode : 'all',
ids : []
@@ -70,8 +70,8 @@ angular.module('kibana.pie', [])
}
};
- $scope.set_refresh = function (state) {
- $scope.refresh = state;
+ $scope.set_refresh = function (state) {
+ $scope.refresh = state;
};
$scope.close_edit = function() {
@@ -83,18 +83,18 @@ angular.module('kibana.pie', [])
};
$scope.get_data = function() {
-
+
// Make sure we have everything for the request to complete
if(dashboard.indices.length === 0) {
return;
- }
+ }
$scope.panelMeta.loading = true;
var request = $scope.ejs.Request().indices(dashboard.indices);
$scope.panel.queries.ids = querySrv.idsByMode($scope.panel.queries);
- // This could probably be changed to a BoolFilter
+ // This could probably be changed to a BoolFilter
var boolQuery = $scope.ejs.BoolQuery();
_.each($scope.panel.queries.ids,function(id) {
boolQuery = boolQuery.should(querySrv.getEjsObj(id));
@@ -127,7 +127,7 @@ angular.module('kibana.pie', [])
$scope.data = [];
var k = 0;
_.each(results.facets.pie.terms, function(v) {
- var slice = { label : v.term, data : v.count };
+ var slice = { label : v.term, data : v.count };
$scope.data.push();
$scope.data.push(slice);
k = k + 1;
@@ -140,9 +140,9 @@ angular.module('kibana.pie', [])
.query(boolQuery)
.filter(filterSrv.getBoolFilter(filterSrv.ids))
.size(0);
-
+
$scope.populate_modal(request);
-
+
results = request.doSearch();
results.then(function(results) {
@@ -165,8 +165,8 @@ angular.module('kibana.pie', [])
body : "
Last Elasticsearch Query
"+
'curl -XGET '+config.elasticsearch+'/'+dashboard.indices+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
- "'
",
- };
+ "'",
+ };
};
})
@@ -194,11 +194,11 @@ angular.module('kibana.pie', [])
var scripts = $LAB.script("common/lib/panels/jquery.flot.js").wait()
.script("common/lib/panels/jquery.flot.pie.js");
-
+
var label;
if(scope.panel.mode === 'goal') {
- label = {
+ label = {
show: scope.panel.labels,
radius: 0,
formatter: function(label, series){
@@ -211,15 +211,15 @@ angular.module('kibana.pie', [])
}
},
};
- } else {
- label = {
+ } else {
+ label = {
show: scope.panel.labels,
radius: 2/3,
formatter: function(label, series){
return '
'+
label+'
'+Math.round(series.percent)+'%
';
},
- threshold: 0.1
+ threshold: 0.1
};
}
@@ -241,10 +241,10 @@ angular.module('kibana.pie', [])
}
},
//grid: { hoverable: true, clickable: true },
- grid: {
+ grid: {
backgroundColor: null,
- hoverable: true,
- clickable: true
+ hoverable: true,
+ clickable: true
},
legend: { show: false },
colors: querySrv.colors
@@ -263,7 +263,7 @@ angular.module('kibana.pie', [])
}
function tt(x, y, contents) {
- var tooltip = $('#pie-tooltip').length ?
+ var tooltip = $('#pie-tooltip').length ?
$('#pie-tooltip') : $('
');
tooltip.html(contents).css({
diff --git a/panels/query/module.js b/panels/query/module.js
index f43306d693e31..4896d7f97ec00 100644
--- a/panels/query/module.js
+++ b/panels/query/module.js
@@ -5,9 +5,9 @@
## query
### Parameters
- * label :: The label to stick over the field
+ * label :: The label to stick over the field
* query :: A string or an array of querys. String if multi is off, array if it is on
- This should be fixed, it should always be an array even if its only
+ This should be fixed, it should always be an array even if its only
one element
*/
diff --git a/panels/table/module.js b/panels/table/module.js
index 18b74b297271d..631248cd049f9 100644
--- a/panels/table/module.js
+++ b/panels/table/module.js
@@ -6,14 +6,14 @@
### Parameters
* size :: Number of events per page to show
- * pages :: Number of pages to show. size * pages = number of cached events.
+ * pages :: Number of pages to show. size * pages = number of cached events.
Bigger = more memory usage byh the browser
* offset :: Position from which to start in the array of hits
* sort :: An array with 2 elements. sort[0]: field, sort[1]: direction ('asc' or 'desc')
* style :: hash of css properties
* fields :: columns to show in table
* overflow :: 'height' or 'min-height' controls wether the row will expand (min-height) to
- to fit the table, or if the table will scroll to fit the row (height)
+ to fit the table, or if the table will scroll to fit the row (height)
* trimFactor :: If line is > this many characters, divided by the number of columns, trim it.
* sortable :: Allow sorting?
* spyable :: Show the 'eye' icon that reveals the last ES query for this panel
@@ -110,7 +110,7 @@ angular.module('kibana.table', [])
} else {
$scope.panel.highlight.push(field);
}
- };
+ };
$scope.toggle_details = function(row) {
row.kibana = row.kibana || {};
@@ -147,7 +147,7 @@ angular.module('kibana.table', [])
if(dashboard.indices.length === 0) {
return;
}
-
+
$scope.panelMeta.loading = true;
$scope.panel.queries.ids = querySrv.idsByMode($scope.panel.queries);
@@ -208,14 +208,14 @@ angular.module('kibana.table', [])
_sort : hit.sort
};
}));
-
+
$scope.hits += results.hits.total;
// Sort the data
$scope.data = _.sortBy($scope.data, function(v){
return v._sort[0];
});
-
+
// Reverse if needed
if($scope.panel.sort[1] === 'desc') {
$scope.data.reverse();
@@ -245,14 +245,14 @@ angular.module('kibana.table', [])
};
$scope.without_kibana = function (row) {
- return {
+ return {
_source : row._source,
highlight : row.highlight
};
- };
+ };
- $scope.set_refresh = function (state) {
- $scope.refresh = state;
+ $scope.set_refresh = function (state) {
+ $scope.refresh = state;
};
$scope.close_edit = function() {
@@ -296,7 +296,7 @@ angular.module('kibana.table', [])
type = fields.mapping[event._index][event._type][field]['type'];
if(type === 'date' && scope.panel.normTimes) {
return moment(text).format('YYYY-MM-DD HH:mm:ss');
- }
+ }
}
return text;
};
diff --git a/panels/terms/module.js b/panels/terms/module.js
index cefde518bb493..ab13b8b424beb 100644
--- a/panels/terms/module.js
+++ b/panels/terms/module.js
@@ -11,7 +11,7 @@
* arrangement :: How should I arrange the query results? 'horizontal' or 'vertical'
* chart :: Show a chart? 'none', 'bar', 'pie'
* donut :: Only applies to 'pie' charts. Punches a hole in the chart for some reason
- * tilt :: Only 'pie' charts. Janky 3D effect. Looks terrible 90% of the time.
+ * tilt :: Only 'pie' charts. Janky 3D effect. Looks terrible 90% of the time.
* lables :: Only 'pie' charts. Labels on the pie?
*/
@@ -26,7 +26,7 @@ angular.module('kibana.terms', [])
{title:'Queries', src:'partials/querySelect.html'}
],
status : "Beta",
- description : "Displays the results of an elasticsearch facet as a pie chart, bar chart, or a "+
+ description : "Displays the results of an elasticsearch facet as a pie chart, bar chart, or a "+
"table"
};
@@ -55,7 +55,7 @@ angular.module('kibana.terms', [])
$scope.init = function () {
$scope.hits = 0;
-
+
$scope.$on('refresh',function(){
$scope.get_data();
});
@@ -67,7 +67,7 @@ angular.module('kibana.terms', [])
// Make sure we have everything for the request to complete
if(dashboard.indices.length === 0) {
return;
- }
+ }
$scope.panelMeta.loading = true;
var request,
@@ -77,7 +77,7 @@ angular.module('kibana.terms', [])
request = $scope.ejs.Request().indices(dashboard.indices);
$scope.panel.queries.ids = querySrv.idsByMode($scope.panel.queries);
- // This could probably be changed to a BoolFilter
+ // This could probably be changed to a BoolFilter
boolQuery = $scope.ejs.BoolQuery();
_.each($scope.panel.queries.ids,function(id) {
boolQuery = boolQuery.should(querySrv.getEjsObj(id));
@@ -108,11 +108,11 @@ angular.module('kibana.terms', [])
$scope.hits = results.hits.total;
$scope.data = [];
_.each(results.facets.terms.terms, function(v) {
- var slice = { label : v.term, data : [[k,v.count]], actions: true};
+ var slice = { label : v.term, data : [[k,v.count]], actions: true};
$scope.data.push(slice);
k = k + 1;
});
-
+
$scope.data.push({label:'Missing field',
data:[[k,results.facets.terms.missing]],meta:"missing",color:'#aaa',opacity:0});
$scope.data.push({label:'Other values',
@@ -135,8 +135,8 @@ angular.module('kibana.terms', [])
dashboard.refresh();
};
- $scope.set_refresh = function (state) {
- $scope.refresh = state;
+ $scope.set_refresh = function (state) {
+ $scope.refresh = state;
};
$scope.close_edit = function() {
@@ -169,7 +169,7 @@ angular.module('kibana.terms', [])
scope.$on('render',function(){
render_panel();
});
-
+
// Re-render if the window is resized
angular.element(window).bind('resize', function(){
render_panel();
@@ -186,16 +186,16 @@ angular.module('kibana.terms', [])
// Make a clone we can operate on.
chartData = _.clone(scope.data);
- chartData = scope.panel.missing ? chartData :
+ chartData = scope.panel.missing ? chartData :
_.without(chartData,_.findWhere(chartData,{meta:'missing'}));
- chartData = scope.panel.other ? chartData :
+ chartData = scope.panel.other ? chartData :
_.without(chartData,_.findWhere(chartData,{meta:'other'}));
// Populate element.
scripts.wait(function(){
// Populate element
try {
- // Add plot to scope so we can build out own legend
+ // Add plot to scope so we can build out own legend
if(scope.panel.chart === 'bar') {
plot = $.plot(elem, chartData, {
legend: { show: false },
@@ -238,11 +238,11 @@ angular.module('kibana.terms', [])
stroke: {
width: 0
},
- label: {
+ label: {
show: scope.panel.labels,
radius: 2/3,
formatter: labelFormat,
- threshold: 0.1
+ threshold: 0.1
}
}
},
@@ -269,7 +269,7 @@ angular.module('kibana.terms', [])
}
function tt(x, y, contents) {
- var tooltip = $('#pie-tooltip').length ?
+ var tooltip = $('#pie-tooltip').length ?
$('#pie-tooltip') : $('
');
//var tooltip = $('#pie-tooltip')
tooltip.html(contents).css({
@@ -293,7 +293,7 @@ angular.module('kibana.terms', [])
elem.bind("plothover", function (event, pos, item) {
if (item) {
- var value = scope.panel.chart === 'bar' ?
+ var value = scope.panel.chart === 'bar' ?
item.datapoint[1] : item.datapoint[1][0][1];
tt(pos.pageX, pos.pageY,
"