mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-20 21:43:18 +00:00
Frontend changes: download link to validation report
This commit is contained in:
parent
9b8721e33a
commit
a4d639925e
@ -93,7 +93,10 @@
|
||||
{
|
||||
// TODO render a link to a device details page,
|
||||
// passing the device.id
|
||||
data: 'device.name'
|
||||
data: 'device.name',
|
||||
render: function (data, type, full, meta) {
|
||||
return createDownloadLink(full);
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'id',
|
||||
@ -126,6 +129,16 @@
|
||||
dataTable.order([1, 'desc']).draw(); //order by createTime
|
||||
});
|
||||
|
||||
/**
|
||||
* This method builds a url to download the device validation report.
|
||||
*/
|
||||
function createDownloadLink(full) {
|
||||
return full.device.name + ' ' +
|
||||
'<a href="${portal}/validation-reports/download?id=' + full.device.name +
|
||||
'"><img src="${icons}/ic_file_download_black_24dp.png" title="Download validation report">' +
|
||||
'</a>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets HTML to display (icon tag) for the specified validation type.
|
||||
* If a validation for the requested type is not found, an empty
|
||||
|
Loading…
Reference in New Issue
Block a user