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

114 lines
4.2 KiB
HTML
Raw Normal View History

2020-04-10 10:21:02 -04:00
{% extends 'base.html' %}
{% load buttons %}
2019-04-15 21:38:04 -04:00
{% load custom_links %}
2018-05-18 11:09:11 -04:00
{% load helpers %}
{% load static %}
{% load plugins %}
2016-03-01 11:23:03 -05:00
2018-06-14 16:15:14 -04:00
{% block header %}
<div class="row noprint">
2018-06-14 16:15:14 -04:00
<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={{ secret.role.slug }}">{{ secret.role }}</a></li>
<li><a href="{{ secret.assigned_object.get_absolute_url }}">{{ secret.assigned_object }}</a></li>
<li>{{ secret }}</li>
2018-06-14 16:15:14 -04:00
</ol>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons secret %}
2018-06-14 16:15:14 -04:00
{% if perms.secrets.change_secret %}
{% edit_button secret %}
2018-06-14 16:15:14 -04:00
{% endif %}
{% if perms.secrets.delete_secret %}
{% delete_button secret %}
2018-06-14 16:15:14 -04:00
{% endif %}
2016-03-01 11:23:03 -05:00
</div>
2018-06-14 16:15:14 -04:00
<h1>{% block title %}{{ secret }}{% endblock %}</h1>
{% include 'inc/created_updated.html' with obj=secret %}
2019-04-15 21:38:04 -04:00
<div class="pull-right noprint">
{% custom_links secret %}
</div>
2018-06-14 16:15:14 -04:00
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ secret.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=secret.pk %}">Change Log</a>
</li>
{% endif %}
2018-06-14 16:15:14 -04:00
</ul>
{% endblock %}
{% block content %}
2016-03-01 11:23:03 -05:00
<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>
2016-03-01 11:23:03 -05:00
<td>
<a href="{{ secret.assigned_object.get_absolute_url }}">{{ secret.assigned_object }}</a>
2016-03-01 11:23:03 -05:00
</td>
</tr>
<tr>
<td>Role</td>
<td>{{ secret.role }}</td>
</tr>
<tr>
<td>Name</td>
<td>{{ secret.name|placeholder }}</td>
2016-03-01 11:23:03 -05:00
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' with obj=secret %}
{% plugin_left_page secret %}
2016-03-01 11:23:03 -05:00
</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_{{ secret.pk }}">********</div>
<div class="col-md-4 text-right noprint">
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ secret.pk }}">
<i class="mdi mdi-lock"></i> Unlock
</button>
<button class="btn btn-xs btn-default copy-secret collapse" secret-id="{{ secret.pk }}" data-clipboard-target="#secret_{{ secret.pk }}">
<i class="mdi mdi-content-copy"></i> Copy
</button>
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ secret.pk }}">
<i class="mdi mdi-lock-open"></i> Lock
</button>
2016-03-01 11:23:03 -05:00
</div>
</div>
</div>
</div>
{% include 'extras/inc/tags_panel.html' with tags=secret.tags.all url='secrets:secret_list' %}
{% plugin_right_page secret %}
</div>
</div>
<div class="row">
<div class="col-md-12">
{% plugin_full_width_page secret %}
2016-03-01 11:23:03 -05:00
</div>
</div>
{% include 'secrets/inc/private_key_modal.html' %}
{% endblock %}
{% block javascript %}
<script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script>
2016-03-01 11:23:03 -05:00
{% endblock %}