Commit 9ed8265c by Rashid Khan

Fixed sort order of numeric fields

parent 86254db7
......@@ -270,10 +270,15 @@ function flatten_json(object,root,array) {
var obj = object[index]
var rootname = root.length == 0 ? index : root + '.' + index;
if(typeof obj == 'object' ) {
if(_.isArray(obj))
array[rootname] = typeof obj === 'undefined' ? null : obj.join(',');
else
if(_.isArray(obj)) {
if(obj.length === 1 && _.isNumber(obj[0])) {
array[rootname] = parseFloat(obj[0]);
} else {
array[rootname] = typeof obj === 'undefined' ? null : obj.join(',');
}
} else {
flatten_json(obj,rootname,array)
}
} else {
array[rootname] = typeof obj === 'undefined' ? null : obj;
}
......
......@@ -54,6 +54,9 @@ labjs.wait(function(){
.when('/dashboard/:type/:id', {
templateUrl: 'partials/dashboard.html'
})
.when('/dashboard/:type/:id/:params', {
templateUrl: 'partials/dashboard.html'
})
.otherwise({
redirectTo: 'dashboard'
});
......
......@@ -6,5 +6,5 @@
<select class="input-small" ng-model="panel.arrange" ng-options="f for f in ['horizontal','vertical']"></select></span>
</div>
<div class="span3"><h6>Font Size</h6>
<select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
<select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
</div>
......@@ -10,6 +10,7 @@ angular.module('kibana.map', [])
exclude : [],
spyable : true,
group : "default",
index_limit : 0
}
_.defaults($scope.panel,_d)
......
......@@ -128,7 +128,7 @@ angular.module('kibana.table', [])
$scope.data = _.sortBy($scope.data, function(v){
return v[$scope.panel.sort[0]]
});
// Reverse if needed
if($scope.panel.sort[1] == 'desc')
$scope.data.reverse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment