diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index db49794..8b3a78b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base def get_conf @config = Hash.new + output = `cat configure.conf`.split("\n") output.each do |t| if t.include? "project_path=" @@ -21,6 +22,8 @@ class ApplicationController < ActionController::Base @config["host_password"] = t.split("host_password=")[1] end end + + return @config end diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index 18ed4e3..02bbf3f 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -18,7 +18,6 @@ class NodeController < ApplicationController new_node = Node.new new_node.host_name = params[:host_name] new_node.host_ip = params[:host_ip] - new_node.host_port = params[:host_port] new_node.user_name = params[:user_name] new_node.user_password = params[:user_password] new_node.save diff --git a/app/views/node/index.html.erb b/app/views/node/index.html.erb index 970aa18..0db0402 100644 --- a/app/views/node/index.html.erb +++ b/app/views/node/index.html.erb @@ -51,14 +51,6 @@ -
- -
- -
-
-
@@ -114,10 +106,9 @@ # Host Name Host IP - Host Port User Name - User Password Date + @@ -127,10 +118,9 @@ <%=t.id%> <%=t.host_name%> <%=t.host_ip%> - <%=t.host_port%> <%=t.user_name%> - <%=t.user_password%> <%=t.created_at%> + <%end%> diff --git a/db/migrate/20160920111650_create_nodes.rb b/db/migrate/20160920111650_create_nodes.rb index d8f37a0..9eb0e74 100644 --- a/db/migrate/20160920111650_create_nodes.rb +++ b/db/migrate/20160920111650_create_nodes.rb @@ -4,7 +4,6 @@ class CreateNodes < ActiveRecord::Migration t.string :host_name t.string :host_ip - t.integer :host_port t.string :user_name t.string :user_password diff --git a/db/schema.rb b/db/schema.rb index 7ea0653..1b31bfa 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -16,7 +16,6 @@ ActiveRecord::Schema.define(version: 20160920111650) do create_table "nodes", force: :cascade do |t| t.string "host_name" t.string "host_ip" - t.integer "host_port" t.string "user_name" t.string "user_password" t.datetime "created_at", null: false