Skip to content

Commit

Permalink
add uiSetting to adopt interface changes
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <[email protected]>
  • Loading branch information
mengweieric committed Jul 30, 2024
1 parent 5533631 commit 4b494f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ export const DataSourceSelection = ({ tabId }: { tabId: string }) => {
dataSourceSelectorConfigs={DATA_SOURCE_SELECTOR_CONFIGS}
onGetDataSetError={handleDataSetFetchError}
onRefresh={onRefresh}
uiSettings={coreRefs.uiSettings!}
/>
);
};
4 changes: 4 additions & 0 deletions public/framework/core_refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
import { DashboardStart } from '../../../../src/plugins/dashboard/public';
import { DataSourcePluginStart } from '../../../../src/plugins/data_source/public';
import PPLService from '../services/requests/ppl';
import { DataSourceStart } from '../../../../src/plugins/data/public/data_sources/datasource_services/types';
import { IUiSettingsClient } from '../../../../src/core/public';

class CoreRefs {
private static _instance: CoreRefs;
Expand All @@ -34,6 +36,8 @@ class CoreRefs {
public dashboardProviders?: unknown;
public overlays?: OverlayStart;
public dataSource?: DataSourcePluginStart;
public dataSources?: DataSourceStart;
public uiSettings?: IUiSettingsClient;
private constructor() {
// ...
}
Expand Down
1 change: 1 addition & 0 deletions public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ export class ObservabilityPlugin
coreRefs.summarizeEnabled = this.config.summarize.enabled;
coreRefs.overlays = core.overlays;
coreRefs.dataSource = startDeps.dataSource;
coreRefs.uiSettings = core.uiSettings;

const { dataSourceService, dataSourceFactory } = startDeps.data.dataSources;
dataSourceFactory.registerDataSourceType(S3_DATA_SOURCE_TYPE, S3DataSource);
Expand Down

0 comments on commit 4b494f2

Please sign in to comment.