diff --git a/swh/web/assets/src/bundles/webapp/webapp.css b/swh/web/assets/src/bundles/webapp/webapp.css --- a/swh/web/assets/src/bundles/webapp/webapp.css +++ b/swh/web/assets/src/bundles/webapp/webapp.css @@ -558,7 +558,6 @@ overflow-y: auto; overflow-x: auto; padding: 0; - padding-right: 1.4em; } @media screen and (min-width: 768px) { @@ -567,18 +566,9 @@ } } -.swh-metadata-table-row { - border-top: 1px solid #ddd !important; -} - -.swh-metadata-table-key { - min-width: 200px; - max-width: 200px; - width: 200px; -} - -.swh-metadata-table-value pre { +.swh-popover pre { white-space: pre-wrap; + margin-bottom: 0; } .d3-wrapper { diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py --- a/swh/web/browse/snapshot_context.py +++ b/swh/web/browse/snapshot_context.py @@ -19,7 +19,6 @@ content_display_max_size, format_log_entries, gen_content_link, - gen_directory_link, gen_release_link, gen_revision_link, gen_revision_log_link, @@ -787,11 +786,6 @@ sum_file_sizes = filesizeformat(sum_file_sizes) dir_path = "/" + path - browse_dir_link = gen_directory_link(sha1_git) - - browse_rev_link = gen_revision_link(revision_id) - browse_snp_link = gen_snapshot_link(snapshot_id) - revision_found = True if sha1_git is None and revision_id is not None: try: @@ -812,16 +806,13 @@ visit_type = visit_info["type"] release_id = snapshot_context["release_id"] - browse_rel_link = None if release_id: swh_objects.append(SWHObjectInfo(object_type=RELEASE, object_id=release_id)) - browse_rel_link = gen_release_link(release_id) dir_metadata = DirectoryMetadata( object_type=DIRECTORY, object_id=sha1_git, directory=sha1_git, - directory_url=browse_dir_link, nb_files=nb_files, nb_dirs=nb_dirs, sum_file_sizes=sum_file_sizes, @@ -829,11 +820,8 @@ path=dir_path, revision=revision_id, revision_found=revision_found, - revision_url=browse_rev_link, release=release_id, - release_url=browse_rel_link, snapshot=snapshot_id, - snapshot_url=browse_snp_link, origin_url=origin_url, visit_date=visit_date, visit_type=visit_type, @@ -982,10 +970,6 @@ query_params={"filename": filename}, ) - browse_rev_link = gen_revision_link(revision_id) - - browse_dir_link = gen_directory_link(directory_id) - content_checksums = content_data.get("checksums", {}) swh_objects = [ @@ -1002,10 +986,8 @@ visit_type = visit_info["type"] release_id = snapshot_context["release_id"] - browse_rel_link = None if release_id: swh_objects.append(SWHObjectInfo(object_type=RELEASE, object_id=release_id)) - browse_rel_link = gen_release_link(release_id) content_metadata = ContentMetadata( object_type=CONTENT, @@ -1023,13 +1005,9 @@ path=f"/{filepath}", filename=filename, directory=directory_id, - directory_url=browse_dir_link, revision=revision_id, - revision_url=browse_rev_link, release=release_id, - release_url=browse_rel_link, snapshot=snapshot_id, - snapshot_url=gen_snapshot_link(snapshot_id), origin_url=origin_url, visit_date=visit_date, visit_type=visit_type, diff --git a/swh/web/browse/views/content.py b/swh/web/browse/views/content.py --- a/swh/web/browse/views/content.py +++ b/swh/web/browse/views/content.py @@ -18,7 +18,6 @@ from swh.web.browse.snapshot_context import get_snapshot_context from swh.web.browse.utils import ( content_display_max_size, - gen_directory_link, gen_link, prepare_content_for_display, request_content, @@ -252,7 +251,6 @@ filename = None path_info = None directory_id = None - directory_url = None root_dir = None if snapshot_context: @@ -295,9 +293,6 @@ else: root_dir = None - if directory_id: - directory_url = gen_directory_link(directory_id) - query_params = {"filename": filename} content_checksums = content_data.get("checksums", {}) @@ -326,7 +321,6 @@ path=f"/{path}" if path else None, filename=filename or "", directory=directory_id, - directory_url=directory_url, revision=None, release=None, snapshot=None, diff --git a/swh/web/browse/views/release.py b/swh/web/browse/views/release.py --- a/swh/web/browse/views/release.py +++ b/swh/web/browse/views/release.py @@ -17,7 +17,6 @@ gen_person_mail_link, gen_release_link, gen_revision_link, - gen_snapshot_link, ) from swh.web.common import archive from swh.web.common.exc import NotFoundExc @@ -73,27 +72,12 @@ elif snapshot_id: snapshot_context = get_snapshot_context(snapshot_id) - target_url = None - if release["target_type"] == REVISION: - target_url = gen_revision_link(release["target"]) - elif release["target_type"] == CONTENT: - target_url = gen_content_link(release["target"]) - elif release["target_type"] == DIRECTORY: - target_url = gen_directory_link(release["target"]) - elif release["target_type"] == RELEASE: - target_url = gen_release_link(release["target"]) - - snapshot_id = None - browse_snp_link = None - if snapshot_context: - snapshot_id = snapshot_context["snapshot_id"] - browse_snp_link = gen_snapshot_link(snapshot_id) + snapshot_id = snapshot_context.get("snapshot_id", None) release_metadata = ReleaseMetadata( object_type=RELEASE, object_id=sha1_git, release=sha1_git, - release_url=gen_release_link(release["id"]), author=release["author"]["fullname"] if release["author"] else "None", author_url=gen_person_mail_link(release["author"]) if release["author"] @@ -103,9 +87,7 @@ synthetic=release["synthetic"], target=release["target"], target_type=release["target_type"], - target_url=target_url, - snapshot=snapshot_context.get("snapshot_id", None), - snapshot_url=browse_snp_link, + snapshot=snapshot_id, origin_url=origin_url, ) diff --git a/swh/web/browse/views/revision.py b/swh/web/browse/views/revision.py --- a/swh/web/browse/views/revision.py +++ b/swh/web/browse/views/revision.py @@ -18,12 +18,9 @@ from swh.web.browse.utils import ( content_display_max_size, format_log_entries, - gen_directory_link, gen_link, gen_person_mail_link, - gen_revision_link, gen_revision_url, - gen_snapshot_link, get_directory_entries, get_readme_to_display, get_revision_log_url, @@ -374,7 +371,6 @@ object_type=REVISION, object_id=sha1_git, revision=sha1_git, - revision_url=gen_revision_link(sha1_git), author=revision["author"]["fullname"] if revision["author"] else "None", author_url=gen_person_mail_link(revision["author"]) if revision["author"] @@ -388,7 +384,6 @@ committer_date=format_utc_iso_date(revision["committer_date"]), date=format_utc_iso_date(revision["date"]), directory=revision["directory"], - directory_url=gen_directory_link(revision["directory"]), merge=revision["merge"], metadata=json.dumps( revision["metadata"], sort_keys=True, indent=4, separators=(",", ": ") @@ -397,7 +392,6 @@ synthetic=revision["synthetic"], type=revision["type"], snapshot=snapshot_id, - snapshot_url=gen_snapshot_link(snapshot_id) if snapshot_id else None, origin_url=origin_url, ) diff --git a/swh/web/common/typing.py b/swh/web/common/typing.py --- a/swh/web/common/typing.py +++ b/swh/web/common/typing.py @@ -157,10 +157,6 @@ origin_url: Optional[str] visit_date: Optional[str] visit_type: Optional[str] - directory_url: Optional[str] - revision_url: Optional[str] - release_url: Optional[str] - snapshot_url: Optional[str] class ContentMetadata(SWHObjectInfo, SWHObjectInfoMetadata): @@ -204,7 +200,6 @@ synthetic: bool target: str target_type: str - target_url: str snapshot: Optional[str] diff --git a/swh/web/templates/includes/show-metadata.html b/swh/web/templates/includes/show-metadata.html --- a/swh/web/templates/includes/show-metadata.html +++ b/swh/web/templates/includes/show-metadata.html @@ -7,31 +7,23 @@ {% load swh_templatetags %} - -