diff --git a/docker-compose.yaml b/docker-compose.yaml index a43dbbd..ece8d12 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '2.4' +version: "2.4" services: app: diff --git a/source/config/api/__init__.py b/source/config/api/__init__.py index 26a8e56..636befa 100644 --- a/source/config/api/__init__.py +++ b/source/config/api/__init__.py @@ -1 +1 @@ -from . import pull, recorder, restream, stream +from . import pull, recorder, restream, stream, transcodingprofile diff --git a/source/config/api/transcodingprofile.py b/source/config/api/transcodingprofile.py new file mode 100644 index 0000000..5bb2653 --- /dev/null +++ b/source/config/api/transcodingprofile.py @@ -0,0 +1,63 @@ + +from ninja import Router, ModelSchema, Schema +from ninja.errors import HttpError +from config import models +from typing import List +from guardian.shortcuts import get_objects_for_user, assign_perm +from django.shortcuts import get_object_or_404 + +router = Router() + +class TranscodingProfile(ModelSchema): + class Meta: + model = models.TranscodingProfile + fields = "__all__" + +class TranscodingProfilePatch(ModelSchema): + class Meta: + model = models.TranscodingProfile + exclude = ["id"] + fields_optional = "__all__" + extra = "forbid" + + +@router.get('/', response=List[TranscodingProfile]) +def list_transcodingprofile(request): + return get_objects_for_user(request.user, 'view_transcodingprofile', models.TranscodingProfile.objects.all()) + +@router.get('/{id}', response=TranscodingProfile) +def get_transcodingprofile(request, id: int): + obj = get_object_or_404(models.TranscodingProfile, id=id) + + if not request.user.has_perm('view_transcodingprofile', obj): + raise HttpError(401, "unauthorized") + + return obj + +@router.post('/', response=TranscodingProfile) +def create_transcodingprofile(request, payload: TranscodingProfilePatch): + obj = models.TranscodingProfile.objects.create(**payload.dict()) + + assign_perm( 'view_transcodingprofile', request.user, obj) + assign_perm('change_transcodingprofile', request.user, obj) + assign_perm('delete_transcodingprofile', request.user, obj) + return obj + +@router.patch('/{id}', response=TranscodingProfile) +def patch_transcodingprofile(request, id: int, payload: TranscodingProfilePatch): + obj = get_object_or_404(models.TranscodingProfile, id=id) + + if not request.user.has_perm('change_transcodingprofile', obj): + raise HttpError(401, "unauthorized") + + for key, value in payload.dict(exclude_unset=True).items(): + setattr(obj, key, value) + obj.save() + return obj + +@router.delete('/{id}', response=None) +def delete_transcodingprofile(request, id: int): + obj = get_object_or_404(models.TranscodingProfile, id=id) + if not request.user.has_perm('delete_transcodingprofile', obj): + raise HttpError(401, "unauthorized") + obj.delete() diff --git a/source/config/templates/config/transcodingprofile_confirm_delete.html b/source/config/templates/config/transcodingprofile_confirm_delete.html new file mode 100644 index 0000000..c7df8cd --- /dev/null +++ b/source/config/templates/config/transcodingprofile_confirm_delete.html @@ -0,0 +1,36 @@ +{% extends 'base.html' %} +{% load i18n %} +{% load static %} +{% load bootstrap4 %} +{% load fontawesome_5 %} + +{% block 'sidenav' %} + {% with 'transcodingprofile' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + +{% block 'content' %} + +
{% trans "name" %} | +{% trans "actions" %} | +
---|---|
{% verbatim %}{{cfg.name}}{% endverbatim %} | ++ {% trans "details" %} + {% fa5_icon 'trash' %} + | +
Eine Restream Konfiguration erlaubt es dir eingehende Streams in das " -"System unverändert an externe System weiterzuleiten.
Die Restream "
-"Konfiguration benötigt einen vorher konfigurierten Quell-Stream und ein "
-"Ziel, dass du über eine RTMP URL frei definieren kannst. Die RTMP URL sollte "
-"zum Beispiel so ausschauen: rtmp://servername/app/streamkey
"
-"p>
Du kannst natürlich mehrere Restream Konfigurationen auf einen " -"einzelnen Quell-Stream einrichten. Das erlaubt es dir von deinem Encoder nur " -"einmal einen Stream zu senden, diesen aber automatisch an mehrere Platformen " -"weiterzuleiten.
Nur Restream Konfigurationen die auf Aktiv geschaltet " -"sind werden bei einem neu eingehenden Stream ausgeführt!
" - -#: restream/templates/restream/restreamconfig_list.html:11 -msgid "restreamconfig_configuration_header" -msgstr "Restream Konfiguration" - -#: restream/templates/restream/restreamconfig_list.html:16 -#: rtmp/templates/rtmp/stream_list.html:16 -msgid "create" -msgstr "Erstellen" - -#: restream/templates/restream/restreamconfig_list.html:26 -#: rtmp/templates/rtmp/stream_list.html:26 -msgid "loading..." -msgstr "" - -#: restream/templates/restream/restreamconfig_list.html:35 -#: rtmp/templates/rtmp/stream_list.html:35 -msgid "actions" -msgstr "Aktionen" - -#: restream/templates/restream/restreamconfig_list.html:52 -#: rtmp/templates/rtmp/stream_list.html:46 -msgid "details" -msgstr "Details" - -#: restream/templates/restream/restreamconfig_update_form.html:5 -msgid "update_restreamconfig_configuration_header" -msgstr "Restream Konfiguration anpassen" - -#: rtmp/models.py:13 -msgid "rtmp_application_name" -msgstr "RTMP Application Name" - -#: rtmp/models.py:16 -msgid "application_verbose_name" -msgstr "Application" - -#: rtmp/models.py:17 -msgid "application_verbose_name_plural" -msgstr "Applications" - -#: rtmp/models.py:20 -msgid "aplication_class_name" -msgstr "Application" - -#: rtmp/models.py:27 -msgid "stream_application_help" -msgstr "Unter welcher RTMP Application gilt diese Stream ID" - -#: rtmp/models.py:28 -msgid "stream_stream_help" -msgstr "RTMP Stream ID" - -#: rtmp/models.py:29 -msgid "stream_name_help" -msgstr "Name für diesen Stream" - -#: rtmp/models.py:68 -msgid "stream_class_name" -msgstr "Stream" - -#: rtmp/templates/rtmp/stream_confirm_delete.html:13 -msgid "deleting_stream_configuration_will_also_delete_all_depending_confgurations_warning" -msgstr "" -"Achtung! Beim Löschen dieser Stream Konfiguration werden auch alle " -"abhängigen Konfigurationen gelöscht." - -#: rtmp/templates/rtmp/stream_confirm_delete.html:15 -#, python-format -msgid "are_you_sure_you_want_to_delete_\"%(stream_config_name)s\"?" -msgstr "Willst du wirklich \"%(stream_config_name)s\" löschen?" - -#: rtmp/templates/rtmp/stream_confirm_delete.html:25 -msgid "deleting_configurations_list_header" -msgstr "Diese Konfigurationen werden gelöscht" - -#: rtmp/templates/rtmp/stream_detail.html:12 -msgid "stream_configuration_details_header" -msgstr "Stream Konfiguration Details" - -#: rtmp/templates/rtmp/stream_detail.html:30 -msgid "application" -msgstr "Application" - -#: rtmp/templates/rtmp/stream_detail.html:33 -msgid "how_to_configure_your_encoder_header" -msgstr "Wie du deinen Encoder konfigurierst" - -#: rtmp/templates/rtmp/stream_detail.html:35 -msgid "set_this_stream_server_in_encoder" -msgstr "Stelle diesen Stream Server in deinem Encoder ein" - -#: rtmp/templates/rtmp/stream_detail.html:37 -msgid "set_this_stream_id_in_encoder" -msgstr "Stelle diese Stream ID in deinem Encoder ein" - -#: rtmp/templates/rtmp/stream_detail.html:46 -#: rtmp/templates/rtmp/stream_form.html:21 -#: rtmp/templates/rtmp/stream_update_form.html:21 -msgid "stream_configuration_text_html" -msgstr "" -"Eine Stream Konfiguration erlaubt es dir einen Stream in das System zu " -"schicken
Nur Streams die zu einer vorher erstellten Konfiguration " -"zugeordnet werden können werden vom System angenommen.
Der Name dient " -"dazu den Stream beim Erstellen von weiteren Konfigurationen leicht zu " -"identifizieren. Die tatsächliche Stream ID wird dir nach dem erstellen " -"angezeigt. Halte die Stream ID auf jeden Fall geheim.
" - -#: rtmp/templates/rtmp/stream_form.html:5 -msgid "create_new_stream_configuration_header" -msgstr "Neue Stream Konfiguration erstellen" - -#: rtmp/templates/rtmp/stream_list.html:11 -msgid "stream_configuration_header" -msgstr "Stream Konfiguration" - -#: rtmp/templates/rtmp/stream_list.html:34 -msgid "receiving" -msgstr "Empfange" - -#: rtmp/templates/rtmp/stream_update_form.html:5 -msgid "update_stream_configuration_header" -msgstr "Stream Konfiguration anpassen" - -#: templates/base.html:39 -#, python-format -msgid "hello_%(username)s" -msgstr "Hallo, %(username)s!" - -#: templates/base.html:42 -msgid "navbar_account_password_change" -msgstr "Passwort ändern" - -#: templates/base.html:43 -msgid "navbar_account_logout" -msgstr "Abmelden" - -#: templates/base.html:47 -msgid "navbar_login" -msgstr "Anmelden" - -#: templates/base.html:80 -msgid "navbar_configuration_pull" -msgstr "Pull" - -#: templates/base.html:83 -msgid "navbar_configuration_stream" -msgstr "Stream" - -#: templates/base.html:86 -msgid "navbar_configuration_restream" -msgstr "Restream" - -#: templates/base.html:89 -msgid "navbar_configuration_publish" -msgstr "Publish" - -#: templates/base.html:92 -msgid "navbar_configuration_record" -msgstr "Record" - -#: templates/base.html:95 -msgid "navbar_configuration_switch" -msgstr "Switch" - -#: templates/registration/login.html:5 templates/registration/login.html:14 -msgid "login" -msgstr "Anmelden" - -#: templates/registration/login.html:19 -msgid "forgot_password_q" -msgstr "Passwort vergessen?" - -#: templates/registration/password_change_done.html:5 -msgid "password_change_successful" -msgstr "Passwort erfolgreich geändert" - -#: templates/registration/password_change_done.html:7 -msgid "password_change_successful_text" -msgstr "" -"Das Passwort wurde erfolgreich geändert. Du kannst dich ab jetzt mit dem " -"neuen Passwort anmelden." - -#: templates/registration/password_change_form.html:5 -msgid "change_password" -msgstr "Passwort ändern" - -#: templates/registration/password_reset_form.html:5 -msgid "reset_password" -msgstr "Passwort vergessen" - -#: templates/registration/password_reset_form.html:21 -msgid "reset_password_text_html" -msgstr "" -"Du hast dein Passwort vergessen? Kein Problem. Gib hier die E-mail Adresse " -"deines Nutzerkonto an, und wir schicken dir einen Link zu mit dem du ein " -"neues Passwort setzen kannst." - -#~ msgid "navbar_streaming" -#~ msgstr "Streaming" diff --git a/source/locale/en/LC_MESSAGES/django.po b/source/locale/en/LC_MESSAGES/django.po index bca342d..16855a6 100644 --- a/source/locale/en/LC_MESSAGES/django.po +++ b/source/locale/en/LC_MESSAGES/django.po @@ -1,272 +1,581 @@ -# Copyright (C) Chaoswest TV +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# Jan KoppeA restream configuration allows you to forward incoming streamswithout " -"further processing to external systems.
The restream configuration "
-"needs a previously configured source stream and a target RTMP URL which you "
-"can freely chose. The target RTMP URL should look e.g. like this: "
-"rtmp://servername/app/streamkey
Only restream configurations that are marked " -"active will be executed for an incoming stream!
" -#: restream/templates/restream/restreamconfig_list.html:11 -msgid "restreamconfig_configuration_header" -msgstr "Restream configuration" +#: config/templates/config/pull_form.html:28 +#: config/templates/config/pull_update_form.html:28 +msgid "pull_configuration_text_html" +msgstr "" -#: restream/templates/restream/restreamconfig_list.html:16 -#: rtmp/templates/rtmp/stream_list.html:16 +#: config/templates/config/pull_list.html:18 +msgid "pull_configuration_header" +msgstr "" + +#: config/templates/config/pull_list.html:23 +#: config/templates/config/restream_list.html:23 +#: config/templates/config/stream_list.html:22 +#: config/templates/config/transcodingprofile_list.html:25 msgid "create" -msgstr "Create" +msgstr "" -#: restream/templates/restream/restreamconfig_list.html:26 -#: rtmp/templates/rtmp/stream_list.html:26 +#: config/templates/config/pull_list.html:33 +#: config/templates/config/restream_list.html:33 +#: config/templates/config/stream_list.html:32 +#: config/templates/config/transcodingprofile_list.html:36 msgid "loading..." msgstr "" -#: restream/templates/restream/restreamconfig_list.html:35 -#: rtmp/templates/rtmp/stream_list.html:35 +#: config/templates/config/pull_list.html:42 +#: config/templates/config/restream_list.html:42 +#: config/templates/config/stream_list.html:41 +#: config/templates/config/transcodingprofile_list.html:44 msgid "actions" -msgstr "Actions" +msgstr "" -#: restream/templates/restream/restreamconfig_list.html:52 -#: rtmp/templates/rtmp/stream_list.html:46 +#: config/templates/config/pull_list.html:59 +#: config/templates/config/restream_list.html:59 +#: config/templates/config/stream_list.html:52 +#: config/templates/config/transcodingprofile_list.html:55 msgid "details" -msgstr "Details" +msgstr "" -#: restream/templates/restream/restreamconfig_update_form.html:5 -msgid "update_restreamconfig_configuration_header" -msgstr "Update restream configuration" +#: config/templates/config/pull_update_form.html:12 +msgid "update_pull_configuration_header" +msgstr "" -#: rtmp/models.py:13 -msgid "rtmp_application_name" -msgstr "RTMP application name" +#: config/templates/config/restream_confirm_delete.html:19 +#, python-format +msgid "are_you_sure_you_want_to_delete_\"%(restream_config_name)s\"?" +msgstr "" +"Are you sure you want to delete \"%(restream_config_name)s\"? This action " +"cannot be undone." -#: rtmp/models.py:16 -msgid "application_verbose_name" -msgstr "RTMP application" +#: config/templates/config/restream_detail.html:19 +msgid "restream_configuration_details_header" +msgstr "" -#: rtmp/models.py:17 -msgid "application_verbose_name_plural" -msgstr "RTMP applications" +#: config/templates/config/restream_detail.html:50 +msgid "configured_target_url" +msgstr "" +"Configured target URL. This is the URL where the stream will be restreamed " +"to." -#: rtmp/models.py:20 -msgid "aplication_class_name" -msgstr "Application" +#: config/templates/config/restream_form.html:12 +msgid "create_new_restream_configuration_header" +msgstr "" -#: rtmp/models.py:27 -msgid "stream_application_help" -msgstr "Application which the stream is assigned to" +#: config/templates/config/restream_form.html:28 +#: config/templates/config/restream_update_form.html:28 +msgid "restream_configuration_text_html" +msgstr "" -#: rtmp/models.py:28 -msgid "stream_stream_help" -msgstr "Stream ID for this stream" +#: config/templates/config/restream_list.html:18 +msgid "restream_configuration_header" +msgstr "Restream Configuration" -#: rtmp/models.py:29 -msgid "stream_name_help" -msgstr "Name for this stream" +#: config/templates/config/restream_update_form.html:12 +msgid "update_restream_configuration_header" +msgstr "Change Restream Configuration" -#: rtmp/models.py:68 -msgid "stream_class_name" -msgstr "Stream" - -#: rtmp/templates/rtmp/stream_confirm_delete.html:13 +#: config/templates/config/stream_confirm_delete.html:20 msgid "deleting_stream_configuration_will_also_delete_all_depending_confgurations_warning" msgstr "" -"Attention! Deleting this stream configuration will also delete all depending " -"configurations." +"Deleting this stream configuration will also delete all depending " +"configurations. This action cannot be undone." -#: rtmp/templates/rtmp/stream_confirm_delete.html:15 +#: config/templates/config/stream_confirm_delete.html:22 #, python-format msgid "are_you_sure_you_want_to_delete_\"%(stream_config_name)s\"?" -msgstr "Are you sure you want to delete \"%(stream_config_name)s\"?" +msgstr "" +"Are you sure you want to delete \"%(stream_config_name)s\"? This will also " +"delete all depending configurations. This action cannot be undone." -#: rtmp/templates/rtmp/stream_confirm_delete.html:25 +#: config/templates/config/stream_confirm_delete.html:32 msgid "deleting_configurations_list_header" -msgstr "List of deleted configurations" +msgstr "Stream Configurations" -#: rtmp/templates/rtmp/stream_detail.html:12 +#: config/templates/config/stream_detail.html:19 msgid "stream_configuration_details_header" -msgstr "Stream configuration details" +msgstr "Stream Configuration Details" -#: rtmp/templates/rtmp/stream_detail.html:30 -msgid "application" -msgstr "Application" - -#: rtmp/templates/rtmp/stream_detail.html:33 +#: config/templates/config/stream_detail.html:38 msgid "how_to_configure_your_encoder_header" -msgstr "How to configure your encoder" +msgstr "" -#: rtmp/templates/rtmp/stream_detail.html:35 +#: config/templates/config/stream_detail.html:40 msgid "set_this_stream_server_in_encoder" -msgstr "Set this stream server in your encoder" +msgstr "Set one of these stream servers in your encoder." -#: rtmp/templates/rtmp/stream_detail.html:37 +#: config/templates/config/stream_detail.html:49 msgid "set_this_stream_id_in_encoder" -msgstr "Set this stream ID in your encoder" +msgstr "Set this stream ID as the key in your encoder." -#: rtmp/templates/rtmp/stream_detail.html:46 -#: rtmp/templates/rtmp/stream_form.html:21 -#: rtmp/templates/rtmp/stream_update_form.html:21 +#: config/templates/config/stream_detail.html:58 +#: config/templates/config/stream_form.html:28 +#: config/templates/config/stream_update_form.html:28 msgid "stream_configuration_text_html" msgstr "" -"A stream configuration allows you to send a stream into the system." -"p>
Only streams that can be matched to a previously configured stream will " -"be accepted by the system.
The only purpose of the name is to make " -"this stream easily identifiable when creating further configurations.The " -"actual stream ID will be shown to you after creation. Always keep " -"your stream ID secret.
" -#: rtmp/templates/rtmp/stream_form.html:5 +#: config/templates/config/stream_form.html:12 msgid "create_new_stream_configuration_header" -msgstr "Create new stream configuration" +msgstr "Create new Stream Configuration" -#: rtmp/templates/rtmp/stream_list.html:11 +#: config/templates/config/stream_list.html:17 msgid "stream_configuration_header" -msgstr "Stream configuration" +msgstr "Stream Configuration" -#: rtmp/templates/rtmp/stream_list.html:34 +#: config/templates/config/stream_list.html:40 msgid "receiving" -msgstr "Receiving" +msgstr "Reseiving" -#: rtmp/templates/rtmp/stream_update_form.html:5 +#: config/templates/config/stream_update_form.html:12 msgid "update_stream_configuration_header" -msgstr "Change stream configuration" +msgstr "Edit Stream Configuration" + +#: config/templates/config/transcodingprofile_detail.html:18 +#, fuzzy +#| msgid "stream_configuration_details_header" +msgid "transcodingprofile_configuration_details_header" +msgstr "Stream Configuration Details" + +#: config/templates/config/transcodingprofile_detail.html:44 +msgid "transcodingprofile_video_map_stream" +msgstr "Stream" + +#: config/templates/config/transcodingprofile_detail.html:46 +msgid "transcodingprofile_video_codec" +msgstr "Codec" + +#: config/templates/config/transcodingprofile_detail.html:48 +msgid "transcodingprofile_video_bitrate" +msgstr "Bitrate" + +#: config/templates/config/transcodingprofile_detail.html:50 +msgid "transcodingprofile_video_bitrate_mode" +msgstr "Mode" + +#: config/templates/config/transcodingprofile_detail.html:52 +msgid "transcodingprofile_video_gop_size" +msgstr "GOP Size" + +#: config/templates/config/transcodingprofile_detail.html:54 +msgid "transcodingprofile_video_pixel_format" +msgstr "Pixelfmt" + +#: config/templates/config/transcodingprofile_detail.html:56 +msgid "transcodingprofile_video_resolution" +msgstr "Resolution" + +#: config/templates/config/transcodingprofile_detail.html:58 +msgid "transcodingprofile_video_frame_rate" +msgstr "Frame Rate" + +#: config/templates/config/transcodingprofile_detail.html:65 +msgid "transcodingprofile_audio_map_stream" +msgstr "Stream" + +#: config/templates/config/transcodingprofile_detail.html:67 +msgid "transcodingprofile_audio_codec" +msgstr "Codec" + +#: config/templates/config/transcodingprofile_detail.html:69 +msgid "transcodingprofile_audio_bitrate" +msgstr "Bitrate" + +#: config/templates/config/transcodingprofile_detail.html:71 +msgid "transcodingprofile_audio_channels" +msgstr "Channels" + +#: config/templates/config/transcodingprofile_detail.html:73 +msgid "transcodingprofile_audio_sample_rate" +msgstr "Samplerate" + +#: config/templates/config/transcodingprofile_list.html:16 +msgid "transcodingprofile_configuration_header" +msgstr "Transcoding Profile Configuration" + +#: config/util.py:8 +#, python-format +msgid "" +"Invalid URL: %(value)s. Must start with one of the following: %(protocols)s" +msgstr "" +"Invalid URL: %(value)s. Must start with one of the following: %(protocols)s" + +#: portier/settings.py:143 +msgid "English" +msgstr "English" #: templates/base.html:39 #, python-format msgid "hello_%(username)s" -msgstr "Hello, %(username)s!" +msgstr "Hello, %(username)s" #: templates/base.html:42 msgid "navbar_account_password_change" -msgstr "Change password" +msgstr "Change Password" #: templates/base.html:43 msgid "navbar_account_logout" @@ -276,27 +585,31 @@ msgstr "Logout" msgid "navbar_login" msgstr "Login" -#: templates/base.html:80 -msgid "navbar_configuration_pull" -msgstr "Pull" - -#: templates/base.html:83 +#: templates/base.html:81 msgid "navbar_configuration_stream" msgstr "Stream" +#: templates/base.html:84 +msgid "navbar_configuration_transcodingprofiles" +msgstr "Profiles" + #: templates/base.html:86 msgid "navbar_configuration_restream" msgstr "Restream" #: templates/base.html:89 +msgid "navbar_configuration_pull" +msgstr "Pull" + +#: templates/base.html:92 msgid "navbar_configuration_publish" msgstr "Publish" -#: templates/base.html:92 +#: templates/base.html:95 msgid "navbar_configuration_record" msgstr "Record" -#: templates/base.html:95 +#: templates/base.html:98 msgid "navbar_configuration_switch" msgstr "Switch" @@ -306,32 +619,34 @@ msgstr "Login" #: templates/registration/login.html:19 msgid "forgot_password_q" -msgstr "Did you forget your password?" +msgstr "Forgot Password?" #: templates/registration/password_change_done.html:5 msgid "password_change_successful" -msgstr "Password change was successful" +msgstr "Password change was successful." #: templates/registration/password_change_done.html:7 msgid "password_change_successful_text" -msgstr "" -"The password has succesfully been changed. From now on you can login with " -"your new password." +msgstr "The password has been changed. Please login with your new password." #: templates/registration/password_change_form.html:5 msgid "change_password" -msgstr "Change password" +msgstr "Change Password" #: templates/registration/password_reset_form.html:5 msgid "reset_password" -msgstr "Password forgotten?" +msgstr "Reset Password" #: templates/registration/password_reset_form.html:21 msgid "reset_password_text_html" -msgstr "" -"Did you forget your password? No worries. Enter the e-mail address of your " -"user account here. We will send an e-mail with a link to you, which you can " -"use to reset the password." +msgstr "Reset your password by entering your email address." -#~ msgid "navbar_streaming" -#~ msgstr "Streaming" +#, fuzzy, python-format +#~| msgid "are_you_sure_you_want_to_delete_\"%(restream_config_name)s\"?" +#~ msgid "are_you_sure_you_want_to_delete_\"%(transcodingprofile_config_name)s\"?" +#~ msgstr "" +#~ "Are you sure you want to delete \"%(restream_config_name)s\"? This action " +#~ "cannot be undone." + +#~ msgid "German" +#~ msgstr "German" diff --git a/source/portier/api.py b/source/portier/api.py index 7c27dfc..8faaae5 100644 --- a/source/portier/api.py +++ b/source/portier/api.py @@ -33,4 +33,5 @@ api.add_router("/config/recorder/", config_api.recorder.router, auth=django_auth api.add_router("/config/pull/", config_api.pull.router, auth=django_auth, tags=["Pull Configuration API"]) api.add_router("/config/stream/", config_api.stream.router, auth=django_auth, tags=["Stream Configuration API"]) api.add_router("/config/restream/", config_api.restream.router, auth=django_auth, tags=["Resteam Configuration API"]) +api.add_router("/config/transcodingprofile/", config_api.transcodingprofile.router, auth=django_auth, tags=["Transcoding Profile Configuration API"]) api.add_router("/concierge/", concierge_router, auth=None, tags=["Concierge API"]) diff --git a/source/portier/settings.py b/source/portier/settings.py index e06ff17..6c4e3d1 100644 --- a/source/portier/settings.py +++ b/source/portier/settings.py @@ -139,7 +139,7 @@ USE_I18N = True USE_TZ = True LANGUAGES = [ - ('de', _('German')), + #('de', _('German')), ('en', _('English')), ] @@ -191,12 +191,12 @@ CELERY_BEAT_SCHEDULE = { }, } # Fixes incompatibility with tzlocal and pytz -DJANGO_CELERY_BEAT_TZ_AWARE = False +DJANGO_CELERY_BEAT_TZ_AWARE = False DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' -if DEBUG == "LOLOLOL": +if DEBUG: LOGGING = { 'version': 1, 'disable_existing_loggers': False, diff --git a/source/static/js/transcodingprofile-list.js b/source/static/js/transcodingprofile-list.js new file mode 100644 index 0000000..faa75af --- /dev/null +++ b/source/static/js/transcodingprofile-list.js @@ -0,0 +1,26 @@ +var app = new Vue({ + el: "#app", + data: { + cfgs: [], + isLoading: true, + }, + methods: { + detailLink(id) { + return `${id}/`; + }, + deleteLink(id) { + return `${id}/delete`; + }, + fetchData() { + axios.get("/api/v2/config/transcodingprofile").then((response) => { + this.cfgs = response.data; + this.isLoading = false; + }); + }, + }, + mounted() { + axios.defaults.xsrfCookieName = "csrftoken"; + axios.defaults.xsrfHeaderName = "X-CSRFTOKEN"; + this.fetchData(); + }, +}); diff --git a/source/templates/base.html b/source/templates/base.html index 345269d..c66a7a1 100644 --- a/source/templates/base.html +++ b/source/templates/base.html @@ -80,6 +80,8 @@