mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #9508 from guerler/bug_reporting
Adjust dataset error reporting page, remove email option, remove long info text
This commit is contained in:
@@ -23,7 +23,6 @@ var View = Backbone.View.extend({
|
||||
// Fetch data for the selected dataset and
|
||||
render: function() {
|
||||
var data_url = `${getAppRoot()}api/datasets/${this.model.get("dataset_id")}`;
|
||||
|
||||
Utils.get({
|
||||
url: data_url,
|
||||
success: dataset => {
|
||||
@@ -34,7 +33,7 @@ var View = Backbone.View.extend({
|
||||
this.render_error_page(dataset, job);
|
||||
this.find_common_problems(job);
|
||||
},
|
||||
error: response => {
|
||||
error: () => {
|
||||
var error_response = {
|
||||
status: "error",
|
||||
message: "Error occurred while loading the job.",
|
||||
@@ -45,7 +44,7 @@ var View = Backbone.View.extend({
|
||||
}
|
||||
});
|
||||
},
|
||||
error: response => {
|
||||
error: () => {
|
||||
var error_response = {
|
||||
status: "error",
|
||||
message: "Error occurred while loading the dataset.",
|
||||
@@ -62,7 +61,7 @@ var View = Backbone.View.extend({
|
||||
Utils.get({
|
||||
url: job_url,
|
||||
success: common_problems => {
|
||||
this.render_common_problems(job, common_problems);
|
||||
this.render_common_problems(common_problems);
|
||||
},
|
||||
error: response => {
|
||||
console.log("error");
|
||||
@@ -72,7 +71,7 @@ var View = Backbone.View.extend({
|
||||
return;
|
||||
},
|
||||
|
||||
render_common_problems: function(job, common_problems) {
|
||||
render_common_problems: function(common_problems) {
|
||||
const has_duplicate_inputs = common_problems.has_duplicate_inputs;
|
||||
const has_empty_inputs = common_problems.has_empty_inputs;
|
||||
if (has_duplicate_inputs || has_empty_inputs) {
|
||||
@@ -99,27 +98,22 @@ var View = Backbone.View.extend({
|
||||
render_error_page: function(dataset, job) {
|
||||
this.$el.empty().append(`
|
||||
${this._templateHeader()}
|
||||
<h2>Dataset Error</h2>
|
||||
<h2>Dataset Error Report</h2>
|
||||
<p>An error occurred while running the tool <b>${job.tool_id}</b>.</p>
|
||||
${this.job_summary(job)}
|
||||
<h3>Troubleshoot This Error</h3>
|
||||
<h3>Troubleshooting</h3>
|
||||
<p>
|
||||
There are a number of help resources to self diagnose and
|
||||
There are a number of helpful resources to self diagnose and
|
||||
correct problems.
|
||||
Start here: <a
|
||||
href="https://galaxyproject.org/support/tool-error/"
|
||||
target="_blank"> My job ended with an error. What can I do?</a>
|
||||
</p>
|
||||
|
||||
<h3>Report This Error</h3>
|
||||
<p>
|
||||
Usually the local Galaxy administrators regularly review errors
|
||||
that occur on the server However, if you would like to provide
|
||||
additional information (such as what you were trying to do when
|
||||
the error occurred) and a contact e-mail address, we will be
|
||||
better able to investigate your problem and get back to you.
|
||||
<br>
|
||||
Start here:
|
||||
<b>
|
||||
<a href="https://galaxyproject.org/support/tool-error/" target="_blank">
|
||||
My job ended with an error. What can I do?
|
||||
</a>
|
||||
</b>
|
||||
</p>`);
|
||||
this.$el.append(this._getBugFormTemplate(dataset, job));
|
||||
this.$el.append("<h3>Issue Report</h3>").append(this._getBugFormTemplate(dataset, job));
|
||||
},
|
||||
|
||||
job_summary: function(job) {
|
||||
@@ -129,7 +123,7 @@ var View = Backbone.View.extend({
|
||||
if (!tool_stderr && !job_stderr && !job_messages) {
|
||||
return '<h3 class="common_problems"></h3>';
|
||||
}
|
||||
var message = "<h3>Error Details</h3>";
|
||||
var message = "<h3>Details</h3>";
|
||||
if (job_messages) {
|
||||
message += "<p>Execution resulted in the following messages:</p>";
|
||||
for (const job_message of job_messages) {
|
||||
@@ -138,7 +132,7 @@ var View = Backbone.View.extend({
|
||||
}
|
||||
if (tool_stderr) {
|
||||
message += "<p>Tool generated the following standard error:</p>";
|
||||
message += `<pre class="code">${_.escape(tool_stderr)}</pre>`;
|
||||
message += `<pre class="rounded code">${_.escape(tool_stderr)}</pre>`;
|
||||
}
|
||||
if (job_stderr) {
|
||||
message += "<p>Galaxy job runner generated the following standard error:</p>";
|
||||
@@ -173,50 +167,28 @@ var View = Backbone.View.extend({
|
||||
/** Convert tab template */
|
||||
_getBugFormTemplate: function(dataset, job) {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
var inputs = [
|
||||
{
|
||||
help: _l("Your email address"),
|
||||
options: [],
|
||||
type: "text",
|
||||
name: "email",
|
||||
label: "Your email",
|
||||
value: Galaxy.user.get("email")
|
||||
},
|
||||
{
|
||||
help: _l(
|
||||
"Any additional comments you can provide regarding what you were doing at the time of the bug."
|
||||
),
|
||||
options: [],
|
||||
type: "text",
|
||||
area: true,
|
||||
name: "message",
|
||||
label: "Message"
|
||||
}
|
||||
];
|
||||
|
||||
// TODO
|
||||
/*
|
||||
if (false && response.any_public) {
|
||||
inputs.push({
|
||||
name: "public_consent",
|
||||
label: "Public Disclosure Consent",
|
||||
help:
|
||||
"This Galaxy is configured to report to one or more error reporting backends that public to the world. By selecting 'yes', you acknowledge that this bug report will be made public.",
|
||||
value: String(Boolean(false)),
|
||||
options: [],
|
||||
type: "boolean"
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
var form = new Form({
|
||||
title: _l("Error Report"),
|
||||
inputs: inputs,
|
||||
const userEmail = Galaxy.user.get("email");
|
||||
const form = new Form({
|
||||
inputs: [
|
||||
{
|
||||
type: "text",
|
||||
hidden: !!userEmail,
|
||||
name: "email",
|
||||
value: userEmail,
|
||||
label: "Please provide your email:"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
area: true,
|
||||
name: "message",
|
||||
label: "Please provide detailed information on the activities leading to this issue:"
|
||||
}
|
||||
],
|
||||
buttons: {
|
||||
save: new Ui.Button({
|
||||
icon: "fa-bug",
|
||||
title: _l("Report"),
|
||||
cls: "ui-button btn btn-primary",
|
||||
cls: "btn btn-primary",
|
||||
floating: "clear",
|
||||
onclick: () => {
|
||||
var form_data = form.data.create();
|
||||
@@ -254,7 +226,7 @@ var View = Backbone.View.extend({
|
||||
);
|
||||
});
|
||||
},
|
||||
error: response => {
|
||||
error: () => {
|
||||
var error_response = {
|
||||
status: "error",
|
||||
message: "Error occurred while saving. Please fill all the required fields and try again.",
|
||||
|
||||
Reference in New Issue
Block a user