kibana-sinatra 0.0.6 → 0.0.7

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -3
  3. data/lib/kibana/assets/app/app.js +16 -4
  4. data/lib/kibana/assets/app/components/require.config.js +2 -1
  5. data/lib/kibana/assets/app/components/settings.js +4 -3
  6. data/lib/kibana/assets/app/controllers/dash.js +1 -1
  7. data/lib/kibana/assets/app/controllers/dashLoader.js +5 -4
  8. data/lib/kibana/assets/app/dashboards/blank.json +2 -1
  9. data/lib/kibana/assets/app/dashboards/default.json +4 -51
  10. data/lib/kibana/assets/app/dashboards/guided.json +2 -1
  11. data/lib/kibana/assets/app/dashboards/logstash.json +2 -0
  12. data/lib/kibana/assets/app/dashboards/noted.json +2 -1
  13. data/lib/kibana/assets/app/directives/addPanel.js +5 -0
  14. data/lib/kibana/assets/app/directives/all.js +2 -1
  15. data/lib/kibana/assets/app/directives/configModal.js +34 -0
  16. data/lib/kibana/assets/app/directives/kibanaPanel.js +10 -4
  17. data/lib/kibana/assets/app/directives/kibanaSimplePanel.js +10 -8
  18. data/lib/kibana/assets/app/panels/bettermap/editor.html +4 -4
  19. data/lib/kibana/assets/app/panels/bettermap/module.js +1 -1
  20. data/lib/kibana/assets/app/panels/dashcontrol/module.html +1 -4
  21. data/lib/kibana/assets/app/panels/histogram/editor.html +22 -22
  22. data/lib/kibana/assets/app/panels/histogram/module.html +4 -4
  23. data/lib/kibana/assets/app/panels/histogram/module.js +30 -24
  24. data/lib/kibana/assets/app/panels/histogram/timeSeries.js +16 -0
  25. data/lib/kibana/assets/app/panels/hits/editor.html +9 -9
  26. data/lib/kibana/assets/app/panels/map/editor.html +4 -4
  27. data/lib/kibana/assets/app/panels/pie/editor.html +47 -42
  28. data/lib/kibana/assets/app/panels/table/editor.html +39 -38
  29. data/lib/kibana/assets/app/panels/table/module.html +14 -5
  30. data/lib/kibana/assets/app/panels/table/module.js +23 -19
  31. data/lib/kibana/assets/app/panels/table/pagination.html +29 -24
  32. data/lib/kibana/assets/app/panels/terms/editor.html +53 -47
  33. data/lib/kibana/assets/app/panels/terms/module.js +7 -5
  34. data/lib/kibana/assets/app/panels/timepicker/module.html +2 -2
  35. data/lib/kibana/assets/app/partials/dashLoader.html +6 -6
  36. data/lib/kibana/assets/app/partials/dasheditor.html +127 -117
  37. data/lib/kibana/assets/app/partials/paneladd.html +1 -1
  38. data/lib/kibana/assets/app/partials/paneleditor.html +2 -2
  39. data/lib/kibana/assets/app/partials/panelgeneral.html +19 -17
  40. data/lib/kibana/assets/app/partials/roweditor.html +3 -3
  41. data/lib/kibana/assets/app/services/dashboard.js +67 -16
  42. data/lib/kibana/assets/app/services/fields.js +18 -15
  43. data/lib/kibana/assets/css/bootstrap.dark.min.css +1 -1
  44. data/lib/kibana/assets/css/bootstrap.light.min.css +1 -1
  45. data/lib/kibana/assets/vendor/angular/angular.js +17 -0
  46. data/lib/kibana/assets/vendor/bootstrap/less/modals.less +3 -11
  47. data/lib/kibana/assets/vendor/bootstrap/less/overrides.less +2 -3
  48. data/lib/kibana/assets/vendor/jquery/jquery.flot.js +2 -2
  49. data/lib/kibana/sinatra/version.rb +1 -1
  50. data/lib/kibana/views/config.erb +17 -7
  51. metadata +3 -5
  52. data/lib/kibana/assets/app/panels/dashcontrol/load.html +0 -40
  53. data/lib/kibana/assets/app/panels/dashcontrol/save.html +0 -30
  54. data/lib/kibana/assets/app/panels/dashcontrol/share.html +0 -11
