Commit 2ceb58d0 by Torkel Ödegaard

feat(elasticsearch): removed dashboard import migration

parent e1f63a33
...@@ -283,42 +283,6 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes ...@@ -283,42 +283,6 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
return this.getTerms(query); return this.getTerms(query);
} }
}; };
this.getDashboard = function(id) {
return this._get('/dashboard/' + id)
.then(function(result) {
return angular.fromJson(result._source.dashboard);
});
};
this.searchDashboards = function() {
var query = {
query: { query_string: { query: '*' } },
size: 10000,
sort: ["_uid"],
};
return this._post(this.index + '/dashboard/_search', query)
.then(function(results) {
if(_.isUndefined(results.hits)) {
return { dashboards: [], tags: [] };
}
var resultsHits = results.hits.hits;
var displayHits = { dashboards: [] };
for (var i = 0, len = resultsHits.length; i < len; i++) {
var hit = resultsHits[i];
displayHits.dashboards.push({
id: hit._id,
title: hit._source.title,
tags: hit._source.tags
});
}
return displayHits;
});
};
} }
return { return {
......
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