feat: show related flows for connections
This commit is contained in:
@@ -40,7 +40,7 @@ export default function ContextMenu(props: ContextMenuProps): React.ReactElement
|
||||
>
|
||||
<MenuItem
|
||||
component={Link}
|
||||
to={URLS.APP_FLOWS(appKey)}
|
||||
to={URLS.APP_FLOWS_FOR_CONNECTION(appKey, connectionId)}
|
||||
onClick={createActionHandler({ type: 'viewFlows' })}
|
||||
>
|
||||
{formatMessage('connection.viewFlows')}
|
||||
|
@@ -21,8 +21,13 @@ const getLimitAndOffset = (page: number) => ({
|
||||
export default function AppFlows(props: AppFlowsProps): React.ReactElement {
|
||||
const { appKey } = props;
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const connectionId = searchParams.get('connectionId') || null;
|
||||
const page = parseInt(searchParams.get('page') || '', 10) || 1;
|
||||
const { data } = useQuery(GET_FLOWS, { variables: { appKey, ...getLimitAndOffset(page) }});
|
||||
const { data } = useQuery(GET_FLOWS, { variables: {
|
||||
appKey,
|
||||
connectionId,
|
||||
...getLimitAndOffset(page)
|
||||
}});
|
||||
const getFlows = data?.getFlows || {};
|
||||
const { pageInfo, edges } = getFlows;
|
||||
|
||||
|
Reference in New Issue
Block a user