@@ -235,7 +235,7 @@ function (angular, app, _, L, localRequire) {
235
235
  });
236
236
 
237
237
  // This could be made configurable?
238
- L.tileLayer('http://{s}.tile.cloudmade.com/57cbb6ca8cac418dbb1a402586df4528/22677/256/{z}/{x}/{y}.png', {
238
+ L.tileLayer('https://ssl_tiles.cloudmade.com/57cbb6ca8cac418dbb1a402586df4528/22677/256/{z}/{x}/{y}.png', {
239
239
  maxZoom: 18,
240
240
  minZoom: 2
241
241
  }).addTo(map);
@@ -1,6 +1,3 @@
1
1
  <div ng-controller='dashcontrol' ng-init="init()">
2
- <label class='small'>Dash Control <tip icon="warning-sign">This panel is deprecated! Please remove it from your dashboard</tip></label>
3
- <button class='btn' ng-show="panel.load.gist || panel.load.elasticsearch || panel.load.local" data-placement="bottom" data-unique="1" ng-click="elasticsearch_dblist(elasticsearch.query)" bs-popover="'app/panels/dashcontrol/load.html'"><i class='icon-folder-open'></i> <i class='icon-caret-down'></i></button>
4
- <button class='btn' ng-show="panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default" data-placement="bottom" data-unique="1" bs-popover="'app/panels/dashcontrol/save.html'"><i class='icon-save'></i> <i class='icon-caret-down'></i></button>
5
- <button ng-show="panel.temp" class='btn' ng-click="elasticsearch_save('temp',panel.temp_ttl)" bs-modal="'app/panels/dashcontrol/share.html'"><i class='icon-share'></i></button>
2
+ This panel has been removed. Please use the dashboard controls in the top right and remove this panel from your dashboard
6
3
  </div>
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
  <div class="editor-option" ng-show="panel.mode != 'count'">
9
9
  <label class="small">Value Field <tip>This field must contain a numeric value</tip></label>
10
- <input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-large" ng-model="panel.value_field">
10
+ <input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-medium" ng-model="panel.value_field">
11
11
  </div>
12
12
  </div>
13
13
  <div class="section">
@@ -23,26 +23,26 @@
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
25
  </div>
26
- </div>
27
- <h5>Time Options</h5>
28
- <div class="editor-row">
29
- <div class="editor-option">
30
- <label class="small">Time Field</label>
31
- <input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.time_field">
32
- </div>
33
- <div class="editor-option">
34
- <label class="small">Time correction</label>
35
- <select ng-model="panel.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
36
- </div>
37
- <div class="editor-option">
38
- <label class="small">Auto-interval</label><input type="checkbox" ng-model="panel.auto_int" ng-checked="panel.auto_int" />
39
- </div>
40
- <div class="editor-option" ng-show='panel.auto_int'>
41
- <label class="small">Resolution <tip>Shoot for this many data points, rounding to sane intervals</tip></label>
42
- <input type="number" class='input-mini' ng-model="panel.resolution" ng-change='set_refresh(true)'/>
43
- </div>
44
- <div class="editor-option" ng-hide='panel.auto_int'>
45
- <label class="small">Interval <tip>Use Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)</tip></label>
46
- <input type="text" class='input-mini' ng-model="panel.interval" ng-change='set_refresh(true)'/>
26
+ <div class="section">
27
+ <h5>Time Options</h5>
28
+ <div class="editor-option">
29
+ <label class="small">Time Field</label>
30
+ <input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.time_field">
31
+ </div>
32
+ <div class="editor-option">
33
+ <label class="small">Time correction</label>
34
+ <select ng-model="panel.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
35
+ </div>
36
+ <div class="editor-option">
37
+ <label class="small">Auto-interval</label><input type="checkbox" ng-model="panel.auto_int" ng-checked="panel.auto_int" />
38
+ </div>
39
+ <div class="editor-option" ng-show='panel.auto_int'>
40
+ <label class="small">Resolution <tip>Shoot for this many data points, rounding to sane intervals</tip></label>
41
+ <input type="number" class='input-mini' ng-model="panel.resolution" ng-change='set_refresh(true)'/>
42
+ </div>
43
+ <div class="editor-option" ng-hide='panel.auto_int'>
44
+ <label class="small">Interval <tip>Use Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)</tip></label>
45
+ <input type="text" class='input-mini' ng-model="panel.interval" ng-change='set_refresh(true)'/>
46
+ </div>
47
47
  </div>
