diff --git a/client/galaxy/scripts/mvc/dataset/dataset-error.js b/client/galaxy/scripts/mvc/dataset/dataset-error.js index efb2af6a857..175934dec52 100644 --- a/client/galaxy/scripts/mvc/dataset/dataset-error.js +++ b/client/galaxy/scripts/mvc/dataset/dataset-error.js @@ -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()} -
An error occurred while running the tool ${job.tool_id}.
${this.job_summary(job)} -- 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: My job ended with an error. What can I do? -
- -
- 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.
+
+ Start here:
+
+
+ My job ended with an error. What can I do?
+
+
Execution resulted in the following messages:
"; for (const job_message of job_messages) { @@ -138,7 +132,7 @@ var View = Backbone.View.extend({ } if (tool_stderr) { message += "Tool generated the following standard error:
"; - message += `${_.escape(tool_stderr)}`;
+ message += `${_.escape(tool_stderr)}`;
}
if (job_stderr) {
message += "Galaxy job runner generated the following standard error:
"; @@ -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.",