add volume info
This commit is contained in:
parent
22a2389c12
commit
e008bd3bab
@ -1,6 +1,22 @@
|
||||
class VolumnController < ApplicationController
|
||||
def info
|
||||
@output = get_info.split("\n")
|
||||
@volumes = Array.new
|
||||
volume = Hash.new
|
||||
i = 0
|
||||
output = get_info.split("\n")
|
||||
for t in 1..(output.length-1)
|
||||
if output[t].include? ":"
|
||||
temp = output[t].split(":")
|
||||
|
||||
volume[temp[0]] = temp[1]
|
||||
else
|
||||
@volumes[i] = volume
|
||||
volume = Hash.new
|
||||
i+=1
|
||||
end
|
||||
end
|
||||
@volumes[i] = volume
|
||||
puts @volumes
|
||||
end
|
||||
|
||||
def get_info
|
||||
|
@ -23,10 +23,12 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
|
||||
<%@volumes.each do |t|%>
|
||||
<div class="col-md-12 col-sm-1 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>Infomation <small>volumn</small></h2>
|
||||
<h2>Infomation <small><%=t["Volume Name"]%></small></h2>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
@ -45,12 +47,20 @@
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<%@output.each do |t|%>
|
||||
<%=t%> </br>
|
||||
Type : <%=t["Type"]%> <br>
|
||||
Volume ID : <%=t["Volume ID"]%> <br>
|
||||
Status : <%=t["Status"]%> <br>
|
||||
Number of Bricks : <%=t["Number of Bricks"]%> <br>
|
||||
Transport-type : <%=t["Transport-type"]%> <br>
|
||||
Bricks : <%=t["Bricks"]%> <br>
|
||||
Bricks1 : <%=t["Brick1"]%> <br>
|
||||
Options Reconfigured : <%=t["Options Reconfigured"]%> <br>
|
||||
performance.readdir-ahead : <%=t["performance.readdir-ahead"]%> <br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user