Skip to content

Commit

Permalink
🪟 🧪 Make sure to filter out connectors correctly (#19732)
Browse files Browse the repository at this point in the history
* Make sure to filter out connectors correctly

* Rename variable
  • Loading branch information
timroes authored Nov 28, 2022
1 parent 6c4e262 commit 373ba6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion airbyte-webapp/src/core/domain/connector/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const DEV_IMAGE_TAG = "dev";
* @param {string} workspaceId The workspace Id
* @returns {array} List of connectorIds that should be filtered out
*/
export const getExcludedConnectorIds = (workspaceId: string) =>
export const getExcludedConnectorIds = (workspaceId?: string) =>
isCloudApp()
? [
"707456df-6f4f-4ced-b5c6-03f73bcad1c5", // hide Cassandra Destination https://github.com/airbytehq/airbyte-cloud/issues/2606
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ const fetchCatalog = async (): Promise<Catalog> => {
};

export const useGetSourceDefinitions = () => {
return useQuery<Catalog, Error, Catalog["sources"]>("cloud_catalog", fetchCatalog, {
return useQuery("cloud_catalog", fetchCatalog, {
select: (data) => {
const excludedConnectorIds = getExcludedConnectorIds();
return data.sources
.filter(() => getExcludedConnectorIds(""))
.filter((source) => !excludedConnectorIds.includes(source.sourceDefinitionId))
.map((source) => {
const icon = availableSourceDefinitions.sourceDefinitions.find(
(src) => src.sourceDefinitionId === source.sourceDefinitionId
Expand Down

0 comments on commit 373ba6a

Please sign in to comment.