{% extends "admin/dj_redis_panel/base.html" %} {% load i18n static dcr_icons %} {% block panel_breadcrumbs %} {{ block.super }} › {{ instance_alias }} › {% trans "Search Keys" %} (db:{{ selected_db }}) {% endblock %} {% block panel_content %} {% if success_message %}

{{ success_message }}

{% endif %} {% if error_message %}

{% trans "Error" %}

{{ error_message }}

{% endif %} {% trans "Back to Instance Overview" %}
{% dcr_icon "database" %}

{{ instance_alias }}::DB{{ selected_db }}

{% if use_cursor_pagination %} {% trans "CURSOR PAGINATION" %} {% else %} {% trans "PAGE PAGINATION" %} {% endif %}

{% trans "Search Redis Keys" %}

{% trans "Add New Key" %}

{% trans "Search Results" %} {% if not error_message %} {% if use_cursor_pagination %}{{ showing_keys }} {% trans "SHOWN" %} {% else %}{{ total_keys }} {% trans "TOTAL" %}{% endif %} {% endif %}

{% if not error_message %} {% if use_cursor_pagination %} {% if showing_keys > 0 %} {% blocktrans with count=showing_keys %}Showing {{ count }} keys{% endblocktrans %} {% if has_next %} · {% trans "more available" %}{% endif %} {% if current_cursor > 0 %} · {% trans "Cursor position" %}: {{ current_cursor }}{% endif %} {% else %} {% trans "No keys found matching your search pattern." %} {% endif %} {% else %} {% if total_keys > 0 %} {% blocktrans with total=total_keys start=start_index end=end_index %}Found {{ total }} keys, showing {{ start }} to {{ end }}{% endblocktrans %} {% if total_keys >= 100000 %} · {% trans "Search limited to first 100,000 matching keys. Refine your search pattern for more specific results." %} {% endif %} {% else %} {% trans "No keys found matching your search pattern." %} {% endif %} {% endif %} {% endif %}

{% if not error_message %}
{% if keys_data %} {% for key_info in keys_data %} {% endfor %} {% else %} {% endif %}
{% trans "Key" %} {% trans "Type" %} {% trans "Size/Length" %} {% trans "TTL" %}
{{ key_info.key }} {{ key_info.type|upper }} {% if key_info.type == 'string' %} {{ key_info.size }} {% trans "bytes" %} {% else %} {{ key_info.size }} {% trans "items" %} {% endif %} {% if key_info.ttl %} {{ key_info.ttl }}s {% else %} {% trans "No expiry" %} {% endif %}

{% trans "No keys found" %}

{% trans "No keys matched your search pattern. Try a broader pattern." %}

{% if keys_data %}
{% if use_cursor_pagination %}
{{ showing_keys }} {% trans "keys shown" %}{% if has_next %} · {% trans "more available" %}{% endif %}
{% if current_cursor > 0 %} {% trans "First" %} {% else %} {% trans "First" %} {% endif %} {% if has_next %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% else %}
{{ total_keys }} {% blocktrans count counter=total_keys %}key{% plural %}keys{% endblocktrans %}
{% if total_pages > 1 %}
{% if has_previous %} {% trans "Previous" %} {% else %} {% trans "Previous" %} {% endif %} {% for num in page_range %} {% if num == "..." %} {% elif num == current_page %} {{ num }} {% else %} {{ num }} {% endif %} {% endfor %} {% if has_next %} {% trans "Next" %} {% else %} {% trans "Next" %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %}