Skip to content

Commit

Permalink
Add connection list filtering to the frontend based on a set of sourc…
Browse files Browse the repository at this point in the history
…es or destinations (#21119)

* Update listWorkspaceStandardSyncs to support lists of sources/destinations

* Update API spec

* Implement the connections list filtering for a set of sources or destinations

* Minor pluralization fix

Co-authored-by: Jimmy Ma <jimmy@airbyte.io>
  • Loading branch information
krishnaglick and gosusnp authored Jan 18, 2023
1 parent 434d8a1 commit 5654ef6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface DestinationsTableProps {

export const DestinationsTable: React.FC<DestinationsTableProps> = ({ destinations }) => {
const navigate = useNavigate();
const { connections } = useConnectionList();
const { connections } = useConnectionList({ destinationId: destinations.map(({ destinationId }) => destinationId) });

const data = getEntityTableData(destinations, connections, "destination");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface SourcesTableProps {
const SourcesTable: React.FC<SourcesTableProps> = ({ sources }) => {
const navigate = useNavigate();

const { connections } = useConnectionList();
const { connections } = useConnectionList({ sourceId: sources.map(({ sourceId }) => sourceId) });

const data = getEntityTableData(sources, connections, "source");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ import styles from "./DestinationSettings.module.scss";
export const DestinationSettingsPage: React.FC = () => {
const params = useParams() as { "*": StepsTypes | ""; id: string };
const destination = useGetDestination(params.id);
const { connections } = useConnectionList();
const connectionsWithDestination = connections.filter(
({ destination: { destinationId } }) => destinationId === destination.destinationId
);
const { connections: connectionsWithDestination } = useConnectionList({ destinationId: [destination.destinationId] });
const destinationSpecification = useGetDestinationDefinitionSpecification(destination.destinationDefinitionId);
const destinationDefinition = useDestinationDefinition(destination.destinationDefinitionId);
const { mutateAsync: updateDestination } = useUpdateDestination();
Expand Down

0 comments on commit 5654ef6

Please sign in to comment.