kibana-sinatra 3.1.0.2 → 3.1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d6fb0ca5b9deb5f4ac4021e85db5ed2bc2f8cc1
4
- data.tar.gz: 7fcc55bafac7329a79b8e8e56dc5991fe2eb4b2a
3
+ metadata.gz: 42a24f6644365d6e9ec2c9a9fca3bf4101d88217
4
+ data.tar.gz: 9e00965d345f23a7299aba04689a2127ab79fd22
5
5
  SHA512:
6
- metadata.gz: 2054e744ba55b7f4299c1b88ff5780e67f58a6358d4473142e0e9ed7e4f28c4cb6d509f9111cd55f1e0264684b6b4c9c162a8a739e6886a56c9bd9b6ef21bbb8
7
- data.tar.gz: 3f9f274511bfaf9edd1382b175e37d98a0dd24f7bd51e60086b71c41b1c18fa6707794e9b40172b24eabda4aff17a76cf444356fd2b89219f6aa086a2319120b
6
+ metadata.gz: 23127982f74f767ee8732d9a99f155785acf0624492ba76fb71d3de4c929affed233ed7ff01ad20da915947e47d422d3ec3fb595fc305df02ab0e3e660151009
7
+ data.tar.gz: 966859ccd8652a412a47aaf7613fb49f1ec118dfa97e7e26992a2ff1991dcc0b7b0224aefb07ac84c5bbb3d5f4fac05137e8ffaccfef2ba5a29818cd4ab21787
data/README.md CHANGED
@@ -81,11 +81,23 @@ If you would like to include custom dashboard JSON files you can do so by overri
81
81
 
82
82
  This method should return the JSON as a string.
83
83
 
84
- You could then make that JSON file the default by overriding `default_route` like this:
84
+ You could then make that JSON file the default by overriding `default_route`.
85
+
86
+ Here is a full example:
85
87
 
86
88
  ```ruby
87
89
  module Kibana::Sinatra
88
90
  class Web
91
+
92
+ def render_dashboard(name)
93
+ case name
94
+ when "test.json"
95
+ "{}"
96
+ when "asdf.json"
97
+ {}.to_json
98
+ end
99
+ end
100
+
89
101
  def default_route
90
102
  "/dashboard/file/test.json"
91
103
  end
@@ -93,6 +105,8 @@ module Kibana::Sinatra
93
105
  end
94
106
  ```
95
107
 
108
+ Please note there are some [built in dashboard](https://github.com/ianneub/kibana-sinatra/tree/master/lib/kibana/assets/app/dashboards) files that you will **NOT** be able to override.
109
+
96
110
  ## Versions
97
111
 
98
112
  Kibana-sinatra's version number will match the upstream Kibana version number, plus an additional build number. For example:
@@ -69,9 +69,25 @@ function (angular, $, _, appLevelRequire) {
69
69
  }
70
70
  };
71
71
 
