styled email report

master
dcore94 2 years ago
parent fa10d2cab9
commit 45db1d5935

@ -18,7 +18,7 @@
"auth" : "Bearer ${workflow.input.token}",
"parentfolder" : "Blue-Cloud Data Pool",
"folder" : "${workflow.input.descriptor.userOrderName}-${workflow.input.descriptor.orderNumber}",
"bcc" : ["prog@maris.nl"],
"bcc" : ["prog@maris.nl","marco.lettere@nubisware.com"],
"scriptExpression": "1 === 1"
}
},
@ -218,7 +218,7 @@
"inputParameters": {
"input" : "${workflow.input.descriptor}",
"output" : "${join_parallel_downloads.output}",
"scriptExpression": "var k,report='<table><thead><tr><th>Download</th><th>Outcome</th><!--th>Link</th--></tr></thead><tbody>',keys=[];for(var k in $.output) keys.push(k);keys.sort();for(k in keys){var index=keys[k].split('_')[1];report+='<tr><td>'+(Number(index)+1)+'</td>';var o=$.output[keys[k]];o.endpoint1.error||o.endpoint2.error?report+='<td>'+(o.endpoint1.error||'')+(o.endpoint2.error||'')+'</td>':report+='<td>OK</td>',report+='</tr>'}report+='</tbody></table>';return { report : report}"
"scriptExpression": "var k,report='<table style='border: solid 1px gray'><thead style='background-color:rgba(0,0,0,.1)'><tr><th>Download</th><th style='width:100%;text-align:left;'>Outcome</th><!--th>Link</th--></tr></thead><tbody>',keys=[];for(var k in $.output) keys.push(k);keys.sort();for(k in keys){var index=keys[k].split('_')[1];report+='<tr><td>'+(Number(index)+1)+'</td>';var o=$.output[keys[k]];o.endpoint1.error||o.endpoint2.error?report+='<td>'+(o.endpoint1.error||'')+(o.endpoint2.error||'')+'</td>':report+='<td>OK</td>',report+='</tr>'}report+='</tbody></table>';return { report : report}"
}
},
{
@ -229,7 +229,7 @@
"from" : "Blue-Cloud Gateway <bluecloud@d4science.org>",
"to" : "${workflow.input.callback.email}",
"bcc" : "${init.input.bcc}",
"html" : "<html><body><p>Dear user,</p> <p>your request with id <b>{v1}</b> related to order <b>{v2}</b> number <b>{v3}</b> has completed with the following outcome:</p><br/> {v4} <br/><p>You can access your data through your Blue-cloud workspace at <b><a href='{v5}'>{v6}</a></b>.</p><br/><br/><p style='font-size:small;color:gray'>WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.</p></body></html>",
"html" : "<html><body style='font-family:ubuntu,Arial,sans-serif; display:flex; flex-direction: column;'><div style='margin:auto;width:800px;max-width:800px'><header style='background-color:#1aabe2;width:100%'><img src='https://ftp.d4science.org/apps/profiles/blue-cloud_vre_data_pool.jpg' style='margin-bottom:1em;width:100%'/></header><div style='width:100%'><h3 style='color:#3a628b'>Dear user,</h3><p>your request with id <b>{v1}</b> related to order <b>{v2}</b> number <b>{v3}</b> has completed with the following outcome:</p><br/>{v4}<br/><p>You can access your data through your Blue-cloud workspace at <b><a href='{v5}'>{v6}</a></b>.</p><br/><br/><p style='font-size:small;color:gray'>WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.</p></div></div></body></html>",
"subject" : "Outcome of Bluecloud DA cache download {v1}",
"extra_vars":{
"v1" : "${workflow.input.descriptor.requestId}",

Loading…
Cancel
Save