forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Daylight saving time calendar events (elastic#193605)
Adds new pages for creating and managing DST calendars. Closes elastic#189469 New section added to Settings home page. ![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801) New page for listing DST calendars. The original calendar page does not show DST calendars. ![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4) New page for creating DST calendars. The ability to apply to all jobs and add a description has been removed. It is not possible manually add events. Events are automatically generated for a selected time zone. <img width="1170" alt="image" src="https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7"> If the selected time zone does not observe daylight savings, an info callout is displayed <img width="1178" alt="image" src="https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387"> A new DST calendar section is added to all AD job wizards. ![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f) (cherry picked from commit 2881b04)
- Loading branch information
1 parent
337d938
commit bea41b8
Showing
41 changed files
with
1,144 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...s/job_details_step/components/additional_section/components/calendars/description_dst.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { FC, PropsWithChildren } from 'react'; | ||
import React, { memo } from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { EuiDescribedFormGroup, EuiFormRow, EuiLink } from '@elastic/eui'; | ||
import { useMlKibana } from '../../../../../../../../../contexts/kibana'; | ||
|
||
export const DescriptionDst: FC<PropsWithChildren<unknown>> = memo(({ children }) => { | ||
const { | ||
services: { docLinks }, | ||
} = useMlKibana(); | ||
const docsUrl = docLinks.links.ml.calendars; | ||
const title = i18n.translate( | ||
'xpack.ml.newJob.wizard.jobDetailsStep.additionalSection.calendarsDstSelection.title', | ||
{ | ||
defaultMessage: 'DST Calendars', | ||
} | ||
); | ||
return ( | ||
<EuiDescribedFormGroup | ||
title={<h3>{title}</h3>} | ||
description={ | ||
<FormattedMessage | ||
id="xpack.ml.newJob.wizard.jobDetailsStep.additionalSection.calendarsDstSelection.description" | ||
defaultMessage="A list of scheduled events you want to ignore, taking into account daylight saving time shifts. {learnMoreLink}" | ||
values={{ | ||
learnMoreLink: ( | ||
<EuiLink href={docsUrl} target="_blank"> | ||
<FormattedMessage | ||
id="xpack.ml.newJob.wizard.jobDetailsStep.additionalSection.calendarsDstSelection.learnMoreLinkText" | ||
defaultMessage="Learn more" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
} | ||
> | ||
<EuiFormRow> | ||
<>{children}</> | ||
</EuiFormRow> | ||
</EuiDescribedFormGroup> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.