{% extends 'base.html.twig' %} {% import '_sidebar_tables.html.twig' as macros %} {% block title %}{{ tableName }} — Structure · Jormun Admin{% endblock %} {% block breadcrumbs %} Home / {{ tableName }} / Structure {% endblock %} {% block sidebar_tables %} {{ macros.sidebar_table_links(tables, tableName) }} {% endblock %} {% block content %} {% if error %}
{{ error }}
{% endif %} {% if desc %}
{# Table info #}
Table Info
{% if desc.CreationDateTime is defined %} {% endif %}
Name{{ desc.TableName }}
Status{{ desc.TableStatus }}
Item Count{{ (desc.ItemCount ?? 0)|number_format }}
Size {% set bytes = desc.TableSizeBytes ?? 0 %} {% if bytes >= 1048576 %}{{ (bytes / 1048576)|number_format(2) }} MB {% elseif bytes >= 1024 %}{{ (bytes / 1024)|number_format(2) }} KB {% else %}{{ bytes }} B{% endif %}
Billing Mode{{ desc.BillingModeSummary.BillingMode ?? 'PROVISIONED' }}
Created{{ desc.CreationDateTime|date('Y-m-d H:i:s') }}
Table ARN{{ desc.TableArn ?? '—' }}
{# Key Schema #}
Key Schema
{% for key in desc.KeySchema %} {% set attrType = 'S' %} {% for attr in desc.AttributeDefinitions %} {% if attr.AttributeName == key.AttributeName %} {% set attrType = attr.AttributeType %} {% endif %} {% endfor %} {% endfor %}
Attribute Key Type Data Type
{{ key.AttributeName }} {{ key.KeyType == 'HASH' ? 'Partition Key' : 'Sort Key' }} {% if attrType == 'S' %}String (S) {% elseif attrType == 'N' %}Number (N) {% elseif attrType == 'B' %}Binary (B) {% else %}{{ attrType }}{% endif %}
{# Secondary Indexes #} {% if desc.GlobalSecondaryIndexes is defined and desc.GlobalSecondaryIndexes|length > 0 %}
Global Secondary Indexes
{% for gsi in desc.GlobalSecondaryIndexes %} {% set gsiPk = null %}{% set gsiSk = null %} {% for k in gsi.KeySchema %} {% if k.KeyType == 'HASH' %}{% set gsiPk = k.AttributeName %}{% endif %} {% if k.KeyType == 'RANGE' %}{% set gsiSk = k.AttributeName %}{% endif %} {% endfor %} {% endfor %}
Index Name Status Partition Key Sort Key Projection Item Count
{{ gsi.IndexName }} {{ gsi.IndexStatus ?? 'ACTIVE' }} {{ gsiPk }} {% if gsiSk %}{{ gsiSk }}{% else %}none{% endif %} {{ gsi.Projection.ProjectionType ?? '—' }} {{ (gsi.ItemCount ?? 0)|number_format }}
{% endif %} {% if desc.LocalSecondaryIndexes is defined and desc.LocalSecondaryIndexes|length > 0 %}
Local Secondary Indexes
{% for lsi in desc.LocalSecondaryIndexes %} {% set lsiSk = null %} {% for k in lsi.KeySchema %}{% if k.KeyType == 'RANGE' %}{% set lsiSk = k.AttributeName %}{% endif %}{% endfor %} {% endfor %}
Index NameSort KeyProjection
{{ lsi.IndexName }} {{ lsiSk ?? '—' }} {{ lsi.Projection.ProjectionType ?? '—' }}
{% endif %}
{% endif %} {% endblock %}