Commit e5743144 by Torkel Odegaard

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

parent 45ab6d7c
......@@ -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) {
......
......@@ -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 };
});
};
......
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