--- /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 Nodes controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
--- /dev/null
+body {
+ background-color: #fff;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px;
+}
+
+a {
+ color: #000;
+ &:visited {
+ color: #666;
+ }
+ &:hover {
+ color: #fff;
+ background-color: #000;
+ }
+}
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px;
+ }
+}
+
+#notice {
+ color: green;
+}
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table;
+}
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff;
+ }
+ ul li {
+ font-size: 12px;
+ list-style: square;
+ }
+}
--- /dev/null
+class NodesController < ApplicationController
+end
--- /dev/null
+module NodesHelper
+end
--- /dev/null
+class Node < ArvadosBase
+ attr_accessor :object
+end
<ul class="dropdown-menu">
<li><%= link_to 'Users', users_path %></li>
<li><%= link_to 'Groups', groups_path %></li>
+ <li><%= link_to 'Nodes', nodes_path %></li>
</ul>
</li>
<% end %>
ArvadosWorkbench::Application.routes.draw do
+ resources :nodes
+
+
resources :humans
--- /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 NodesControllerTest < ActionController::TestCase
+ setup do
+ @node = nodes(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:nodes)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create node" do
+ assert_difference('Node.count') do
+ post :create, node: { }
+ end
+
+ assert_redirected_to node_path(assigns(:node))
+ end
+
+ test "should show node" do
+ get :show, id: @node
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @node
+ assert_response :success
+ end
+
+ test "should update node" do
+ put :update, id: @node, node: { }
+ assert_redirected_to node_path(assigns(:node))
+ end
+
+ test "should destroy node" do
+ assert_difference('Node.count', -1) do
+ delete :destroy, id: @node
+ end
+
+ assert_redirected_to nodes_path
+ end
+end
--- /dev/null
+require 'test_helper'
+
+class NodesHelperTest < ActionView::TestCase
+end
--- /dev/null
+require 'test_helper'
+
+class NodeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end