module VolumeHelper def 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 << "
Volume Info
" # volume_info html << "" html << t + " : " + volume[t] html << "
" end html << "Uploader Activated
" html << "" html << "Uploader Inactivated
" html << "" html << "Name | " html << "auth | " html << "" html << " |
---|---|---|
" html << " #{@current_dir}" html << " | " html << "" html << " | " html << " | " html << " #{file['name']}" html << " | " html << "#{file['auth']}" html << " | " html << "" html << "" html << " | " html << "" end end html << "" html << "