-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move timefilter and timehistory instantiation ⇒ data plugin #44783
Move timefilter and timehistory instantiation ⇒ data plugin #44783
Conversation
💔 Build Failed |
💔 Build Failed |
31da752
to
f7adb55
Compare
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
Pinging @elastic/kibana-app-arch |
💔 Build Failed |
💔 Build Failed |
Copying @peteharverson 's feedback here:
|
ML uses (For example I could mock them independently, but since most tests don't even need i.e. mocking I hope this makes it clearer. |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one minor comment, tested on chrome linux.
the issue with not reloading settings can be addressed in separate PR as its also present on master
src/legacy/core_plugins/data/public/filter/filter_manager/lib/extract_time_filter.ts
Show resolved
Hide resolved
|
||
export class TimefilterService { | ||
public setup({ uiSettings }: TimeFilterServiceDependencies): TimefilterSetup { | ||
const timefilterConfig = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm not sure if this is (was) working fine:
- you start kibana, TimefilterService gets started and reads the uiSettings
- you go to management -> kibana advanced settings and you change them
- they don't apply until you refresh your browser (to reload kibana)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ML, and edits LGTM.
💔 Build Failed |
💚 Build Succeeded |
…44783) * Create timefilter service * Pass timehistory as a dependency to query bar * Updated timefilter tests and mocks * Fix jest test * Fixed bad import path * updated xpack test * make history optional on query bar * Fixed chart_utils test * Fixed page.test by mocking timefilter * Fixed explorer_charts_container_service test by mocking timefilter * Fixed explorer_chart_distribution test by mocking timefilter * Fixed explorer_chart_single_metric test by mocking timefilter * Fixed explorer_charts_container test by mocking timefilter and removing some unneeded initialization * Fixed explorer_swimlane tesy by mocking timefilter * Added missing functions to uiTimefilterMock to fix top_nav test * Fixed timeseries_chart test by mocking timefilter * remove bad merge * mock field formats * mock field formats * rename timefilter boolean getters * fix ml mocks * ml mocks
…46467) * Create timefilter service * Pass timehistory as a dependency to query bar * Updated timefilter tests and mocks * Fix jest test * Fixed bad import path * updated xpack test * make history optional on query bar * Fixed chart_utils test * Fixed page.test by mocking timefilter * Fixed explorer_charts_container_service test by mocking timefilter * Fixed explorer_chart_distribution test by mocking timefilter * Fixed explorer_chart_single_metric test by mocking timefilter * Fixed explorer_charts_container test by mocking timefilter and removing some unneeded initialization * Fixed explorer_swimlane tesy by mocking timefilter * Added missing functions to uiTimefilterMock to fix top_nav test * Fixed timeseries_chart test by mocking timefilter * remove bad merge * mock field formats * mock field formats * rename timefilter boolean getters * fix ml mocks * ml mocks
@lizozom can you please add a DevDocs section? |
💔 Build Failed |
Summary
Part of #44377
timefilter
as a dependency toFilterService
timeHistory
as a dependency toQueryBar
timefilter
as a dependency tochangeTimeFilter
andonBrushEvent
functionsTimefilterContract
andTimeHistoryContract
typesisAutoRefreshSelectorEnabled
andisTimeRangeSelectorEnabled
public members oftimefilter
with appropriate get functions.timefilter.getForceNow
privateDev Docs
Move
value_suggestions
intoNP
and exposedata.getSuggestions
on start contract.In old platform:
In new platform:
Also, in
timefilter
the following API changes were made:timefilter.isAutoRefreshSelectorEnabled
member withtimefilter.isAutoRefreshSelectorEnabled()
timefilter.isTimeRangeSelectorEnabled
withtimefilter.isTimeRangeSelectorEnabled()
timefilter.getForceNow
is now privateChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers