Skip to content

Commit

Permalink
rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidonos committed Jan 15, 2025
1 parent c00fa53 commit b822bbd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions sechub-web-ui/src/components/ProjectJobList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
</v-btn>
</template>
<v-list>
<v-list-item @click="downloadReportHtml(job.jobUUID)">
<v-list-item @click="downloadJobReportHtml(job.jobUUID)">
<v-list-item-title>{{ $t('JOB_TABLE_DOWNLOAD_HTML_REPORT') }}</v-list-item-title>
</v-list-item>
<v-list-item @click="downloadReportJson(job.jobUUID)">
<v-list-item @click="downloadJobReportJson(job.jobUUID)">
<v-list-item-title>{{ $t('JOB_TABLE_DOWNLOAD_JSON_REPORT') }}</v-list-item-title>
</v-list-item>
</v-list>
Expand Down Expand Up @@ -154,7 +154,7 @@
}
}

async function downloadReportJson(jobUUID: string) {
async function downloadJobReportJson(jobUUID: string) {
try {
const response = await defaultClient.withExecutionApi.userDownloadJobReport({
projectId: projectId.value,
Expand All @@ -163,21 +163,21 @@
const prettyJson = JSON.stringify(response, null, 2);
downloadFile(new Blob([prettyJson], {type: 'application/json'}), `sechub_report_${projectId.value}_${jobUUID}.json`)
} catch (err) {
error.value = 'Failed to download JSON report.'
console.error('Failed to download JSON report:', err)
error.value = 'Failed to download JSON job report.'
console.error('Failed to download JSON job report:', err)
}
}

async function downloadReportHtml(jobUUID: string) {
async function downloadJobReportHtml(jobUUID: string) {
try {
const response = await defaultClient.withExecutionApi.userDownloadJobReportHtml({
projectId: projectId.value,
jobUUID
})
downloadFile(new Blob([response], {type: 'text/html'}), `sechub_report_${projectId.value}_${jobUUID}.html`)
} catch (err) {
error.value = 'Failed to download HTML report.'
console.error('Failed to download HTML report:', err)
error.value = 'Failed to download HTML job report.'
console.error('Failed to download HTML job report:', err)
}
}

Expand Down Expand Up @@ -228,8 +228,8 @@
currentRequestParameters,
showProjectsDetails,
fetchProjectJobs,
downloadReportJson,
downloadReportHtml,
downloadJobReportJson,
downloadJobReportHtml,
onPageChange,
openNewScanPage,
backToProjectsList,
Expand Down

0 comments on commit b822bbd

Please sign in to comment.