diff --git a/config.js b/config.js
index f186a5da401..f03cc256efa 100644
--- a/config.js
+++ b/config.js
@@ -3,11 +3,8 @@
The settings before the break are the only ones that are currently implemented
The remaining settings do nothing
-timespan: Default timespan (eg 1d, 30d, 6h, 20m)
-refresh: Milliseconds between auto refresh.
+elasticsearch: URL to your elasticsearch server
timeformat: Format for time in histograms (might go away)
-timefield: Field to use for ISO8601 timestamps (might go away)
-indexpattern: Timestamping pattern for time based indices,
modules: Panel modules to load. In the future these will be inferred
from your initial dashboard, though if you share dashboards you
will probably need to list them all here
@@ -17,22 +14,17 @@ NOTE: No timezone support yet, everything is in UTC at the moment.
If you need to configure the default dashboard, please see dashboard.js
shared.json contains an example sharable dashboard. Note the subtle differences
-between dashboard.js and shared.json. Once is a javascript object, the other is
+between dashboard.js and shared.json. One is a javascript object, the other is
json.
*/
var config = new Settings(
{
- timespan: '15m',
- refresh: 30000,
elasticsearch: 'http://localhost:9200',
timeformat: 'mm/dd HH:MM:ss',
- timefield: '@timestamp',
- indexpattern: '"shakespeare"',
modules: ['histogram','map','pie','table','stringquery','sort',
- 'timepicker','text'],
+ 'timepicker','text','fields','hits'],
- defaultfields: ['line_text'],
perpage: 50,
timezone: 'user',
operator: 'OR',
diff --git a/dashboards.js b/dashboards.js
index 54507e97968..323c37764f7 100644
--- a/dashboards.js
+++ b/dashboards.js
@@ -9,17 +9,18 @@ var dashboards =
{
type : "stringquery",
span : 12,
+ group : ['default','counter','histogram']
}
]
},
{
- title: "Options",
- collapse: true,
- height: "30px",
+ title: "Status",
+ collapse: false,
+ height: "100px",
panels: [
{
type : "timepicker",
- span : 5,
+ span : 4,
mode : 'relative',
index : "\"shakespeare\"",
refresh : {
@@ -33,28 +34,73 @@ var dashboards =
},
{
type : "sort",
- span : 4,
+ span : 3,
+ },
+ {
+ title : "Histogram Timer",
+ type : "timepicker",
+ span : 0,
+ mode : 'relative',
+ timespan : '5m',
+ index : "\"shakespeare\"",
+ refresh : {
+ enable : true,
+ interval: 30,
+ min : 10
+ },
+ timefield: '@timestamp',
+ group: 'histogram',
+ },
+ {
+ type : "histogram",
+ span : 3,
+ show : ['lines'],
+ fill : 0.3,
+ group : "histogram",
+ query : [
+ { label : "Event Rate", query : "*", color: '#FF7400' }
+ ],
+ },
+ {
+ title : "Counter Timer",
+ type : "timepicker",
+ span : 0,
+ mode : 'relative',
+ timespan : '30d',
+ index : "\"shakespeare\"",
+ refresh : {
+ enable : true,
+ interval: 30,
+ min : 10
+ },
+ timefield: '@timestamp',
+ group: 'counter',
+ },
+ {
+ type : "hits",
+ title : "Lines Completed",
+ span : 2,
+ group : 'counter',
},
{
type : "text",
- fontsize : "85%",
- span: 3,
- content : "Panels can send events to other panels. In the case of" +
- " the sort panel, it also receives a field event that it uses" +
- " to populate its list of fields from the table panel. The time " +
- " selector is a member of two groups."
+ style : {"font-size":"85%"},
+ span: 0,
+ content : "Rows are collapsable, and input panels can send event to" +
+ " multiple groups. The Search panel is part of one group, while" +
+ " the time panel is part of two"
},
]
},
{
title: "Top 3 Characters",
- collapse: false,
- height: "160px",
+ collapse: true,
+ height: "150px",
panels: [
{
type : "text",
title : "About",
- fontsize : "85%",
+ style : {"font-size":"85%"},
span: 2,
content : "These donut charts demonstrate configurable binding." +
" They exist in a different group from the other panels and are" +
@@ -136,14 +182,15 @@ var dashboards =
},
{
title: "Lines of Plays",
- height: "250px",
- collapse: true,
+ height: "210px",
+ collapse: false,
panels: [
{
title : "Plays",
type : "pie",
span : 4,
size : 8,
+ labels : false,
colors : ['#BF3030','#1D7373','#86B32D','#A60000','#006363','#679B00'],
field : 'country',
//query : { query: "*", field: "country"}
@@ -152,10 +199,10 @@ var dashboards =
{
type : "text",
title : "About",
- fontsize : "85%",
- span: 2,
+ style : {"font-size":"85%"},
+ span: 0,
content : "The table panel can be sorted via a sort panel, or by" +
- " clicking the table header. Unlike the pie charts above, this" +
+ " clicking the table header. Unlike the donut charts above, this" +
" pie is bound to the query input. Try searching for a speaker" +
" (eg, FALSTAFF) to see a break down of the plays they appear in.",
},
@@ -164,14 +211,20 @@ var dashboards =
type : "table",
span : 6,
query : "*",
+ style : {"font-size":"85%"},
fields : ['@timestamp','play_name','speaker','text_entry'],
- }
+ },
+ {
+ type : "fields",
+ title : "Fields",
+ span : 2,
+ },
]
},
{
title: "Monkey Monitoring",
collapse: false,
- height: "275px",
+ height: "225px",
panels: [
{
title : "Monkey Shakespeare Lines",
@@ -197,7 +250,7 @@ var dashboards =
{
type : "text",
title : "About",
- fontsize : "85%",
+ style : {"font-size":"85%"},
span: 2,
content : "Histograms can show multiple queries. In the case that a" +
" multi-query histogram is bound to a query input, only the first" +
diff --git a/js/controllers.js b/js/controllers.js
index 049b49ec191..fc8b4512ad9 100644
--- a/js/controllers.js
+++ b/js/controllers.js
@@ -3,97 +3,17 @@
'use strict';
angular.module('kibana.controllers', [])
-.controller('DashCtrl', function($scope, $location, $http, $timeout, ejsResource) {
-
+.controller('DashCtrl', function($scope, ejsResource) {
$scope.config = config;
$scope.dashboards = dashboards
- /*
- $scope.timespan = config.timespan
- $scope.time = {
- from : time_ago($scope.timespan),
- to : new Date()
- }
-
- // I'm leaving in all this refresh stuff until I figure out how index
- // list caching should work. Maybe it should be handled by each time panel?
- // That would require dashboard to contain a time panel. Hmm.
- $scope.counter = 0;
- $scope.playing = true;
- $scope.play = function(){
- $scope.counter++;
- $scope.time.to = new Date();
- $scope.time.from = time_ago($scope.timespan);
- $scope.$root.$eval()
- mytimeout = $timeout($scope.play,config.refresh);
- }
-
- $scope.pause = function(){
- if($scope.playing) {
- $scope.playing = false;
- $timeout.cancel(mytimeout);
- } else {
- $scope.playing = true;
- mytimeout = $timeout($scope.play,config.refresh);
- }
- }
- var mytimeout = $timeout($scope.play,config.refresh);
-
- // If from/to to change, update index list
- $scope.$watch(function() {
- return angular.toJson([$scope.time.from, $scope.time.to])
- }, function(){
- indices($scope.time.from,$scope.time.to).then(function (p) {
- $scope.index = p.join();
- });
- });
- */
-
- // point to your ElasticSearch server
var ejs = $scope.ejs = ejsResource(config.elasticsearch);
$scope.toggle_row = function(row) {
$scope.$broadcast('toggle_row',row)
row.collapse = row.collapse ? false : true;
}
-
- $scope.set_timespan = function(timespan) {
- $scope.timespan = timespan;
- $scope.time.from = time_ago($scope.timespan);
- }
-
- // returns a promise containing an array of all indices matching the index
- // pattern that exist in a given range
- function indices(from,to) {
- var possible = [];
- _.each(date_range(from,to.add_days(1)),function(d){
- possible.push(d.format(config.indexpattern));
- });
-
- return all_indices().then(function(p) {
- return _.intersection(p,possible);
- })
- };
-
- // returns a promise containing an array of all indices in an elasticsearch
- // cluster
- function all_indices() {
- var something = $http({
- url: config.elasticsearch + "/_aliases",
- method: "GET"
- }).error(function(data, status, headers, config) {
- $scope.error = status;
- });
-
- return something.then(function(p) {
- var indices = [];
- _.each(p.data, function(v,k) {
- indices.push(k)
- });
- return indices;
- });
- }
});
diff --git a/panels/fields/module.html b/panels/fields/module.html
new file mode 100644
index 00000000000..7c5dafecd51
--- /dev/null
+++ b/panels/fields/module.html
@@ -0,0 +1,6 @@
+