mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 02:59:05 +08:00
chore: add info icon tool tips for webhook/routing/integration key (#7405)
This commit is contained in:
parent
f0a4c37073
commit
f67555576f
@ -18,6 +18,13 @@
|
|||||||
"field_send_resolved": "Send resolved alerts",
|
"field_send_resolved": "Send resolved alerts",
|
||||||
"field_channel_type": "Type",
|
"field_channel_type": "Type",
|
||||||
"field_webhook_url": "Webhook URL",
|
"field_webhook_url": "Webhook URL",
|
||||||
|
"tooltip_webhook_url": "The URL of the webhook to send alerts to. Learn more about webhook integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/webhook/). Integrates with [Incident.io](https://signoz.io/docs/alerts-management/notification-channel/incident-io/), [Rootly](https://signoz.io/docs/alerts-management/notification-channel/rootly/), [Zenduty](https://signoz.io/docs/alerts-management/notification-channel/zenduty/) and [more](https://signoz.io/docs/alerts-management/notification-channel/webhook/#my-incident-management-tool-is-not-listed-can-i-still-integrate).",
|
||||||
|
"tooltip_slack_url": "The URL of the slack [incoming webhook](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/) to send alerts to. Learn more about slack integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/slack/).",
|
||||||
|
"tooltip_pager_routing_key": "Learn how to obtain the routing key from your PagerDuty account [here](https://signoz.io/docs/alerts-management/notification-channel/pagerduty/#obtaining-integration-or-routing-key).",
|
||||||
|
"tooltip_opsgenie_api_key": "Learn how to obtain the API key from your OpsGenie account [here](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-prometheus/).",
|
||||||
|
"tooltip_email_to": "Enter email addresses separated by commas.",
|
||||||
|
"tooltip_ms_teams_url": "The URL of the Microsoft Teams [webhook](https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498) to send alerts to. Learn more about Microsoft Teams integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/ms-teams/).",
|
||||||
|
|
||||||
"field_slack_recipient": "Recipient",
|
"field_slack_recipient": "Recipient",
|
||||||
"field_slack_title": "Title",
|
"field_slack_title": "Title",
|
||||||
"field_slack_description": "Description",
|
"field_slack_description": "Description",
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
"field_send_resolved": "Send resolved alerts",
|
"field_send_resolved": "Send resolved alerts",
|
||||||
"field_channel_type": "Type",
|
"field_channel_type": "Type",
|
||||||
"field_webhook_url": "Webhook URL",
|
"field_webhook_url": "Webhook URL",
|
||||||
|
"tooltip_webhook_url": "The URL of the webhook to send alerts to. Learn more about webhook integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/webhook/). Integrates with [Incident.io](https://signoz.io/docs/alerts-management/notification-channel/incident-io/), [Rootly](https://signoz.io/docs/alerts-management/notification-channel/rootly/), [Zenduty](https://signoz.io/docs/alerts-management/notification-channel/zenduty/) and [more](https://signoz.io/docs/alerts-management/notification-channel/webhook/#my-incident-management-tool-is-not-listed-can-i-still-integrate).",
|
||||||
|
"tooltip_slack_url": "The URL of the slack [incoming webhook](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/) to send alerts to. Learn more about slack integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/slack/).",
|
||||||
|
"tooltip_pager_routing_key": "Learn how to obtain the routing key from your PagerDuty account [here](https://signoz.io/docs/alerts-management/notification-channel/pagerduty/#obtaining-integration-or-routing-key).",
|
||||||
|
"tooltip_opsgenie_api_key": "Learn how to obtain the API key from your OpsGenie account [here](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-prometheus/).",
|
||||||
|
"tooltip_email_to": "Enter email addresses separated by commas.",
|
||||||
|
"tooltip_ms_teams_url": "The URL of the Microsoft Teams [webhook](https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498) to send alerts to. Learn more about Microsoft Teams integration in the docs [here](https://signoz.io/docs/alerts-management/notification-channel/ms-teams/).",
|
||||||
"field_slack_recipient": "Recipient",
|
"field_slack_recipient": "Recipient",
|
||||||
"field_slack_title": "Title",
|
"field_slack_title": "Title",
|
||||||
"field_slack_description": "Description",
|
"field_slack_description": "Description",
|
||||||
|
@ -31,6 +31,10 @@ jest.mock('hooks/useNotifications', () => ({
|
|||||||
})),
|
})),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
jest.mock('components/MarkdownRenderer/MarkdownRenderer', () => ({
|
||||||
|
MarkdownRenderer: jest.fn(() => <div>Mocked MarkdownRenderer</div>),
|
||||||
|
}));
|
||||||
|
|
||||||
describe('Create Alert Channel', () => {
|
describe('Create Alert Channel', () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
@ -18,6 +18,10 @@ import { render, screen } from 'tests/test-utils';
|
|||||||
|
|
||||||
import { testLabelInputAndHelpValue } from './testUtils';
|
import { testLabelInputAndHelpValue } from './testUtils';
|
||||||
|
|
||||||
|
jest.mock('components/MarkdownRenderer/MarkdownRenderer', () => ({
|
||||||
|
MarkdownRenderer: jest.fn(() => <div>Mocked MarkdownRenderer</div>),
|
||||||
|
}));
|
||||||
|
|
||||||
describe('Create Alert Channel (Normal User)', () => {
|
describe('Create Alert Channel (Normal User)', () => {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
@ -20,6 +20,10 @@ jest.mock('hooks/useNotifications', () => ({
|
|||||||
})),
|
})),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
jest.mock('components/MarkdownRenderer/MarkdownRenderer', () => ({
|
||||||
|
MarkdownRenderer: jest.fn(() => <div>Mocked MarkdownRenderer</div>),
|
||||||
|
}));
|
||||||
|
|
||||||
describe('Should check if the edit alert channel is properly displayed ', () => {
|
describe('Should check if the edit alert channel is properly displayed ', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
render(<EditAlertChannels initialValue={editAlertChannelInitialValue} />);
|
render(<EditAlertChannels initialValue={editAlertChannelInitialValue} />);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Form, Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
|
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -9,7 +10,20 @@ function MsTeams({ setSelectedConfig }: MsTeamsProps): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form.Item name="webhook_url" label={t('field_webhook_url')}>
|
<Form.Item
|
||||||
|
name="webhook_url"
|
||||||
|
label={t('field_webhook_url')}
|
||||||
|
tooltip={{
|
||||||
|
title: (
|
||||||
|
<MarkdownRenderer
|
||||||
|
markdownContent={t('tooltip_ms_teams_url')}
|
||||||
|
variables={{}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
overlayInnerStyle: { maxWidth: 400 },
|
||||||
|
placement: 'right',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
onChange={(event): void => {
|
onChange={(event): void => {
|
||||||
setSelectedConfig((value) => ({
|
setSelectedConfig((value) => ({
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Form, Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
|
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { OpsgenieChannel } from '../../CreateAlertChannels/config';
|
import { OpsgenieChannel } from '../../CreateAlertChannels/config';
|
||||||
@ -19,7 +20,21 @@ function OpsgenieForm({ setSelectedConfig }: OpsgenieFormProps): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form.Item name="api_key" label={t('field_opsgenie_api_key')} required>
|
<Form.Item
|
||||||
|
name="api_key"
|
||||||
|
label={t('field_opsgenie_api_key')}
|
||||||
|
tooltip={{
|
||||||
|
title: (
|
||||||
|
<MarkdownRenderer
|
||||||
|
markdownContent={t('tooltip_opsgenie_api_key')}
|
||||||
|
variables={{}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
overlayInnerStyle: { maxWidth: 400 },
|
||||||
|
placement: 'right',
|
||||||
|
}}
|
||||||
|
required
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
onChange={handleInputChange('api_key')}
|
onChange={handleInputChange('api_key')}
|
||||||
data-testid="opsgenie-api-key-textbox"
|
data-testid="opsgenie-api-key-textbox"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Form, Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
|
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||||
import { Dispatch, SetStateAction } from 'react';
|
import { Dispatch, SetStateAction } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -10,7 +11,20 @@ function PagerForm({ setSelectedConfig }: PagerFormProps): JSX.Element {
|
|||||||
const { t } = useTranslation('channels');
|
const { t } = useTranslation('channels');
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form.Item name="routing_key" label={t('field_pager_routing_key')} required>
|
<Form.Item
|
||||||
|
name="routing_key"
|
||||||
|
label={t('field_pager_routing_key')}
|
||||||
|
tooltip={{
|
||||||
|
title: (
|
||||||
|
<MarkdownRenderer
|
||||||
|
markdownContent={t('tooltip_pager_routing_key')}
|
||||||
|
variables={{}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
overlayInnerStyle: { maxWidth: 400 },
|
||||||
|
placement: 'right',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
onChange={(event): void => {
|
onChange={(event): void => {
|
||||||
setSelectedConfig((value) => ({
|
setSelectedConfig((value) => ({
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Form, Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
|
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||||
import { Dispatch, SetStateAction } from 'react';
|
import { Dispatch, SetStateAction } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -11,7 +12,20 @@ function Slack({ setSelectedConfig }: SlackProps): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form.Item name="api_url" label={t('field_webhook_url')}>
|
<Form.Item
|
||||||
|
name="api_url"
|
||||||
|
label={t('field_webhook_url')}
|
||||||
|
tooltip={{
|
||||||
|
title: (
|
||||||
|
<MarkdownRenderer
|
||||||
|
markdownContent={t('tooltip_slack_url')}
|
||||||
|
variables={{}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
overlayInnerStyle: { maxWidth: 400 },
|
||||||
|
placement: 'right',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
onChange={(event): void => {
|
onChange={(event): void => {
|
||||||
setSelectedConfig((value) => ({
|
setSelectedConfig((value) => ({
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Form, Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
|
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
|
||||||
import { Dispatch, SetStateAction } from 'react';
|
import { Dispatch, SetStateAction } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
@ -9,7 +10,20 @@ function WebhookSettings({ setSelectedConfig }: WebhookProps): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form.Item name="api_url" label={t('field_webhook_url')}>
|
<Form.Item
|
||||||
|
name="api_url"
|
||||||
|
label={t('field_webhook_url')}
|
||||||
|
tooltip={{
|
||||||
|
title: (
|
||||||
|
<MarkdownRenderer
|
||||||
|
markdownContent={t('tooltip_webhook_url')}
|
||||||
|
variables={{}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
overlayInnerStyle: { maxWidth: 400 },
|
||||||
|
placement: 'right',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Input
|
<Input
|
||||||
onChange={(event): void => {
|
onChange={(event): void => {
|
||||||
setSelectedConfig((value) => ({
|
setSelectedConfig((value) => ({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user