module VolumeHelper def html_volume_info(volume, index) params = ['Type', 'Volume ID', 'Status', 'Number of Bricks', 'Transport-type', 'Bricks', 'Options Reconfigured', 'Mount State', 'Mount Point'] arrow = ((index == 0) ? "up" : "down") display = ((index != 0) ? "style='display: none;'" : "") lights = [] lights << ((volume['Status'].eql? " Stopped" or volume['Status'].eql? " Created") ? "red" : "") lights << ((!volume['Mount State'].eql? "mounted" and volume['Status'].eql? " Started") ? "blue" : "") lights << ((volume['Mount State'].eql? "mounted") ? "green" : "") html = '' html << "
" html << "
" html << "
" # left title html << "

Infomation #{volume['Volume Name']}

" # right title html << "" html << "
" html << "
" html << "
" # left content html << "
" html << "
" html << "

Volume Info

" # volume_info html << "
" params.each do |t| next if volume[t].nil? html << "

" html << t + " : " + volume[t] html << "

" end html << "
" html << "
" # buttons if volume["Mount State"] == "mounted" html << "" elsif volume["Status"] == " Started" html << "" # need to fix this a tag to button html << "" html << " Mount" html << "" else html << "" html << "" end html << "
" # right content html << "
" if volume["Mount State"] == "mounted" html << "

Uploader Activated

" html << "
" html << "
" html << "
" else html << "

Uploader Inactivated

" html << "
" html << "
" html << "
" end html << "
" html << "
" html << "
" html << "
" return html end def html_mount_table(dir = @current_dir, id = "mount_table", class_option = "table table-striped table-bordered jambo_table") html = String.new html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" files(dir).each do |file| if file["auth"][0]=='d' html << "" html << "" html << "" html << "" end end html << "" html << "
Nameauth
" html << " #{@current_dir}" html << "
" html << " #{file['name']}" html << "#{file['auth']}" html << "" html << "
" html << "" html << "" html << "
" html << "
" return html end end