diff --git a/Gruntfile.js b/Gruntfile.js index 237f3d666938a8..c0e067e0e517d3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,6 +18,7 @@ module.exports = function (grunt) { files: ['Gruntfile.js', 'js/*.js', 'panels/*/*.js' ], options: { bitwise: true, + maxlen: 140, curly: true, eqeqeq: true, immed: true, diff --git a/js/controllers.js b/js/controllers.js index c6195b273fa7ba..8311fe5abb9f8c 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -129,6 +129,7 @@ angular.module('kibana.controllers', []) }; $scope.reset_panel = function() { + $scope.panel = { loading : false, error : false, diff --git a/js/directives.js b/js/directives.js index 44fce2e020a2d0..192e2078e806af 100644 --- a/js/directives.js +++ b/js/directives.js @@ -8,8 +8,9 @@ angular.module('kibana.directives', []) restrict: 'E', link: function(scope, elem, attrs) { var template = ''+ - ' '+ - '{{panel.type}} '+ + ' '+ + '{{panel.type}} '+ '

{{panel.title}}

'; elem.prepend($compile(angular.element(template))(scope)); } @@ -21,7 +22,10 @@ angular.module('kibana.directives', []) link: function(scope, elem, attrs) { scope.$watch('panel.type', function(n,o) { if(!_.isUndefined(scope.panel.type)) { - var template = '
'; + var template = '
'+ + '
'+ + '
'+ + '
'; elem.html($compile(angular.element(template))(scope)); } }); diff --git a/js/services.js b/js/services.js index 2b9c40fd37b5ee..49cd92aa3e9920 100644 --- a/js/services.js +++ b/js/services.js @@ -411,8 +411,8 @@ angular.module('kibana.services', []) { case 'time': return ejs.RangeFilter(filter.field) - .from(filter.from) - .to(filter.to); + .from(filter.from.valueOf()) + .to(filter.to.valueOf()); case 'range': return ejs.RangeFilter(filter.field) .from(filter.from) diff --git a/panels/bettermap/editor.html b/panels/bettermap/editor.html index 963801de903b12..fd8223015f1e33 100644 --- a/panels/bettermap/editor.html +++ b/panels/bettermap/editor.html @@ -1,14 +1,7 @@ -
-
- This panel uses geoJSON points in a field to place markers on a map. - Coordinates must be stored as an array in Elasticsearch. - Also note that geoJSON is long,lat NOT lat,long. -
-
-
Coordinate Field
+
Coordinate Field
diff --git a/panels/bettermap/module.js b/panels/bettermap/module.js index 75e1f2781d1915..478551c5cebdb4 100644 --- a/panels/bettermap/module.js +++ b/panels/bettermap/module.js @@ -5,10 +5,6 @@ ## Better maps - So the cavaet for this panel is that, for better or worse, it does NOT use the terms facet and it - DOES query sequentially. This however means that it transfer more data and is generally heavier - to computer, while showing less actual data - ### Parameters * size :: How many results to show, more results = slower * field :: field containing a 2 element array in the format [lon,lat] @@ -21,9 +17,17 @@ angular.module('kibana.bettermap', []) .controller('bettermap', function($scope, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Experimental", + description : "Displays geo points in clustered groups on a map. The cavaet for this panel is"+ + " that, for better or worse, it does NOT use the terms facet and it does query "+ + "sequentially. This however means that it transfers more data and is generally heavier to"+ + " compute, while showing less actual data. If you have a time filter, it will attempt to"+ + " show to most recent points in your search, up to your defined limit" + }; + // Set and populate defaults var _d = { - status : "Experimental", queries : { mode : 'all', ids : [] @@ -31,8 +35,7 @@ angular.module('kibana.bettermap', []) size : 1000, spyable : true, tooltip : "_id", - field : null, - group : "default" + field : null }; _.defaults($scope.panel,_d); diff --git a/panels/column/module.js b/panels/column/module.js index 9edd9a34b6a4e9..79bff92605f68d 100644 --- a/panels/column/module.js +++ b/panels/column/module.js @@ -4,10 +4,6 @@ ## Column - The column panel is sort of a hack to allow you to put multiple, veritcal, - panels next to a bigger panel. Note that it has no group, and setting a group - for the panel itself will do nothing - ### Parameters * panels :: an array of panel objects. All of their spans should be set to 12 @@ -17,9 +13,15 @@ angular.module('kibana.column', []) .controller('column', function($scope, $rootScope, $timeout) { + + $scope.panelMeta = { + status : "Stable", + description : "A pseudo panel that lets you add other panels to be arranged in a column with"+ + "defined heights." + }; + // Set and populate defaults var _d = { - status: "Stable", panels : [] }; _.defaults($scope.panel,_d); diff --git a/panels/dashcontrol/module.js b/panels/dashcontrol/module.js index 3604c6a442f251..8bb778ef621464 100644 --- a/panels/dashcontrol/module.js +++ b/panels/dashcontrol/module.js @@ -5,10 +5,6 @@ ## Dashcontrol - Dash control allows for saving, loading and sharing of dashboards. Do not - disable the dashcontrol module as a special instance of it allows for loading - the default dashboard from dashboards/default - ### Parameters * save ** gist :: Allow saving to gist. Requires registering an oauth domain with Github @@ -30,11 +26,14 @@ angular.module('kibana.dashcontrol', []) .controller('dashcontrol', function($scope, $http, timer, dashboard) { + $scope.panelMeta = { + status : "Stable", + description : "This panel allows for saving, loading, exporting and sharing dashboard schemas." + }; + $scope.panel = $scope.panel || {}; // Set and populate defaults var _d = { - status : "Stable", - group : "default", save : { gist: false, elasticsearch: true, @@ -138,7 +137,8 @@ angular.module('kibana.dashcontrol', []) function(link) { if(!_.isUndefined(link)) { $scope.gist.last = link; - $scope.alert('Gist saved','You will be able to access your exported dashboard file at '+link+' in a moment','success'); + $scope.alert('Gist saved','You will be able to access your exported dashboard file at '+ + ''+link+' in a moment','success'); } else { $scope.alert('Save failed','Gist could not be saved','error',5000); } diff --git a/panels/derivequeries/editor.html b/panels/derivequeries/editor.html index 9196363253403a..96d9eafb0b8037 100644 --- a/panels/derivequeries/editor.html +++ b/panels/derivequeries/editor.html @@ -17,10 +17,4 @@
-
-
- The derive queries panel takes a query and a field, runs a terms facet, then creates queries based on them. For example, you might want to see a histogram of the top 5 requests that return a 404. You should be careful not to select a high cardinality field as Elasticsearch must load all of these values into memory.

- Query Mode allows to optionally append original query to each term in the list. -

-
diff --git a/panels/derivequeries/module.js b/panels/derivequeries/module.js index 39c9efbe2b47fb..4d79ed0620b9b4 100644 --- a/panels/derivequeries/module.js +++ b/panels/derivequeries/module.js @@ -4,8 +4,6 @@ ## Derivequeries - Broadcasts an array of queries based on the results of a terms facet - ### Parameters * label :: The label to stick over the field * query :: A string to use as a filter for the terms facet @@ -21,14 +19,21 @@ angular.module('kibana.derivequeries', []) .controller('derivequeries', function($scope, $rootScope, querySrv, fields, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Experimental", + description : "Creates a new set of queries using the Elasticsearch terms facet. For example,"+ + " you might want to create 5 queries showing the most frequent HTTP response codes. Be "+ + "careful not to select a high cardinality field, as Elasticsearch must load all unique values"+ + " into memory." + }; + + // Set and populate defaults var _d = { loading : false, - status : "Beta", label : "Search", query : "*", ids : [], - group : "default", field : '_type', fields : [], spyable : true, diff --git a/panels/fields/module.js b/panels/fields/module.js index a7748c7895f7b0..99d1753bc92a8b 100644 --- a/panels/fields/module.js +++ b/panels/fields/module.js @@ -5,8 +5,6 @@ ## Fields - Allows for enabling and disabling of fields in the table panel as well as a - micro anaylsis panel for analyzing the events in the table panel ### Parameters * style :: a hash containing css styles @@ -26,9 +24,16 @@ angular.module('kibana.fields', []) .controller('fields', function($scope, eventBus, $timeout, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Deprecating Soon", + description : "Allows for enabling and disabling of fields in the table panel as well as a "+ + "micro anaylsis panel for analyzing the events in the table panel. This panel will soon be"+ + "combined with the table panel" + }; + + // Set and populate defaults var _d = { - status : "Beta", group : "default", style : {}, arrange : 'vertical', diff --git a/panels/filtering/module.js b/panels/filtering/module.js index 00a0b6f46ea77b..f06037316aee98 100644 --- a/panels/filtering/module.js +++ b/panels/filtering/module.js @@ -4,8 +4,6 @@ ## filtering - An experimental for interacting with the filter service - */ 'use strict'; @@ -13,9 +11,14 @@ angular.module('kibana.filtering', []) .controller('filtering', function($scope, filterSrv, $rootScope, dashboard) { + $scope.panelMeta = { + status : "Beta", + description : "A controllable list of all filters currently applied to the dashboard. You "+ + "almost certainly want one of these on your dashboard somewhere." + }; + // Set and populate defaults var _d = { - status : "Beta" }; _.defaults($scope.panel,_d); diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 4752d8c31ab52f..4f130d11542c52 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -5,10 +5,6 @@ ## Histogram - A bucketted time series representation of the current query or queries. Note that this - panel uses facetting. I tried to make it safe by using sequential/serial querying but, - yeah, you should know that it uses facetting. It should be pretty safe. - ### Parameters * auto_int :: Auto calculate data point interval? * resolution :: If auto_int is enables, shoot for this many data points, rounding to @@ -40,9 +36,15 @@ angular.module('kibana.histogram', []) .controller('histogram', function($scope, eventBus, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Stable", + description : "A bucketed time series chart of the current query or queries. Uses the "+ + "Elasticsearch date_histogram facet. If using time stamped indices this panel will query"+ + " them sequentially to attempt to apply the lighest possible load to your Elasticsearch cluster" + }; + // Set and populate defaults var _d = { - status : "Stable", mode : 'count', time_field : '@timestamp', queries : { diff --git a/panels/hits/module.js b/panels/hits/module.js index fc064aa86b6e3d..425db5135e5137 100644 --- a/panels/hits/module.js +++ b/panels/hits/module.js @@ -5,8 +5,6 @@ ## Hits - A variety of representations of the hits a query matches - ### Parameters * style :: A hash of css styles * arrangement :: How should I arrange the query results? 'horizontal' or 'vertical' @@ -22,9 +20,14 @@ angular.module('kibana.hits', []) .controller('hits', function($scope, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Stable", + description : "The total hits for a query or set of queries. Can be a pie chart, bar chart, "+ + "list, or absolute total of all queries combined" + }; + // Set and populate defaults var _d = { - status : "Beta", queries : { mode : 'all', ids : [] @@ -219,7 +222,8 @@ angular.module('kibana.hits', []) show: scope.panel.labels, radius: 2/3, formatter: function(label, series){ - return '
'+ + return '
'+ label+'
'+Math.round(series.percent)+'%
'; }, threshold: 0.1 diff --git a/panels/map/editor.html b/panels/map/editor.html index 9325ef6b2b95ff..83045f1d5e26c5 100644 --- a/panels/map/editor.html +++ b/panels/map/editor.html @@ -21,9 +21,4 @@
Panel Spy
-
- The panel spy shows 'behind the scenes' information about a panel. It can - be accessed by clicking the in the top right - of the panel. -
diff --git a/panels/map/module.js b/panels/map/module.js index ef6830f4f96554..49a23c00e9cf16 100644 --- a/panels/map/module.js +++ b/panels/map/module.js @@ -5,12 +5,6 @@ ## Map - LOL. Should this even be documented? Zach's map panel is going to ruin this one. - For serious. This shades a map of the world, the US or Europe with the number of - events that match the query. Uses 2 letter country codes and nothing else. This uses - a terms facet. Its probably safe as long as you point it at the right field. Nach. - There's no way to query sequentially here, so I'm going to hit them all at once! - ### Parameters * map :: 'world', 'us' or 'europe' * colors :: an array of colors to use for the regions of the map. If this is a 2 @@ -28,9 +22,15 @@ angular.module('kibana.map', []) .controller('map', function($scope, $rootScope, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Stable", + description : "Displays a map of shaded regions using a field containing a 2 letter country "+ + ", or US state, code. Regions with more hit are shaded darker. Node that this does use the"+ + " Elasticsearch terms facet, so it is important that you set it to the correct field." + }; + // Set and populate defaults var _d = { - status : "Beta", queries : { mode : 'all', ids : [] diff --git a/panels/pie/module.js b/panels/pie/module.js index 681af420401a84..467fe9a4faa43a 100644 --- a/panels/pie/module.js +++ b/panels/pie/module.js @@ -4,12 +4,6 @@ ## Pie - This panel is probably going away. For now its has 2 modes: - * terms: Run a terms facet on the query. You're gonna have a bad (ES crashing) day - if you run in this mode on a high cardinality field - * goal: Compare the query to this number and display the percentage that the query - represents - ### Parameters * query :: An object with 2 possible parameters depends on the mode: ** field: Fields to run a terms facet on. Only does anything in terms mode @@ -30,9 +24,15 @@ angular.module('kibana.pie', []) .controller('pie', function($scope, $rootScope, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Deprecating Soon", + 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, to be"+ + " replaced with a panel that can represent a terms facet in a variety of ways." + }; + // Set and populate defaults var _d = { - status : "Deprecating Soon", query : { field:"_type", goal: 100}, queries : { mode : 'all', @@ -45,7 +45,6 @@ angular.module('kibana.pie', []) legend : "above", labels : true, mode : "terms", - group : "default", default_field : 'DEFAULT', spyable : true, }; @@ -291,7 +290,8 @@ angular.module('kibana.pie', []) elem.bind("plothover", function (event, pos, item) { if (item) { var percent = parseFloat(item.series.percent).toFixed(1) + "%"; - tt(pos.pageX, pos.pageY, "
" + + tt(pos.pageX, pos.pageY, "
"+ (item.series.label||"")+ " " + percent); } else { $("#pie-tooltip").remove(); diff --git a/panels/query/module.js b/panels/query/module.js index c349e926ad3108..a15cf30ca1c00a 100644 --- a/panels/query/module.js +++ b/panels/query/module.js @@ -4,8 +4,6 @@ ## query - An experimental panel for the query service - ### Parameters * 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 @@ -18,13 +16,17 @@ angular.module('kibana.query', []) .controller('query', function($scope, querySrv, $rootScope) { + $scope.panelMeta = { + status : "Stable", + description : "Manage all of the queries on the dashboard. You almost certainly need one of "+ + "these somewhere. This panel allows you to add, remove, label, pin and color queries" + }; + // Set and populate defaults var _d = { - status : "Beta", label : "Search", query : "*", pinned : true, - group : "default", history : [], remember: 10 // max: 100, angular strap can't take a variable for items param }; diff --git a/panels/table/module.js b/panels/table/module.js index 35c4a43ff26442..eb19759ab5eddc 100644 --- a/panels/table/module.js +++ b/panels/table/module.js @@ -4,8 +4,6 @@ ## Table - A paginated table of events matching a query - ### Parameters * size :: Number of events per page to show * pages :: Number of pages to show. size * pages = number of cached events. @@ -31,6 +29,12 @@ angular.module('kibana.table', []) .controller('table', function($rootScope, $scope, eventBus, fields, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status: "Stable", + description: "A paginated table of records matching your query or queries. Click on a row to "+ + "expand it and review all of the fields associated with that document.

" + }; + // Set and populate defaults var _d = { status : "Stable", diff --git a/panels/text/module.js b/panels/text/module.js index 2a63d7298ae346..80dfa93320e663 100644 --- a/panels/text/module.js +++ b/panels/text/module.js @@ -5,8 +5,6 @@ ## Text - A simple panel of static content - ### Parameters * mode :: 'text', 'html', 'markdown' * content :: Content of the panel @@ -19,10 +17,15 @@ angular.module('kibana.text', []) .controller('text', function($scope, $rootScope) { + $scope.panelMeta = { + status : "Stable", + description : "A static text panel that can use plain text, markdown, or (sanitized) HTML" + }; + + // Set and populate defaults var _d = { status : "Stable", - group : "default", mode : "markdown", content : "", style: {}, diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index bb635173d4a4e1..6b4ce2d68311f0 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -4,10 +4,6 @@ ## Timepicker - The timepicker panel is used to select time ranges and inform other panel of - them. It also handles searching for indices that match the given time range and - a pattern - ### Parameters * mode :: The default mode of the panel. Options: 'relative', 'absolute' 'since' Default: 'relative' * time_options :: An array of possible time options. Default: ['5m','15m','1h','6h','12h','24h','2d','7d','30d'] @@ -24,6 +20,13 @@ angular.module('kibana.timepicker', []) .controller('timepicker', function($scope, $rootScope, $timeout, timer, $http, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Stable", + description : "A panel for controlling the time range filters. If you have time based data, "+ + " or if you're using time stamped indices, you need one of these" + }; + + // Set and populate defaults var _d = { status : "Stable", @@ -32,7 +35,6 @@ angular.module('kibana.timepicker', []) timespan : '15m', timefield : '@timestamp', timeformat : "", - group : "default", refresh : { enable : false, interval: 30, diff --git a/panels/trends/module.js b/panels/trends/module.js index 943454dc49ac63..97c5037efeebc3 100644 --- a/panels/trends/module.js +++ b/panels/trends/module.js @@ -4,8 +4,6 @@ ## Trends - Shows how queries are moving from a specified time ago - ### Parameters * style :: A hash of css styles * arrangement :: How should I arrange the query results? 'horizontal' or 'vertical' @@ -18,14 +16,21 @@ angular.module('kibana.trends', []) .controller('trends', function($scope, kbnIndex, querySrv, dashboard, filterSrv) { + $scope.panelMeta = { + status : "Beta", + description : "A stock-ticker style representation of how queries are moving over time. "+ + "For example, if the time is 1:10pm, your time picker was set to \"Last 10m\", and the \"Time "+ + "Ago\" parameter was set to '1h', the panel would show how much the query results have changed"+ + " since 12:00-12:10pm" + }; + + // Set and populate defaults var _d = { - status : "Beta", queries : { mode : 'all', ids : [] }, - group : "default", style : { "font-size": '14pt'}, ago : '1d', arrangement : 'vertical', diff --git a/partials/dasheditor.html b/partials/dasheditor.html index 6a39b8ff300947..ba13e35d89c63f 100644 --- a/partials/dasheditor.html +++ b/partials/dasheditor.html @@ -89,5 +89,5 @@

Rows

\ No newline at end of file diff --git a/partials/paneleditor.html b/partials/paneleditor.html index add08ccc53f862..7f7daf8a7193f8 100644 --- a/partials/paneleditor.html +++ b/partials/paneleditor.html @@ -1,5 +1,5 @@