mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-27 20:01:47 +01:00
* feat(config): Add extra context to ConfigRevisionView Introduces `get_extra_context` method for `ConfigRevisionView` to format JSON-based attributes like `CUSTOM_VALIDATORS`, `DEFAULT_USER_PREFERENCES`, and `PROTECTION_RULES`. This ensures clearer rendering of configuration data in the UI. Fixes #20981 * Reduce padding on JSON blocks --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
{% extends 'generic/object.html' %}
|
|
{% load buttons %}
|
|
{% load custom_links %}
|
|
{% load helpers %}
|
|
{% load perms %}
|
|
{% load plugins %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% block breadcrumbs %}
|
|
{% endblock %}
|
|
|
|
{% block control-buttons %}
|
|
{% if not object.pk or object.is_active and perms.core.add_configrevision %}
|
|
{% url 'core:configrevision_add' as edit_url %}
|
|
{% include "buttons/edit.html" with url=edit_url %}
|
|
{% endif %}
|
|
{% if object.pk and not object.is_active and perms.core.delete_configrevision %}
|
|
{% delete_button object %}
|
|
{% endif %}
|
|
{% endblock control-buttons %}
|
|
|
|
{% block subtitle %}
|
|
{% if object.created %}
|
|
<div class="text-secondary fs-5">
|
|
{% trans "Created" %} {{ object.created|isodatetime }}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock subtitle %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col col-md-12">
|
|
<div class="card">
|
|
<h2 class="card-header">{% trans "Configuration Data" %}</h2>
|
|
{% include 'core/inc/config_data.html' %}
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-header">{% trans "Comment" %}</h2>
|
|
<div class="card-body">
|
|
{{ object.comment|placeholder }}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|