{% extends "base.html" %}{% from "_inventory_forms.html" import device_kind %}{% block title %}Review {{ observation.data.name }} · Keywright{% endblock %} {% block body %}{% include "_infrastructure_nav.html" %}{% set item=observation.data %}

Review {{ item.name }}

Back to discovery

{{ providers[observation.provider] }} · {{ resource_map[observation.resource_id].name }} · observed {{ observation.last_seen.strftime('%Y-%m-%d %H:%M') }} UTC

{% if not fresh %}
This observation is old, missing, or its latest refresh did not succeed. Refresh the source before applying changes. Existing records and allocations are retained.
{% endif %}

Inventory record

{% if discovery_link %}

Linked to {{ target.name }}. Last reviewed {{ discovery_link.reviewed_at.strftime('%Y-%m-%d %H:%M') }} UTC.

{% else %}

Choose an existing resource to link it to this device. A new inventory record is created if that resource has none.

{% if candidates %}

Possible matches: {% for candidate in candidates %}{{ candidate.asset.name }} ({{ candidate.reasons }}){% if not loop.last %}; {% endif %}{% endfor %}. Select a record only after confirming its identity.

{% endif %}{% endif %} {% if selected_resource %}

{{ selected_resource.name }} will be linked to {{ target.name if target else 'the new inventory record' }} when you save.

{% endif %} {% if target %}
{% endif %}

{{ 'Choose changes to apply' if target else 'New record' }}

{% if target %}

Unchecked fields keep their current values. Saving also marks these observations as reviewed.

{% for key,label in [('name','Name'),('kind','Device type'),('site','Site')] %}{% endfor %}
ApplyCurrent recordObserved value
{{ kinds[target.kind] if key=='kind' else target[key] or 'Not recorded' }}{{ kinds[item.kind] if key=='kind' else item[key] or 'Not reported (clears this field)' }}
{% else %}
{{ device_kind('new-kind',kinds,item.kind) }}
{% endif %} {% if item.parent %}

Hosting

Current host: {{ asset_map[target.parent_id].name if target and target.parent_id else 'Not recorded' }}

{% set parent=related.parent %}{% if parent.asset %}{% else %}

Import or link the observed host first: {% if parent.observation %}{{ parent.observation.data.name }}{% else %}{{ item.parent }}{% endif %}. Then return to this review.

{% endif %}{% endif %}
{% if item.mac or selected_interface %}

Network interface

{% if selected_interface %}

Current: {{ selected_interface.name }} · {{ selected_interface.mac or 'No MAC' }} · {{ media[selected_interface.medium] }} · {{ selected_interface.port or 'No port / SSID' }}

{% else %}{% endif %} {% if item.mac %}

Observed: {{ item.mac }} · {{ media[item.medium] }} · {{ item.port or 'No port / SSID reported' }}. Missing connection details preserve existing values.

{% endif %} {% if item.attachment %}{% set attachment=related.attachment %}

Current connection: {{ asset_map[selected_interface.attached_to_id].name if selected_interface and selected_interface.attached_to_id else 'Not recorded' }}

{% if attachment.asset %}{% else %}

Import or link the connected device first: {% if attachment.observation %}{{ attachment.observation.data.name }}{% else %}{{ item.attachment }}{% endif %}.

{% endif %}{% endif %}
{% endif %} {% if address_rows %}

Observed addresses

Choose a subnet only for addresses you have confirmed belong to this interface. DHCP observations alone are not allocation records. Existing addresses are never released by this review.

{% for row in address_rows %}{% if not row.choices %}

No matching subnet. Record a subnet before allocating this address.

{% endif %}{% endfor %}
{% endif %}
Cancel
{% if discovery_link %}

Removes only the discovery link. Inventory, interfaces, and IP allocations remain recorded.

{% endif %}
{% endblock %} {% block scripts %}{% include "_device_kind_picker.html" %}{% endblock %}