From 0a94593fc94f0445601647789b2e7920fe155e16 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Sat, 16 Feb 2013 10:28:03 -0700 Subject: [PATCH] Added newlines filter to text panel, set default.json to Logstash instructional message with loader --- default.json | 298 ++-------------------------------------- panels/text/module.html | 2 +- panels/text/module.js | 15 +- 3 files changed, 23 insertions(+), 292 deletions(-) diff --git a/default.json b/default.json index 6573d9790e4..d3e58e73371 100644 --- a/default.json +++ b/default.json @@ -1,156 +1,23 @@ { - "title": "Infinite Monkey Dashboard", + "title": "Introduction", "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", + "span": 6, + "editable": true, "group": [ - "default", - "pies" + "default" ], - "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", + "title": "Welcome", + "content": "Welcome to Kibana Dashboard, a technology preview of what's to come for Kibana, Logstash and Elasticsearch \n\nKibana dashboard is the easy way to share, build, use and extend interactive, real time dashboards and data analysis interfaces. \n\nReady to get started? \n\nLogstash users, click the 'Load' button to the right, paste this URL: https://gist.github.com/anonymous/e99d94a426956c45a288 into the 'Gist' loader, click 'Get' and select the 'Logstash Dashboard' link that appears", "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" + "font-size": "14pt" + } }, { "title": "Dashboard Loader", @@ -173,155 +40,6 @@ } ], "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 diff --git a/panels/text/module.html b/panels/text/module.html index add17018bcf..1b287cbbafe 100644 --- a/panels/text/module.html +++ b/panels/text/module.html @@ -1,3 +1,3 @@ -

{{panel.content}}

+

\ No newline at end of file diff --git a/panels/text/module.js b/panels/text/module.js index 82ee2e2d9a5..d7c20e5bba9 100644 --- a/panels/text/module.js +++ b/panels/text/module.js @@ -14,4 +14,17 @@ angular.module('kibana.text', []) $scope.init = function() { } $scope.init(); -}) \ No newline at end of file +}) +.filter('newlines', function(){ + return function (input) { + return input.replace(/\n/g, '
'); + } +}) +.filter('striphtml', function () { + return function(text) { + return text + .replace(/&/g, '&') + .replace(/>/g, '>') + .replace(/