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.
|
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:
|
Setup:
|
||||||
1. Clone this repo : git clone
|
1. Clone this repo : git clone
|
||||||
https://github.com/iogbole/gentelella_on_rails.git
|
https://github.com/iogbole/gentelella_on_rails.git
|
||||||
|
@ -3,20 +3,24 @@ class VolumnController < ApplicationController
|
|||||||
@volumes = Array.new
|
@volumes = Array.new
|
||||||
volume = Hash.new
|
volume = Hash.new
|
||||||
i = 0
|
i = 0
|
||||||
output = get_info.split("\n")
|
|
||||||
for t in 1..(output.length-1)
|
if get_info.blank?
|
||||||
if output[t].include? ":"
|
flash[:danger] = "Check Server"
|
||||||
temp = output[t].split(":")
|
else
|
||||||
|
output = get_info.split("\n")
|
||||||
volume[temp[0]] = temp[1]
|
for t in 1..(output.length-1)
|
||||||
else
|
if output[t].include? ":"
|
||||||
@volumes[i] = volume
|
temp = output[t].split(":")
|
||||||
volume = Hash.new
|
volume[temp[0]] = temp[1]
|
||||||
i+=1
|
else
|
||||||
end
|
@volumes[i] = volume
|
||||||
|
volume = Hash.new
|
||||||
|
i+=1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@volumes[i] = volume
|
||||||
|
puts @volumes
|
||||||
end
|
end
|
||||||
@volumes[i] = volume
|
|
||||||
puts @volumes
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_info
|
def get_info
|
||||||
|
Loading…
Reference in New Issue
Block a user