Closes #82, dashboard search/load now sorts in alfabetical order
This commit is contained in:
@@ -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 };
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user