88978ef148530cd7680fb57c623744f06e4f2b9a
[arvados.git] / apps / workbench / app / views / users / _notifications.html.erb
1 <% if current_user.andand.is_active %>
2
3 <% if @my_ssh_keys.count == 0 || @showallalerts %>
4   <div class="alert alert-info daxalert">
5     <button type="button" class="close" data-dismiss="alert">&times;</button>
6     <%= image_tag "dax.png", class: "dax" %>
7     <div>
8       Hi, I noticed that you have not yet set up an SSH public key for use with Arvados.  
9       <%= link_to "Click here to learn about SSH keys in Arvados.",
10           "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html", 
11           style: "font-weight: bold",
12           target: "_blank" %>
13       When you have an SSH key you would like to use, paste the SSH public key
14       in the text box.
15     </div>
16       <%= form_for AuthorizedKey.new do |f| %>
17         <%= hidden_field_tag :return_to, request.original_url %>
18         <%= f.text_area :public_key, cols: 50, rows: 4, placeholder: "Paste your public key here", style: "width: 100%" %>
19         <%= f.submit :Save, value: raw("&check;"), class: "btn btn-primary pull-right" %>
20       <% end %>
21   </div>
22 <% end %>
23
24 <% if @my_collections.count == 0 || @showallalerts %>
25 <div class="alert alert-info daxalert">
26   <button type="button" class="close" data-dismiss="alert">&times;</button>
27   <%= image_tag "dax.png", class: "dax" %>
28   <p>
29     Hi, I noticed you haven't uploaded a new collection yet. 
30     <%= link_to "Click here to learn how to upload data to Arvados Keep.", 
31         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-keep.html", 
32         style: "font-weight: bold", target: "_blank" %>
33   </p>
34 </div>
35
36 <% end %>
37
38 <% if @my_jobs.count == 0 || @showallalerts %>
39 <div class="alert alert-info daxalert">
40   <button type="button" class="close" data-dismiss="alert">&times;</button>  
41   <p><%= image_tag "dax.png", class: "dax" %>
42     Hi, I noticed you haven't run a job yet. 
43     <%= link_to "Click here to learn how to run an Arvados Crunch job.", 
44         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-job1.html", 
45         style: "font-weight: bold",
46         target: "_blank" %>
47   </p>
48 </div>
49 <% end %>
50
51 <% if @my_pipelines.count == 0 || @showallalerts %>
52 <div class="alert alert-info daxalert">
53   <button type="button" class="close" data-dismiss="alert">&times;</button>
54   <p><%= image_tag "dax.png", class: "dax" %>
55     Hi, I noticed you haven't run a pipeline yet.  
56     <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.", 
57         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-new-pipeline.html", 
58         style: "font-weight: bold",
59         target: "_blank" %>
60   </p>
61 </div>
62 <% end %>
63
64 <% end %>
65
66 <div class="well">
67   <p><strong>Useful links</strong></p>
68   <p><ul>
69       <li><%= link_to "Arvados project page", "http://arvados.org", target: "_blank" %></li>
70       <li><%= link_to "Tutorials and user guide",
71       "#{Rails.configuration.arvados_docsite}/user/", target: "_blank" %></li>
72     </ul>
73   </p>
74 </div>
75
76 <% if current_user.andand.is_active %>
77 <div class="well">
78   <p><strong>System status</strong></p>
79     <table>
80       <% [Human, Trait, Collection, PipelineTemplate,
81           PipelineInstance].each do |aclass| %>
82         <tr>
83           <td>
84             <span style="margin-right: 2em">
85               <a href="/<%= raw(aclass.to_s.pluralize.underscore) %>">
86                 <%= raw(aclass.to_s.pluralize.underscore.capitalize.gsub '_', '&nbsp;') %>
87               </a>
88             </span>
89           </td>
90           <td>
91             <%= aclass.limit(0).where({}).items_available ||
92                 aclass.limit(4000).where({}).count %>
93           </td>
94         </tr>
95       <% end %>
96     </table>
97 </div>
98 <% end %>