Patch broken integratins due to permission update

This commit is contained in:
Tuan Dang
2023-09-09 17:29:19 +01:00
parent 110153385b
commit 83d2a39fb1
53 changed files with 60 additions and 269 deletions
@@ -28,9 +28,7 @@ export default function NorthflankCreateIntegrationPage() {
const integrationAuth = await mutateAsync({
workspaceId: localStorage.getItem("projectData.id"),
integration: "northflank",
accessToken: apiKey,
url: null,
namespace: null
accessToken: apiKey
});
setIsLoading(false);
@@ -29,7 +29,7 @@ export default function NorthflankCreateIntegrationPage() {
const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState("");
const [secretPath, setSecretPath] = useState("/");
const [targetAppId, setTargetAppId] = useState("");
const [targetSecretGroupId, setTargetSecretGroupId] = useState<string | null>(null);
const [targetSecretGroupId, setTargetSecretGroupId] = useState<string>("");
const [isLoading, setIsLoading] = useState(false);
@@ -88,13 +88,7 @@ export default function NorthflankCreateIntegrationPage() {
app: integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.appId === targetAppId)?.name,
appId: targetAppId,
sourceEnvironment: selectedSourceEnvironment,
targetEnvironment: null,
targetEnvironmentId: null,
targetService: null,
targetServiceId: targetSecretGroupId,
owner: null,
path: null,
region: null,
secretPath
});
@@ -160,7 +154,7 @@ export default function NorthflankCreateIntegrationPage() {
)}
</Select>
</FormControl>
{targetSecretGroupId && integrationAuthSecretGroups && (
{targetSecretGroupId !== "" && integrationAuthSecretGroups && (
<FormControl label="Secret Group" className="mt-4">
<Select
value={targetSecretGroupId}