mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-21 05:53:27 +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,
|
// TODO render a link to a device details page,
|
||||||
// passing the device.id
|
// passing the device.id
|
||||||
data: 'device.name'
|
data: 'device.name',
|
||||||
|
render: function (data, type, full, meta) {
|
||||||
|
return createDownloadLink(full);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'id',
|
data: 'id',
|
||||||
@ -126,6 +129,16 @@
|
|||||||
dataTable.order([1, 'desc']).draw(); //order by createTime
|
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.
|
* Gets HTML to display (icon tag) for the specified validation type.
|
||||||
* If a validation for the requested type is not found, an empty
|
* If a validation for the requested type is not found, an empty
|
||||||
|
Loading…
Reference in New Issue
Block a user