Changeset View
Changeset View
Standalone View
Standalone View
swh/web/ui/backend.py
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | def stat_counters(): | ||||
"""Return the stat counters for Software Heritage | """Return the stat counters for Software Heritage | ||||
Returns: | Returns: | ||||
A dict mapping textual labels to integer values. | A dict mapping textual labels to integer values. | ||||
""" | """ | ||||
return main.storage().stat_counters() | return main.storage().stat_counters() | ||||
def stat_origin_visits(origin_id): | |||||
"""Return the dates at which the given origin was scanned for content. | |||||
Returns: | |||||
An array of dates | |||||
""" | |||||
return main.storage().origin_visit_get(origin_id) | |||||
def revision_get_by(origin_id, branch_name, timestamp): | def revision_get_by(origin_id, branch_name, timestamp): | ||||
"""Return occurrence information matching the criterions origin_id, | """Return occurrence information matching the criterions origin_id, | ||||
branch_name, ts. | branch_name, ts. | ||||
""" | """ | ||||
res = main.storage().revision_get_by(origin_id, | res = main.storage().revision_get_by(origin_id, | ||||
branch_name, | branch_name, | ||||
timestamp=timestamp, | timestamp=timestamp, | ||||
Show All 21 Lines |