@@ -43,7 +43,7 @@ const downloadInProgress = useState<boolean>(`${statePrefix}.downloadInProgress`
43
43
const doDownload = async () => {
44
44
downloadInProgress .value = true
45
45
// Just download the audit_file.csv for audits
46
- const artifactsToDownload = props .analysis .analysisType === AnalysisType .ANALYSIS_TYPE_AUDIT ? props .analysis .artifacts .filter ((a ) => a .blob .fileName === ' audit_file.csv' ) : props .analysis .artifacts ;
46
+ const artifactsToDownload = props .analysis .analysisType === AnalysisType .ANALYSIS_TYPE_AUDIT ? props .analysis .artifacts .filter ((a ) => a .blob .fileName === ' audit_file.csv' ) : props .analysis .artifacts
47
47
const response: AccessBlobContentResp = await pactaClient .accessBlobContent ({
48
48
items: artifactsToDownload .map ((asset ): AccessBlobContentReqItem => ({
49
49
blobId: asset .blob .id ,
@@ -53,9 +53,9 @@ const doDownload = async () => {
53
53
let content: Blob | null = null
54
54
let fileName: string | null = null
55
55
if (response .items .length === 1 ) {
56
- const resp = await fetch (response .items [0 ].downloadUrl )
57
- content = await resp .blob ()
58
- fileName = artifactsToDownload [0 ].blob .fileName
56
+ const resp = await fetch (response .items [0 ].downloadUrl )
57
+ content = await resp .blob ()
58
+ fileName = artifactsToDownload [0 ].blob .fileName
59
59
} else {
60
60
const zip = new JSZip ()
61
61
await Promise .all (response .items .map (
@@ -101,8 +101,8 @@ const openReport = () => navigateTo(`${apiServerURL}/report/${props.analysis.id}
101
101
@click =" openReport"
102
102
/>
103
103
<PVButton
104
- v-tooltip =" canAccess ? tt('Download') : ''"
105
104
v-if =" isCompleted"
105
+ v-tooltip =" canAccess ? tt('Download') : ''"
106
106
:disabled =" downloadInProgress || !canAccess"
107
107
:loading =" downloadInProgress"
108
108
:icon =" downloadInProgress ? 'pi pi-spinner pi-spin' : 'pi pi-download'"
0 commit comments