kibana-sinatra 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/kibana/assets/app/app.js +4 -2
  4. data/lib/kibana/assets/app/components/kbn.js +114 -0
  5. data/lib/kibana/assets/app/components/require.config.js +5 -1
  6. data/lib/kibana/assets/app/controllers/dash.js +30 -2
  7. data/lib/kibana/assets/app/controllers/row.js +33 -0
  8. data/lib/kibana/assets/app/dashboards/blank.json +0 -11
  9. data/lib/kibana/assets/app/dashboards/default.json +0 -11
  10. data/lib/kibana/assets/app/dashboards/guided.json +0 -11
  11. data/lib/kibana/assets/app/dashboards/logstash.json +0 -6
  12. data/lib/kibana/assets/app/dashboards/noted.json +0 -11
  13. data/lib/kibana/assets/app/directives/addPanel.js +1 -1
  14. data/lib/kibana/assets/app/directives/kibanaPanel.js +3 -2
  15. data/lib/kibana/assets/app/directives/kibanaSimplePanel.js +3 -3
  16. data/lib/kibana/assets/app/panels/bettermap/module.js +52 -17
  17. data/lib/kibana/assets/app/panels/column/module.js +18 -8
  18. data/lib/kibana/assets/app/panels/histogram/editor.html +3 -0
  19. data/lib/kibana/assets/app/panels/histogram/module.html +1 -1
  20. data/lib/kibana/assets/app/panels/histogram/module.js +179 -49
  21. data/lib/kibana/assets/app/panels/histogram/styleEditor.html +4 -0
  22. data/lib/kibana/assets/app/panels/hits/module.js +46 -18
  23. data/lib/kibana/assets/app/panels/map/module.js +40 -21
  24. data/lib/kibana/assets/app/panels/pie/module.html +3 -0
  25. data/lib/kibana/assets/app/panels/pie/module.js +62 -25
  26. data/lib/kibana/assets/app/panels/sparklines/module.js +42 -35
  27. data/lib/kibana/assets/app/panels/table/editor.html +2 -2
  28. data/lib/kibana/assets/app/panels/table/module.html +24 -19
  29. data/lib/kibana/assets/app/panels/table/module.js +80 -29
  30. data/lib/kibana/assets/app/panels/terms/module.html +3 -0
  31. data/lib/kibana/assets/app/panels/terms/module.js +65 -17
  32. data/lib/kibana/assets/app/panels/text/module.js +21 -9
  33. data/lib/kibana/assets/app/panels/trends/module.js +34 -13
  34. data/lib/kibana/assets/app/partials/dasheditor.html +1 -1
  35. data/lib/kibana/assets/app/services/dashboard.js +14 -14
  36. data/lib/kibana/assets/app/services/fields.js +11 -8
  37. data/lib/kibana/assets/app/services/filterSrv.js +27 -17
  38. data/lib/kibana/assets/app/services/querySrv.js +14 -15
  39. data/lib/kibana/assets/css/bootstrap.dark.min.css +1 -1
  40. data/lib/kibana/assets/css/bootstrap.light.min.css +1 -1
  41. data/lib/kibana/assets/index.html +1 -1
  42. data/lib/kibana/assets/vendor/angular/angular-strap.js +6 -3
  43. data/lib/kibana/assets/vendor/angular/bindonce.js +269 -0
  44. data/lib/kibana/assets/vendor/bootstrap/less/overrides.less +6 -0
  45. data/lib/kibana/assets/vendor/elasticjs/elastic-angular-client.js +37 -24
  46. data/lib/kibana/assets/vendor/elasticjs/elastic.js +4694 -2419
  47. data/lib/kibana/assets/vendor/jquery/jquery.flot.byte.js +107 -0
  48. data/lib/kibana/sinatra/version.rb +1 -1
  49. data/lib/kibana/views/config.erb +19 -16
  50. metadata +4 -2
