Skip to content

Commit

Permalink
fix url locator
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Oct 10, 2024
1 parent a01975d commit 41b4337
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ export const getChangePointChartEmbeddableFactory = (
buildEmbeddable: async (state, buildApi, uuid, parentApi) => {
const [coreStart, pluginStart] = await getStartServices();

const { http, uiSettings, notifications, ...startServices } = coreStart;
const { lens, data, usageCollection, fieldFormats } = pluginStart;

const deps = {
http,
uiSettings,
data,
notifications,
lens,
usageCollection,
fieldFormats,
...startServices,
};

const {
api: timeRangeApi,
comparators: timeRangeComparators,
Expand All @@ -95,7 +81,7 @@ export const getChangePointChartEmbeddableFactory = (
const blockingError = new BehaviorSubject<Error | undefined>(undefined);

const dataViews$ = new BehaviorSubject<DataView[] | undefined>([
await deps.data.dataViews.get(state.dataViewId),
await pluginStart.data.dataViews.get(state.dataViewId),
]);

const api = buildApi(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,6 @@ export const getLogRateAnalysisEmbeddableFactory = (
buildEmbeddable: async (state, buildApi, uuid, parentApi) => {
const [coreStart, pluginStart] = await getStartServices();

const { http, uiSettings, notifications, ...startServices } = coreStart;
const { lens, data, usageCollection, fieldFormats } = pluginStart;

const deps = {
http,
uiSettings,
data,
notifications,
lens,
usageCollection,
fieldFormats,
...startServices,
};

const {
api: timeRangeApi,
comparators: timeRangeComparators,
Expand All @@ -93,8 +79,8 @@ export const getLogRateAnalysisEmbeddableFactory = (
const blockingError = new BehaviorSubject<Error | undefined>(undefined);

const dataViews$ = new BehaviorSubject<DataView[] | undefined>([
await deps.data.dataViews.get(
state.dataViewId ?? (await deps.data.dataViews.getDefaultId())
await pluginStart.data.dataViews.get(
state.dataViewId ?? (await pluginStart.data.dataViews.getDefaultId())
),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ export const getPatternAnalysisEmbeddableFactory = (
buildEmbeddable: async (state, buildApi, uuid, parentApi) => {
const [coreStart, pluginStart] = await getStartServices();

const { http, uiSettings, notifications, ...startServices } = coreStart;
const { lens, data, usageCollection, fieldFormats } = pluginStart;

const deps = {
http,
uiSettings,
data,
notifications,
lens,
usageCollection,
fieldFormats,
...startServices,
};

const {
api: timeRangeApi,
comparators: timeRangeComparators,
Expand All @@ -92,8 +78,8 @@ export const getPatternAnalysisEmbeddableFactory = (
const blockingError = new BehaviorSubject<Error | undefined>(undefined);

const dataViews$ = new BehaviorSubject<DataView[] | undefined>([
await deps.data.dataViews.get(
state.dataViewId ?? (await deps.data.dataViews.getDefaultId())
await pluginStart.data.dataViews.get(
state.dataViewId ?? (await pluginStart.data.dataViews.getDefaultId())
),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const LogRateAnalysisEmbeddableWrapperWithDeps: FC<LogRateAnalysisPropsWithDeps>
lastReloadRequestTime,
}) => {
const deps = useMemo(() => {
const { lens, data, usageCollection, fieldFormats, charts, storage, unifiedSearch } =
const { lens, data, usageCollection, fieldFormats, charts, share, storage, unifiedSearch } =
pluginStart;

return {
Expand All @@ -84,6 +84,7 @@ const LogRateAnalysisEmbeddableWrapperWithDeps: FC<LogRateAnalysisPropsWithDeps>
usageCollection,
fieldFormats,
charts,
share,
storage,
unifiedSearch,
...coreStart,
Expand Down

0 comments on commit 41b4337

Please sign in to comment.