Fixed bug with notification triggering on wrong condition. Also removed old "notific...
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 11 Feb 2014 19:08:25 +0000 (14:08 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 11 Feb 2014 19:08:25 +0000 (14:08 -0500)
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/views/users/_notifications.html.erb [deleted file]

index d26a13ef4257790ab09fae94db97f1db8648ac32..cc452b93cbf6b3c4dfceac5bc533b6a2523038cf 100644 (file)
@@ -311,15 +311,6 @@ class ApplicationController < ActionController::Base
     }
   }
 
-  @@notification_tests.push lambda { |controller, current_user|
-    AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
-      return nil
-    end
-    return lambda { |view|
-      view.render partial: 'notifications/jobs_notification'
-    }
-  }
-
   @@notification_tests.push lambda { |controller, current_user|
     Job.limit(1).where(created_by: current_user.uuid).each do
       return nil
diff --git a/apps/workbench/app/views/users/_notifications.html.erb b/apps/workbench/app/views/users/_notifications.html.erb
deleted file mode 100644 (file)
index 0144dd2..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<% if current_user.andand.is_active %>
-
-<% if @my_ssh_keys.count == 0 || @showallalerts %>
-  <div class="alert alert-info daxalert">
-    <button type="button" class="close" data-dismiss="alert">&times;</button>
-    <%= image_tag "dax.png", class: "dax" %>
-    <div>
-      Hi, I noticed that you have not yet set up an SSH public key for use with Arvados.  
-      <%= link_to "Click here to learn about SSH keys in Arvados.",
-         "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html", 
-         style: "font-weight: bold",
-         target: "_blank" %>
-      When you have an SSH key you would like to use, paste the SSH public key
-      in the text box.
-    </div>
-    <%= form_for AuthorizedKey.new, remote: true do |f| %>
-      <div class="row-fluid">
-        <div class="span12">
-          <%= hidden_field_tag :return_to, request.original_url %>
-          <%= hidden_field_tag :disable_element, 'input[type=submit]' %>
-          <%= f.text_area :public_key, rows: 4, placeholder: "Paste your public key here", style: "width: 100%" %>
-        </div>
-      </div>
-      <div class="row-fluid">
-        <div class="span4 offset8">
-          <%= f.submit :Save, value: raw("&check;"), class: "btn btn-primary pull-right", style: "width: 100%" %>
-        </div>
-      </div>
-    <% end %>
-  </div>
-<% end %>
-
-<% if @my_collections.count == 0 || @showallalerts %>
-<div class="alert alert-info daxalert">
-  <button type="button" class="close" data-dismiss="alert">&times;</button>
-  <%= image_tag "dax.png", class: "dax" %>
-  <p>
-    Hi, I noticed you haven't uploaded a new collection yet. 
-    <%= link_to "Click here to learn how to upload data to Arvados Keep.", 
-       "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-keep.html", 
-       style: "font-weight: bold", target: "_blank" %>
-  </p>
-</div>
-
-<% end %>
-
-<% if @my_jobs.count == 0 || @showallalerts %>
-<div class="alert alert-info daxalert">
-  <button type="button" class="close" data-dismiss="alert">&times;</button>  
-  <p><%= image_tag "dax.png", class: "dax" %>
-    Hi, I noticed you haven't run a job yet. 
-    <%= link_to "Click here to learn how to run an Arvados Crunch job.", 
-       "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-job1.html", 
-       style: "font-weight: bold",
-       target: "_blank" %>
-  </p>
-</div>
-<% end %>
-
-<% if @my_pipelines.count == 0 || @showallalerts %>
-<div class="alert alert-info daxalert">
-  <button type="button" class="close" data-dismiss="alert">&times;</button>
-
-</div>
-<% end %>
-
-<% end %>
-
-<!--
-<% if current_user.andand.is_active %>
-<div class="well">
-  <p><strong>System status</strong></p>
-    <table>
-      <% [Human, Trait, Collection, PipelineTemplate,
-         PipelineInstance].each do |aclass| %>
-       <tr>
-         <td>
-           <span style="margin-right: 2em">
-             <a href="/<%= raw(aclass.to_s.pluralize.underscore) %>">
-               <%= raw(aclass.to_s.pluralize.underscore.capitalize.gsub '_', '&nbsp;') %>
-             </a>
-           </span>
-         </td>
-         <td>
-            <%= aclass.limit(0).where({}).items_available ||
-                aclass.limit(4000).where({}).count %>
-          </td>
-       </tr>
-      <% end %>
-    </table>
-</div>
-<% end %>
--->