Skip to content

Commit 6afcf9d

Browse files
authored
feat: frontend-rename-feature-health-sample-to-webhook ⚠️ (#6330)
1 parent 60f57b8 commit 6afcf9d

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

docs/docs/managing-flags/feature-health-metrics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Feature health enables you to monitor observability metrics within Flagsmith, sp
1717

1818
1. Go to your **Project Settings** in Flagsmith.
1919
2. Navigate to the **Feature Health** section.
20-
3. Choose your desired provider from the **Provider Name** drop-down menu (e.g., Grafana/Prometheus Alertmanager or Sample).
20+
3. Choose your desired provider from the **Provider Name** drop-down menu (e.g., Grafana/Prometheus Alertmanager or Webhook).
2121
4. Click **Create** and copy the webhook URL.
2222

2323
---
@@ -28,20 +28,20 @@ Feature health enables you to monitor observability metrics within Flagsmith, sp
2828

2929
[Learn more](/third-party-integrations/observability-and-monitoring/grafana) about configuring Grafana / Prometheus Alertmanager feature health provider.
3030

31-
### Sample Provider
31+
### Webhook Provider
3232

33-
We provide a Sample Provider for your custom integrations. To create a Sample Feature Health webhook:
33+
We provide a Webhook Provider for your custom integrations. To create a Webhook Feature Health webhook:
3434

3535
1. Go to Project Settings > Feature Health.
36-
2. Select "Sample" from the Provider Name drop-down menu.
36+
2. Select "Webhook" from the Provider Name drop-down menu.
3737
3. Click Create and copy the webhook URL.
3838

3939
You can use the webhook in your custom integration. Refer to the payload schema below:
4040

4141
```json
4242
{
4343
"$schema": "http://json-schema.org/draft-07/schema#",
44-
"title": "SampleEvent",
44+
"title": "WebhookEvent",
4545
"type": "object",
4646
"properties": {
4747
"environment": {

frontend/web/components/feature-health/components/FeatureHealthProviderDocumentationNote.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const FeatureHealthProviderDocumentationNote: React.FC<
1717
</div>
1818
<div>
1919
<span>
20-
Sample provider:{' '}
21-
<a href='https://docs.flagsmith.com/advanced-use/feature-health#sample-provider'>
22-
https://docs.flagsmith.com/advanced-use/feature-health#sample-provider
20+
Webhook provider:{' '}
21+
<a href='https://docs.flagsmith.com/advanced-use/feature-health#webhook-provider'>
22+
https://docs.flagsmith.com/advanced-use/feature-health#webhook-provider
2323
</a>
2424
</span>
2525
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export enum FeatureHealthProviderName {
2+
WEBHOOK = 'Webhook',
3+
GRAFANA = 'Grafana',
4+
}

frontend/web/components/pages/project-settings/ProjectSettingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useRouteContext } from 'components/providers/RouteContext'
88
import Constants from 'common/constants'
99
import Utils from 'common/utils/utils'
1010
import ProjectUsage from 'components/ProjectUsage'
11-
import EditHealthProvider from 'components/EditHealthProvider'
11+
import EditHealthProvider from './tabs/EditHealthProvider'
1212
import FeatureExport from 'components/import-export/FeatureExport'
1313
import { GeneralTab } from './tabs/general-tab'
1414
import { SDKSettingsTab } from './tabs/SDKSettingsTab'

frontend/web/components/EditHealthProvider.tsx renamed to frontend/web/components/pages/project-settings/tabs/EditHealthProvider.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { FC, useEffect } from 'react'
22
import { HealthProvider } from 'common/types/responses'
3-
import PanelSearch from './PanelSearch'
4-
import Button from './base/forms/Button'
3+
import PanelSearch from 'components/PanelSearch'
4+
import Button from 'components/base/forms/Button'
55

6-
import Icon from './Icon'
6+
import Icon from 'components/Icon'
77

88
import Utils from 'common/utils/utils'
99
import {
@@ -12,8 +12,9 @@ import {
1212
useGetHealthProvidersQuery,
1313
} from 'common/services/useHealthProvider'
1414
import { components } from 'react-select'
15-
import InteractiveDemo from './InteractiveDemo'
16-
import FeatureHealthProviderDocumentationNote from './feature-health/components/FeatureHealthProviderDocumentationNote'
15+
import InteractiveDemo from 'components/InteractiveDemo'
16+
import FeatureHealthProviderDocumentationNote from 'components/feature-health/components/FeatureHealthProviderDocumentationNote'
17+
import { FeatureHealthProviderName } from 'components/feature-health/feature-health.types'
1718

1819
type EditHealthProviderType = {
1920
projectId: number
@@ -34,7 +35,10 @@ const CreateHealthProviderForm = ({ projectId }: { projectId: number }) => {
3435
const [createProvider, { error, isError, isLoading, isSuccess }] =
3536
useCreateHealthProviderMutation()
3637

37-
const providers = [{ name: 'Sample' }, { name: 'Grafana' }]
38+
const providers = [
39+
{ name: FeatureHealthProviderName.WEBHOOK },
40+
{ name: FeatureHealthProviderName.GRAFANA },
41+
]
3842

3943
const providerOptions = providers.map((provider) => ({
4044
label: provider.name,

public/webhooks/feature-health-sample-provider.json renamed to public/webhooks/feature-health-webhook-provider.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"title": "SampleEvent",
3+
"title": "WebhookEvent",
44
"type": "object",
55
"properties": {
66
"environment": {

0 commit comments

Comments
 (0)