This commit is contained in:
bee0005
2016-09-21 09:12:46 +00:00
parent e9d72c6fc5
commit 418fbf93d8
5 changed files with 5 additions and 15 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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%>