-
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
[ML] Transforms: Adds date picker to transform wizard for data view with time fields. #149049
[ML] Transforms: Adds date picker to transform wizard for data view with time fields. #149049
Conversation
5f0c069
to
a0b7f86
Compare
674b552
to
c01a95d
Compare
x-pack/test/functional/apps/transform/creation_index_pattern.ts
Outdated
Show resolved
Hide resolved
...s/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx
Show resolved
Hide resolved
'The advanced editor allows you to edit the pivot configuration of the transform.', | ||
})}{' '} | ||
<EuiLink href={esTransformPivot} target="_blank"> | ||
{i18n.translate('xpack.transform.stepDefineForm.advancedEditorHelpTextLink', { |
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.
Nit - is it worth getting pivot
in the i18n key here, in case there is text for a help link in the Latest wizard too?
onClick={applyPivotChangesHandler} | ||
disabled={!isAdvancedPivotEditorApplyButtonEnabled} | ||
> | ||
{i18n.translate('xpack.transform.stepDefineForm.advancedEditorApplyButtonText', { |
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.
As above, is it worth adding pivot
in the i18n key here?
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.
There's no reference to latest
in the form for latest either so I'd prefer to keep the ids as is to keep the existing translations.
@@ -94,6 +98,18 @@ export const StepDefineSummary: FC<Props> = ({ | |||
> | |||
<span>{searchItems.dataView.getIndexPattern()}</span> | |||
</EuiFormRow> | |||
{isDatePickerApplyEnabled && timeRangeMs && ( | |||
<EuiFormRow |
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.
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.
At the moment it's set up to get the full width like the search bar below. Suggest to revisit this once the follow ups (frozen option / full time range) are added too. I added a note in the meta issue here: #146187
@peteharverson The callout for no source documents is rendered by the data grid component itself, it's not aware of outer individual options (like search or date picker), that's why it says |
Added an info tooltip to the time range label in 427d418. |
@peteharverson @qn895 Thanks for your comments, addressed and answered them, please have another look. |
@@ -36,16 +36,16 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { | |||
await transform.testResources.resetKibanaTimeZone(); | |||
}); | |||
|
|||
loadTestFile(require.resolve('./permissions')); | |||
// loadTestFile(require.resolve('./permissions')); |
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.
Don't forget to re-enable these tests back before merging
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.
Thanks for catching! Fixed it in c64f1b2. (I think with the latest merge of main
into this branch that whole code part was refactored away though, it's now organized differently)
LGTM 🎉 |
'xpack.transform.stepDefineForm.datePickerIconTipContent', | ||
{ | ||
defaultMessage: | ||
'The time range will be applied to previews only, it will not be part of the final transform configuration.', |
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.
Suggest editing to The time range will be applied to previews only and will not be part of the final transform configuration
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.
Fixed in 2fcf33a.
@@ -47,9 +48,15 @@ export interface SimpleQuery { | |||
}; | |||
} | |||
|
|||
export type PivotQuery = SimpleQuery | SavedSearchQuery; | |||
export interface FilterBasedSimpleQuery { | |||
bool: { |
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.
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.
Added a note for a follow up in #146187.
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.
PR is up to fix this issue here: #151665
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @walterra |
…ith time fields. (elastic#149049) Adds a date picker to the transform wizard for data views with time fields. The time range will be applied to previews only.
Summary
Part of #146187.
Adds a date picker to the transform wizard for data views with time fields.
The PR includes functionality to allow to set if the time range should get applied to the transform configuration or just be used for previews, however for now this is disabled with a hard coded feature flag. So the time range will only be applied to previews, not the final transform configuration.
pivot
but was meant to be used for bothpivot/latest
so was renamed to justtransform*
.latest
was already inLatestFunctionForm
, but the form forpivot
was kept inline<StepDefineForm>
component. This PR moves that inline code toPivotFunctionForm
.transform.datePicker
service.Checklist