Skip to content

Commit

Permalink
Fix comments and add ui bootstrap back
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Jun 23, 2023
1 parent 7ac2b19 commit f113dab
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export interface DashboardAppState {
hidePanelTitles: boolean;
useMargins: boolean;
};
query: Query;
query: Query | string;
filters: Filter[];
viewMode: ViewMode;
expandedPanelId?: string;
Expand Down

0 comments on commit f113dab

Please sign in to comment.