diff --git a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts b/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts index 6ff78045f05..0baebc0bc3d 100644 --- a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts +++ b/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts @@ -29,7 +29,7 @@ */ import _ from 'lodash'; -import { RefreshInterval, TimefilterContract } from 'src/plugins/data/public'; +import { Query, RefreshInterval, TimefilterContract } from 'src/plugins/data/public'; import { FilterUtils } from './filter_utils'; import { SavedObjectDashboard } from '../../saved_dashboards'; import { DashboardAppState } from '../../types'; @@ -67,5 +67,5 @@ export function updateSavedDashboard( savedDashboard.searchSource.setField('filter', unpinnedFilters); // save the queries - savedDashboard.searchSource.setField('query', appState.query); + savedDashboard.searchSource.setField('query', appState.query as Query); } diff --git a/src/plugins/dashboard/public/application/utils/use/use_saved_dashboard_instance.ts b/src/plugins/dashboard/public/application/utils/use/use_saved_dashboard_instance.ts index 0c624cf647f..77454301d2c 100644 --- a/src/plugins/dashboard/public/application/utils/use/use_saved_dashboard_instance.ts +++ b/src/plugins/dashboard/public/application/utils/use/use_saved_dashboard_instance.ts @@ -60,7 +60,7 @@ export const useSavedDashboardInstance = ( // Update time filter to match the saved dashboard if time restore has been set to true when saving the dashboard // We should only set the time filter according to time restore once when we are loading the dashboard - if (savedDashboard && savedDashboard.timeRestore) { + if (savedDashboard.timeRestore) { if (savedDashboard.timeFrom && savedDashboard.timeTo) { services.data.query.timefilter.timefilter.setTime({ from: savedDashboard.timeFrom, diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 7f6342ad036..b787ffe4712 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -444,8 +444,8 @@ export class DashboardPlugin }, }; - // TODO: need to add UI bootstrap - // initAngularBootstrap(); + // TODO: delete this when discover de-angular is completed + initAngularBootstrap(); core.application.register(app); urlForwarding.forwardApp( diff --git a/src/plugins/dashboard/public/types.ts b/src/plugins/dashboard/public/types.ts index c98da7bda1a..efd571ca74f 100644 --- a/src/plugins/dashboard/public/types.ts +++ b/src/plugins/dashboard/public/types.ts @@ -123,7 +123,7 @@ export interface DashboardAppState { hidePanelTitles: boolean; useMargins: boolean; }; - query: Query; + query: Query | string; filters: Filter[]; viewMode: ViewMode; expandedPanelId?: string;