Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/utils.py
Show All 28 Lines | |||||
from swh.web.common.exc import BadInputExc | from swh.web.common.exc import BadInputExc | ||||
from swh.web.common.typing import QueryParameters | from swh.web.common.typing import QueryParameters | ||||
from swh.web.config import get_config | from swh.web.config import get_config | ||||
SWH_WEB_METRICS_REGISTRY = CollectorRegistry(auto_describe=True) | SWH_WEB_METRICS_REGISTRY = CollectorRegistry(auto_describe=True) | ||||
swh_object_icons = { | swh_object_icons = { | ||||
"branch": "fa fa-code-fork", | "branch": "mdi mdi-source-branch", | ||||
"branches": "fa fa-code-fork", | "branches": "mdi mdi-source-branch", | ||||
"content": "fa fa-file-text", | "content": "mdi mdi-file-document", | ||||
"directory": "fa fa-folder", | "directory": "mdi mdi-folder", | ||||
"person": "fa fa-user", | "person": "mdi mdi-account", | ||||
"revisions history": "fa fa-history", | "revisions history": "mdi mdi-history", | ||||
"release": "fa fa-tag", | "release": "mdi mdi-tag", | ||||
"releases": "fa fa-tag", | "releases": "mdi mdi-tag", | ||||
"revision": "octicon-git-commit", | "revision": "mdi mdi-rotate-90 mdi-source-commit", | ||||
"snapshot": "fa fa-camera", | "snapshot": "mdi mdi-camera", | ||||
"visits": "fa fa-calendar", | "visits": "mdi mdi-calendar-month", | ||||
} | } | ||||
def reverse( | def reverse( | ||||
viewname: str, | viewname: str, | ||||
url_args: Optional[Dict[str, Any]] = None, | url_args: Optional[Dict[str, Any]] = None, | ||||
query_params: Optional[QueryParameters] = None, | query_params: Optional[QueryParameters] = None, | ||||
current_app: Optional[str] = None, | current_app: Optional[str] = None, | ||||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |