Skip to content

Commit

Permalink
Application drawer > reports: show analysis details for successful task
Browse files Browse the repository at this point in the history
Clicking the 'View analysis details' link in the application analysis
detail drawer, reports tab should show the most current application's
task details.  If no task is available for an application,
"Not available" is shown.

The link for a successful task was broken.  It has been updated to
use the task id instead of the application id.

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Oct 5, 2023
1 parent 8277208 commit 2de9186
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export const ApplicationDetailDrawerAnalysis: React.FC<

const { identities } = useFetchIdentities();
const { facts, isFetching } = useFetchFacts(application?.id);
const [appAnalysisToView, setAppAnalysisToView] = React.useState<number>();
const [taskIdToView, setTaskIdToView] = React.useState<number>();

let matchingSourceCredsRef: Identity | undefined;
Expand Down Expand Up @@ -124,7 +123,7 @@ export const ApplicationDetailDrawerAnalysis: React.FC<
}
type="button"
variant="link"
onClick={() => setAppAnalysisToView(application.id)}
onClick={() => setTaskIdToView(task.id)}
className={spacing.ml_0}
style={{ margin: "0", padding: "0" }}
>
Expand Down Expand Up @@ -217,10 +216,9 @@ export const ApplicationDetailDrawerAnalysis: React.FC<
<SimpleDocumentViewerModal<Task | string>
title={`Analysis details for ${application?.name}`}
fetch={getTaskById}
documentId={taskIdToView || appAnalysisToView}
documentId={taskIdToView}
onClose={() => {
setTaskIdToView(undefined);
setAppAnalysisToView(undefined);
}}
/>
</TextContent>
Expand Down

0 comments on commit 2de9186

Please sign in to comment.