1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
2020-11-19 13:53:37 -05:00

114 lines
4.2 KiB
HTML

{% extends 'base.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load static %}
{% load plugins %}
{% block header %}
<div class="row noprint">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li>
<li><a href="{% url 'secrets:secret_list' %}?role={{ object.role.slug }}">{{ object.role }}</a></li>
<li><a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a></li>
<li>{{ object }}</li>
</ol>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.secrets.change_secret %}
{% edit_button object %}
{% endif %}
{% if perms.secrets.delete_secret %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Secret</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'secrets:secret_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %}
{% block content %}
<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>Assigned object</td>
<td>
<a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a>
</td>
</tr>
<tr>
<td>Role</td>
<td>{{ object.role }}</td>
</tr>
<tr>
<td>Name</td>
<td>{{ object.name|placeholder }}</td>
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' %}
{% plugin_left_page object %}
</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-6" id="secret_{{ object.pk }}">********</div>
<div class="col-md-4 text-right noprint">
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ object.pk }}">
<i class="mdi mdi-lock"></i> Unlock
</button>
<button class="btn btn-xs btn-default copy-secret collapse" secret-id="{{ object.pk }}" data-clipboard-target="#secret_{{ object.pk }}">
<i class="mdi mdi-content-copy"></i> Copy
</button>
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ object.pk }}">
<i class="mdi mdi-lock-open"></i> Lock
</button>
</div>
</div>
</div>
</div>
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='secrets:secret_list' %}
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col-md-12">
{% plugin_full_width_page object %}
</div>
</div>
{% include 'secrets/inc/private_key_modal.html' %}
{% endblock %}
{% block javascript %}
<script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script>
{% endblock %}