diff --git a/js/controllers.js b/js/controllers.js index e48145eeaf9..eec0666afc4 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -14,7 +14,6 @@ angular.module('kibana.controllers', []) style: 'dark' }; - // For $scope.editor = { index: 0 }; diff --git a/js/services.js b/js/services.js index 10f30f766e0..ec51c226ec8 100644 --- a/js/services.js +++ b/js/services.js @@ -454,7 +454,7 @@ angular.module('kibana.services', []) var self = this; var filterSrv,querySrv; - this.current = {}; + this.current = _.clone(_dash); this.last = {}; $rootScope.$on('$routeChangeSuccess',function(){ diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index 89c330545d0..81a7b8ee4b1 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -22,7 +22,7 @@
-
+
diff --git a/panels/histogram/module.js b/panels/histogram/module.js index bc3e94d9068..64df1a59382 100644 --- a/panels/histogram/module.js +++ b/panels/histogram/module.js @@ -306,7 +306,7 @@ angular.module('kibana.histogram', []) var options = { legend: { show: false }, series: { - stackpercent: scope.panel.stack ? scope.panel.percentage : false, + //stackpercent: scope.panel.stack ? scope.panel.percentage : false, stack: scope.panel.percentage ? null : stack, lines: { show: scope.panel.lines, @@ -327,8 +327,8 @@ angular.module('kibana.histogram', []) timezone: scope.panel.timezone, show: scope.panel['x-axis'], mode: "time", - min: scope.range.from.getTime(), - max: scope.range.to.getTime(), + min: _.isUndefined(scope.range.from) ? null : scope.range.from.getTime(), + max: _.isUndefined(scope.range.to) ? null : scope.range.to.getTime(), timeformat: time_format(scope.panel.interval), label: "Datetime", }, diff --git a/panels/table/editor.html b/panels/table/editor.html index 83571eb1afe..7a2248546aa 100644 --- a/panels/table/editor.html +++ b/panels/table/editor.html @@ -32,18 +32,22 @@
Sorting
-
+
Sort
-
Font Size
+
Font Size
Page Control
+
+
Trim Factor
+ +
Paging
diff --git a/panels/table/micropanel.html b/panels/table/micropanel.html index e8870015ea6..fa7ec38376f 100644 --- a/panels/table/micropanel.html +++ b/panels/table/micropanel.html @@ -13,7 +13,7 @@ - {{{true: "__blank__",false:field[0]}[field[0] == ""]}} + {{{true: "__blank__",false:field[0]}[field[0] == ""]|tableTruncate:panel.trimFactor:3}} diff --git a/panels/table/module.html b/panels/table/module.html index 1e509754721..5abe68c5a43 100644 --- a/panels/table/module.html +++ b/panels/table/module.html @@ -3,7 +3,7 @@ .table-doc-table { margin-left: 0px !important; overflow-y: auto; - overflow-x: auto; + overflow-x: scroll; } @@ -57,7 +57,7 @@ - + diff --git a/panels/table/module.js b/panels/table/module.js index 30c21cf49b4..de49a27ecec 100644 --- a/panels/table/module.js +++ b/panels/table/module.js @@ -14,6 +14,7 @@ * fields :: columns to show in table * overflow :: 'height' or 'min-height' controls wether the row will expand (min-height) to to fit the table, or if the table will scroll to fit the row (height) + * trimFactor :: If line is > this many characters, divided by the number of columns, trim it. * sortable :: Allow sorting? * spyable :: Show the 'eye' icon that reveals the last ES query for this panel @@ -49,7 +50,8 @@ angular.module('kibana.table', []) sortable: true, header : true, paging : true, - field_list: true, + field_list: true, + trimFactor: 300, spyable : true }; _.defaults($scope.panel,_d); @@ -249,7 +251,7 @@ angular.module('kibana.table', []) }) -.filter('highlight', function() { +.filter('tableHighlight', function() { return function(text) { if (!_.isUndefined(text) && !_.isNull(text) && text.toString().length > 0) { return text.toString(). @@ -262,4 +264,12 @@ angular.module('kibana.table', []) } return ''; }; +}) +.filter('tableTruncate', function() { + return function(text,length,factor) { + if (!_.isUndefined(text) && !_.isNull(text) && text.toString().length > 0) { + return text.length > length/factor ? text.substr(0,length/factor)+'...' : text; + } + return ''; + }; });