- {selectedInstructions &&
}
- {/* Integration Name Field */}
-
-
-
setIntegrationName(e.target.value)}
- placeholder="e.g., my-app-integration"
- required
- disabled={!canCreateIntegrations}
+ {!isSetupPhase && selectedInstructions && (
+
+ )}
+
+ {metadataContent}
+
+ {activeBrowserAction && (
+
-
- A unique name for this integration
-
-
+ )}
- {/* Configuration Fields */}
- {selectedIntegration.configuration && selectedIntegration.configuration.length > 0 && (
+ {!isSetupPhase && (
+
+
+
setIntegrationName(e.target.value)}
+ placeholder="e.g., my-app-integration"
+ required
+ disabled={!canCreateIntegrations}
+ />
+
+ A unique name for this integration
+
+
+ )}
+
+ {fieldsToShow.length > 0 && (
- {selectedIntegration.configuration.map((field) => {
+ {fieldsToShow.map((field) => {
if (!field.name) return null;
return (
);
})}
@@ -421,32 +531,65 @@ export function Integrations({ organizationId }: IntegrationsProps) {
-
-
+ {isSetupPhase ? (
+ <>
+ {isReadyWithMetadata ? (
+
+ ) : (
+ <>
+
+
+ >
+ )}
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
- {createIntegrationMutation.isError && (
+ {(createIntegrationMutation.isError || updateIntegrationMutation.isError) && (
- Failed to create integration: {getApiErrorMessage(createIntegrationMutation.error)}
+ {createIntegrationMutation.isError
+ ? `Failed to create integration: ${getApiErrorMessage(createIntegrationMutation.error)}`
+ : `Failed to update integration: ${getApiErrorMessage(updateIntegrationMutation.error)}`}
)}
diff --git a/web_src/src/pages/organization/settings/integrationMetadataRenderers/components.tsx b/web_src/src/pages/organization/settings/integrationMetadataRenderers/components.tsx
new file mode 100644
index 0000000000..8f3b99013e
--- /dev/null
+++ b/web_src/src/pages/organization/settings/integrationMetadataRenderers/components.tsx
@@ -0,0 +1,47 @@
+import { Icon } from "@/components/Icon";
+import { showErrorToast } from "@/utils/toast";
+import { useState } from "react";
+
+export function CopyButton({ text, label }: { text: string; label: string }) {
+ const [copied, setCopied] = useState(false);
+
+ const handleCopy = async () => {
+ try {
+ await navigator.clipboard.writeText(text);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ } catch (_error) {
+ showErrorToast(`Failed to copy ${label}`);
+ }
+ };
+
+ return (
+
+ );
+}
+
+export function URLField({ label, url }: { label: string; url: string }) {
+ return (
+
+ );
+}
diff --git a/web_src/src/pages/organization/settings/integrationMetadataRenderers/dash0.tsx b/web_src/src/pages/organization/settings/integrationMetadataRenderers/dash0.tsx
index fcb712cb15..a8b1a5a119 100644
--- a/web_src/src/pages/organization/settings/integrationMetadataRenderers/dash0.tsx
+++ b/web_src/src/pages/organization/settings/integrationMetadataRenderers/dash0.tsx
@@ -1,7 +1,5 @@
-import { Icon } from "@/components/Icon";
-import { showErrorToast } from "@/utils/toast";
-import { useState } from "react";
import { IntegrationMetadataRenderer } from "./types";
+import { CopyButton } from "./components";
export const dash0MetadataRenderer: IntegrationMetadataRenderer = ({ integration }) => {
const metadata = integration.status?.metadata as Record
| undefined;
@@ -12,31 +10,6 @@ export const dash0MetadataRenderer: IntegrationMetadataRenderer = ({ integration
const normalizedWebhookURL = webhookUrl.trim();
- const CopyButton = () => {
- const [copied, setCopied] = useState(false);
-
- const handleCopy = async () => {
- try {
- await navigator.clipboard.writeText(normalizedWebhookURL);
- setCopied(true);
- setTimeout(() => setCopied(false), 2000);
- } catch (_error) {
- showErrorToast("Failed to copy webhook URL");
- }
- };
-
- return (
-
- );
- };
-
return (
Dash0 Notification Webhook
@@ -67,7 +40,7 @@ export const dash0MetadataRenderer: IntegrationMetadataRenderer = ({ integration
{normalizedWebhookURL}
-
+
);
diff --git a/web_src/src/pages/organization/settings/integrationMetadataRenderers/index.tsx b/web_src/src/pages/organization/settings/integrationMetadataRenderers/index.tsx
index 7c808af0aa..6f175c810d 100644
--- a/web_src/src/pages/organization/settings/integrationMetadataRenderers/index.tsx
+++ b/web_src/src/pages/organization/settings/integrationMetadataRenderers/index.tsx
@@ -1,9 +1,11 @@
import { dash0MetadataRenderer } from "./dash0";
+import { linearMetadataRenderer } from "./linear";
import { OrganizationsIntegration } from "@/api-client";
import { IntegrationMetadataRenderer } from "./types";
const integrationMetadataRenderers: Record