Merge branch 'feature' of https://github.com/netbox-community/netbox into feature

# Conflicts:
#	netbox/dcim/tables/template_code.py
#	netbox/netbox/views/__init__.py
#	netbox/project-static/css/base.css
#	netbox/templates/base.html
#	netbox/templates/circuits/circuit.html
#	netbox/templates/circuits/circuittermination_edit.html
#	netbox/templates/circuits/inc/circuit_termination.html
#	netbox/templates/circuits/provider.html
#	netbox/templates/dcim/device.html
#	netbox/templates/dcim/device/base.html
#	netbox/templates/dcim/device_component.html
#	netbox/templates/dcim/devicetype.html
#	netbox/templates/dcim/inc/device_napalm_tabs.html
#	netbox/templates/dcim/rack.html
#	netbox/templates/dcim/site.html
#	netbox/templates/dcim/virtualchassis.html
#	netbox/templates/extras/configcontext.html
#	netbox/templates/extras/object_journal.html
#	netbox/templates/extras/tag.html
#	netbox/templates/generic/object.html
#	netbox/templates/generic/object_list.html
#	netbox/templates/home.html
#	netbox/templates/inc/nav_menu.html
#	netbox/templates/ipam/aggregate.html
#	netbox/templates/ipam/ipaddress.html
#	netbox/templates/ipam/prefix.html
#	netbox/templates/ipam/vlan.html
#	netbox/templates/ipam/vlangroup_edit.html
#	netbox/templates/ipam/vlangroup_vlans.html
#	netbox/templates/secrets/secret.html
#	netbox/templates/tenancy/tenant.html
#	netbox/templates/users/api_tokens.html
#	netbox/templates/virtualization/cluster.html
#	netbox/templates/virtualization/vminterface_edit.html
#	netbox/utilities/forms/fields.py
#	netbox/utilities/templates/buttons/export.html
This commit is contained in:
checktheroads
2021-04-14 11:30:15 -07:00
256 changed files with 5928 additions and 2111 deletions

View File

@@ -11,12 +11,8 @@
<div class="card-header">
<div class="float-end noprint">
<a class="m-1 btn btn-sm btn-success copy-token" data-clipboard-target="#token_{{ token.pk }}">Copy</a>
{% if perms.users.change_token %}
<a href="{% url 'user:token_edit' pk=token.pk %}" class="m-1 btn btn-sm btn-warning">Edit</a>
{% endif %}
{% if perms.users.delete_token %}
<a href="{% url 'user:token_delete' pk=token.pk %}" class="m-1 btn btn-sm btn-danger">Delete</a>
{% endif %}
<a href="{% url 'user:token_edit' pk=token.pk %}" class="m-1 btn btn-sm btn-warning">Edit</a>
<a href="{% url 'user:token_delete' pk=token.pk %}" class="m-1 btn btn-sm btn-danger">Delete</a>
</div>
<i class="mdi mdi-key"></i>
<samp><span id="token_{{ token.pk }}">{{ token.key }}</span></samp>
@@ -55,20 +51,10 @@
{% empty %}
<p>You do not have any API tokens.</p>
{% endfor %}
<div class="row my-3">
<div class="col-md-12">
{% if perms.users.add_token %}
<a href="{% url 'user:token_add' %}" class="btn btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
Add a Token
</a>
{% else %}
<div class="alert alert-info text-center" role="alert">
You do not have permission to create new API tokens. If needed, ask an administrator to enable token creation for your account or an assigned group.
</div>
{% endif %}
</div>
</div>
<a href="{% url 'user:token_add' %}" class="btn btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
Add a token
</a>
</div>
</div>
{% endblock %}

View File

@@ -18,7 +18,9 @@
<span class="badge bg-danger">Inactive</span>
{% endif %}
</h4>
{% include 'inc/created_updated.html' %}
<p>
<small class="text-muted">Created {{ object.created }} &middot; Updated <span title="{{ object.last_updated }}">{{ object.last_updated|timesince }}</span> ago</small>
</p>
{% if not object.is_active %}
<div class="alert alert-warning" role="alert">
<i class="mdi mdi-alert"></i>