You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/shixuns/get_data_sets.json.jbuilder

14 lines
647 B

5 years ago
json.data_sets do
json.array! @data_sets do |set|
json.id set.id
json.title set.title
json.author set.author.real_name
json.created_on set.created_on
json.filesize number_to_human_size(set.filesize)
5 years ago
# 这里需要去除shixunfiles目录后的标识因为Jupyter代码里面会写死这样的路径当实训fork后这个版本库的路径无法修改因此给用户展示的
# 还是/data/shixunfiles/+文件名这种形式
json.file_path "#{@absolute_folder}/#{set.relative_path_filename}".gsub("/#{@shixun.identifier}", "")
5 years ago
end
end
json.data_sets_count @data_count
json.folder_name @absolute_folder