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
4 changes: 3 additions & 1 deletion qiita_pet/static/js/sampleTemplateVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ Vue.component('sample-template-page', {
$btn = $('<button>').addClass('btn btn-danger st-interactive').appendTo($td).attr('data-column', cat).attr('data-row-id', rowIdx);
$('<span>').addClass('glyphicon glyphicon-trash').appendTo($btn);
$btn.on('click', function () {
vm.deleteColumn($(this).attr('data-column'), $(this).attr('data-row-id'));
if (confirm('Are you sure you want to delete `' + $(this).attr('data-column') + '`?')) {
vm.deleteColumn($(this).attr('data-column'), $(this).attr('data-row-id'));
}
});
}
rowIdx += 1;
Expand Down
22 changes: 22 additions & 0 deletions qiita_pet/templates/sitebase.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
row.push('')
row.push(item.heartbeat);
row.push(item.name);
if (item.status == 'error') {
item.status += '&nbsp;&nbsp;&nbsp;<a class="btn btn-danger btn-sm hide-job-from-procesing-jobs" id="' +
item.id + '"><span class="glyphicon glyphicon-trash"></span></a>';
}
row.push(item.status);
row.push(item.step);
row.push(item.id);
Expand Down Expand Up @@ -250,6 +254,24 @@
tr.addClass('shown');
}
});

$('#processing-jobs-datatables').on('click', 'a.hide-job-from-procesing-jobs', function () {
var jid = this.id;
if (confirm('Are you sure you want to hide `' + jid + '`?')){

$.ajax({
url: '{% raw qiita_config.portal_dir %}/study/process/job/',
type: 'PATCH',
data: {'op': 'remove', 'path': jid},
success: function(data) {
processing_jobs_vue.update_processing_job_data();
},
error: function(object, status, error_msg) {
bootstrapAlert("Error while hiding `" + jid + "` artifact visiblity: " + error_msg, "danger");
}
});
}
});
}
});

Expand Down