Changeset View
Changeset View
Standalone View
Standalone View
swh/scanner/dashboard/dashboard.py
Show All 17 Lines | |||||
def generate_table_body(dir_path: Path, source: Tree): | def generate_table_body(dir_path: Path, 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 (SWHID). | 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.get_files_from_dir(dir_path): | ||||
for file_path, attr in file_info.items(): | for file_path, attr in file_info.items(): | ||||
file_path = Path(file_path) | file_path = Path(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( | ||||
[ | [ | ||||
html.Td("✔" if attr["known"] else ""), | html.Td("✔" if attr["known"] else ""), | ||||
html.Td( | html.Td( | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |