Skip to content

Commit

Permalink
[ResponseOps][Connectors] Add deprecation warning to the Teams Connec…
Browse files Browse the repository at this point in the history
…tor (#190958)

Fixes #190944

## Summary

**The exact text is still a work in progress.**

<img width="895" alt="Screenshot 2024-08-21 at 11 02 37"
src="https://github.com/user-attachments/assets/8aca356d-cd3d-425d-b849-7769b18324d9">

---------

Co-authored-by: Lisa Cawley <[email protected]>
  • Loading branch information
adcoelho and lcawl authored Aug 22, 2024
1 parent 5c0991b commit c5b38e4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import { EuiLink } from '@elastic/eui';
import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { FieldConfig, UseField } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib';
import { fieldValidators } from '@kbn/es-ui-shared-plugin/static/forms/helpers';
Expand Down Expand Up @@ -42,18 +42,28 @@ const TeamsActionFields: React.FunctionComponent<ActionConnectorFieldsProps> = (
const { docLinks } = useKibana().services;

return (
<UseField
path="secrets.webhookUrl"
config={getWebhookUrlConfig(docLinks)}
component={Field}
componentProps={{
euiFieldProps: {
readOnly,
'data-test-subj': 'teamsWebhookUrlInput',
fullWidth: true,
},
}}
/>
<>
<UseField
path="secrets.webhookUrl"
config={getWebhookUrlConfig(docLinks)}
component={Field}
componentProps={{
euiFieldProps: {
readOnly,
'data-test-subj': 'teamsWebhookUrlInput',
fullWidth: true,
},
}}
/>
<EuiSpacer size="m" />
<EuiCallOut
size="s"
color="warning"
iconType="warning"
data-test-subj={'microsoftTeamsWebhookDeprecationWarning'}
title={i18n.WEBHOOK_DEPRECATION_WARNING}
/>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ export const MESSAGE_REQUIRED = i18n.translate(
defaultMessage: 'Message is required.',
}
);

export const WEBHOOK_DEPRECATION_WARNING = i18n.translate(
'xpack.stackConnectors.components.teams.warning.webhookDeprecation',
{
defaultMessage:
'Microsoft Teams deprecated some methods for configuring webhooks. Follow the documentation link to create a supported webhook URL. If the URL is not updated by December 31, 2024, notifications will stop.',
}
);

0 comments on commit c5b38e4

Please sign in to comment.