Skip to content

Commit

Permalink
Merge pull request #1378 from alliance-genome/SCRUM-2639
Browse files Browse the repository at this point in the history
Added the button for downloading exceptions file
  • Loading branch information
VarunReddy1111 authored Jan 8, 2024
2 parents 817e485 + 793f155 commit c041c1c
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/main/cliapp/src/containers/dataLoadsPage/DataLoadsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,18 @@ export const DataLoadsComponent = () => {
};

const historyActionBodyTemplate = (rowData) => {
return <Button icon="pi pi-search-plus" className="p-button-rounded p-button-info mr-2" onClick={() => showHistory(rowData)} />
};
return (
<nobr>
<Button icon="pi pi-search-plus" className="p-button-rounded p-button-info mr-2" onClick={() => showHistory(rowData)} />
{ rowData.failedRecords > 0 &&
<a href={`/api/bulkloadfilehistory/${rowData.id}/download`} target="_blank" rel="noopener noreferrer" className="p-button p-button-warning">
<i className="pi pi-exclamation-triangle"></i>
<i className="pi pi-download"></i>
</a>
}
</nobr>
)
}

const showUploadConfirmDialog = (rowData) => {
setUploadLoadType(rowData.backendBulkLoadType);
Expand Down Expand Up @@ -410,7 +420,7 @@ export const DataLoadsComponent = () => {
if (file.dateLastLoaded) {
lastLoadedDates.set(file.dateLastLoaded, file);
} else {
filesWithoutDates.push(file);
filesWithoutDates.push(file);
}
} else {
lastLoadedDates.set(new Date().toISOString(), file);
Expand All @@ -421,7 +431,7 @@ export const DataLoadsComponent = () => {
const start2 = new Date(b);
return start2 - start1;
}).forEach(date => sortedFiles.push(lastLoadedDates.get(date)));

if (filesWithoutDates.length > 0) {
filesWithoutDates.forEach(fwd => {sortedFiles.push(fwd)});
}
Expand Down Expand Up @@ -460,7 +470,7 @@ export const DataLoadsComponent = () => {
if (group.loads) {
sortedLoads = group.loads.sort((a, b) => (a.name > b.name) ? 1: -1);
}

return (
<div className="card">
<DataTable key="loadTable" value={sortedLoads} responsiveLayout="scroll"
Expand Down

0 comments on commit c041c1c

Please sign in to comment.