Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion includes/pipeline_page/example_output.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@

<script type="text/javascript">
var HIDE_INDEX = true;
var prefix = window.location.hash.length>0 ? window.location.hash.substr(1) : '<?php echo $pipeline->name?>/results-<?php echo $release_hash ?>/'
var prefix = '<?php echo $pipeline->name?>/results-<?php echo $release_hash ?>/';
if (window.location.hash.length>0){
if(window.location.hash.substr(1).split("/")[0]==="<?php echo $pipeline->name?>"){
prefix = window.location.hash.substr(1);
}
}
var s3exp_config = {
Region: 'eu-west-1',
Bucket: 'nf-core-awsmegatests',
Expand Down
7 changes: 4 additions & 3 deletions public_html/assets/js/aws-s3-explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ $(function () {
$("body").on("click", ".copy-url", function (e) {
var text = e.currentTarget.dataset.target;
var $tmp = $("<input>");

$("body").append($tmp);
$tmp.val(text).select();
document.execCommand("copy");
Expand Down Expand Up @@ -198,7 +199,7 @@ $(function () {
}
$('#breadcrumb').append(ipart);
});
$('.title-bar .copy-url').data().target = "s3://" + parts.join("/");
$('.title-bar .copy-url')[0].dataset.target = "s3://" + parts.join("/");
}

function s3draw(data, complete) {
Expand Down Expand Up @@ -351,12 +352,12 @@ $(function () {
} else if (isfolder(data)) {
// console.log("is folder: " + data);
if (full.render_name) {
return '<a data-s3="folder" data-prefix="' + sanitize_html(data) + '" href="' + object2hrefvirt(s3exp_config.Bucket, data) + '"><i class="fad fa-folder"></i> ' + prefix2folder(data) + '</a>';
return '<a data-s3="folder" data-prefix="' + sanitize_html(data) + '" href="' + object2hrefvirt(s3exp_config.Bucket, data) + '"><i class="fas fa-folder"></i> ' + prefix2folder(data) + '</a>';
} else {
return '<div class="d-flex justify-content-between align-items-center"><div><a data-s3="folder" data-prefix="' + sanitize_html(data) + '" href="' + object2hrefvirt(s3exp_config.Bucket, data) + '"><i class="fad fa-folder-open"></i> ..</a></div></div>';
}
} else {
var icon = '<i class="fad fa-file"></i> ';
var icon = '<i class="fas fa-file"></i> ';

// console.log("not folder/this document: " + data);
return '<div class="d-flex justify-content-between align-items-center"><div><a data-s3="object" href="' + object2hrefvirt(s3exp_config.Bucket, data) + '"download="' + fullpath2filename(data) + '" data-size=' + full.Size + '>' + icon + fullpath2filename(data) + '</a></div></div>';
Expand Down