tons of i18n; add some views for restream configs
This commit is contained in:
parent
76aac4d59f
commit
b16e9c955c
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-04-20 20:58+0000\n"
|
||||
"POT-Creation-Date: 2020-04-29 19:05+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -18,6 +18,247 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: srs/models.py:9
|
||||
msgid "srs_application_name"
|
||||
#: restream/models.py:9
|
||||
msgid "restreamconfig_stream_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:10
|
||||
msgid "restreamconfig_target_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:11
|
||||
msgid "restreamconfig_name_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:12
|
||||
msgid "restreamconfig_activate_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:15
|
||||
msgid "restreamconfig_verbose_name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:16
|
||||
msgid "restreamconfig_verbose_name_plural"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:19
|
||||
msgid "restreamconfig_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:6
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:6
|
||||
msgid "confirm_delete_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:12
|
||||
#, python-format
|
||||
msgid "are_you_sure_you_want_to_delete_\"%(restreamconfig_config_name)s\"?"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:15
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:18
|
||||
msgid "delete"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:6
|
||||
msgid "restreamconfig_configuration_details_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:11
|
||||
#: restream/templates/restream/restreamconfig_list.html:16
|
||||
#: rtmp/templates/rtmp/stream_detail.html:11
|
||||
#: rtmp/templates/rtmp/stream_list.html:16
|
||||
msgid "name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:13
|
||||
msgid "stream"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:18
|
||||
msgid "configured_target_url"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:5
|
||||
msgid "create_new_restreamconfig_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:14
|
||||
#: rtmp/templates/rtmp/stream_form.html:14
|
||||
#: templates/registration/password_change_form.html:13
|
||||
#: templates/registration/password_reset_form.html:13
|
||||
msgid "submit"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:21
|
||||
msgid "create_new_restreamconfig_configuration_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:6
|
||||
msgid "restreamconfig_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:10
|
||||
#: rtmp/templates/rtmp/stream_list.html:10
|
||||
msgid "create"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:17
|
||||
#: rtmp/templates/rtmp/stream_list.html:17
|
||||
msgid "actions"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:26
|
||||
#: rtmp/templates/rtmp/stream_list.html:26
|
||||
msgid "details"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:10
|
||||
msgid "rtmp_application_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:13
|
||||
msgid "application_verbose_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:14
|
||||
msgid "application_verbose_name_plural"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:17
|
||||
msgid "aplication_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:24
|
||||
msgid "stream_application_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:25
|
||||
msgid "stream_stream_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:26
|
||||
msgid "stream_name_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:65
|
||||
msgid "stream_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:13
|
||||
msgid "deleting_stream_configuration_will_also_delete_all_depending_confgurations_warning"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:15
|
||||
#, python-format
|
||||
msgid "are_you_sure_you_want_to_delete_\"%(stream_config_name)s\"?"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:25
|
||||
msgid "deleting_configurations_list_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:6
|
||||
msgid "stream_configuration_details_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:13
|
||||
msgid "application"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:16
|
||||
msgid "stream_configuration_do_not_share_warning"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:19
|
||||
msgid "how_to_configure_your_encoder_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:21
|
||||
msgid "set_this_stream_server_in_encoder"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:23
|
||||
msgid "set_this_stream_id_in_encoder"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:31
|
||||
msgid "you_may_need_to_use_this_full_url_instead"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_form.html:5
|
||||
msgid "create_new_stream_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_form.html:21
|
||||
msgid "create_new_stream_configuration_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_list.html:6
|
||||
msgid "stream_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:36
|
||||
msgid "navbar_configuration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:39
|
||||
msgid "navbar_configuration_streaming_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:40
|
||||
msgid "navbar_configuration_streams"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:41
|
||||
msgid "navbar_configuration_restreams"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:43
|
||||
msgid "navbar_configuration_account_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:44
|
||||
msgid "navbar_configuration_password_change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:50
|
||||
msgid "navbar_logout"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:52
|
||||
msgid "navbar_login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/login.html:5 templates/registration/login.html:13
|
||||
msgid "login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/login.html:18
|
||||
msgid "forgot_password_q"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:5
|
||||
msgid "password_change_successful"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:6
|
||||
msgid "password_change_successful_text"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:7
|
||||
msgid "take_me_to_safety"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_form.html:5
|
||||
msgid "change_password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_form.html:20
|
||||
msgid "change_password_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_reset_form.html:20
|
||||
msgid "reset_password_text_html"
|
||||
msgstr ""
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-04-20 20:58+0000\n"
|
||||
"POT-Creation-Date: 2020-04-29 19:05+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -18,6 +18,247 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: srs/models.py:9
|
||||
msgid "srs_application_name"
|
||||
#: restream/models.py:9
|
||||
msgid "restreamconfig_stream_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:10
|
||||
msgid "restreamconfig_target_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:11
|
||||
msgid "restreamconfig_name_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:12
|
||||
msgid "restreamconfig_activate_help"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:15
|
||||
msgid "restreamconfig_verbose_name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:16
|
||||
msgid "restreamconfig_verbose_name_plural"
|
||||
msgstr ""
|
||||
|
||||
#: restream/models.py:19
|
||||
msgid "restreamconfig_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:6
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:6
|
||||
msgid "confirm_delete_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:12
|
||||
#, python-format
|
||||
msgid "are_you_sure_you_want_to_delete_\"%(restreamconfig_config_name)s\"?"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_confirm_delete.html:15
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:18
|
||||
msgid "delete"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:6
|
||||
msgid "restreamconfig_configuration_details_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:11
|
||||
#: restream/templates/restream/restreamconfig_list.html:16
|
||||
#: rtmp/templates/rtmp/stream_detail.html:11
|
||||
#: rtmp/templates/rtmp/stream_list.html:16
|
||||
msgid "name"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:13
|
||||
msgid "stream"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_detail.html:18
|
||||
msgid "configured_target_url"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:5
|
||||
msgid "create_new_restreamconfig_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:14
|
||||
#: rtmp/templates/rtmp/stream_form.html:14
|
||||
#: templates/registration/password_change_form.html:13
|
||||
#: templates/registration/password_reset_form.html:13
|
||||
msgid "submit"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_form.html:21
|
||||
msgid "create_new_restreamconfig_configuration_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:6
|
||||
msgid "restreamconfig_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:10
|
||||
#: rtmp/templates/rtmp/stream_list.html:10
|
||||
msgid "create"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:17
|
||||
#: rtmp/templates/rtmp/stream_list.html:17
|
||||
msgid "actions"
|
||||
msgstr ""
|
||||
|
||||
#: restream/templates/restream/restreamconfig_list.html:26
|
||||
#: rtmp/templates/rtmp/stream_list.html:26
|
||||
msgid "details"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:10
|
||||
msgid "rtmp_application_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:13
|
||||
msgid "application_verbose_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:14
|
||||
msgid "application_verbose_name_plural"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:17
|
||||
msgid "aplication_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:24
|
||||
msgid "stream_application_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:25
|
||||
msgid "stream_stream_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:26
|
||||
msgid "stream_name_help"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/models.py:65
|
||||
msgid "stream_class_name"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:13
|
||||
msgid "deleting_stream_configuration_will_also_delete_all_depending_confgurations_warning"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:15
|
||||
#, python-format
|
||||
msgid "are_you_sure_you_want_to_delete_\"%(stream_config_name)s\"?"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_confirm_delete.html:25
|
||||
msgid "deleting_configurations_list_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:6
|
||||
msgid "stream_configuration_details_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:13
|
||||
msgid "application"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:16
|
||||
msgid "stream_configuration_do_not_share_warning"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:19
|
||||
msgid "how_to_configure_your_encoder_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:21
|
||||
msgid "set_this_stream_server_in_encoder"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:23
|
||||
msgid "set_this_stream_id_in_encoder"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_detail.html:31
|
||||
msgid "you_may_need_to_use_this_full_url_instead"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_form.html:5
|
||||
msgid "create_new_stream_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_form.html:21
|
||||
msgid "create_new_stream_configuration_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: rtmp/templates/rtmp/stream_list.html:6
|
||||
msgid "stream_configuration_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:36
|
||||
msgid "navbar_configuration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:39
|
||||
msgid "navbar_configuration_streaming_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:40
|
||||
msgid "navbar_configuration_streams"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:41
|
||||
msgid "navbar_configuration_restreams"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:43
|
||||
msgid "navbar_configuration_account_header"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:44
|
||||
msgid "navbar_configuration_password_change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:50
|
||||
msgid "navbar_logout"
|
||||
msgstr ""
|
||||
|
||||
#: templates/base.html:52
|
||||
msgid "navbar_login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/login.html:5 templates/registration/login.html:13
|
||||
msgid "login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/login.html:18
|
||||
msgid "forgot_password_q"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:5
|
||||
msgid "password_change_successful"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:6
|
||||
msgid "password_change_successful_text"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_done.html:7
|
||||
msgid "take_me_to_safety"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_form.html:5
|
||||
msgid "change_password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_change_form.html:20
|
||||
msgid "change_password_text_html"
|
||||
msgstr ""
|
||||
|
||||
#: templates/registration/password_reset_form.html:20
|
||||
msgid "reset_password_text_html"
|
||||
msgstr ""
|
||||
|
|
|
@ -21,6 +21,7 @@ urlpatterns = [
|
|||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('rtmp/', include('rtmp.urls')),
|
||||
path('restream/', include('restream.urls')),
|
||||
path('concierge/', include('concierge.urls')),
|
||||
path('', include('portal.urls')),
|
||||
]
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from rtmp.models import Stream
|
||||
|
||||
|
||||
class RestreamConfig(models.Model):
|
||||
stream = models.ForeignKey(Stream, on_delete=models.CASCADE)
|
||||
target = models.CharField(max_length=500)
|
||||
name = models.CharField(max_length=100)
|
||||
active = models.BooleanField()
|
||||
stream = models.ForeignKey(Stream, on_delete=models.CASCADE, help_text=_('restreamconfig_stream_help'))
|
||||
target = models.CharField(max_length=500, help_text=_('restreamconfig_target_help'))
|
||||
name = models.CharField(max_length=100, help_text=_('restreamconfig_name_help'))
|
||||
active = models.BooleanField(help_text=_('restreamconfig_activate_help'))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('restreamconfig_verbose_name')
|
||||
verbose_name_plural = _('restreamconfig_verbose_name_plural')
|
||||
|
||||
def class_name(self):
|
||||
return self.__class__.__name__
|
||||
return _('restreamconfig_class_name')
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('restream:restreamconfig_detail', kwargs={'pk': self.pk})
|
||||
|
||||
def __str__(self):
|
||||
return '{} to {}'.format(self.stream, self.name)
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "confirm_delete_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<p>{% blocktrans with restreamconfig_config_name=object.name %}are_you_sure_you_want_to_delete_"{{ restreamconfig_config_name }}"?{% endblocktrans %}</p>
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-danger" value="login">
|
||||
{% fa 'trash' %} {% trans "delete" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,46 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "restreamconfig_configuration_details_header" %}</h6>
|
||||
<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 'rtmp:stream_detail' pk=object.stream.pk %}">{{ object.stream.name }}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p>{% trans "configured_target_url" %}</p>
|
||||
<div class="input-group mb-4" id="show_hide_target_url">
|
||||
<input class="form-control" type="password" value="{{ object.target }}">
|
||||
<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_target_url a").on('click', function(event) {
|
||||
event.preventDefault();
|
||||
if ($('#show_hide_target_url input').attr('type') == 'text') {
|
||||
$('#show_hide_target_url input').attr('type', 'password');
|
||||
$('#show_hide_target_url i').addClass('fa-eye-slash');
|
||||
$('#show_hide_target_url i').removeClass('fa-eye');
|
||||
} else if ($('#show_hide_target_url input').attr('type') == 'password') {
|
||||
$('#show_hide_target_url input').attr('type', 'text');
|
||||
$('#show_hide_target_url i').removeClass('fa-eye-slash');
|
||||
$('#show_hide_target_url i').addClass('fa-eye');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -0,0 +1,24 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "create_new_restreamconfig_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-primary" value="login">
|
||||
{% trans "submit" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
{% trans "create_new_restreamconfig_configuration_text_html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,34 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>{% trans "restreamconfig_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="btn-toolbar mb-4" role="toolbar">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'restream:restreamconfig_create' %}" type="button" class="btn btn-sm btn-outline-success">{% fa 'plus' %} {% trans "create" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col">{% trans "name" %}</th>
|
||||
<th scope="col" class="text-right">{% trans "actions" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<th scope="ro">{{ object.name }}</th>
|
||||
<td align="right">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'restream:restreamconfig_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a>
|
||||
<a href="{% url 'restream:restreamconfig_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-danger">{% fa 'trash' %}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
|
@ -0,0 +1,11 @@
|
|||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
app_name = 'restream'
|
||||
|
||||
urlpatterns = [
|
||||
path('restreamconfig/', views.RestreamConfigList.as_view(), name='restreamconfig_list'),
|
||||
path('restreamconfig/<int:pk>/', views.RestreamConfigDetail.as_view(), name='restreamconfig_detail'),
|
||||
path('restreamconfig/<int:pk>/delete', views.RestreamConfigDelete.as_view(), name='restreamconfig_delete'),
|
||||
path('restreamconfig/create', views.RestreamConfigCreate.as_view(), name='restreamconfig_create'),
|
||||
]
|
|
@ -1,3 +1,28 @@
|
|||
from django.shortcuts import render # noqa
|
||||
from django.urls import reverse_lazy
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views.generic import ListView, DetailView, CreateView, DeleteView
|
||||
|
||||
# Create your views here.
|
||||
from . import models
|
||||
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
class RestreamConfigList(ListView):
|
||||
model = models.RestreamConfig
|
||||
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
class RestreamConfigDetail(DetailView):
|
||||
model = models.RestreamConfig
|
||||
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
class RestreamConfigCreate(CreateView):
|
||||
model = models.RestreamConfig
|
||||
fields = ["name", "stream", "target", "active"]
|
||||
|
||||
|
||||
@method_decorator(login_required, name='dispatch')
|
||||
class RestreamConfigDelete(DeleteView):
|
||||
model = models.RestreamConfig
|
||||
success_url = reverse_lazy('restream:restreamconfig_list')
|
||||
|
|
|
@ -9,17 +9,21 @@ from . import signals
|
|||
class Application(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True, help_text=_("rtmp_application_name"))
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('application_verbose_name')
|
||||
verbose_name_plural = _('application_verbose_name_plural')
|
||||
|
||||
def class_name(self):
|
||||
return self.__class__.__name__
|
||||
return _('aplication_class_name')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class Stream(models.Model):
|
||||
application = models.ForeignKey(Application, on_delete=models.CASCADE)
|
||||
stream = models.UUIDField(unique=True, default=uuid.uuid4)
|
||||
name = models.CharField(max_length=100)
|
||||
application = models.ForeignKey(Application, on_delete=models.CASCADE, help_text=_('stream_application_help'))
|
||||
stream = models.UUIDField(unique=True, default=uuid.uuid4, help_text=_('stream_stream_help'))
|
||||
name = models.CharField(max_length=100, help_text=_('stream_name_help'))
|
||||
|
||||
# the same stream uuid can be published multiple times to different origin
|
||||
# servers. this is a valid scheme to achieve a failover on the origin layer.
|
||||
|
@ -58,7 +62,7 @@ class Stream(models.Model):
|
|||
return reverse('rtmp:stream_detail', kwargs={'pk': self.pk})
|
||||
|
||||
def class_name(self):
|
||||
return self.__class__.__name__
|
||||
return _('stream_class_name')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>Create new stream configuration</h6>
|
||||
<h6>{% trans "confirm_delete_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
When deleting a Stream configuration, you will also delete all other configurations that depend on this stream!
|
||||
{% trans "deleting_stream_configuration_will_also_delete_all_depending_confgurations_warning" %}
|
||||
</div>
|
||||
<p>Are you sure you want to delete the Stream configuration "{{ object }}"?</p>
|
||||
<p>{% blocktrans with stream_config_name=object.name %}are_you_sure_you_want_to_delete_"{{ stream_config_name }}"?{% endblocktrans %}</p>
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-danger" value="login">
|
||||
{% fa 'trash' %} Delete
|
||||
{% fa 'trash' %} {% trans "delete" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<h5>Deleting configurations</h5>
|
||||
<h5>{% trans "deleting_configurations_list_header" %}</h5>
|
||||
<ul>
|
||||
{% for object in to_delete %}
|
||||
{% if object.name %}
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>Show stream configuration details</h6>
|
||||
<h6>{% trans "stream_configuration_details_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3">Name</dt>
|
||||
<dt class="col-sm-3">{% trans "name" %}</dt>
|
||||
<dd class="col-sm-9">{{ object.name }}</dd>
|
||||
<dt class="col-sm-3">Application</dt>
|
||||
<dt class="col-sm-3">{% trans "application" %}</dt>
|
||||
<dd class="col-sm-9">{{ object.application }}</dd>
|
||||
</dl>
|
||||
<p><strong>Do not share the stream ID.</strong> It serves as a secret key, and anyone that knows this key could send content to your stream.</p>
|
||||
<p>{% trans "stream_configuration_do_not_share_warning" %}</p>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<h6>How to configure your Encoder</h6>
|
||||
<h6>{% trans "how_to_configure_your_encoder_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<p>Set the following <strong>stream server</strong> in your encoder application:</p>
|
||||
<p>{% trans "set_this_stream_server_in_encoder" %}</p>
|
||||
<code>rtmp://TODO TODO SERVER BASE URL/{{ object.application }}/</code>
|
||||
<p>Set the following <strong>stream ID</strong> in your encoder application:</p>
|
||||
<p>{% trans "set_this_stream_id_in_encoder" %}</p>
|
||||
<div class="input-group mb-4" id="show_hide_stream_key">
|
||||
<input class="form-control" type="password" value="{{ object.stream }}">
|
||||
<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>
|
||||
<p>You may need to use the full URL instead:</p>
|
||||
<hr class="my-4">
|
||||
<p>{% trans "you_may_need_to_use_this_full_url_instead" %}</p>
|
||||
<div class="input-group mb-4" id="show_hide_stream_url">
|
||||
<input class="form-control" type="password" value="rtmp://TODO TODO TODO SERVER BASE URL/{{ object.stream }}">
|
||||
<div class="input-group-append">
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h6>Create new stream configuration</h6>
|
||||
<h6>{% trans "create_new_stream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
|
@ -10,14 +11,14 @@
|
|||
{% bootstrap_form form %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-primary" value="login">
|
||||
Submit
|
||||
{% trans "submit" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p>Enter a descriptive name, and select one of the applications.</p>
|
||||
{% trans "create_new_stream_configuration_text_html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
{% block 'content' %}
|
||||
<h6>Stream configurations</h6>
|
||||
<h6>{% trans "stream_configuration_header" %}</h6>
|
||||
<hr class="my-4">
|
||||
<div class="btn-toolbar mb-4" role="toolbar">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'rtmp:stream_create' %}" type="button" class="btn btn-sm btn-outline-success">{% fa 'plus' %} Create</a>
|
||||
<a href="{% url 'rtmp:stream_create' %}" type="button" class="btn btn-sm btn-outline-success">{% fa 'plus' %} {% trans "create" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col" class="text-right">Actions</th>
|
||||
<th scope="col">{% trans "name" %}</th>
|
||||
<th scope="col" class="text-right">{% trans "actions" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -21,8 +22,8 @@
|
|||
<tr>
|
||||
<th scope="ro">{{ object.name }}</th>
|
||||
<td align="right">
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<a href="{% url 'rtmp:stream_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">Details</a>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'rtmp:stream_detail' pk=object.pk %}" type="button" class="btn btn-sm btn-primary">{% trans "details" %}</a>
|
||||
<a href="{% url 'rtmp:stream_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-danger">{% fa 'trash' %}</a>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -30,9 +31,4 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover()
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% load font_awesome %}
|
||||
|
||||
|
@ -19,7 +20,7 @@
|
|||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-light mb-4 border boder-bottom-0">
|
||||
<span class="navbar-brand mb-0 h1">
|
||||
<a href="{% url 'index' %}">Portier</a>
|
||||
<a href="{% url 'index' %}">portier</a>
|
||||
</span>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
@ -32,22 +33,23 @@
|
|||
{% if user.is_authenticated %}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Configuration
|
||||
{% trans "navbar_configuration" %}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
<h6 class="dropdown-header">{% trans "navbar_configuration_streaming_header" %}</h6>
|
||||
<a class="dropdown-item" href="{% url 'rtmp:stream_list' %}">{% trans "navbar_configuration_streams" %}</a>
|
||||
<a class="dropdown-item" href="{% url 'restream:restreamconfig_list' %}">{% trans "navbar_configuration_restreams" %}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">Streaming</h6>
|
||||
<a class="dropdown-item" href="{% url 'rtmp:stream_list' %}">Streams</a>
|
||||
<a class="dropdown-item" href="#">Restream</a>
|
||||
<h6 class="dropdown-header">{% trans "navbar_configuration_account_header" %}</h6>
|
||||
<a class="dropdown-item" href="{% url 'password_change' %}">{% trans "navbar_configuration_password_change" %}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-link logout" href="{% url 'logout' %}?next={% url 'index' %}">Logout</a>
|
||||
<a class="nav-link logout" href="{% url 'logout' %}?next={% url 'index' %}">{% trans "navbar_logout" %}</a>
|
||||
{% else %}
|
||||
<a class="nav-link login" href="{% url 'login' %}?next={% url 'index' %}">Login</a>
|
||||
<a class="nav-link login" href="{% url 'login' %}?next={% url 'index' %}">{% trans "navbar_login" %}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h1>Login</h1>
|
||||
<h6>{% trans "login" %}</h6>
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
|
@ -9,12 +10,12 @@
|
|||
{% bootstrap_form form %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-primary" value="login">
|
||||
Submit
|
||||
{% trans "login" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
<p><a href="{% url 'password_reset' %}">Lost password?</a></p>
|
||||
<p><a href="{% url 'password_reset' %}">{% trans "forgot_password_q" %}</a></p>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h1>Password Change</h1>
|
||||
<p>It frickin' worked! OMG.</p>
|
||||
<a class="btn btn-primary btn-lg" href="{% url 'index' %}">Back to safety</a>
|
||||
<h6>{% trans "password_change_successful" %}</h6>
|
||||
<p>{% trans "password_change_successful_text" %}</p>
|
||||
<a class="btn btn-primary btn-lg" href="{% url 'index' %}">{% trans "take_me_to_safety" %}</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h1>Password Change</h1>
|
||||
<h6>{% trans "change_password" %}</h6>
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
|
@ -9,14 +10,14 @@
|
|||
{% bootstrap_form form %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-primary" value="login">
|
||||
Submit
|
||||
{% trans "submit" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p>Please enter a name for your new stream configuration. This is only used for identification purposes.</p>
|
||||
{% trans "change_password_text_html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap4 %}
|
||||
{% block 'content' %}
|
||||
<h1>Password Reset</h1>
|
||||
<h6>{% trans "reset_password"}</h6>
|
||||
<div class="row">
|
||||
<div class="col-sm border-right">
|
||||
<form method="post">
|
||||
|
@ -9,14 +10,14 @@
|
|||
{% bootstrap_form form %}
|
||||
{% buttons %}
|
||||
<button type="submit" class="btn btn-primary" value="login">
|
||||
Submit
|
||||
{% trans "submit" %}
|
||||
</button>
|
||||
{% endbuttons %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p>Forgotten your password? Enter your email address, and we’ll email instructions for setting a new one.</p>
|
||||
{% trans "reset_password_text_html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue