diff --git a/common/css/main.css b/common/css/main.css index e781c12b0b3..7bad2ccb853 100644 --- a/common/css/main.css +++ b/common/css/main.css @@ -40,6 +40,10 @@ opacity: 1; } +.popover { + max-width: 500px; +} + /* .row-header i.editlink { opacity: 0; diff --git a/common/lib/elastic-angular-client.js b/common/lib/elastic-angular-client.js index 8a3d660295c..a3811909ec2 100644 --- a/common/lib/elastic-angular-client.js +++ b/common/lib/elastic-angular-client.js @@ -60,7 +60,7 @@ angular.module('elasticjs.service', []) }, del: function (path, data, successcb, errorcb) { path = url + path; - return promiseThen($http.delee(path, data), successcb, errorcb); + return promiseThen($http.delete(path, data), successcb, errorcb); }, head: function (path, data, successcb, errorcb) { path = url + path; diff --git a/common/lib/elastic-angular-client.min.js b/common/lib/elastic-angular-client.min.js index 522b9e99d27..a88c594c820 100644 --- a/common/lib/elastic-angular-client.min.js +++ b/common/lib/elastic-angular-client.min.js @@ -1,4 +1,4 @@ /*! elastic.js - v1.0.0 - 2013-01-15 * https://github.com/fullscale/elastic.js * Copyright (c) 2013 FullScale Labs, LLC; Licensed MIT */ -"use strict";angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(e){return function(t){var n=window.ejs||{},r=function(e,t,n){return e.then(function(e){return(t||angular.noop)(e.data),e.data},function(e){return(n||angular.noop)(undefined),undefined})};return t==null&&(t=""),n.client={server:function(e){return e==null?t:(t=e,this)},post:function(n,i,s,o){return n=t+n,r(e.post(n,i),s,o)},get:function(n,i,s,o){return n=t+n,r(e.get(n,i),s,o)},put:function(n,i,s,o){return n=t+n,r(e.put(n,i),s,o)},del:function(n,i,s,o){return n=t+n,r(e.delee(n,i),s,o)},head:function(n,r,i,s){return n=t+n,e.head(n,r).then(function(e){return(i||angular.noop)(e.headers()),e.headers()},function(e){return(s||angular.noop)(undefined),undefined})}},n}}]); \ No newline at end of file +"use strict";angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(e){return function(t){var n=window.ejs||{},r=function(e,t,n){return e.then(function(e){return(t||angular.noop)(e.data),e.data},function(e){return(n||angular.noop)(undefined),undefined})};return t==null&&(t=""),n.client={server:function(e){return e==null?t:(t=e,this)},post:function(n,i,s,o){return n=t+n,r(e.post(n,i),s,o)},get:function(n,i,s,o){return n=t+n,r(e.get(n,i),s,o)},put:function(n,i,s,o){return n=t+n,r(e.put(n,i),s,o)},del:function(n,i,s,o){return n=t+n,r(e.delete(n,i),s,o)},head:function(n,r,i,s){return n=t+n,e.head(n,r).then(function(e){return(i||angular.noop)(e.headers()),e.headers()},function(e){return(s||angular.noop)(undefined),undefined})}},n}}]); diff --git a/config.js b/config.js index f03cc256efa..6f2508fcd85 100644 --- a/config.js +++ b/config.js @@ -1,8 +1,5 @@ /* -The settings before the break are the only ones that are currently implemented -The remaining settings do nothing - elasticsearch: URL to your elasticsearch server timeformat: Format for time in histograms (might go away) modules: Panel modules to load. In the future these will be inferred @@ -13,25 +10,12 @@ 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. One is a javascript object, the other is -json. - */ var config = new Settings( { elasticsearch: 'http://localhost:9200', timeformat: 'mm/dd HH:MM:ss', modules: ['histogram','map','pie','table','stringquery','sort', - 'timepicker','text','fields','hits'], - - perpage: 50, - timezone: 'user', - operator: 'OR', - exportdelim: ',', - smartindex: true, - indexlimit: 150, - indexdefault: 'logstash-*', - primaryfield: '_all' + 'timepicker','text','fields','hits','dashcontrol'], } ); diff --git a/dashboards.js b/dashboards.js deleted file mode 100644 index c9a09967e4b..00000000000 --- a/dashboards.js +++ /dev/null @@ -1,267 +0,0 @@ -var dashboards = -{ - title: "Infinite Monkey Dashboard", - rows: [ - { - title: "Query Control", - height: "30px", - panels: [ - { - type : "stringquery", - span : 12, - group : ['default','counter','histogram'] - } - ] - }, - { - title: "Status", - collapse: false, - height: "100px", - panels: [ - { - type : "timepicker", - span : 4, - mode : 'relative', - index : "\"shakespeare\"", - refresh : { - enable : false, - interval: 30, - min : 10 - }, - timespan : '1h', - timefield: '@timestamp', - group: ['default','pies'], - }, - { - type : "sort", - span : 3, - }, - { - title : "Histogram Timer", - type : "timepicker", - span : 0, - mode : 'relative', - timespan : '5m', - index : "\"shakespeare\"", - refresh : { - enable : true, - interval: 3, - 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: 3, - min : 10 - }, - timefield: '@timestamp', - group: 'counter', - }, - { - type : "hits", - title : "Lines Completed", - span : 2, - group : 'counter', - }, - { - type : "text", - 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: true, - height: "150px", - panels: [ - { - type : "text", - title : "About", - 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" + - " bound only to the time selector, not to the query input. Thus" + - " they will change when you select a new time range, but not if" + - " you enter a search.", - }, - { - title : "Hamlet", - type : "pie", - span : 2, - size : 3, - legend : false, - labels : false, - donut : true, - colors : ['#20805E','#26527C','#BF8530','#A60000','#006363','#679B00'], - field : 'country', - //query : { query: "*", field: "country"} - query : { field : "speaker", query : "play_name:Hamlet" }, - group : "pies" - }, - { - title : "Othello", - type : "pie", - span : 2, - size : 3, - legend : false, - labels : false, - donut : true, - colors : ['#35D59D','#FFB140','#F43D6B','#A60000','#006363','#679B00'], - field : 'country', - //query : { query: "*", field: "country"} - query : { field : "speaker", query : "play_name:Othello" }, - group : "pies" - }, - { - title : "A Winters Tale", - type : "pie", - span : 2, - size : 3, - legend : false, - labels : false, - donut : true, - colors : ['#78AF2C','#BF4630','#6A237E','#A60000','#006363','#679B00'], - field : 'country', - //query : { query: "*", field: "country"} - query : { field : "speaker", query : 'play_name:"A Winters Tale"' }, - group : "pies" - }, - { - title : "The Tempest", - type : "pie", - span : 2, - size : 3, - legend : false, - labels : false, - donut : true, - colors : ['#2A4480','#BFA730','#BF7130','#A60000','#006363','#679B00'], - field : 'country', - //query : { query: "*", field: "country"} - query : { field : "speaker", query : 'play_name:"The Tempest"' }, - group : "pies" - }, - { - title : "King Lear", - type : "pie", - span : 2, - size : 3, - legend : false, - labels : false, - donut : true, - colors : ['#01939A','#FFAB00','#FF0700','#A60000','#006363','#679B00'], - field : 'country', - //query : { query: "*", field: "country"} - query : { field : "speaker", query : 'play_name:"King Lear"' }, - group : "pies" - }, - ] - }, - { - title: "Lines of Plays", - height: "210px", - collapse: false, - panels: [ - { - title : "Plays", - type : "pie", - span : 4, - size : 8, - labels : false, - colors : ['#BF3030','#1D7373','#86B32D','#A60000','#006363','#679B00'], - field : 'country', - mode : "terms", - query : { query:"*", field:"play_name" } - }, - { - type : "text", - title : "About", - 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 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.", - }, - { - title : "Newest Lines", - editable: true, - 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: "225px", - panels: [ - { - title : "Monkey Shakespeare Lines", - type : "histogram", - span : 5, - show : ['bars','stack'], - fill : 1, - query : [ - { label : "Query Hits", query : "*", color: '#86B32D' }, - { label : "Hamlet", query : "play_name:Hamlet" }, - { label : "Macbeth", query : "play_name:macbeth" }, - ], - }, - { - title : "Monkey Typists Worldwide", - type : "map", - map : 'world', - field : "country", - span : 5, - size : 500, - query : "*", - }, - { - type : "text", - title : "About", - 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" + - " data series will be altered. All panels exist in the 'default'" + - " group by default. The map panel can be used to visualize events" + - " with attached geo data.", - }, - ] - } - - ] -}; diff --git a/default.json b/default.json new file mode 100644 index 00000000000..6573d9790e4 --- /dev/null +++ b/default.json @@ -0,0 +1,328 @@ +{ + "title": "Infinite Monkey Dashboard", + "rows": [ + { + "title": "Query Control", + "height": "30px", + "panels": [ + { + "type": "stringquery", + "span": 12, + "group": [ + "default", + "counter", + "histogram" + ], + "label": "Search", + "query": "*", + "size": 100, + "sort": [ + "@timestamp", + "desc" + ] + } + ], + "collapse": false, + "editable": true + }, + { + "title": "Status", + "collapse": false, + "height": "50px", + "panels": [ + { + "type": "timepicker", + "span": 5, + "mode": "relative", + "index": "\"shakespeare\"", + "refresh": { + "enable": false, + "interval": 30, + "min": 10 + }, + "timespan": "1h", + "timefield": "@timestamp", + "group": [ + "default", + "pies" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + { + "title": "Histogram Timer", + "type": "timepicker", + "span": 0, + "mode": "relative", + "timespan": "5m", + "index": "\"shakespeare\"", + "refresh": { + "enable": true, + "interval": 10, + "min": 10 + }, + "timefield": "@timestamp", + "group": "histogram", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + { + "type": "histogram", + "span": 2, + "show": [ + "lines", + "y-axis" + ], + "fill": 0.3, + "group": "histogram", + "query": [ + { + "label": "Event Rate", + "query": "*", + "color": "#FF7400" + } + ], + "interval": "5s", + "index": "shakespeare", + "title": "Lines per 5s" + }, + { + "title": "Counter Timer", + "type": "timepicker", + "span": 0, + "mode": "relative", + "timespan": "30d", + "index": "\"shakespeare\"", + "refresh": { + "enable": true, + "interval": 10, + "min": 10 + }, + "timefield": "@timestamp", + "group": "counter", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + { + "type": "hits", + "title": "Lines Completed", + "span": 2, + "group": "counter", + "query": "*", + "style": { + "font-size": "36pt", + "font-weight": "bold" + }, + "index": "shakespeare", + "error": false + }, + { + "type": "text", + "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", + "group": "default" + }, + { + "title": "Dashboard Loader", + "type": "dashcontrol", + "span": 3, + "group": "default", + "save": { + "gist": true, + "elasticsearch": true, + "local": true, + "default": true + }, + "load": { + "gist": true, + "elasticsearch": true, + "local": true + }, + "elasticsearch_size": 20, + "error": false + } + ], + "editable": true + }, + { + "title": "Lines of Plays", + "height": "210px", + "collapse": false, + "panels": [ + { + "title": "Plays", + "type": "pie", + "span": 4, + "size": 8, + "labels": false, + "colors": [ + "#BF3030", + "#1D7373", + "#86B32D", + "#A60000", + "#006363", + "#679B00" + ], + "field": "country", + "mode": "terms", + "query": { + "query": "*", + "field": "play_name" + }, + "exclude": [], + "donut": false, + "tilt": false, + "legend": true, + "group": "default", + "default_field": "_all", + "index": "shakespeare" + }, + { + "type": "text", + "title": "About", + "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 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.", + "group": "default" + }, + { + "title": "Newest Lines", + "editable": true, + "type": "table", + "span": 6, + "query": "*", + "style": { + "font-size": "85%" + }, + "fields": [ + "@timestamp", + "play_name", + "speaker", + "text_entry" + ], + "size": 100, + "sort": [ + "@timestamp", + "desc" + ], + "group": "default", + "index": "shakespeare", + "error": false + }, + { + "type": "fields", + "title": "Fields", + "span": 2, + "group": "default", + "style": { + "font-size": "85%", + "line-height": "15px" + }, + "sort": [ + "@timestamp", + "desc" + ] + } + ], + "editable": true + }, + { + "title": "Monkey Monitoring", + "collapse": false, + "height": "225px", + "panels": [ + { + "title": "Monkey Shakespeare Lines", + "type": "histogram", + "span": 5, + "show": [ + "bars", + "stack", + "legend", + "x-axis", + "y-axis" + ], + "fill": 1, + "query": [ + { + "label": "Query Hits", + "query": "*", + "color": "#86B32D" + }, + { + "label": "Hamlet", + "query": "play_name:Hamlet" + }, + { + "label": "Macbeth", + "query": "play_name:macbeth" + } + ], + "interval": "1m", + "group": "default", + "index": "shakespeare" + }, + { + "title": "Monkey Typists Worldwide", + "type": "map", + "map": "world", + "field": "country", + "span": 5, + "size": 500, + "query": "*", + "colors": [ + "#C8EEFF", + "#0071A4" + ], + "exclude": [], + "group": "default", + "index": "shakespeare" + }, + { + "type": "text", + "title": "About", + "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 data series will be altered. All panels exist in the 'default' group by default. The map panel can be used to visualize events with attached geo data.", + "group": "default" + } + ], + "editable": true + } + ], + "editable": true +} \ No newline at end of file diff --git a/index.html b/index.html index 424da916d0a..ceca3003c11 100644 --- a/index.html +++ b/index.html @@ -29,21 +29,19 @@
++ | {{dashboard._id}} | +