Skip to content

Commit

Permalink
feat: organisation integrations (#4704)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg authored Oct 15, 2024
1 parent 796fb01 commit d76a6f0
Show file tree
Hide file tree
Showing 12 changed files with 1,126 additions and 925 deletions.
87 changes: 55 additions & 32 deletions docs/docs/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["logging"],
"title": "Datadog",
"description": "Sends events to Datadog for when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production."
"description": "Sends events to Datadog for when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production.",
"project": true
},
"dynatrace": {
"perEnvironment": true,
Expand All @@ -254,45 +255,38 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["logging"],
"title": "Dynatrace",
"description": "Sends events to Dynatrace for when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production."
},
"grafana": {
"perEnvironment": false,
"image": "/static/images/integrations/grafana.svg",
"docs": "https://docs.flagsmith.com/integrations/apm/grafana",
"fields": [
{
"key": "base_url",
"label": "Base URL",
"default": "https://grafana.com"
},
{
"key": "api_key",
"label": "Service account token",
"hidden": true
}
],
"tags": ["logging"],
"title": "Grafana",
"description": "Receive Flagsmith annotations to your Grafana instance on feature flag and segment changes."
"description": "Sends events to Dynatrace for when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production.",
"project": true
},
"jira": {
"perEnvironment": false,
"image": "https://docs.flagsmith.com/img/integrations/jira/jira-logo.svg",
"docs": "https://docs.flagsmith.com/integrations/project-management/jira",
"external": true,
"title": "Jira",
"description": "View your Flagsmith Flags inside Jira."
"description": "View your Flagsmith Flags inside Jira.",
"project": true,
"organisation": true
},
"github": {
"perEnvironment": false,
"image": "https://docs.flagsmith.com/img/integrations/github/github-logo.svg",
"docs": "https://docs.flagsmith.com/integrations/project-management/github",
"external": true,
"title": "GitHub",
"isExternalInstallation": true,
"description": "View your Flagsmith Flags inside your GitHub Issues and Pull Request.",
"project": true
},

"slack": {
"perEnvironment": true,
"isOauth": true,
"image": "/static/images/integrations/slack.svg",
"docs": "https://docs.flagsmith.com/integrations/slack",
"tags": ["messaging"],
"title": "Slack",
"description": "Sends messages to Slack when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production."
"description": "Sends messages to Slack when flags are created, updated and removed. Logs are tagged with the environment they came from e.g. production.",
"project": true
},
"amplitude": {
"perEnvironment": true,
Expand All @@ -311,7 +305,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Amplitude",
"description": "Sends data on what flags served to each identity."
"description": "Sends data on what flags served to each identity.",
"project": true
},
"new-relic": {
"perEnvironment": false,
Expand All @@ -334,7 +329,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "New Relic",
"description": "Sends events to New Relic for when flags are created, updated and removed."
"description": "Sends events to New Relic for when flags are created, updated and removed.",
"project": true
},
"segment": {
"perEnvironment": true,
Expand All @@ -349,7 +345,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Segment",
"description": "Sends data on what flags served to each identity."
"description": "Sends data on what flags served to each identity.",
"project": true
},
"rudderstack": {
"perEnvironment": true,
Expand All @@ -368,7 +365,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Rudderstack",
"description": "Sends data on what flags served to each identity."
"description": "Sends data on what flags served to each identity.",
"project": true
},
"webhook": {
"perEnvironment": true,
Expand All @@ -387,7 +385,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Webhook",
"description": "Sends data on what flags served to each identity to a Webhook Endpoint you provide."
"description": "Sends data on what flags served to each identity to a Webhook Endpoint you provide.",
"project": true
},
"heap": {
"perEnvironment": true,
Expand All @@ -402,7 +401,8 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Heap Analytics",
"description": "Sends data on what flags served to each identity."
"description": "Sends data on what flags served to each identity.",
"project": true
},
"mixpanel": {
"perEnvironment": true,
Expand All @@ -417,7 +417,30 @@ The list of the flags and remote config we're currently using in production is b
],
"tags": ["analytics"],
"title": "Mixpanel",
"description": "Sends data on what flags served to each identity."
"description": "Sends data on what flags served to each identity.",
"project": true
},
"grafana": {
"perEnvironment": false,
"image": "/static/images/integrations/grafana.svg",
"docs": "https://docs.flagsmith.com/integrations/apm/grafana",
"fields": [
{
"key": "base_url",
"label": "Base URL",
"default": "https://grafana.com"
},
{
"key": "api_key",
"label": "Service account token",
"hidden": true
}
],
"tags": ["logging"],
"title": "Grafana",
"description": "Receive Flagsmith annotations to your Grafana instance on feature flag and segment changes.",
"project": true,
"organisation": true
}
}
```
Expand Down
29 changes: 29 additions & 0 deletions frontend/common/types/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,35 @@ export type Repository = {
owner: { login: string }
}

export type IntegrationFieldOption = { label: string; value: string }
export type IntegrationField = {
key: string
label: string
default?: string
hidden?: boolean
inputType?: 'text' | 'checkbox'
options?: IntegrationFieldOption[]
}

export type IntegrationData = {
description: string
docs?: string
external: boolean
image: string
fields: IntegrationField[] | undefined
isExternalInstallation: boolean
perEnvironment: boolean
title?: string
organisation?: string
project?: string
isOauth?: boolean
}

export type ActiveIntegration = {
id: string
flagsmithEnvironment?: string
}

export type GithubRepository = {
id: number
github_configuration: number
Expand Down
34 changes: 24 additions & 10 deletions frontend/web/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,31 @@ const App = class extends Component {
Usage
</NavSubLink>
)}

{AccountStore.isAdmin() && (
<NavSubLink
icon={<SettingsIcon />}
id='org-settings-link'
to={`/organisation/${
AccountStore.getOrganisation().id
}/settings`}
>
Organisation Settings
</NavSubLink>
<>
{Utils.getFlagsmithHasFeature(
'organisation_integrations',
) && (
<NavSubLink
icon={<Icon name='layers' />}
id='integrations-link'
to={`/organisation/${
AccountStore.getOrganisation().id
}/integrations`}
>
Organisation Integrations
</NavSubLink>
)}
<NavSubLink
icon={<SettingsIcon />}
id='org-settings-link'
to={`/organisation/${
AccountStore.getOrganisation().id
}/settings`}
>
Organisation Settings
</NavSubLink>
</>
)}
</>
)
Expand Down
Loading

0 comments on commit d76a6f0

Please sign in to comment.