1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/templates/users/userkey.html

54 lines
2.0 KiB
HTML
Raw Normal View History

2020-05-06 13:25:17 -04:00
{% extends 'users/base.html' %}
2016-03-01 11:23:03 -05:00
{% block title %}User Key{% endblock %}
{% block usercontent %}
{% if object %}
2021-04-13 21:51:12 -07:00
<div class="float-end noprint">
<a href="{% url 'user:userkey_edit' %}" class="btn btn-warning">
<span class="mdi mdi-pencil" aria-hidden="true"></span>
2021-04-13 21:51:12 -07:00
Edit User Key
</a>
</div>
<h4>
2021-04-16 16:02:56 -07:00
Your User Key is
{% if object.is_active %}
2021-04-13 21:51:12 -07:00
<span class="badge bg-success">Active</span>
{% else %}
2021-04-13 21:51:12 -07:00
<span class="badge bg-danger">Inactive</span>
{% endif %}
</h4>
2021-04-13 16:03:07 -04:00
<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>
Your user key is inactive. Ask an administrator to enable it for you.
</div>
{% endif %}
2021-04-16 16:02:56 -07:00
<pre class="copyable">{{ object.public_key }}</pre>
<hr />
{% if object.session_key %}
2021-04-18 16:42:28 -07:00
<div class="float-end noprint">
2017-03-14 14:01:06 -04:00
<a href="{% url 'user:sessionkey_delete' %}" class="btn btn-danger">
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>
2021-04-16 16:02:56 -07:00
Delete Session Key
</a>
</div>
2021-04-16 16:02:56 -07:00
<h4>Session Key: <span class="badge bg-success">Active</span></h4>
<small class="text-muted">Created {{ object.session_key.created }}</small>
{% else %}
2021-04-16 16:02:56 -07:00
<h4>No Active Session Key</h4>
{% endif %}
{% else %}
<p>You don't have a user key on file.</p>
<p>
2017-03-14 12:36:44 -04:00
<a href="{% url 'user:userkey_edit' %}" class="btn btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
Create a User Key
</a>
</p>
{% endif %}
2016-03-01 11:23:03 -05:00
{% endblock %}