Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Nov 5, 2020
1 parent 86065ee commit e50ade4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,21 @@ export class IndexPatternsService {
* Refresh cache of index pattern ids and titles
*/
private async refreshSavedObjectsCache() {
this.savedObjectsCache = await this.savedObjectsClient.find<IndexPatternSavedObjectAttrs>({
const so = await this.savedObjectsClient.find<IndexPatternSavedObjectAttrs>({
type: 'index-pattern',
fields: ['title'],
perPage: 10000,
});
console.log('refreshSavedObjectsCache', so);
this.savedObjectsCache = so;
}

/**
* Get list of index pattern ids
* @param refresh Force refresh of index pattern list
*/
getIds = async (refresh: boolean = false) => {
console.log('getIds');
if (!this.savedObjectsCache || refresh) {
await this.refreshSavedObjectsCache();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class IndexPatternsTestPlugin
router.get(
{ path: '/api/index-patterns-plugin/get-all', validate: false },
async (context, req, res) => {
console.log('get /api/index-patterns-plugin/get-all');
const [{ savedObjects, elasticsearch }, { data }] = await core.getStartServices();
const savedObjectsClient = savedObjects.getScopedClient(req);
const service = await data.indexPatterns.indexPatternsServiceFactory(
Expand Down

0 comments on commit e50ade4

Please sign in to comment.