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.
[8.x] [ML] Daylight saving time calendar events (elastic#193605) (ela…
…stic#195262) # Backport This will backport the following commits from `main` to `8.x`: - [[ML] Daylight saving time calendar events (elastic#193605)](elastic#193605) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2024-10-07T13:35:25Z","message":"[ML] Daylight saving time calendar events (elastic#193605)\n\nAdds new pages for creating and managing DST calendars.\r\nCloses https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added to Settings home page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew page for listing DST calendars. The original calendar page does not\r\nshow DST calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew page for creating DST calendars.\r\nThe ability to apply to all jobs and add a description has been removed.\r\nIt is not possible manually add events. Events are automatically\r\ngenerated for a selected time zone.\r\n<img width=\"1170\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf the selected time zone does not observe daylight savings, an info\r\ncallout is displayed\r\n<img width=\"1178\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA new DST calendar section is added to all AD job wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","Feature:Anomaly Detection","v9.0.0","release_note:feature","v8.16.0","backport:version"],"title":"[ML] Daylight saving time calendar events","number":193605,"url":"https://github.com/elastic/kibana/pull/193605","mergeCommit":{"message":"[ML] Daylight saving time calendar events (elastic#193605)\n\nAdds new pages for creating and managing DST calendars.\r\nCloses https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added to Settings home page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew page for listing DST calendars. The original calendar page does not\r\nshow DST calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew page for creating DST calendars.\r\nThe ability to apply to all jobs and add a description has been removed.\r\nIt is not possible manually add events. Events are automatically\r\ngenerated for a selected time zone.\r\n<img width=\"1170\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf the selected time zone does not observe daylight savings, an info\r\ncallout is displayed\r\n<img width=\"1178\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA new DST calendar section is added to all AD job wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193605","number":193605,"mergeCommit":{"message":"[ML] Daylight saving time calendar events (elastic#193605)\n\nAdds new pages for creating and managing DST calendars.\r\nCloses https://github.com/elastic/kibana/issues/189469\r\n\r\nNew section added to Settings home page.\r\n\r\n![image](https://github.com/user-attachments/assets/9165906f-e571-46be-a5ac-bf7dc9cd2801)\r\n\r\nNew page for listing DST calendars. The original calendar page does not\r\nshow DST calendars.\r\n\r\n![image](https://github.com/user-attachments/assets/32a64a31-b4e5-4516-85fd-19e63aa9d5c4)\r\n\r\nNew page for creating DST calendars.\r\nThe ability to apply to all jobs and add a description has been removed.\r\nIt is not possible manually add events. Events are automatically\r\ngenerated for a selected time zone.\r\n<img width=\"1170\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/557b8d39-6c17-448a-aa30-a282d8a424a7\">\r\n\r\nIf the selected time zone does not observe daylight savings, an info\r\ncallout is displayed\r\n<img width=\"1178\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/627043bf-0368-4ab3-8ca7-1931f9622387\">\r\n\r\n\r\nA new DST calendar section is added to all AD job wizards.\r\n\r\n![image](https://github.com/user-attachments/assets/6359192b-faac-4ffb-ad3e-b8193f40f02f)","sha":"2881b0423d099649243ee01887f27a1fb6dbffe7"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: James Gowdy <jgowdy@elastic.co>
- Loading branch information
1 parent
1963138
commit 8811474
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.