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.
|
|
|
|
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)
|
|
|
|
|
# 这里需要去除shixunfiles目录后的标识;因为Jupyter代码里面会写死这样的路径,当实训fork后,这个版本库的路径无法修改,因此给用户展示的
|
|
|
|
|
# 还是/data/shixunfiles/+文件名这种形式
|
|
|
|
|
json.file_path "#{@absolute_folder}/#{set.relative_path_filename}".gsub("/#{@shixun.identifier}", "")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
json.data_sets_count @data_count
|
|
|
|
|
json.folder_name @absolute_folder
|