Coming Soon
diff --git a/frontend/components/integrations/Integration.tsx b/frontend/components/integrations/Integration.tsx
index fa203b9bd..e81fdb684 100644
--- a/frontend/components/integrations/Integration.tsx
+++ b/frontend/components/integrations/Integration.tsx
@@ -15,6 +15,8 @@ import getIntegrationApps from "../../pages/api/integrations/GetIntegrationApps"
import Button from "~/components/basic/buttons/Button";
import ListBox from "~/components/basic/Listbox";
+// TODO: optimize laggy dropdown for app options
+
interface Integration {
app?: string;
environment: string;
@@ -34,23 +36,21 @@ const Integration = ({
const [fileState, setFileState] = useState([]);
const router = useRouter();
const [apps, setApps] = useState([]);
- const [integrationApp, setIntegrationApp] = useState(
- integration.app ? integration.app : apps[0]
- );
+ const [integrationApp, setIntegrationApp] = useState(null);
useEffect(async () => {
- const tempHerokuApps = await getIntegrationApps({
+ const tempApps = await getIntegrationApps({
integrationAuthId: integration.integrationAuth,
});
- const tempHerokuAppNames = tempHerokuApps.map((app) => app.name);
- setApps(tempHerokuAppNames);
+ const tempAppNames = tempApps.map((app) => app.name);
+ setApps(tempAppNames);
setIntegrationApp(
- integration.app ? integration.app : tempHerokuAppNames[0]
+ integration.app ? integration.app : tempAppNames[0]
);
}, []);
- return (
+ return (integrationApp && apps.length > 0) ? (
@@ -63,6 +63,7 @@ const Integration = ({
!integration.isActive && [
"Development",
"Staging",
+ "Testing",
"Production",
]
}
@@ -135,7 +136,9 @@ const Integration = ({
- );
+ ) : (
+
+ )
};
export default Integration;
\ No newline at end of file
diff --git a/frontend/public/json/cloudIntegrations.json b/frontend/public/json/cloudIntegrations.json
index 7d11b3b51..48cecec34 100644
--- a/frontend/public/json/cloudIntegrations.json
+++ b/frontend/public/json/cloudIntegrations.json
@@ -3,6 +3,7 @@
"name": "Heroku",
"slug": "heroku",
"image": "Heroku",
+ "isAvailable": true,
"type": "oauth2",
"clientId": "bc132901-935a-4590-b010-f1857efc380d"
},
@@ -10,6 +11,7 @@
"name": "Netlify",
"slug": "netlify",
"image": "Netlify",
+ "isAvailable": false,
"type": "oauth2",
"clientId": ""
},
@@ -17,6 +19,7 @@
"name": "Digital Ocean",
"slug": "digital-ocean",
"image": "Digital Ocean",
+ "isAvailable": false,
"type": "",
"clientId": ""
},
@@ -24,6 +27,7 @@
"name": "Google Cloud Platform",
"slug": "gcp",
"image": "Google Cloud Platform",
+ "isAvailable": false,
"type": "",
"clientId": ""
},
@@ -31,6 +35,7 @@
"name": "Amazon Web Services",
"slug": "aws",
"image": "Amazon Web Services",
+ "isAvailable": false,
"type": "",
"clientId": ""
},
@@ -38,6 +43,7 @@
"name": "Microsoft Azure",
"slug": "azure",
"image": "Microsoft Azure",
+ "isAvailable": false,
"type": "",
"clientId": ""
},
@@ -45,6 +51,7 @@
"name": "Travis CI",
"slug": "travisci",
"image": "Travis CI",
+ "isAvailable": false,
"type": "",
"clientId": ""
},
@@ -52,6 +59,7 @@
"name": "Circle CI",
"slug": "circleci",
"image": "Circle CI",
+ "isAvailable": false,
"type": "",
"clientId": ""
}