update
This commit is contained in:
parent
e9d72c6fc5
commit
418fbf93d8
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -51,14 +51,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="number">Host Port <span class="required">*</span>
|
||||
</label>
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<input type="number" id="number" name="host_port" required="required" data-validate-length-range="4" data-validate-minmax="0,9999" placeholder="0~9999" class="form-control col-md-7 col-xs-12">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">User Name <span class="required">*</span>
|
||||
</label>
|
||||
@ -114,10 +106,9 @@
|
||||
<th>#</th>
|
||||
<th>Host Name</th>
|
||||
<th>Host IP</th>
|
||||
<th>Host Port</th>
|
||||
<th>User Name</th>
|
||||
<th>User Password</th>
|
||||
<th>Date</th>
|
||||
<!-- <th></th>-->
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -127,10 +118,9 @@
|
||||
<th scope="row"><%=t.id%></th>
|
||||
<td><%=t.host_name%></td>
|
||||
<td><%=t.host_ip%></td>
|
||||
<td><%=t.host_port%></td>
|
||||
<td><%=t.user_name%></td>
|
||||
<td><%=t.user_password%></td>
|
||||
<td><%=t.created_at%></td>
|
||||
<!-- <td><i class="fa fa-pencil"></i></td>-->
|
||||
<td><a href="/node/delete/<%=t.id%>"><i class="fa fa-trash"></i></a></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user