Changeset View
Changeset View
Standalone View
Standalone View
swh/scanner/dashboard/dashboard.py
Show All 14 Lines | |||||
from dash.dependencies import Input, Output | from dash.dependencies import Input, Output | ||||
def generate_table_body(dir_path: PosixPath, source: Tree): | def generate_table_body(dir_path: PosixPath, source: Tree): | ||||
""" | """ | ||||
Generate the data_table from the path taken from the chart. | Generate the data_table from the path taken from the chart. | ||||
For each file builds the html table rows showing the known status, a local link to | For each file builds the html table rows showing the known status, a local link to | ||||
the file and the relative Software Heritage Persistent Identifier. | the file and the relative SoftWare Heritage persistent IDentifier (SWHID). | ||||
""" | """ | ||||
data = [] | data = [] | ||||
for file_info in source.getFilesFromDir(dir_path): | for file_info in source.getFilesFromDir(dir_path): | ||||
for file_path, attr in file_info.items(): | for file_path, attr in file_info.items(): | ||||
file_path = PosixPath(file_path) | file_path = PosixPath(file_path) | ||||
file_name = file_path.parts[len(file_path.parts) - 1] | file_name = file_path.parts[len(file_path.parts) - 1] | ||||
data.append( | data.append( | ||||
html.Tr( | html.Tr( | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |