Skip to content

Commit

Permalink
fix(ui): show frequency in connection's sync page (NangoHQ#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel authored Jan 24, 2024
1 parent 8e75e1a commit d6c860c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/shared/lib/services/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export const getSyncs = async (nangoConnection: Connection): Promise<Sync[]> =>
.from<Sync>(TABLE)
.select(
`${TABLE}.*`,
`${TABLE}.frequency as frequency_override`,
`${SYNC_SCHEDULE_TABLE}.schedule_id`,
`${SYNC_SCHEDULE_TABLE}.frequency`,
`${SYNC_SCHEDULE_TABLE}.offset`,
Expand Down
5 changes: 4 additions & 1 deletion packages/webapp/src/pages/ConnectionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,10 @@ We could not retrieve and/or refresh your access token due to the following erro
{interpretNextRun(sync.futureActionTimes) === '-' ? (
<li className="ml-3 w-32 text-sm text-gray-500">-</li>
) : (
<Tooltip text={interpretNextRun(sync.futureActionTimes, sync.latest_sync?.updated_at)[1]} type="dark">
<Tooltip text={<div>
{interpretNextRun(sync.futureActionTimes, sync.latest_sync?.updated_at)[1]}
<br/>
Frequency: {sync.frequency_override || sync.frequency}{sync.frequency_override && <> (override)</>}</div>} type="dark">
<li className="ml-3 w-32 text-sm text-gray-500">{interpretNextRun(sync.futureActionTimes, sync.latest_sync?.updated_at)[0]}</li>
</Tooltip>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/webapp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface SyncResponse {
nango_connection_id: number;
name: string;
frequency: string;
frequency_override: string | null;
futureActionTimes: number[];
offset: number;
schedule_status: 'RUNNING' | 'PAUSED' | 'STOPPED';
Expand Down

0 comments on commit d6c860c

Please sign in to comment.