@@ -0,0 +1,107 @@
1
+ (function ($) {
2
+ "use strict";
3
+
4
+ var options = {};
5
+
6
+ //Round to nearby lower multiple of base
7
+ function floorInBase(n, base) {
8
+ return base * Math.floor(n / base);
9
+ }
10
+
11
+ function init(plot) {
12
+ plot.hooks.processDatapoints.push(function (plot) {
13
+ $.each(plot.getAxes(), function(axisName, axis) {
14
+ var opts = axis.options;
15
+ if (opts.mode === "byte" || opts.mode === "byteRate") {
16
+ axis.tickGenerator = function (axis) {
17
+ var returnTicks = [],
18
+ tickSize = 2,
19
+ delta = axis.delta,
20
+ steps = 0,
21
+ tickMin = 0,
22
+ tickVal,
23
+ tickCount = 0;
24
+
25
+ //Set the reference for the formatter
26
+ if (opts.mode === "byteRate") {
27
+ axis.rate = true;
28
+ }
29
+
30
+ //Enforce maximum tick Decimals
31
+ if (typeof opts.tickDecimals === "number") {
32
+ axis.tickDecimals = opts.tickDecimals;
33
+ } else {
34
+ axis.tickDecimals = 2;
35
+ }
36
+
37
+ //Count the steps
38
+ while (Math.abs(delta) >= 1024) {
39
+ steps++;
40
+ delta /= 1024;
41
+ }
42
+
43
+ //Set the tick size relative to the remaining delta
44
+ while (tickSize <= 1024) {
45
+ if (delta <= tickSize) {
46
+ break;
47
+ }
48
+ tickSize *= 2;
49
+ }
50
+
51
+ //Tell flot the tickSize we've calculated
52
+ if (typeof opts.minTickSize !== "undefined" && tickSize < opts.minTickSize) {
53
+ axis.tickSize = opts.minTickSize;
54
+ } else {
55
+ axis.tickSize = tickSize * Math.pow(1024,steps);
56
+ }
57
+
58
+ //Calculate the new ticks
59
+ tickMin = floorInBase(axis.min, axis.tickSize);
60
+ do {
61
+ tickVal = tickMin + (tickCount++) * axis.tickSize;
62
+ returnTicks.push(tickVal);
63
+ } while (tickVal < axis.max);
64
+
65
+ return returnTicks;
66
+ };
67
+
68
+ axis.tickFormatter = function(size, axis) {
69
+ var ext, steps = 0;
70
+
71
+ while (Math.abs(size) >= 1024) {
72
+ steps++;
73
+ size /= 1024;
74
+ }
75
+
76
+
77
+ switch (steps) {
78
+ case 0: ext = " B"; break;
79
+ case 1: ext = " KB"; break;
80
+ case 2: ext = " MB"; break;
81
+ case 3: ext = " GB"; break;
82
+ case 4: ext = " TB"; break;
83
+ case 5: ext = " PB"; break;
84
+ case 6: ext = " EB"; break;
85
+ case 7: ext = " ZB"; break;
86
+ case 8: ext = " YB"; break;
87
+ }
88
+
89
+
90
+ if (typeof axis.rate !== "undefined") {
91
+ ext += "/s";
92
+ }
93
+
94
+ return (size.toFixed(axis.tickDecimals) + ext);
95
+ };
96
+ }
97
+ });
98
+ });
99
+ }
100
+
101
+ $.plot.plugins.push({
102
+ init: init,
103
+ options: options,
104
+ name: "byte",
105
+ version: "0.1"
106
+ });
107
+ })(jQuery);
@@ -1,5 +1,5 @@
1
1
  module Kibana
2
2
  module Sinatra
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -1,36 +1,41 @@
1
- /**
2
- * These is the app's configuration, If you need to configure
3
- * the default dashboard, please see dashboards/default
1
+ /** @scratch /configuration/config.js/1
2
+ * == Configuration ==
3
+ * config.js is where you will find the core Kibana configuration. This file contains parameter that
4
+ * must be set before kibana is run for the first time.
4
5
  */
5
6
  define(['settings'],
6
7
  function (Settings) {
7
8
  "use strict";
8
9
 
10
+ /** @scratch /configuration/config.js/2
11
+ * === Parameters ===
12
+ */
9
13
  return new Settings({
10
14
 
11
- /**
12
- * URL to your elasticsearch server. You almost certainly don't
13
- * want 'http://localhost:9200' here. Even if Kibana and ES are on
14
- * the same host
15
+ /** @scratch /configuration/config.js/5
16
+ * ==== elasticsearch ====
15
17
  *
16
- * By default this will attempt to reach ES at the same host you have
18
+ * The URL to your elasticsearch server. You almost certainly don't
19
+ * want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on
20
+ * the same host. By default this will attempt to reach ES at the same host you have
17
21
  * elasticsearch installed on. You probably want to set it to the FQDN of your
18
22
  * elasticsearch host
19
- * @type {String}
20
23
  */
21
24
  elasticsearch: "<%= elasticsearch_url %>",
22
25
 
23
- /**
26
+ /** @scratch /configuration/config.js/5
27
+ * ==== kibana-int ====
28
+ *
24
29
  * The default ES index to use for storing Kibana specific object
25
30
  * such as stored dashboards
26
- * @type {String}
27
31
  */
28
32
  kibana_index: "<%= kibana_index %>",
29
33
 
30
- /**
31
- * Panel modules available. Panels will only be loaded when they are defined in the
34
+ /** @scratch /configuration/config.js/5
35
+ * ==== panel_name ====
36
+ *
37
+ * An array of panel modules available. Panels will only be loaded when they are defined in the
32
38
  * dashboard, but this list is used in the "add panel" interface.
33
- * @type {Array}
34
39
  */
35
40
  panel_names: [
36
41
  'histogram',
@@ -40,11 +45,9 @@ function (Settings) {
40
45
  'filtering',
41
46
  'timepicker',
42
47
  'text',
43
- 'fields',
44
48
  'hits',
45
49
  'dashcontrol',
46
50
  'column',
47
- 'derivequeries',
48
51
  'trends',
49
52
  'bettermap',
50
53
  'query',
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: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Neubert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2013-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -277,6 +277,7 @@ files:
277
277
  - lib/kibana/assets/vendor/angular/angular-sanitize.js
278
278
  - lib/kibana/assets/vendor/angular/angular-strap.js
279
279
  - lib/kibana/assets/vendor/angular/angular.js
280
+ - lib/kibana/assets/vendor/angular/bindonce.js
280
281
  - lib/kibana/assets/vendor/angular/datepicker.js
281
282
  - lib/kibana/assets/vendor/angular/timepicker.js
282
283
  - lib/kibana/assets/vendor/bootstrap/bootstrap.js
@@ -342,6 +343,7 @@ files:
342
343
  - lib/kibana/assets/vendor/filesaver.js
343
344
  - lib/kibana/assets/vendor/jquery/jquery-1.8.0.js
344
345
  - lib/kibana/assets/vendor/jquery/jquery-ui-1.10.3.js
346
+ - lib/kibana/assets/vendor/jquery/jquery.flot.byte.js
345
347
  - lib/kibana/assets/vendor/jquery/jquery.flot.events.js
346
348
  - lib/kibana/assets/vendor/jquery/jquery.flot.js
347
349
  - lib/kibana/assets/vendor/jquery/jquery.flot.pie.js