From: radhika Date: Thu, 14 Aug 2014 02:20:23 +0000 (-0400) Subject: 3112: config settings, mailer, popup display X-Git-Tag: 1.1.0~2266^2~56 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/97e3a42d5041515e4c135220b1836805e76a2d94 3112: config settings, mailer, popup display --- diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb index d1dc0fca35..a50eaaf432 100644 --- a/apps/workbench/app/controllers/actions_controller.rb +++ b/apps/workbench/app/controllers/actions_controller.rb @@ -177,4 +177,19 @@ class ActionsController < ApplicationController redirect_to controller: 'collections', action: :show, id: newc.uuid end + def report_issue_popup + @popup_params = params + respond_to do |format| + format.js + format.html + end + end + + def report_issue + respond_to do |format| + IssueReporter.send_report(current_user, params).deliver + format.js + end + end + end diff --git a/apps/workbench/app/mailers/issue_reporter.rb b/apps/workbench/app/mailers/issue_reporter.rb new file mode 100644 index 0000000000..1b1fa65b35 --- /dev/null +++ b/apps/workbench/app/mailers/issue_reporter.rb @@ -0,0 +1,10 @@ +class IssueReporter < ActionMailer::Base + default from: Rails.configuration.report_notifier_email_from + default to: Rails.configuration.report_notifier_email_to + + def send_report(user, data) + @user = user + @data = data + mail(subject: 'Issue reported') + end +end diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb new file mode 100644 index 0000000000..924787af68 --- /dev/null +++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb @@ -0,0 +1,94 @@ +<% + api_version = arvados_api_client.discovery[:source_version] + generated_at = arvados_api_client.discovery[:generatedAt] + wb_version = Rails.configuration.source_version + ' ' + Rails.configuration.local_modified + arvados_base = Rails.configuration.arvados_v1_base + support_email = Rails.configuration.support_email_address + + additional_info = "User's email: " + current_user.email + "\n" + + "Current Location: " + @popup_params[:current_location] +%> +