Skip to content

Commit

Permalink
Fix rollup test
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Jun 4, 2020
1 parent 235687a commit 94af312
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { fetchIndexPatternFields } from './lib/fetch_fields';
import { getSavedObjectsClient, getUISettings, getI18n } from '../services';
import { getUISettings, getI18n, getDataStart } from '../services';
import { VisEditor } from './components/vis_editor_lazy';

export class EditorController {
Expand All @@ -37,17 +37,8 @@ export class EditorController {
};
}

fetchDefaultIndexPattern = async () => {
const indexPattern = await getSavedObjectsClient().client.get(
'index-pattern',
getUISettings().get('defaultIndex')
);

return indexPattern.attributes;
};

fetchDefaultParams = async () => {
const { title, timeFieldName } = await this.fetchDefaultIndexPattern();
const { title, timeFieldName } = await getDataStart().indexPatterns.getDefault();

this.state.vis.params.default_index_pattern = title;
this.state.vis.params.default_timefield = timeFieldName;
Expand Down

0 comments on commit 94af312

Please sign in to comment.