module HomeHelper def html_file_manager_table(dir = @current_dir, id = "file_manager_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 << "" html << "" html << "" files(dir).each do |file| html << "" if file["auth"][0]=='d' html << "" else conv_name = (dir + '/' + file['name']).gsub("/", "+") html << "" end html << "" html << "" html << "" html << "" end html << "" html << "
NameauthSizeDate
" html << " " html << "#{dir}" html << "" html << "
" html << " #{file['name']}" html << "" html << " #{file['name']}" html << "#{file['auth']}#{file['size']}#{file["date"]}" html << "" html << "
" return html end def html_disk_usage_table(dir = @current_dir, id = "disk_usage_table") html = String.new html << "" html << "" html << "" html << "" html << "" html << "" html << "
" html << "

Chart

" html << "
" html << "
" html << "

Name

" html << "
" html << "

Usage

" html << "
" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" get_du(dir).each_with_index do |file, index| color = ['blue', 'green', 'red', 'purple', 'grey'][index % 5] html << "" end html << "" html << "
" html << "
" html << "

" html << file['file_name'] html << "

" html << "
" html << "
" html << "

" html << format("%.2f", file['usage']*100) + "%" html << "

" html << "
" html << "
" return html end def html_disk_file_table(dir = @current_dir, id = "disk_file_table") html = String.new html << "" html << "" html << "" html << "" html << "" html << "" html << "
" html << "

Chart

" html << "
" html << "
" html << "

Name

" html << "
" html << "

Usage

" html << "
" html << "" html << "" html << "" html << "" html << "" html << "" html << "" html << "" get_df.each_with_index do |file, index| color = ['blue', 'green', 'red', 'purple', 'grey'][index % 5] html << "" end html << "" html << "
" html << "
" html << "

" html << file['Filesystem'] html << "

" html << "
" html << "
" html << "

" html << format((file["Use%"][0..file["Use%"].length - 1])) + "%" html << "

" html << "
" html << "
" return html end end