72
- app.config(function ($routeProvider, $controllerProvider, $compileProvider, $filterProvider, $provide) {
72
+ app.config(function ($routeProvider, $controllerProvider, $httpProvider, $compileProvider, $filterProvider, $provide) {
73
+
74
+
75
+ $httpProvider.interceptors.push(['$location', function($location) {
76
+ return {
77
+ responseError: function(resp) {
78
+ if (resp.status === 0) {
79
+ console.log("redirecting");
80
+ $location.path('/connectionFailed');
81
+ console.log(resp);
82
+ }
83
+ }
84
+ };
85
+ }]);
73
86
 
74
87
  $routeProvider
88
+ .when('/connectionFailed', {
89
+ templateUrl: 'app/partials/connectionFailed.html',
90
+ })
75
91
  .when('/dashboard', {
76
92
  templateUrl: 'app/partials/dashboard.html',
77
93
  })
@@ -58,6 +58,11 @@ function (angular, app, _) {
58
58
  $scope.row.panels.push(panel);
59
59
  };
60
60
 
61
+ $scope.duplicate_panel = function(panel) {
62
+ var clone = angular.copy(panel);
63
+ $scope.row.panels.push(clone);
64
+ };
65
+
61
66
  /** @scratch /panels/0
62
67
  * [[panels]]
63
68
  * = Panels
@@ -47,6 +47,11 @@ function (angular,$) {
47
47
  '<i class="icon-cog pointer" bs-tooltip="\'Configure\'"></i></span>'+
48
48
  '</span>' +
49
49
 
50
+ '<span class="row-button extra" ng-show="panel.editable != false">' +
51
+ '<span ng-click="duplicate_panel(panel)" class="pointer">'+
52
+ '<i class="icon-copy pointer" bs-tooltip="\'Duplicate\'"></i></span>'+
53
+ '</span>' +
54
+
50
55
  '<span ng-repeat="task in panelMeta.modals" class="row-button extra" ng-show="task.show">' +
51
56
  '<span bs-modal="task.partial" class="pointer"><i ' +
52
57
  'bs-tooltip="task.description" ng-class="task.icon" class="pointer"></i></span>'+
@@ -241,7 +241,7 @@ function (angular, app, _, L, localRequire) {
241
241
 
242
242
  // This could be made configurable?
243
243
  L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', {
244
- attribution: '"Data, imagery and map information provided by MapQuest, '+
244
+ attribution: 'Data, imagery and map information provided by MapQuest, '+
245
245
  'OpenStreetMap <http://www.openstreetmap.org/copyright> and contributors, ODbL',
246
246
  maxZoom: 18,
247
247
  minZoom: 2
@@ -0,0 +1,20 @@
1
+
2
+ <p>
3
+ <div class="row">
4
+ <div class="container-fluid main">
5
+ <div class="kibana-container container">
6
+ <div class="span12">
7
+ <h1>Connection Failed</h1>
8
+
9
+ <h5>Possibility #1: Your elasticsearch server is down or unreachable</h5>
10
+ This can be caused by a network outage, or a failure of the Elasticsearch process. If you have recently run a query that required a <i>terms</i> facet to be executed it is possible the process has run out of memory and stopped. Be sure to check your Elasticsearch logs for any sign of memory pressure.
11
+ <h5>Possibility #2: You are running Elasticsearch 1.4 or higher</h5>
12
+ Elasticsearch 1.4 ships with a security setting that prevents Kibana from connecting. You will need to set <i>http.cors.allow-origin</i> in your <i>elasticsearch.yml</i> to the correct protocol, hostname, and port (if not 80) that your access Kibana from. Note that if you are running Kibana in a sub-url, you should exclude the sub-url path and only include the protocol, hostname and port. For example, <i>http://mycompany.com:8080</i>, not <i>http://mycompany.com:8080/kibana</i>.
13
+
14
+ <h5>Click back, or the home button, when you have resolved the connection issue</h5>
15
+ </ol>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </p>
@@ -77,8 +77,9 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
77
77
  this.last = {};
78
78
  this.availablePanels = [];
79
79
 
80
- $rootScope.$on('$routeChangeSuccess',function(){
80
+ $rootScope.$on('$routeChangeSuccess', function () {
81
81
  // Clear the current dashboard to prevent reloading
82
+ if ($location.path() === '/connectionFailed') { return; }
82
83
  self.current = {};
83
84
  self.indices = [];
84
85
  esVersion.isMinimum().then(function(isMinimum) {
@@ -37,7 +37,7 @@ function (angular, _, config, moment) {
37
37
  var something;
38
38
  indices = _.uniq(_.map(indices, encodeURIComponent));
39
39
 
40
- something = ejs.client.get("/" + indices.join(",") + "/_aliases?ignore_missing=true",
40
+ something = ejs.client.get("/" + indices.join(",") + "/_aliases?ignore_unavailable=true&ignore_missing=true",
41
41
  undefined, undefined, function (data, p) {
42
42
  if (p === 404) {
43
43
  return [];
@@ -772,7 +772,8 @@ angular.module('$strap.directives').directive('bsTimepicker', [
772
772
  angular.module('$strap.directives').directive('bsTooltip', [
773
773
  '$parse',
774
774
  '$compile',
775
- function ($parse, $compile) {
775
+ '$sanitize',
776
+ function ($parse, $compile, $sanitize) {
776
777
  return {
777
778
  restrict: 'A',
778
779
  scope: true,
@@ -795,7 +796,7 @@ angular.module('$strap.directives').directive('bsTooltip', [
795
796
  }
796
797
  element.tooltip({
797
798
  title: function () {
798
- return angular.isFunction(value) ? value.apply(null, arguments) : value;
799
+ return $sanitize(angular.isFunction(value) ? value.apply(null, arguments) : value);
799
800
  },
800
801
  html: true
801
802
  });
@@ -875,4 +876,4 @@ angular.module('$strap.directives').directive('bsTypeahead', [
875
876
  }
876
877
  };
877
878
  }
878
- ]);
879
+ ]);
@@ -1,5 +1,5 @@
1
1
  module Kibana
2
2
  module Sinatra
3
- VERSION = "3.1.0.2"
3
+ VERSION = "3.1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kibana-sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.2
4
+ version: 3.1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Neubert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-16 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -249,6 +249,7 @@ files:
249
249
  - lib/kibana/assets/app/panels/trends/editor.html
250
250
  - lib/kibana/assets/app/panels/trends/module.html
251
251
  - lib/kibana/assets/app/panels/trends/module.js
252
+ - lib/kibana/assets/app/partials/connectionFailed.html
252
253
  - lib/kibana/assets/app/partials/dashLoader.html
253
254
  - lib/kibana/assets/app/partials/dashLoaderShare.html
254
255
  - lib/kibana/assets/app/partials/dashboard.html