From b85f2c94409822491f0a6e0f1beb1ad31b07a57e Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 18:15:53 -0700 Subject: [PATCH 01/13] css cleanup, fixed issue where dashboards using relative time might not save correctly --- common/css/main.css | 66 +++++++++++++++++++------------------ panels/column/editor.html | 2 +- panels/timepicker/module.js | 14 +++++--- 3 files changed, 44 insertions(+), 38 deletions(-) diff --git a/common/css/main.css b/common/css/main.css index 1d72620a14d59..3dad01af61c72 100644 --- a/common/css/main.css +++ b/common/css/main.css @@ -6,17 +6,19 @@ color: #000; } -.kibana-row { - margin-left: 15px; - margin-bottom: 15px; -} - .navbar .brand { color: #eee; } .navbar-inner { - border-width: 0 0 0px; + border-width: 0 0 0px; + padding-left: 0px; + padding-right: 0px; +} + +.kibana-row { + margin-left: 15px; + margin-bottom: 15px; } .row-close { @@ -54,6 +56,10 @@ background-color: #f9f9f9; } +.nomargin { + margin: 0px; +} + [ng\:cloak], [ng-cloak], .ng-cloak { display: none !important; } @@ -90,7 +96,15 @@ opacity: 1; } -.pointer:hover { +.link { + cursor: pointer; +} + +.pointer { + cursor: pointer; +} + +.link:hover { color: #0088CC; } @@ -98,54 +112,42 @@ max-width: 500px; } -.pointer { - cursor: pointer; +.popover-title { display: none; } + +.tiny { + font-size: 50%; } .small { font-size: 85%; } -.input-append label { - font-size: inherit !important; -} - .large { font-size: 120%; } -.nomargin { - margin: 0px; -} - .strong { font-weight: bold; } -.btn-active { - background-color: #E6E6E6; - background-image: none; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); - outline: 0 none +.input-append label { + font-size: inherit !important; } -.popover-title { display: none; } - .input-smaller { width: 75px; } -.tiny { - font-size: 50%; +.typeahead { z-index: 1051; } + +.btn-active { + background-color: #E6E6E6; + background-image: none; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + outline: 0 none } .remove:hover { background-color: #A60000; } -.typeahead { z-index: 1051; } - -.navbar-inner { - padding-left: 0px; - padding-right: 0px; -} \ No newline at end of file diff --git a/panels/column/editor.html b/panels/column/editor.html index c260bafe38a87..e5dec0361b40c 100644 --- a/panels/column/editor.html +++ b/panels/column/editor.html @@ -33,4 +33,4 @@

Panels

