mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-16 00:32:18 -06:00
Initial push to public repo
This commit is contained in:
99
netbox/templates/secrets/secret.html
Normal file
99
netbox/templates/secrets/secret.html
Normal file
@@ -0,0 +1,99 @@
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}Secret: {{ secret }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li>
|
||||
<li>{{ secret.parent }}</li>
|
||||
<li>{{ secret.role }}{% if secret.name %} ({{ secret.name }}){% endif %}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if perms.secrets.change_secret %}
|
||||
<a href="{% url 'secrets:secret_edit' pk=secret.pk %}" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
|
||||
Edit this secret
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.secrets.delete_secret %}
|
||||
<a href="{% url 'secrets:secret_delete' pk=secret.pk %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
|
||||
Delete this secret
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{{ secret }}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Secret Attributes</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body">
|
||||
<tr>
|
||||
<td>Parent</td>
|
||||
<td>
|
||||
<a href="{{ secret.parent.get_absolute_url }}">{{ secret.parent }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>{{ secret.role }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
{% if secret.name %}
|
||||
<span>{{ secret.name }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">N/A</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Created</td>
|
||||
<td>{{ secret.created|date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Modified</td>
|
||||
<td>{{ secret.last_modified|date:'DATETIME_FORMAT' }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Secret Data</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form id="secret_form">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-md-2">Secret</div>
|
||||
<div class="col-md-8" id="secret_{{ secret.pk }}">********</div>
|
||||
<div class="col-md-2 text-right">
|
||||
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ secret.pk }}">
|
||||
<i class="fa fa-lock"></i> Unlock
|
||||
</button>
|
||||
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ secret.pk }}">
|
||||
<i class="fa fa-unlock-alt"></i> Lock
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'secrets/inc/private_key_modal.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="/static/js/secrets.js"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user