[ARVADOS] updated: a15dde47e5ab8a562a03f04d65a7c2bc9369a4ff

git at public.curoverse.com git at public.curoverse.com
Thu Aug 14 10:36:15 EDT 2014


Summary of changes:
 apps/workbench/app/views/application/404.html.erb  | 10 +++++++++
 .../views/application/_report_issue_popup.html.erb | 25 +++++++++-------------
 .../app/views/application/report_issue.js.erb      |  2 +-
 .../app/views/issue_reporter/send_report.text.erb  | 13 +++--------
 4 files changed, 24 insertions(+), 26 deletions(-)

       via  a15dde47e5ab8a562a03f04d65a7c2bc9369a4ff (commit)
       via  85186b89af388cde74441a15d4da62cce22c088d (commit)
      from  a3c8db7d939fbfc4d70dceb3d398d07ac3689ef5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a15dde47e5ab8a562a03f04d65a7c2bc9369a4ff
Author: radhika <radhika at curoverse.com>
Date:   Thu Aug 14 10:35:51 2014 -0400

    3112: add "report issue" button to 404 error page

diff --git a/apps/workbench/app/views/application/404.html.erb b/apps/workbench/app/views/application/404.html.erb
index fd97295..ae7dc22 100644
--- a/apps/workbench/app/views/application/404.html.erb
+++ b/apps/workbench/app/views/application/404.html.erb
@@ -4,6 +4,7 @@
      class_name_h = class_name.humanize(capitalize: false)
      req_item = safe_join([class_name_h, " with UUID ",
                            raw("<code>"), params[:uuid], raw("</code>")], "")
+     req_item_plain_text = safe_join([class_name_h, " with UUID ", params[:uuid]])
    else
      req_item = "page you requested"
    end
@@ -20,3 +21,12 @@ Perhaps you'd like to
 
 </p>
 
+<p>
+<br/>
+<% error_message = "The #{req_item_plain_text} was not found." %>
+Would you like to report this problem?
+<%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.fullpath, action_method: 'post', error_message: error_message),
+      {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+      <i class="fa fa-fw fa-support"></i> Report problem
+<% end %>
+</p>
diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb
index c1534a1..105af38 100644
--- a/apps/workbench/app/views/application/_report_issue_popup.html.erb
+++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb
@@ -7,9 +7,8 @@
 
   additional_info = {}
   additional_info['Current Location'] = @popup_params[:current_location]
-  if current_user
-    additional_info['User email'] = current_user.email
-  end
+  additional_info['User email'] = current_user.email if current_user
+
   additional_info_str = additional_info.map {|k,v| "#{k}=#{v}"}.join("\n")
 
   additional_info['api_version'] = api_version
@@ -17,6 +16,7 @@
   additional_info['workbench_version'] = wb_version
   additional_info['arvados_base'] = arvados_base
   additional_info['support_email'] = support_email
+  additional_info['error_message'] = @popup_params[:error_message] if @popup_params[:error_message]
 %>
 <div class="modal-dialog modal-with-loading-spinner">
   <div class="modal-content">

commit 85186b89af388cde74441a15d4da62cce22c088d
Author: radhika <radhika at curoverse.com>
Date:   Thu Aug 14 09:40:33 2014 -0400

    3112: simplify report message send logic

diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb
index 85aeae6..c1534a1 100644
--- a/apps/workbench/app/views/application/_report_issue_popup.html.erb
+++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb
@@ -5,22 +5,18 @@
   arvados_base = Rails.configuration.arvados_v1_base
   support_email = Rails.configuration.support_email_address
 
-  additional_info1 = "Current Location: " + @popup_params[:current_location]
-  additional_info1 += ("\nUser's email: " + current_user.email) if current_user
-
   additional_info = {}
   additional_info['Current Location'] = @popup_params[:current_location]
   if current_user
     additional_info['User email'] = current_user.email
   end
-  additional_info_to_s = additional_info.map {|k,v| "#{k}=#{v}"}.join("\n")
+  additional_info_str = additional_info.map {|k,v| "#{k}=#{v}"}.join("\n")
 
-  additional_info_2 = {}
-  additional_info_2['api_version'] = api_version
-  additional_info_2['generated_at'] = generated_at
-  additional_info_2['workbench_version'] = wb_version
-  additional_info_2['arvados_base'] = arvados_base
-  additional_info_2['support_email'] = support_email
+  additional_info['api_version'] = api_version
+  additional_info['generated_at'] = generated_at
+  additional_info['workbench_version'] = wb_version
+  additional_info['arvados_base'] = arvados_base
+  additional_info['support_email'] = support_email
 %>
 <div class="modal-dialog modal-with-loading-spinner">
   <div class="modal-content">
@@ -90,10 +86,9 @@
         <div class="form-group">
           <label for="additional_info" class="col-sm-4 control-label"> Additional info </label>
           <div class="col-sm-8">
-            <textarea readonly class="form-control" rows="1" name="additional_info" type="text"><%=additional_info_to_s%></textarea>
+            <textarea readonly class="form-control" rows="1" name="additional_info" type="text"><%=additional_info_str%></textarea>
         </div>
         <input type="hidden" name="report_additional_info" value="<%=additional_info.to_json%>">
-        <input type="hidden" name="report_additional_info_2" value="<%=additional_info_2.to_json%>">
       </div>
 
       <div class="modal-footer">
diff --git a/apps/workbench/app/views/application/report_issue.js.erb b/apps/workbench/app/views/application/report_issue.js.erb
index bce71b4..6247a3c 100644
--- a/apps/workbench/app/views/application/report_issue.js.erb
+++ b/apps/workbench/app/views/application/report_issue.js.erb
@@ -1,2 +1,2 @@
-$("#user-setup-modal-window").modal("hide");
+$("#report-issue-modal-window").modal("hide");
 document.location.reload();
diff --git a/apps/workbench/app/views/issue_reporter/send_report.text.erb b/apps/workbench/app/views/issue_reporter/send_report.text.erb
index 9b18279..9afd1d2 100644
--- a/apps/workbench/app/views/issue_reporter/send_report.text.erb
+++ b/apps/workbench/app/views/issue_reporter/send_report.text.erb
@@ -1,14 +1,7 @@
 Issue reported by user <%=@user.full_name%> <%=@user.email%>
 
 Details of the report:
-<% @params.each do |k, v| %>
-  <% if k.start_with? 'report_' %>
-    <% if k.start_with? 'report_additional_info' %>
-      <%  json_map = JSON.parse(v).map %>
-      <%  map_to_s = json_map.map {|k,v| "#{k}=#{v}"}.join("\n") %>
+<% json_map = JSON.parse(@params['report_additional_info']).map %>
+<%  map_to_s = json_map.map {|k,v| "#{k}=#{v}"}.join("\n") %>
 <%= map_to_s %>
-    <% else %>
-<%= k %>=<%= v %>
-    <% end %>
-  <% end %>
-<% end %>
+Report text=<%=@params['report_text'] %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list