Commit faac140e authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

Merge branch 'master' of gitlab.inria.fr:allgo/allgo

parents 03eca6b8 5957bf0b
......@@ -73,9 +73,6 @@
<li>
<%= link_to 'My account', edit_user_registration_path %>
</li>
<li>
<%= link_to 'My jobs', show_jobs_user_path %>
</li>
<li>
<%= link_to 'Quotas of my apps', quotas_path %>
</li>
......
<%= render 'users/menu' %>
<div class="container">
<div class="row">
<div class="col-md-10">
<h2>My jobs</h2>
</div>
<div class="col-md-2 margin-20">
<%= link_to "Create my job", new_job_path, class: 'btn btn-success pull-right' %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<br />
<table class="table table-hover table-condensed" style="th text-align:center;">
<thead>
<tr>
<th>Id</th>
<th>App</th>
<th>Files</th>
<th>Status</th>
<th>Date</th>
<th>Parameters</th>
<% if current_user && current_user.admin? %>
<th></th>
<th></th>
<% end %>
</tr>
</thead>
<tbody>
<% @jobs.each do |job| %>
<tr>
<td><%= job.id%></td>
<td><%= job.webapp.name.capitalize %></td>
<!--<td>< %= File.basename(job.datafile).truncate(30) if job.datafile %></td> -->
<td><%= job.state %></td>
<td><%= job.updated_at.strftime("%e/%m/%Y, %H:%M") %></td> <!-- TODO changer en fonction de la localisation -->
<td>
<% if job.param %>
<%= job.param.truncate(30) %>
<% end %>
</td>
<td><%= link_to 'Show', job, class: 'btn btn-primary' %></td>
<% if current_user && current_user.admin? %>
<td><%= link_to 'Edit', edit_job_path(job), class: 'btn btn-warning' %></td>
<td><%= link_to 'Destroy', job, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %></td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
......@@ -31,4 +31,16 @@ if Rails.env.development?
# auth_token: 37010bc3b9834f28ae6dd5023c5efb4a
)
User.create(
email: "benoit.guillou@inria.fr",
password: "qzfyplzfy;rsty;l",
encrypted_password: "$2a$10$j1t6f..YD784kcfyB4wksuZjt6y6Q.lCuIcv.2E6noZSFxfAf2ni6",
admin: 1,
sshkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOT2kQqfsp9jqExS39v8/fV0+gh9RW27hN+Ef8yCwoMeEhWlcBX8MtEnpMjpkbNq84b16sR2mmA5ZpD6s6H1FK2R8ArZGrRiuHtbhbbrovBz86Z1pkO5Y8HF4ouNf/dwlOY/Vrp+1ybIdAIkBhwbObJOubUgWBnp4cuaJ3WClHJZB8HON7P0DNNtDJMbhzc8g8MRUMniq4wI+MmREtBuDnMolczPgElA6gIZ6XMEPzp9HGhfg3DPur/lzk691yIQzx5dqEKfEsrlekGWG7pk4dES80daPHNbL86BVl7mRm3O5d9ZDICbQMa6IyEqGEn3rQiUViymDui3vxFCkT7yKF",
created_at: now,
confirmed_at: now,
# auth_token: 37010bc3b9834f28ae6dd5023c5efb4a
)
end
require "socket"
require 'timeout'
module DockerAdapter
def self.notify
Timeout.timeout(0.5) do
begin
host, port = Rails.configuration.docker_adapter
sock = TCPSocket.new(host, port)
......@@ -11,5 +13,7 @@ module DockerAdapter
rescue Exception => e
Rails.logger.error "failed to notify the docker controller: #{e}"
end
end
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment