Web interface

This commit is contained in:
Gregory Eremin
2013-06-06 21:48:46 +04:00
parent 802fe508ea
commit 1c26921387
13 changed files with 478 additions and 18 deletions
@@ -2,13 +2,16 @@
<html>
<head>
<title>RakeControlWeb</title>
<%= stylesheet_link_tag "rake_control_web/application", :media => "all" %>
<%= javascript_include_tag "rake_control_web/application" %>
<%= stylesheet_link_tag 'rake_control_web/application', media: 'all' %>
<%= javascript_include_tag 'rake_control_web/application' %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<div class="row">
<div class="large-12 columns">
<h2 class="subheader">Rake Control Dashboard</h2>
<%= yield %>
</div>
</div>
</body>
</html>
@@ -0,0 +1,22 @@
<table>
<thead>
<tr>
<th>Task</th>
<th>Last Run</th>
<th>Took</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @tasks.each do |run| %>
<tr>
<td style="color: <%= run.success ? 'green' : 'red' %>"><%= run.name %></td>
<td><%= time_ago_in_words(run.created_at) %> ago</td>
<td><%= run.execution_time.round(6) %>s</td>
<td><%= link_to 'Run', run_task_path(run.name, back: tasks_path), class: 'radius button' %></td>
<td><%= link_to 'History', task_runs_path(run.name), class: 'secondary radius button' %></td>
</tr>
<% end %>
</tbody>
</table>