- \ No newline at end of file + diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index a07a107048848..cc030e23256d2 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -214,11 +214,15 @@ angular.module('kibana.timepicker', []) } // Update panel's string representation of the time object - $scope.panel.time = { - from : $scope.time.from.format("mm/dd/yyyy HH:MM:ss"), - to : $scope.time.to.format("mm/dd/yyyy HH:MM:ss"), - index : $scope.time.index, - }; + if($scope.panel.mode !== 'relative') { + $scope.panel.time = { + from : $scope.time.from.format("mm/dd/yyyy HH:MM:ss"), + to : $scope.time.to.format("mm/dd/yyyy HH:MM:ss"), + index : $scope.time.index, + }; + } else { + delete $scope.panel.time; + } }; function set_timepicker(from,to) { From 38520b03875e8e9710afa641e56684f088496e90 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:20:49 -0700 Subject: [PATCH 02/13] column panel documentation --- panels/column/module.js | 17 +++++++++++++++++ panels/timepicker/module.js | 14 +++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/panels/column/module.js b/panels/column/module.js index f55d46dde0822..e48c2975c55c5 100644 --- a/panels/column/module.js +++ b/panels/column/module.js @@ -1,3 +1,20 @@ +/* + + ## 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 + + ### Group Events + #### Sends + * time :: Object Includes from, to and index + +*/ + angular.module('kibana.column', []) .controller('column', function($scope, $rootScope) { // Set and populate defaults diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index cc030e23256d2..af3e9b7e59106 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -12,6 +12,7 @@ a pattern * timefield :: The field in which time is stored in the document. * index :: Index pattern to match. Literals should be double quoted. Default: '_all' * defaultindex :: Index to failover to if index not found +* index_interval :: Time between timestamped indices (can be 'none') for static index * refresh: Object containing refresh parameters * enable :: true/false, enable auto refresh by default. Default: false * interval :: Seconds between auto refresh. Default: 30 @@ -21,7 +22,7 @@ a pattern #### Sends * time :: Object Includes from, to and index #### Receives -* get_time :: Receives an object containing a uniqueid, broadcasts to it. +* get_time :: Receives an object containing a $id, broadcasts back to it. */ angular.module('kibana.timepicker', []) @@ -167,8 +168,8 @@ angular.module('kibana.timepicker', []) $scope.time_apply(); } - $scope.time_check = function(){ - + // + $scope.time_calc = function(){ // If time picker is defined (on initialization) if(!(_.isUndefined($scope.timepicker))) { var from = $scope.panel.mode === 'relative' ? time_ago($scope.panel.timespan) : @@ -198,7 +199,7 @@ angular.module('kibana.timepicker', []) $scope.time_apply = function() { // Update internal time object - $scope.time = $scope.time_check(); + $scope.time = $scope.time_calc(); $scope.time.field = $scope.panel.timefield // Get indices for the time period, then broadcast time range and index list @@ -213,7 +214,9 @@ angular.module('kibana.timepicker', []) eventBus.broadcast($scope.$id,$scope.panel.group,'time',$scope.time) } - // Update panel's string representation of the time object + // Update panel's string representation of the time object.Don't update if + // we're in relative mode since we dont want to store the time object in the + // json for relative periods if($scope.panel.mode !== 'relative') { $scope.panel.time = { from : $scope.time.from.format("mm/dd/yyyy HH:MM:ss"), @@ -276,6 +279,7 @@ angular.module('kibana.timepicker', []) // this is stupid, but there is otherwise no good way to ensure that when // I extract the date from an object that I'm get the UTC date. Stupid js. // I die a little inside every time I call this function. + // Update: I just read this again. I died a little more inside. function fake_utc(date) { return new Date(date.getTime() + date.getTimezoneOffset() * 60000); } From 0f2dac44b1730858de25e0c10ad7bd031fceb95c Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:28:30 -0700 Subject: [PATCH 03/13] dashboard panel documentation --- panels/dashcontrol/module.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/panels/dashcontrol/module.js b/panels/dashcontrol/module.js index 7fb38f71ef098..fcef5a44e48ff 100644 --- a/panels/dashcontrol/module.js +++ b/panels/dashcontrol/module.js @@ -1,3 +1,32 @@ +/* + + ## 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 + ** elasticsearch :: Allow saving to a special Kibana index within Elasticsearch + ** local :: Allow saving to local file + * load + ** gist :: Allow loading from gists + ** elasticsearch :: Allow searching and loading of elasticsearch saved dashboards + ** local :: Allow loading of dashboards from Elasticsearch + * hide_control :: Upon save, hide this panel + * elasticsearch_size :: show this many dashboards under the ES section in the load drop down + * elasticsearch_saveto :: Special kibana index to save to + * temp :: Allow saving of temp dashboards + * temp_ttl :: How long should temp dashboards persist + + ### Group Events + #### Sends + * dashboard :: An object containing an entire dashboard to be loaded + +*/ + angular.module('kibana.dashcontrol', []) .controller('dashcontrol', function($scope, $routeParams, $http, eventBus, timer) { $scope.panel = $scope.panel || {}; From af89762021a3443a9d071a907be6dee42be68222 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:32:01 -0700 Subject: [PATCH 04/13] debug panel documentation --- panels/debug/module.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/panels/debug/module.js b/panels/debug/module.js index 5a955dade9a2c..ae0bdddf52770 100644 --- a/panels/debug/module.js +++ b/panels/debug/module.js @@ -1,3 +1,21 @@ +/* + + ## Debug + + Shows the exchange of events between panels. Disabled by default and usually + should be. This panel exists in the ALL group by default so that it receives + all of the events from every panel + + ### Parameters + * size :: How many events to show + * style :: A hash containing css style parameters + + ### Group Events + #### Receives + * $kibana_debug :: Contains a meta object of any event sent + +*/ + angular.module('kibana.debug', []) .controller('debug', function($scope, eventBus) { From 76f4788f728aee39d02285063029eef7ed72cdff Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:36:03 -0700 Subject: [PATCH 05/13] fields panel documentation --- panels/fields/module.js | 19 ++++++++++++++ panels/timepicker/module.js | 50 +++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/panels/fields/module.js b/panels/fields/module.js index d67445ca8e09d..324e05f2a7299 100644 --- a/panels/fields/module.js +++ b/panels/fields/module.js @@ -1,3 +1,22 @@ +/* + + ## 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 + * arrange :: the layout pf the panel 'horizontal' or 'vertical' + * micropanel_position :: where to place the micropanel in relation to the field + + ### Group Events + #### Recieves + * table_documents :: An object containing the documents in the table panel + *** Sends + * fields :: an object containing the sort order, existing fields and selected fields + +*/ angular.module('kibana.fields', []) .controller('fields', function($scope, eventBus, $timeout) { diff --git a/panels/timepicker/module.js b/panels/timepicker/module.js index af3e9b7e59106..2f45de560f326 100644 --- a/panels/timepicker/module.js +++ b/panels/timepicker/module.js @@ -1,30 +1,32 @@ /* -## 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'] -* timespan :: The default options selected for the relative view. Default: '15m' -* timefield :: The field in which time is stored in the document. -* index :: Index pattern to match. Literals should be double quoted. Default: '_all' -* defaultindex :: Index to failover to if index not found -* index_interval :: Time between timestamped indices (can be 'none') for static index -* refresh: Object containing refresh parameters - * enable :: true/false, enable auto refresh by default. Default: false - * interval :: Seconds between auto refresh. Default: 30 - * min :: The lowest interval a user may set - -### Group Events -#### Sends -* time :: Object Includes from, to and index -#### Receives -* get_time :: Receives an object containing a $id, broadcasts back to it. + + ## 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'] + * timespan :: The default options selected for the relative view. Default: '15m' + * timefield :: The field in which time is stored in the document. + * index :: Index pattern to match. Literals should be double quoted. Default: '_all' + * defaultindex :: Index to failover to if index not found + * index_interval :: Time between timestamped indices (can be 'none') for static index + * refresh: Object containing refresh parameters + * enable :: true/false, enable auto refresh by default. Default: false + * interval :: Seconds between auto refresh. Default: 30 + * min :: The lowest interval a user may set + + ### Group Events + #### Sends + * time :: Object Includes from, to and index + #### Receives + * get_time :: Receives an object containing a $id, broadcasts back to it. */ + angular.module('kibana.timepicker', []) .controller('timepicker', function($scope, eventBus, $timeout, timer, $http) { From 61a71b36ce983780320322a8b55504f50005c1f9 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:49:57 -0700 Subject: [PATCH 06/13] histogram panel documentation --- panels/histogram/module.js | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/panels/histogram/module.js b/panels/histogram/module.js index 42f3287a547d1..9ec721b0ca936 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -1,3 +1,42 @@ +/* + + ## 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 + * query :: an array of objects as such: {query: 'somequery', label 'legent text'}. + this is usually populated by a stringquery panel wher the query and label + parameter are the same + * interval :: Generated automatically. Tells ES how to bucket the data points + * fill :: Only applies to line charts. Level of area shading from 0-10 + * linewidth :: Only applies to line charts. How thick the line should be in pixels + While the editor only exposes 0-10, this can be any numeric value. + Set to 0 and you'll get something like a scatter plot + * timezone :: This isn't totally functional yet. Currently only supports browser and utc. + browser will adjust the x-axis labels to match the timezone of the user's + browser + * spyable :: Dislay the 'eye' icon that show the last elasticsearch query + * zoomlinks :: Show the zoom links? + * bars :: Show bars in the chart + * stack :: Stack multiple queries. This generally a crappy way to represent things. + You probably should just use a line chart without stacking + * points :: Should circles at the data points on the chart + * lines :: Line chart? Sweet. + * legend :: Show the legend? + * x-axis :: Show x-axis labels and grid lines + * y-axis :: Show y-axis labels and grid lines + ### Group Events + #### Receives + * time :: An object containing the time range to use and the index(es) to query + * query :: An Array of queries, even if its only one + #### Sends + * get_time :: On panel initialization get time range to query + +*/ + angular.module('kibana.histogram', []) .controller('histogram', function($scope, eventBus) { From bc558733ada37231eebf5c123486eafdd2f5e467 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 20:56:24 -0700 Subject: [PATCH 07/13] hits panel documentation --- panels/hits/module.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/panels/hits/module.js b/panels/hits/module.js index 879beb309ab43..eb40eeb852eab 100644 --- a/panels/hits/module.js +++ b/panels/hits/module.js @@ -1,12 +1,34 @@ +/* + + ## Hits + + A variety of representations of the hits a query matches + + ### Parameters + * query :: An array of queries. No labels here, just an array of strings. Maybe + there should be labels. Probably. + * style :: A hash of css styles + * 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. + * lables :: Only 'pie' charts. Labels on the pie? + ### Group Events + #### Sends + * get_time :: On panel initialization get time range to query + #### Receives + * time :: An object containing the time range to use and the index(es) to query + * query :: An Array of queries, even if its only one + +*/ angular.module('kibana.hits', []) .controller('hits', function($scope, eventBus) { // Set and populate defaults var _d = { - query : "*", + query : ["*"], group : "default", style : { "font-size": '10pt'}, - aggregate : true, arrangement : 'vertical', chart : 'none', counter_pos : 'above', From 5eb5f2cb8bca8817b26966d80db972133d28c51d Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:03:31 -0700 Subject: [PATCH 08/13] map panel documentation --- panels/map/module.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/panels/map/module.js b/panels/map/module.js index 17afbc2d3fc67..2416dd7c10ca5 100644 --- a/panels/map/module.js +++ b/panels/map/module.js @@ -1,3 +1,33 @@ +/* + + ## 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 + * query :: A single query string, not and array. This panel can only handle one + query at a time. + * map :: 'world', 'us' or 'europe' + * colors :: an array of colors to use for the regions of the map. If this is a 2 + element array, jquerymap will generate shades between these colors + * size :: How big to make the facet. Higher = more countries + * exclude :: Exlude the array of counties + * spyable :: Show the 'eye' icon that reveals the last ES query + * index_limit :: This does nothing yet. Eventually will limit the query to the first + N indices + ### Group Events + #### Sends + * get_time :: On panel initialization get time range to query + #### Receives + * time :: An object containing the time range to use and the index(es) to query + * query :: An Array of queries, even if its only one + +*/ + angular.module('kibana.map', []) .controller('map', function($scope, eventBus) { From 5e297222b020e9267fafe7976ef90d35ce577b14 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:14:38 -0700 Subject: [PATCH 09/13] pie panel documentation --- panels/map/module.js | 3 +-- panels/pie/module.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/panels/map/module.js b/panels/map/module.js index 2416dd7c10ca5..cf8a824a15848 100644 --- a/panels/map/module.js +++ b/panels/map/module.js @@ -24,8 +24,7 @@ * get_time :: On panel initialization get time range to query #### Receives * time :: An object containing the time range to use and the index(es) to query - * query :: An Array of queries, even if its only one - + * query :: An Array of queries, this panel uses only the first one */ angular.module('kibana.map', []) diff --git a/panels/pie/module.js b/panels/pie/module.js index 0c3e8d5502f76..2dc0ddcbb538d 100644 --- a/panels/pie/module.js +++ b/panels/pie/module.js @@ -1,3 +1,37 @@ +/* + + ## 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 3 possible parameters depends on the mode: + ** field: Fields to run a terms facet on. Only does anything in terms mode + ** query: A string of the query to run + ** goal: How many to shoot for, only does anything in goal mode + * exclude :: In terms mode, ignore these terms + * donut :: Drill a big hole in the pie + * tilt :: A janky 3D representation of the pie. Looks terrible 90% of the time. + * 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 + doesn't have a field + * spyable :: Show the 'eye' icon that displays the last ES query for this panel + + ### Group Events + #### Sends + * get_time :: On panel initialization get time range to query + #### Receives + * time :: An object containing the time range to use and the index(es) to query + * query :: An Array of queries, this panel will use the first in the array + +*/ + angular.module('kibana.pie', []) .controller('pie', function($scope, eventBus) { From db524af6b2dd83728b63051a1c6991d72233ebac Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:21:25 -0700 Subject: [PATCH 10/13] sort panel documentation --- panels/sort/module.js | 22 ++++++++++++++++++++++ panels/stringquery/module.js | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/panels/sort/module.js b/panels/sort/module.js index 064f43beafe7c..8bcb07823e768 100644 --- a/panels/sort/module.js +++ b/panels/sort/module.js @@ -1,3 +1,25 @@ +/* + + ## Sort + + This will probably be removed in the near future since it only interacts with + the table panel and the table panel already implements all of its functionality. + It only interacts with the table panel in any case + + ### Parameters + * label :: The label to stick over the drop down + * sort :: An array where the first elemetn is the field to sort on an the second + is the direction ('asc' or 'desc') + ### Group Events + #### Sends + * sort :: An array where the first elemetn is the field to sort on an the second + is the direction ('asc' or 'desc') + #### Receives + * fields :: An array containing the fields in a table. This will be concat'd + + uniqued with the curent list. + +*/ + angular.module('kibana.sort', []) .controller('sort', function($scope, eventBus) { diff --git a/panels/stringquery/module.js b/panels/stringquery/module.js index ca34045a83d35..f2281f10a3b8c 100644 --- a/panels/stringquery/module.js +++ b/panels/stringquery/module.js @@ -1,3 +1,25 @@ +/* + + ## Sort + + This will probably be removed in the near future since it only interacts with + the table panel and the table panel already implements all of its functionality. + It only interacts with the table panel in any case + + ### Parameters + * label :: The label to stick over the drop down + * sort :: An array where the first elemetn is the field to sort on an the second + is the direction ('asc' or 'desc') + ### Group Events + #### Sends + * sort :: An array where the first elemetn is the field to sort on an the second + is the direction ('asc' or 'desc') + #### Receives + * fields :: An array containing the fields in a table. This will be concat'd + + uniqued with the curent list. + +*/ + angular.module('kibana.stringquery', []) .controller('stringquery', function($scope, eventBus) { From 433272b99490c13b27e2cecf5cd5174b0ec02c05 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:46:47 -0700 Subject: [PATCH 11/13] query panel documentation --- panels/stringquery/editor.html | 7 ------- panels/stringquery/module.js | 30 ++++++++++-------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/panels/stringquery/editor.html b/panels/stringquery/editor.html index a2e274a0cc914..a057ca99b0f0c 100644 --- a/panels/stringquery/editor.html +++ b/panels/stringquery/editor.html @@ -7,13 +7,6 @@ -
- - - - -
-
diff --git a/panels/stringquery/module.js b/panels/stringquery/module.js index f2281f10a3b8c..5290dd9dd76cd 100644 --- a/panels/stringquery/module.js +++ b/panels/stringquery/module.js @@ -1,22 +1,21 @@ /* - ## Sort + ## Stringquery - This will probably be removed in the near future since it only interacts with - the table panel and the table panel already implements all of its functionality. - It only interacts with the table panel in any case + Broadcasts a query object to other panels ### Parameters - * label :: The label to stick over the drop down - * sort :: An array where the first elemetn is the field to sort on an the second - is the direction ('asc' or 'desc') + * 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 + one element + * multi :: Allow input of multiple queries? true/false + * multi_arrange :: How to arrange multu query string panels, 'vertical' or 'horizontal' ### Group Events #### Sends - * sort :: An array where the first elemetn is the field to sort on an the second - is the direction ('asc' or 'desc') + * query :: Always broadcast as an array, even in multi: false #### Receives - * fields :: An array containing the fields in a table. This will be concat'd + - uniqued with the curent list. + * query :: An array of queries. This is probably needs to be fixed. */ @@ -27,8 +26,6 @@ angular.module('kibana.stringquery', []) var _d = { label : "Search", query : "*", - size : 100, - sort : ['_score','desc'], group : "default", multi : false, multi_arrange: 'horizontal', @@ -63,13 +60,6 @@ angular.module('kibana.stringquery', []) new Array($scope.panel.query) : $scope.panel.query[0]; } - $scope.set_sort = function(field) { - if($scope.panel.sort[0] === field) - $scope.panel.sort[1] = $scope.panel.sort[1] == 'asc' ? 'desc' : 'asc'; - else - $scope.panel.sort[0] = field; - } - $scope.remove_query = function(index) { $scope.panel.query.splice(index,1); } From 78c6178217a7f08e17b14427809ae14f7299dda7 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:55:15 -0700 Subject: [PATCH 12/13] table panel documentation --- panels/table/module.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/panels/table/module.js b/panels/table/module.js index 7a880b68c6601..4f18a2ab3ffad 100644 --- a/panels/table/module.js +++ b/panels/table/module.js @@ -1,3 +1,31 @@ +/* + + ## Table + + A paginated table of events matching a query + + ### Parameters + * query :: A string representing then current query + * size :: Number of events per page to show + * 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 + * sortable :: Allow sorting? + * spyable :: Show the 'eye' icon that reveals the last ES query for this panel + ### Group Events + #### Sends + * table_documents :: An array containing all of the documents in the table. + Only used by the fields panel so far. + #### Receives + * time :: An object containing the time range to use and the index(es) to query + * query :: An Array of queries, even if its only one + * sort :: An array with 2 elements. sort[0]: field, sort[1]: direction ('asc' or 'desc') + * selected_fields :: An array of fields to show +*/ + angular.module('kibana.table', []) .controller('table', function($scope, eventBus, fields) { From bcaba794942362c964d79d85dbe89195da5c4bb3 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 19 Apr 2013 21:58:58 -0700 Subject: [PATCH 13/13] text panel documentation --- panels/text/module.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/panels/text/module.js b/panels/text/module.js index 89c603fc24c08..3d02393976b94 100644 --- a/panels/text/module.js +++ b/panels/text/module.js @@ -1,3 +1,16 @@ +/* + + ## Text + + A simple panel of static content + + ### Parameters + * mode :: 'text', 'html', 'markdown' + * content :: Content of the panel + * style :: Hash containing css properties + +*/ + angular.module('kibana.text', []) .controller('text', function($scope, $rootScope) {