--- /dev/null
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
--- /dev/null
+// Place all the styles related to the VirtualMachines controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
--- /dev/null
+class VirtualMachinesController < ApplicationController
+end
--- /dev/null
+module VirtualMachinesHelper
+end
--- /dev/null
+class VirtualMachine < ArvadosBase
+end
<ul class="nav">
<% [
[true, 'Keys', authorized_keys_path],
+ [true, 'VMs', virtual_machines_path],
[true, 'Data', collections_path],
[true, 'Groups', groups_path],
[true, 'Pipeline Templates', pipeline_templates_path],
--- /dev/null
+<table class="table">
+ <thead>
+ <tr class="contain-align-left">
+ <th>
+ id
+ </th><th>
+ owner
+ </th><th>
+ hostname
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <% @objects.sort_by { |vm| vm[:hostname] }.each do |vm| %>
+
+ <tr>
+ <td>
+ <%= link_to_if_arvados_object vm %>
+ </td><td>
+ <%= render_editable_attribute vm, 'owner' %>
+ </td><td>
+ <%= render_editable_attribute vm, 'hostname' %>
+ </td>
+ </tr>
+
+ <% end %>
+ <% if @objects.count == 0 %>
+ <tr>
+ <td colspan="7">
+ (no VMs)
+ </td>
+ </tr>
+ <% end %>
+
+ </tbody>
+</table>
+
+<% if current_user and current_user.is_admin %>
+<%= button_to "Add a new VM", { action: 'create', return_to: './' }, { class: 'btn btn-primary' } %>
+<% end %>
--- /dev/null
+<%= render :partial => 'application/arvados_object' %>
ArvadosWorkbench::Application.routes.draw do
+ resources :virtual_machines
+
+
resources :authorized_keys
--- /dev/null
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
--- /dev/null
+require 'test_helper'
+
+class VirtualMachinesControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
--- /dev/null
+require 'test_helper'
+
+class VirtualMachinesHelperTest < ActionView::TestCase
+end
--- /dev/null
+require 'test_helper'
+
+class VirtualMachineTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end