Skip to content

Commit

Permalink
Test selectRestore and onLogClick
Browse files Browse the repository at this point in the history
  • Loading branch information
doracretu3pillar committed Nov 7, 2024
1 parent a843b8e commit 16fd3df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,16 @@ export const RestoreHistory: FC = () => {
};

const onLogClick = (restore: Restore) => {
console.log('onLogClick', restore);
setSelectedRestore(restore);
setLogsModalVisible(true);
};

const getLogs = useCallback(
async (startingChunk: number, offset: number, token?: CancelToken) =>
RestoreHistoryService.getLogs(selectedRestore!.id, startingChunk, offset, token),
async (startingChunk: number, offset: number, token?: CancelToken) => {
console.log('selectedRestore!.id', selectedRestore!.id);
return RestoreHistoryService.getLogs(selectedRestore!.id, startingChunk, offset, token)
}
[selectedRestore]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface RestoreResponse {
}

export interface Restore extends Omit<Backup, 'created' | 'status' | 'mode' | 'folder'> {
id?: number;
artifactId: string;
started: number;
finished: number | null;
Expand Down

0 comments on commit 16fd3df

Please sign in to comment.