79 lines
2.8 KiB
HTML
79 lines
2.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% load bootstrap4 %}
|
|
{% load fontawesome_5 %}
|
|
{% load guardian_tags %}
|
|
|
|
{% get_obj_perms user for object as "obj_perms" %}
|
|
|
|
|
|
{% block 'sidenav' %}
|
|
{% with 'pull' as section %}
|
|
{{ block.super }}
|
|
{% endwith %}
|
|
{% endblock %}
|
|
|
|
{% block 'content' %}
|
|
<div class="row justify-content-between">
|
|
<div class="col">
|
|
<h6>{% trans "pull_configuration_details_header" %}</h6>
|
|
</div>
|
|
{% get_obj_perms user for object as "obj_perms" %}
|
|
<div class="col-auto">
|
|
{% if "change_pull" in obj_perms %}
|
|
<a href="{% url 'config:pull_change' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-primary">{% fa5_icon 'edit' %} {% trans 'change' %}</a>
|
|
{% endif %}
|
|
{% if "delete_pull" in obj_perms %}
|
|
<a href="{% url 'config:pull_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-danger">{% fa5_icon 'trash' %} {% trans 'delete' %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<hr class="my-4">
|
|
<div class="row">
|
|
<div class="col-sm border-right">
|
|
<dl class="row">
|
|
<dt class="col-sm-3">{% trans "name" %}</dt>
|
|
<dd class="col-sm-9">{{ object.name }}</dd>
|
|
<dt class="col-sm-3">{% trans "stream" %}</dt>
|
|
<dd class="col-sm-9"><a href="{% url 'config:stream_detail' pk=object.stream.pk %}">{{ object.stream.name }}</a></dd>
|
|
<dt class="col-sm-3">{% trans "active" %}</dt>
|
|
<dd class="col-sm-9">
|
|
{% if object.active %}
|
|
<span class="text-success">{% fa5_icon 'check-circle' %}</span>
|
|
{% else %}
|
|
<span class="text-danger">{% fa5_icon 'times-circle' %}</span>
|
|
{% endif %}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="col-sm">
|
|
<p>{% trans "configured_source_url" %}</p>
|
|
<div class="input-group mb-4" id="show_hide_source_url">
|
|
<input readonly class="form-control" type="password" value="{{ object.source }}">
|
|
<div class="input-group-append">
|
|
<a href="" class="btn btn-outline-secondary"><i class="fa fa-eye-slash" aria-hidden="true"></i></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('[data-toggle="popover"]').popover()
|
|
})
|
|
$(function() {
|
|
$("#show_hide_source_url a").on('click', function(event) {
|
|
event.preventDefault();
|
|
if ($('#show_hide_source_url input').attr('type') == 'text') {
|
|
$('#show_hide_source_url input').attr('type', 'password');
|
|
$('#show_hide_source_url i').addClass('fa-eye-slash');
|
|
$('#show_hide_source_url i').removeClass('fa-eye');
|
|
} else if ($('#show_hide_source_url input').attr('type') == 'password') {
|
|
$('#show_hide_source_url input').attr('type', 'text');
|
|
$('#show_hide_source_url i').removeClass('fa-eye-slash');
|
|
$('#show_hide_source_url i').addClass('fa-eye');
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|