48
48
  </div>
@@ -43,11 +43,11 @@
43
43
  <!--<a class='small' ng-click='zoom(0.5)'><i class='icon-zoom-in'></i> Zoom In</a>-->
44
44
  <a class='small' ng-click='zoom(2)'><i class='icon-zoom-out'></i> Zoom Out</a> |&nbsp
45
45
  </span>
46
- <span ng-show="panel.legend" ng-repeat='series in data' class="histogram-legend">
47
- <i class='icon-circle' ng-style="{color: series.info.color}"></i>
46
+ <span ng-show="panel.legend" ng-repeat='series in legend' class="histogram-legend">
47
+ <i class='icon-circle' ng-style="{color: series.query.color}"></i>
48
48
  <span class='small histogram-legend-item'>
49
- <span ng-if="panel.show_query">{{series.info.alias || series.info.query}}</span>
50
- <span ng-if="!panel.show_query">{{series.info.alias}}</span>
49
+ <span ng-if="panel.show_query">{{series.query.alias || series.query.query}}</span>
50
+ <span ng-if="!panel.show_query">{{series.query.alias}}</span>
51
51
  <span ng-show="panel.legend_counts"> ({{series.hits}})</span>
52
52
  </span>
53
53
  </span>
@@ -242,9 +242,6 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
242
242
  $scope.init = function() {
243
243
  // Hide view options by default
244
244
  $scope.options = false;
245
- $scope.$on('refresh',function(){
246
- $scope.get_data();
247
- });
248
245
 
249
246
  // Always show the query if an alias isn't set. Users can set an alias if the query is too
250
247
  // long
@@ -303,7 +300,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
303
300
  * @param {number} query_id The id of the query, generated on the first run and passed back when
304
301
  * this call is made recursively for more segments
305
302
  */
306
- $scope.get_data = function(segment, query_id) {
303
+ $scope.get_data = function(data, segment, query_id) {
307
304
  var
308
305
  _range,
309
306
  _interval,
@@ -380,12 +377,12 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
380
377
  results = request.doSearch();
381
378
 
382
379
  // Populate scope when we have results
383
- results.then(function(results) {
384
-
380
+ return results.then(function(results) {
385
381
  $scope.panelMeta.loading = false;
386
382
  if(segment === 0) {
383
+ $scope.legend = [];
387
384
  $scope.hits = 0;
388
- $scope.data = [];
385
+ data = [];
389
386
  $scope.annotations = [];
390
387
  query_id = $scope.query_id = new Date().getTime();
391
388
  }
@@ -407,7 +404,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
407
404
  var query_results = results.facets[q.id];
408
405
  // we need to initialize the data variable on the first run,
409
406
  // and when we are working on the first segment of the data.
410
- if(_.isUndefined($scope.data[i]) || segment === 0) {
407
+ if(_.isUndefined(data[i]) || segment === 0) {
411
408
  var tsOpts = {
412
409
  interval: _interval,
413
410
  start_date: _range && _range.from,
@@ -417,8 +414,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
417
414
  time_series = new timeSeries.ZeroFilled(tsOpts);
418
415
  hits = 0;
419
416
  } else {
420
- time_series = $scope.data[i].time_series;
421
- hits = $scope.data[i].hits;
417
+ time_series = data[i].time_series;
418
+ hits = data[i].hits;
422
419
  }
423
420
 
424
421
  // push each entry into the time series, while incrementing counters
@@ -427,7 +424,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
427
424
  hits += entry.count; // The series level hits counter
428
425
  $scope.hits += entry.count; // Entire dataset level hits counter
429
426
  });
430
- $scope.data[i] = {
427
+
428
+ $scope.legend[i] = {query:q,hits:hits};
429
+
430
+ data[i] = {
431
431
  info: q,
432
432
  time_series: time_series,
433
433
  hits: hits
@@ -461,11 +461,11 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
461
461
  }
462
462
 
463
463
  // Tell the histogram directive to render.
464
- $scope.$emit('render');
464
+ $scope.$emit('render', data);
465
465
 
466
466
  // If we still have segments left, get them
467
467
  if(segment < dashboard.indices.length-1) {
468
- $scope.get_data(segment+1,query_id);
468
+ $scope.get_data(data,segment+1,query_id);
469
469
  }
470
470
  }
471
471
  });
@@ -527,15 +527,21 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
527
527
  restrict: 'A',
528
528
  template: '<div></div>',
529
529
  link: function(scope, elem) {
530
+ var data, plot;
531
+
532
+ scope.$on('refresh',function(){
533
+ scope.get_data();
534
+ });
530
535
 
531
536
  // Receive render events
532
- scope.$on('render',function(){
533
- render_panel();
537
+ scope.$on('render',function(event,d){
538
+ data = d || data;
539
+ render_panel(data);
534
540
  });
535
541
 
536
542
  // Re-render if the window is resized
537
543
  angular.element(window).bind('resize', function(){
538
- render_panel();
544
+ render_panel(data);
539
545
  });
540
546
 
541
547
  var scale = function(series,factor) {
@@ -563,13 +569,13 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
563
569
  };
564
570
 
565
571
  // Function for rendering panel
566
- function render_panel() {
572
+ function render_panel(data) {
567
573
  // IE doesn't work without this
568
574
  elem.css({height:scope.panel.height || scope.row.height});
569
575
 
570
576
  // Populate from the query service
571
577
  try {
572
- _.each(scope.data, function(series) {
578
+ _.each(data, function(series) {
573
579
  series.label = series.info.alias;
574
580
  series.color = series.info.color;
575
581
  });
@@ -668,8 +674,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
668
674
  // when rendering stacked bars, we need to ensure each point that has data is zero-filled
669
675
  // so that the stacking happens in the proper order
670
676
  var required_times = [];
671
- if (scope.data.length > 1) {
672
- required_times = Array.prototype.concat.apply([], _.map(scope.data, function (query) {
677
+ if (data.length > 1) {
678
+ required_times = Array.prototype.concat.apply([], _.map(data, function (query) {
673
679
  return query.time_series.getOrderedTimes();
674
680
  }));
675
681
  required_times = _.uniq(required_times.sort(function (a, b) {
@@ -679,8 +685,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
679
685
  }
680
686
 
681
687
 
682
- for (var i = 0; i < scope.data.length; i++) {
683
- var _d = scope.data[i].time_series.getFlotPairs(required_times);
688
+ for (var i = 0; i < data.length; i++) {
689
+ var _d = data[i].time_series.getFlotPairs(required_times);
684
690
  if(scope.panel.derivative) {
685
691
  _d = derivative(_d);
686
692
  }
@@ -690,10 +696,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
690
696
  if(scope.panel.scaleSeconds) {
691
697
  _d = scaleSeconds(_d,scope.panel.interval);
692
698
  }
693
- scope.data[i].data = _d;
699
+ data[i].data = _d;
694
700
  }
695
701
 
696
- scope.plot = $.plot(elem, scope.data, options);
702
+ plot = $.plot(elem, data, options);
697
703
 
698
704
  } catch(e) {
699
705
  // Nothing to do here
@@ -101,6 +101,8 @@ function (_, Interval) {
101
101
  strategy = this._getAllFlotPairs;
102
102
  } else if(this.opts.fill_style === 'null') {
103
103
  strategy = this._getNullFlotPairs;
104
+ } else if(this.opts.fill_style === 'no') {
105
+ strategy = this._getNoZeroFlotPairs;
104
106
  } else {
105
107
  strategy = this._getMinFlotPairs;
106
108
  }
@@ -211,6 +213,20 @@ function (_, Interval) {
211
213
  return result;
212
214
  };
213
215
 
216
+ /**
217
+ * ** called as a reduce stragegy in getFlotPairs() **
218
+ * Not fill zero's on either side of the current time, only the current time
219
+ * @return {array} An array of points to plot with flot
220
+ */
221
+ ts.ZeroFilled.prototype._getNoZeroFlotPairs = function (result, time) {
222
+
223
+ // add the current time
224
+ if(this._data[time]){
225
+ result.push([ time, this._data[time]]);
226
+ }
227
+
228
+ return result;
229
+ };
214
230
 
215
231
  return ts;
216
232
  });
@@ -1,28 +1,28 @@
1
- <div>
2
- <div class="row-fluid">
3
- <div class="span3">
1
+ <div class="editor-row">
2
+ <div class="section">
3
+ <div class="editor-option">
4
4
  <label class="small">Style</label>
5
5
  <select class="input-small" ng-model="panel.chart" ng-options="f for f in ['bar','pie','list','total']"></select></span>
6
6
  </div>
7
- <div class="span2" ng-show="panel.chart == 'total' || panel.chart == 'list'">
7
+ <div class="editor-option" ng-show="panel.chart == 'total' || panel.chart == 'list'">
8
8
  <label class="small">Font Size</label>
9
9
  <select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
10
10
  </div>
11
- <div class="span3" ng-show="panel.chart == 'bar' || panel.chart == 'pie'">
11
+ <div class="editor-option" ng-show="panel.chart == 'bar' || panel.chart == 'pie'">
12
12
  <label class="small">Legend</label>
13
13
  <select class="input-small" ng-model="panel.counter_pos" ng-options="f for f in ['above','below','none']"></select></span>
14
14
  </div>
15
- <div class="span3" ng-show="panel.chart != 'total' && panel.counter_pos != 'none'">
15
+ <div class="editor-option" ng-show="panel.chart != 'total' && panel.counter_pos != 'none'">
16
16
  <label class="small" >List Format</label>
17
17
  <select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></span>
18
18
  </div>
19
- <div class="span1" ng-show="panel.chart == 'pie'">
19
+ <div class="editor-option" ng-show="panel.chart == 'pie'">
20
20
  <label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut">
21
21
  </div>
22
- <div class="span1" ng-show="panel.chart == 'pie'">
22
+ <div class="editor-option" ng-show="panel.chart == 'pie'">
23
23
  <label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt">
24
24
  </div>
25
- <div class="span1" ng-show="panel.chart == 'pie'">
25
+ <div class="editor-option" ng-show="panel.chart == 'pie'">
26
26
  <label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels">
27
27
  </div>
28
28
  </div>
@@ -1,15 +1,15 @@
1
- <div class="row-fluid">
2
- <div class="span3">
1
+ <div class="editor-row">
2
+ <div class="editor-option">
3
3
  <form>
4
4
  <h6>Field <tip>2 letter country or state code</tip></h6>
5
5
  <input bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.field" ng-change="set_refresh(true)">
6
6
  </form>
7
7
  </div>
8
- <div class="span2">
8
+ <div class="editor-option">
9
9
  <h6>Max <tip>Maximum countries to plot</tip></h6>
10
10
  <input class="input-mini" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
11
11
  </div>
12
- <div class="span1"><h6>Map</h6>
12
+ <div class="editor-option"><h6>Map</h6>
13
13
  <select ng-change="$emit('render')" class="input-small" ng-model="panel.map" ng-options="f for f in ['world','europe','usa']"></select>
14
14
  </div>
15
15
  </div>
@@ -1,49 +1,54 @@
1
- <div class="row-fluid" ng-switch="panel.mode">
2
- <div class="row-fluid">
3
- <div class="span2">
4
- <label class="small">Mode</label>
1
+ <div class="editor-row" ng-switch="panel.mode">
2
+
3
+ <div class="section">
4
+ <h5>Mode</h5>
5
+ <div class="editor-option">
6
+ <label class="small">Mode</label>
5
7
  <select class="input-small" ng-change="set_mode(panel.mode);set_refresh(true)" ng-model="panel.mode" ng-options="f for f in ['terms','goal']"></select>
6
- </div>
7
- </div>
8
- <div ng-switch-when="terms">
9
- <div class="row-fluid">
10
- <div class="span2">
11
- <label class="small">Field</label>
12
- <input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.query.field" ng-change="set_refresh(true)">
13
- </div>
14
- <div class="span2">
15
- <label class="small">Length</label>
16
- <input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
17
- </div>
18
- <div class="span6">
19
- <label class="small">Exclude Terms(s) (comma seperated)</label>
20
- <input array-join type="text" ng-model='panel.exclude'></input>
21
- </div>
22
- </div>
23
- </div>
24
- <div ng-switch-when="goal">
25
- <div class="row-fluid">
26
- <div class="span2">
27
- <form style="margin-bottom: 0px">
28
- <label class="small">Goal</label>
29
- <input type="number" style="width:90%" ng-model="panel.query.goal" ng-change="set_refresh(true)">
30
- </form>
31
- </div>
32
8
  </div>
33
9
  </div>
34
- </div>
35
- <div class="row-fluid">
36
- <div class="span1">
37
- <label class="small"> Donut </label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut">
38
- </div>
39
- <div class="span1">
40
- <label class="small"> Tilt </label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt">
10
+
11
+ <div class="section" ng-switch-when="terms">
12
+ <h5>Parameters</h5>
13
+ <div class="editor-option">
14
+ <label class="small">Field</label>
15
+ <input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.query.field" ng-change="set_refresh(true)">
16
+ </div>
17
+ <div class="editor-option">
18
+ <label class="small">Length</label>
19
+ <input class="input-mini" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
20
+ </div>
21
+ <div class="editor-option">
22
+ <label class="small">Exclude Terms(s) (comma seperated)</label>
23
+ <input array-join type="text" ng-model='panel.exclude'></input>
24
+ </div>
41
25
  </div>
42
- <div class="span1">
43
- <label class="small"> Labels </label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels">
26
+
27
+ <div class="section" ng-switch-when="goal">
28
+ <h5>Parameters</h5>
29
+ <div class="editor-option">
30
+ <form style="margin-bottom: 0px">
31
+ <label class="small">Goal</label>
32
+ <input type="number" style="width:90%" ng-model="panel.query.goal" ng-change="set_refresh(true)">
33
+ </form>
34
+ </div>
44
35
  </div>
45
- <div class="span3">
46
- <label class="small">Legend</label>
47
- <select class="input-small" ng-model="panel.legend" ng-options="f for f in ['above','below','none']"></select></span>
36
+
37
+ <div class="section">
38
+ <h5>View Options</h5>
39
+ <div class="editor-option">
40
+ <label class="small"> Donut </label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut">
41
+ </div>
42
+ <div class="editor-option">
43
+ <label class="small"> Tilt </label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt">
44
+ </div>
45
+ <div class="editor-option">
46
+ <label class="small"> Labels </label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels">
47
+ </div>
48
+ <div class="editor-option">
49
+ <label class="small">Legend</label>
50
+ <select class="input-small" ng-model="panel.legend" ng-options="f for f in ['above','below','none']"></select></span>
51
+ </div>
48
52
  </div>
53
+
49
54
  </div>
@@ -1,48 +1,49 @@
1
1
  <div class="row-fluid">
2
- <div class="span4">
3
- <form class="input-append">
4
- <h6>Add Column</h6>
2
+ <div class="section span6">
3
+ <h5>Columns</h5>
4
+ <form class="input-append editor-option">
5
5
  <input bs-typeahead="fields.list" type="text" class="input-small" ng-model='newfield'>
6
6
  <button class="btn" ng-click="toggle_field(newfield);newfield=''"><i class="icon-plus"></i></button>
7
- </form>
7
+ </form><br>
8
+ <span style="margin-left:3px" ng-repeat="field in $parent.panel.fields" class="label">{{field}} <i class="pointer icon-remove-sign" ng-click="toggle_field(field)"></i></span>
8
9
  </div>
9
- <div class="span8">
10
- <h6>Columns <small>Click to remove</small></h6>
11
- <span style="margin-left:3px" ng-click="toggle_field(field)" ng-repeat="field in $parent.panel.fields" class="label pointer remove">{{field}} </span>
12
- </div>
13
- </div>
14
- <div class="row-fluid">
15
- <div class="span4">
16
- <form class="input-append">
17
- <h6>Add field</h6>
10
+ <div class="section span6">
11
+ <h5>Hightlighted Fields</h5>
12
+ <form class="input-append editor-option">
18
13
  <input bs-typeahead="fields.list" type="text" class="input-small" ng-model='newhighlight' ng-change="set_refresh(true)">
19
14
  <button class="btn" ng-click="toggle_highlight(newhighlight);newhighlight=''"><i class="icon-plus"></i></button>
20
- </form>
21
- </div>
22
- <div class="span8">
23
- <h6>Highlighted fields <small>Click to remove</small></h6>
24
- <span style="margin-left:3px" ng-click="toggle_highlight(field);set_refresh(true)" ng-repeat="field in $parent.panel.highlight" class="label remove pointer">{{field}} </span>
15
+ </form><br>
16
+ <span style="margin-left:3px" ng-repeat="field in $parent.panel.highlight" class="label">{{field}} <i class="pointer icon-remove-sign" ng-click="toggle_highlight(field);set_refresh(true)" ></i></span>
25
17
  </div>
26
18
  </div>
27
- <h5>Options</h5>
28
- <div class="row-fluid">
29
- <div class="span1">
30
- <h6>Header</h6><input type="checkbox" ng-model="panel.header" ng-checked="panel.header">
31
- </div>
32
- <div class="span1">
33
- <h6>Sorting</h6><input type="checkbox" ng-model="panel.sortable" ng-checked="panel.sortable">
34
- </div>
35
- <div class="span3" style="white-space:nowrap" ng-show='panel.sortable'>
36
- <h6>Sort</h6>
37
- <input ng-show="all_fields.length<=0 || !all_fields"style="width:85%" ng-model="panel.sort[0]" type="text"></input>
38
- <select ng-show="all_fields.length>0"style="width:85%" ng-model="panel.sort[0]" ng-options="f for f in all_fields"></select>
39
- <i ng-click="set_sort(panel.sort[0])" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
40
- </div>
41
- <div class="span2"><h6>Font Size</h6>
42
- <select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
43
- </div>
44
- <div class="span2">
45
- <h6>Trim Factor <tip>Trim fields to this long divided by # of rows. Requires data refresh.</tip></h6>
46
- <input type="number" class="input-small" ng-model="panel.trimFactor" ng-change="set_refresh(true)">
19
+
20
+ <div class="editor-row">
21
+ <div class="section">
22
+ <h5>Options</h5>
23
+ <div class="editor-option">
24
+ <h6>Header</h6><input type="checkbox" ng-model="panel.header" ng-checked="panel.header">
25
+ </div>
26
+ <div class="editor-option">
27
+ <h6>Sorting</h6><input type="checkbox" ng-model="panel.sortable" ng-checked="panel.sortable">
28
+ </div>
29
+ <div class="editor-option" style="white-space:nowrap" ng-show='panel.sortable'>
30
+ <h6>Sort</h6>
31
+ <input class="input-small" bs-typeahead="fields.list" ng-model="panel.sort[0]" type="text"></input>
32
+ <i ng-click="set_sort(panel.sort[0])" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i>
33
+ </div>
34
+ <div class="editor-option"><h6>Font Size</h6>
35
+ <select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
36
+ </div>
37
+ <div class="editor-option">
38
+ <h6>Trim Factor <tip>Trim fields to this long divided by # of rows. Requires data refresh.</tip></h6>
39
+ <input type="number" class="input-small" ng-model="panel.trimFactor" ng-change="set_refresh(true)">
40
+ </div>
41
+ <div class="editor-option">
42
+ <h6>Local Time <tip>Adjust time field to browser's local time</tip></h6><input type="checkbox" ng-change="set_refresh(true)" ng-model="panel.localTime" ng-checked="panel.localTime">
43
+ </div>
44
+ <div class="editor-option" ng-show="panel.localTime">
45
+ <h6>Time Field</h6>
46
+ <input type="text" class="input-small" ng-model="panel.timeField" ng-change="set_refresh(true)" bs-typeahead="fields.list">
47
+ </div>
47
48
  </div>
48
49
  </div>