update
This commit is contained in:
parent
0b28a0c5dc
commit
7a757e10b1
@ -2,6 +2,11 @@
|
||||
---------------------------
|
||||
Rails 4 implementation of the awesome [Gentelella](https://github.com/puikinsh/gentelella) Bootstrap admin template.
|
||||
|
||||
Requirement:
|
||||
1. ruby(2.2.3)
|
||||
2. rails
|
||||
3. sshpass
|
||||
|
||||
Setup:
|
||||
1. Clone this repo : git clone
|
||||
https://github.com/iogbole/gentelella_on_rails.git
|
||||
|
@ -3,20 +3,24 @@ class VolumnController < ApplicationController
|
||||
@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
|
||||
|
||||
if get_info.blank?
|
||||
flash[:danger] = "Check Server"
|
||||
else
|
||||
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
|
||||
@volumes[i] = volume
|
||||
puts @volumes
|
||||
end
|
||||
|
||||
def get_info
|
||||
|
Loading…
Reference in New Issue
Block a user