Closes #82, dashboard search/load now sorts in alfabetical order

This commit is contained in:
Torkel Odegaard 2014-02-11 20:38:50 +01:00
parent 45ab6d7c5e
commit e574314472
2 changed files with 3 additions and 11 deletions

View File

@ -103,16 +103,6 @@ function (angular, _, moment) {
);
};
$scope.elasticsearch_dblist = function(query) {
dashboard.elasticsearch_list(query,$scope.loader.load_elasticsearch_size).then(
function(result) {
if(!_.isUndefined(result.hits)) {
$scope.hits = result.hits.total;
$scope.elasticsearch.dashboards = result.hits.hits;
}
});
};
$scope.save_gist = function() {
dashboard.save_gist($scope.gist.title).then(
function(link) {

View File

@ -47,7 +47,9 @@ function (angular, _, config, $) {
return;
}
$scope.search_results = { dashboards: results.hits.hits };
var hits = _.sortBy(results.hits.hits, '_id');
$scope.search_results = { dashboards: hits };
});
};