mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed sort order of numeric fields
This commit is contained in:
parent
86254db78c
commit
9ed8265c1e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user