kibana-sinatra 3.0.0.0 → 3.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/kibana/assets/app/components/extend-jquery.js +1 -1
- data/lib/kibana/assets/app/components/kbn.js +1 -1
- data/lib/kibana/assets/app/components/lodash.extended.js +1 -1
- data/lib/kibana/assets/app/components/require.config.js +1 -0
- data/lib/kibana/assets/app/controllers/all.js +1 -1
- data/lib/kibana/assets/app/controllers/dash.js +1 -1
- data/lib/kibana/assets/app/controllers/pulldown.js +1 -1
- data/lib/kibana/assets/app/controllers/row.js +1 -1
- data/lib/kibana/assets/app/dashboards/blank.json +1 -1
- data/lib/kibana/assets/app/dashboards/guided.json +1 -1
- data/lib/kibana/assets/app/dashboards/noted.json +1 -1
- data/lib/kibana/assets/app/directives/addPanel.js +1 -1
- data/lib/kibana/assets/app/directives/all.js +1 -1
- data/lib/kibana/assets/app/directives/arrayJoin.js +1 -1
- data/lib/kibana/assets/app/directives/configModal.js +1 -1
- data/lib/kibana/assets/app/directives/confirmClick.js +1 -1
- data/lib/kibana/assets/app/directives/dashUpload.js +1 -1
- data/lib/kibana/assets/app/directives/esVersion.js +1 -1
- data/lib/kibana/assets/app/directives/kibanaPanel.js +1 -1
- data/lib/kibana/assets/app/directives/kibanaSimplePanel.js +2 -2
- data/lib/kibana/assets/app/directives/ngBlur.js +1 -1
- data/lib/kibana/assets/app/directives/ngModelOnBlur.js +1 -1
- data/lib/kibana/assets/app/directives/tip.js +1 -1
- data/lib/kibana/assets/app/factories/store.js +1 -1
- data/lib/kibana/assets/app/filters/all.js +11 -3
- data/lib/kibana/assets/app/panels/bettermap/module.js +2 -2
- data/lib/kibana/assets/app/panels/filtering/module.html +19 -19
- data/lib/kibana/assets/app/panels/filtering/module.js +3 -1
- data/lib/kibana/assets/app/panels/goal/module.js +1 -1
- data/lib/kibana/assets/app/panels/histogram/editor.html +3 -0
- data/lib/kibana/assets/app/panels/histogram/module.js +4 -4
- data/lib/kibana/assets/app/panels/hits/module.js +1 -1
- data/lib/kibana/assets/app/panels/map/module.js +1 -1
- data/lib/kibana/assets/app/panels/query/editors/topN.html +3 -3
- data/lib/kibana/assets/app/panels/query/meta.html +7 -7
- data/lib/kibana/assets/app/panels/query/module.html +9 -9
- data/lib/kibana/assets/app/panels/query/module.js +4 -3
- data/lib/kibana/assets/app/panels/sparklines/module.js +1 -1
- data/lib/kibana/assets/app/panels/stats/module.js +2 -2
- data/lib/kibana/assets/app/panels/table/micropanel.html +1 -1
- data/lib/kibana/assets/app/panels/table/modal.html +1 -3
- data/lib/kibana/assets/app/panels/table/module.html +7 -0
- data/lib/kibana/assets/app/panels/table/module.js +22 -13
- data/lib/kibana/assets/app/panels/terms/module.html +21 -5
- data/lib/kibana/assets/app/panels/terms/module.js +3 -3
- data/lib/kibana/assets/app/panels/timepicker/module.js +0 -1
- data/lib/kibana/assets/app/panels/trends/module.js +6 -8
- data/lib/kibana/assets/app/partials/dashLoader.html +1 -1
- data/lib/kibana/assets/app/partials/dasheditor.html +4 -4
- data/lib/kibana/assets/app/partials/querySelect.html +3 -3
- data/lib/kibana/assets/app/services/dashboard.js +14 -12
- data/lib/kibana/assets/app/services/esVersion.js +14 -8
- data/lib/kibana/assets/app/services/fields.js +16 -15
- data/lib/kibana/assets/app/services/filterSrv.js +28 -22
- data/lib/kibana/assets/app/services/kbnIndex.js +23 -20
- data/lib/kibana/assets/app/services/querySrv.js +29 -20
- data/lib/kibana/sinatra/version.rb +1 -1
- data/lib/kibana/views/config.erb +5 -0
- data/lib/tasks/update.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a60578b7212ab46b0322991c4c6bdf4248008bb
|
4
|
+
data.tar.gz: 75631dc7670f9a33295b221bf6b2b97481c7d6d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3899211b14c10cf4d02a9157d034eb205a229ef03fe141eba9c907a0be4ffb65f8f01965a9262111c0dc7f2ac097e7f08bdc6018daa6c5a31c444a7835608876
|
7
|
+
data.tar.gz: 52b59580df2b66f222bb1a8d98963812ef70f9bd198d1e8a7e1c625bd9eb079e1106a94018c1cf80f7832f6688523f384627d8356eb3ab2942f372dd23406cfe
|
data/README.md
CHANGED
@@ -4,9 +4,7 @@
|
|
4
4
|
[![Build Status](https://travis-ci.org/ianneub/kibana-sinatra.png)](https://travis-ci.org/ianneub/kibana-sinatra)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/kibana-sinatra.png)](http://badge.fury.io/rb/kibana-sinatra)
|
6
6
|
|
7
|
-
This gem provides [Kibana 3](https://github.com/elasticsearch/kibana) inside a [Sinatra](http://www.sinatrarb.com/) app that you can include in any Rack based system, including Rails.
|
8
|
-
|
9
|
-
It is currently based on Kibana 3 commit [84ed4069f7797a9e364e050063e6897927d2a0d7](https://github.com/elasticsearch/kibana/commits/84ed4069f7797a9e364e050063e6897927d2a0d7)
|
7
|
+
This gem provides [Kibana 3](https://github.com/elasticsearch/kibana) inside a [Sinatra](http://www.sinatrarb.com/) app that you can include in any [Rack](https://github.com/rack/rack) based system, including [Rails](http://www.rubyonrails.org/).
|
10
8
|
|
11
9
|
## Installation
|
12
10
|
|
@@ -73,6 +71,14 @@ At last, you need to just run rackup.
|
|
73
71
|
rackup
|
74
72
|
```
|
75
73
|
|
74
|
+
## Versions
|
75
|
+
|
76
|
+
Kibana-sinatra's version number will match the upstream Kibana version number, plus an additional build number. For example:
|
77
|
+
|
78
|
+
Kibana-sinatra v.`3.0.0.0` is equivalent to upstream Kibana v.`3.0.0`, and is our build `0`.
|
79
|
+
|
80
|
+
We aim to keep in step with Kibana's released versions.
|
81
|
+
|
76
82
|
## Contributing
|
77
83
|
|
78
84
|
1. Fork it
|
@@ -9,7 +9,7 @@ function (angular, _) {
|
|
9
9
|
.module('kibana.directives')
|
10
10
|
.directive('kibanaSimplePanel', function($compile) {
|
11
11
|
var panelLoading = '<span ng-show="panelMeta.loading == true">' +
|
12
|
-
'<span style="font-size:
|
12
|
+
'<span style="font-size:24px;font-weight:200">'+
|
13
13
|
'<i class="icon-spinner icon-spin"></i> loading ...' +
|
14
14
|
'</span>'+
|
15
15
|
'</span>';
|
@@ -74,4 +74,4 @@ function (angular, _) {
|
|
74
74
|
};
|
75
75
|
});
|
76
76
|
|
77
|
-
});
|
77
|
+
});
|
@@ -16,8 +16,8 @@ define([
|
|
16
16
|
|
17
17
|
module.filter('pinnedQuery', function(querySrv) {
|
18
18
|
return function( items, pinned) {
|
19
|
-
var ret = _.filter(querySrv.ids,function(id){
|
20
|
-
var v = querySrv.list[id];
|
19
|
+
var ret = _.filter(querySrv.ids(),function(id){
|
20
|
+
var v = querySrv.list()[id];
|
21
21
|
if(!_.isUndefined(v.pin) && v.pin === true && pinned === true) {
|
22
22
|
return true;
|
23
23
|
}
|
@@ -110,6 +110,14 @@ define([
|
|
110
110
|
};
|
111
111
|
});
|
112
112
|
|
113
|
+
module.filter('editable', function () {
|
114
|
+
return function (data) {
|
115
|
+
return _.filter(data, function (item) {
|
116
|
+
return item.editable !== false;
|
117
|
+
});
|
118
|
+
};
|
119
|
+
});
|
120
|
+
|
113
121
|
module.filter('gistid', function() {
|
114
122
|
var gist_pattern = /(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
|
115
123
|
return function(input) {
|
@@ -122,4 +130,4 @@ define([
|
|
122
130
|
};
|
123
131
|
});
|
124
132
|
|
125
|
-
});
|
133
|
+
});
|
@@ -145,7 +145,7 @@ function (angular, app, _, L, localRequire) {
|
|
145
145
|
var request = $scope.ejs.Request().indices(dashboard.indices[_segment])
|
146
146
|
.query($scope.ejs.FilteredQuery(
|
147
147
|
boolQuery,
|
148
|
-
filterSrv.getBoolFilter(filterSrv.ids).must($scope.ejs.ExistsFilter($scope.panel.field))
|
148
|
+
filterSrv.getBoolFilter(filterSrv.ids()).must($scope.ejs.ExistsFilter($scope.panel.field))
|
149
149
|
))
|
150
150
|
.fields([$scope.panel.field,$scope.panel.tooltip])
|
151
151
|
.size($scope.panel.size);
|
@@ -255,7 +255,7 @@ function (angular, app, _, L, localRequire) {
|
|
255
255
|
|
256
256
|
_.each(scope.data, function(p) {
|
257
257
|
if(!_.isUndefined(p.tooltip) && p.tooltip !== '') {
|
258
|
-
markerList.push(L.marker(p.coordinates).bindLabel(p.tooltip));
|
258
|
+
markerList.push(L.marker(p.coordinates).bindLabel(_.isArray(p.tooltip) ? p.tooltip[0] : p.tooltip));
|
259
259
|
} else {
|
260
260
|
markerList.push(L.marker(p.coordinates));
|
261
261
|
}
|
@@ -33,48 +33,48 @@
|
|
33
33
|
</style>
|
34
34
|
|
35
35
|
<div class='filtering-container'>
|
36
|
-
<span ng-show="
|
36
|
+
<span ng-show="dashboard.current.services.filter.ids.length == 0">
|
37
37
|
<h5>No filters available</h5>
|
38
38
|
</span>
|
39
|
-
<div ng-repeat="id in
|
39
|
+
<div ng-repeat="id in dashboard.current.services.filter.ids" class="small filter-panel-filter">
|
40
40
|
<div>
|
41
|
-
<strong>{{
|
42
|
-
<span ng-show="!
|
43
|
-
{{
|
41
|
+
<strong>{{dashboard.current.services.filter.list[id].type}}</strong>
|
42
|
+
<span ng-show="!dashboard.current.services.filter.list[id].editing && isEditable(dashboard.current.services.filter.list[id])" class="filter-mandate" ng-click="dashboard.current.services.filter.list[id].editing = true">
|
43
|
+
{{dashboard.current.services.filter.list[id].mandate}}
|
44
44
|
</span>
|
45
|
-
<span ng-show="!isEditable(
|
46
|
-
{{
|
45
|
+
<span ng-show="!isEditable(dashboard.current.services.filter.list[id])">
|
46
|
+
{{dashboard.current.services.filter.list[id].mandate}}
|
47
47
|
</span>
|
48
48
|
|
49
|
-
<i ng-class="getFilterClass(
|
49
|
+
<i ng-class="getFilterClass(dashboard.current.services.filter.list[id])" class="icon-circle"></i>
|
50
50
|
|
51
|
-
<span ng-show="
|
52
|
-
<select class="input-small" ng-model="
|
51
|
+
<span ng-show="dashboard.current.services.filter.list[id].editing">
|
52
|
+
<select class="input-small" ng-model="dashboard.current.services.filter.list[id].mandate" ng-options="f for f in ['must','mustNot','either']"></select>
|
53
53
|
</span>
|
54
54
|
|
55
55
|
<i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(id)"></i>
|
56
|
-
<i class="filter-action pointer" ng-class="{'icon-check':
|
57
|
-
<i class="filter-action pointer icon-edit" ng-hide="
|
56
|
+
<i class="filter-action pointer" ng-class="{'icon-check': dashboard.current.services.filter.list[id].active,'icon-check-empty': !dashboard.current.services.filter.list[id].active}" bs-tooltip="'Toggle'" ng-click="toggle(id)"></i>
|
57
|
+
<i class="filter-action pointer icon-edit" ng-hide="dashboard.current.services.filter.list[id].editing || !isEditable(dashboard.current.services.filter.list[id])" bs-tooltip="'Edit'" ng-click="dashboard.current.services.filter.list[id].editing = true"></i>
|
58
58
|
</div>
|
59
59
|
|
60
|
-
<div ng-hide="
|
60
|
+
<div ng-hide="dashboard.current.services.filter.list[id].editing && isEditable(dashboard.current.services.filter.list[id])">
|
61
61
|
<ul class="unstyled">
|
62
|
-
<li ng-repeat="(key,value) in
|
62
|
+
<li ng-repeat="(key,value) in dashboard.current.services.filter.list[id] track by $index" ng-show="show_key(key)">
|
63
63
|
<strong>{{key}}</strong> : {{value}}
|
64
64
|
</li>
|
65
65
|
</ul>
|
66
66
|
</div>
|
67
|
-
<form ng-show="
|
67
|
+
<form ng-show="dashboard.current.services.filter.list[id].editing && isEditable(dashboard.current.services.filter.list[id])">
|
68
68
|
<ul class="unstyled">
|
69
|
-
<li ng-repeat="key in _.keys(
|
70
|
-
<strong>{{key}}</strong> : <input type='text' ng-model="
|
69
|
+
<li ng-repeat="key in _.keys(dashboard.current.services.filter.list[id])" ng-show="show_key(key)">
|
70
|
+
<strong>{{key}}</strong> : <input type='text' ng-model="dashboard.current.services.filter.list[id][key]">
|
71
71
|
</li>
|
72
72
|
</ul>
|
73
73
|
<div>
|
74
74
|
|
75
|
-
<button type="submit" ng-click="
|
75
|
+
<button type="submit" ng-click="dashboard.current.services.filter.list[id].editing=undefined;refresh()" class="filter-apply btn btn-mini btn-success" bs-tooltip="'Save and refresh'">Apply</button>
|
76
76
|
|
77
|
-
<button ng-click="
|
77
|
+
<button ng-click="dashboard.current.services.filter.list[id].editing=undefined" class="filter-apply btn-mini btn" bs-tooltip="'Save without refresh'">Save</button>
|
78
78
|
</div>
|
79
79
|
</form>
|
80
80
|
</div>
|
@@ -27,6 +27,8 @@ function (angular, app, _) {
|
|
27
27
|
};
|
28
28
|
_.defaults($scope.panel,_d);
|
29
29
|
|
30
|
+
$scope.dashboard = dashboard;
|
31
|
+
|
30
32
|
$scope.$on('filter', function() {
|
31
33
|
$scope.row.notice = true;
|
32
34
|
});
|
@@ -41,7 +43,7 @@ function (angular, app, _) {
|
|
41
43
|
|
42
44
|
// This function should be moved to the service
|
43
45
|
$scope.toggle = function(id) {
|
44
|
-
|
46
|
+
dashboard.current.services.filter.list[id].active = !dashboard.current.services.filter.list[id].active;
|
45
47
|
dashboard.refresh();
|
46
48
|
};
|
47
49
|
|
@@ -131,7 +131,7 @@ define([
|
|
131
131
|
|
132
132
|
request = request
|
133
133
|
.query(boolQuery)
|
134
|
-
.filter(filterSrv.getBoolFilter(filterSrv.ids))
|
134
|
+
.filter(filterSrv.getBoolFilter(filterSrv.ids()))
|
135
135
|
.size(0);
|
136
136
|
|
137
137
|
$scope.inspector = angular.toJson(JSON.parse(request.toString()),true);
|
@@ -22,6 +22,9 @@
|
|
22
22
|
<div class="editor-option">
|
23
23
|
<label class="small">Derivative <tip>Plot the change per interval in the series</tip></label><input type="checkbox" ng-model="panel.derivative" ng-checked="panel.derivative" ng-change="set_refresh(true)">
|
24
24
|
</div>
|
25
|
+
<div class="editor-option">
|
26
|
+
<label class="small">Zero fill <tip>Fills zeros in gaps.</tip></label><input type="checkbox" ng-model="panel.zerofill" ng-checked="panel.zerofill" ng-change="set_refresh(true)">
|
27
|
+
</div>
|
25
28
|
</div>
|
26
29
|
<div class="section">
|
27
30
|
<h5>Time Options</h5>
|
@@ -226,6 +226,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
|
|
226
226
|
/** @scratch /panels/histogram/3
|
227
227
|
* derivative:: Show each point on the x-axis as the change from the previous point
|
228
228
|
*/
|
229
|
+
|
229
230
|
derivative : false,
|
230
231
|
/** @scratch /panels/histogram/3
|
231
232
|
* tooltip object::
|
@@ -345,7 +346,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
|
|
345
346
|
_.each(queries, function(q) {
|
346
347
|
var query = $scope.ejs.FilteredQuery(
|
347
348
|
querySrv.toEjsObj(q),
|
348
|
-
filterSrv.getBoolFilter(filterSrv.ids)
|
349
|
+
filterSrv.getBoolFilter(filterSrv.ids())
|
349
350
|
);
|
350
351
|
|
351
352
|
var facet = $scope.ejs.DateHistogramFacet(q.id);
|
@@ -417,7 +418,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
|
|
417
418
|
interval: _interval,
|
418
419
|
start_date: _range && _range.from,
|
419
420
|
end_date: _range && _range.to,
|
420
|
-
fill_style: $scope.panel.derivative ? 'null' : 'minimal'
|
421
|
+
fill_style: $scope.panel.derivative ? 'null' : $scope.panel.zerofill ? 'minimal' : 'no'
|
421
422
|
};
|
422
423
|
time_series = new timeSeries.ZeroFilled(tsOpts);
|
423
424
|
hits = 0;
|
@@ -772,8 +773,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
|
|
772
773
|
var $tooltip = $('<div>');
|
773
774
|
elem.bind("plothover", function (event, pos, item) {
|
774
775
|
var group, value, timestamp, interval;
|
775
|
-
interval = scope.panel.
|
776
|
-
"" : " per " + (scope.panel.scaleSeconds ? '1s' : scope.panel.interval);
|
776
|
+
interval = " per " + (scope.panel.scaleSeconds ? '1s' : scope.panel.interval);
|
777
777
|
if (item) {
|
778
778
|
if (item.series.info.alias || scope.panel.tooltip.query_as_alias) {
|
779
779
|
group = '<small style="font-size:0.9em;">' +
|
@@ -122,7 +122,7 @@ define([
|
|
122
122
|
_.each(queries, function(q) {
|
123
123
|
var _q = $scope.ejs.FilteredQuery(
|
124
124
|
querySrv.toEjsObj(q),
|
125
|
-
filterSrv.getBoolFilter(filterSrv.ids));
|
125
|
+
filterSrv.getBoolFilter(filterSrv.ids()));
|
126
126
|
|
127
127
|
request = request
|
128
128
|
.facet($scope.ejs.QueryFacet(q.id)
|
@@ -121,7 +121,7 @@ function (angular, app, _, $) {
|
|
121
121
|
.facetFilter($scope.ejs.QueryFilter(
|
122
122
|
$scope.ejs.FilteredQuery(
|
123
123
|
boolQuery,
|
124
|
-
filterSrv.getBoolFilter(filterSrv.ids)
|
124
|
+
filterSrv.getBoolFilter(filterSrv.ids())
|
125
125
|
)))).size(0);
|
126
126
|
|
127
127
|
$scope.populate_modal(request);
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<fieldset>
|
2
2
|
<label class="small">Field</label><br>
|
3
|
-
<input ng-model="
|
3
|
+
<input ng-model="dashboard.current.services.query.list[id].field" type="text" bs-typeahead="fields.list" placeholder="Field">
|
4
4
|
<p>
|
5
5
|
<label class="small">Count</label><br>
|
6
|
-
<input ng-model="
|
6
|
+
<input ng-model="dashboard.current.services.query.list[id].size" type="number">
|
7
7
|
<p>
|
8
8
|
<label class="small">Union</label><br>
|
9
|
-
<select class="input-small" ng-model="
|
9
|
+
<select class="input-small" ng-model="dashboard.current.services.query.list[id].union">
|
10
10
|
<option ng-repeat="mode in ['none','AND','OR']">{{mode}}</option>
|
11
11
|
</select>
|
12
12
|
</fieldset>
|