{# SPDX-FileCopyrightText: 2026 Front Matter. SPDX-License-Identifier: MIT The commonmeta store's status (administration.StoreStatusView): the files as this process sees them, the sources' versions and downloads, and what keeps the store from working here. Read-only; the store is written outside InvenioRDM. #} {% extends admin_base_template %} {%- macro when(value) -%} {%- if value is none -%}– {%- elif value is string -%}{{ value }} {%- else -%}{{ value.strftime("%Y-%m-%d %H:%M UTC") }} {%- endif -%} {%- endmacro -%} {%- macro number(value) -%} {%- if value is none -%}–{%- else -%}{{ "{:,}".format(value) }}{%- endif -%} {%- endmacro -%} {%- macro state(ok, good, bad) -%} {%- if ok -%} {{ good }} {%- else -%} {{ bad }} {%- endif -%} {%- endmacro -%} {%- macro file_row(label, file) -%} {{ label }} {{ file.path }} {%- if not file.exists -%} {{ _("Missing") }} {%- else -%} {{ state(file.readable, _("Readable"), _("Not readable")) }} {%- endif -%} {{ file.size | filesizeformat if file.exists else "–" }} {{ when(file.modified) if file.exists else "–" }} {%- endmacro -%} {% block admin_page_content %}
{%- if not status.configured %}

{{ _("No store is configured (PIDBOX_SQLITE_PATH).") }}

{%- else %} {%- set index = status.index %} {%- if status.problems %}
{%- else %}

{{ _("The store and its search index can be read, and the store is answering.") }}

{%- endif %}

{{ _("Files") }}

{{ file_row(_("Store"), status.store) }}
{{ _("File") }} {{ _("Path") }} {{ _("Status") }} {{ _("Size") }} {{ _("Changed") }}
{{ _("Search index") }} {{ index.path }} {%- if not index.exists -%} {{ _("Missing") }} {%- else -%} {{ state(index.readable and not index.unreadable, _("Readable"), _("Not readable")) }} {%- endif -%} {{ index.size | filesizeformat if index.size is defined else "–" }} {{ when(index.modified) if index.modified is defined else "–" }}
{%- if index.unreadable %}

{{ _("Files of the search index this site can't read:") }} {% for name in index.unreadable %}{{ name }}{{ ", " if not loop.last }}{% endfor %}

{{ _("Make them readable to all on the host, e.g. chmod 644, after the index is built.") }}

{%- endif %} {%- if status.sources is defined %}

{{ _("Sources") }}

{%- for source in status.sources %} {%- else %} {%- endfor %}
{{ _("Source") }} {{ _("Version") }} {{ _("Last download") }} {{ _("Records") }}
{{ source.name }} {{ source.version or "–" }} {{ when(source.downloaded) }} {{ number(source.records) }}
{{ _("The store records no sources.") }}
{%- endif %} {%- endif %}
{% endblock admin_page_content %}