Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONE] Feature: Webinar management in the meetings module #1092

Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4a8f7b7
Delete useless templates (replaced by pod/live/templates/meeting/meet…
LoicBonavent Apr 8, 2024
06395aa
Delete useless code for webinar chat and monitoring
LoicBonavent Apr 8, 2024
26ae1db
Manages the sending of messages for live webinars
LoicBonavent Apr 8, 2024
34024e3
Add webinar parameters: USE_MEETING_WEBINAR, MEETING_WEBINAR_SIPMEDIA…
LoicBonavent Apr 8, 2024
5290e7e
Manage USE_MEETING_WEBINAR parameter
LoicBonavent Apr 8, 2024
d14a3cd
Add configuration needed to test webinars
LoicBonavent Apr 8, 2024
b6516e9
Add webinars fields, LivestreamAdmin and IngesterAdmin classes
LoicBonavent Apr 8, 2024
982567c
Manage webinars fields and rules
LoicBonavent Apr 8, 2024
c9f0a48
Add webinars fields, Livestream and Ingester classes
LoicBonavent Apr 8, 2024
203a6ac
Add 2 CSS classes for meeting card
LoicBonavent Apr 8, 2024
eb65793
Add actions buttons to manage a webinar (restart a live, stop a live,…
LoicBonavent Apr 8, 2024
f9127a3
Manage webinars (no reccurrence available, guest policy = Always acce…
LoicBonavent Apr 8, 2024
0e7b58e
Manage webinars, add webinar actions buttons, display correction
LoicBonavent Apr 8, 2024
88d524d
Add some webinars tests
LoicBonavent Apr 8, 2024
de7d835
Add URLs for manage webinars
LoicBonavent Apr 8, 2024
31d837f
Code reordering
LoicBonavent Apr 8, 2024
ada64e6
Manages webinars views and refactor some code
LoicBonavent Apr 8, 2024
3cd887b
Add filter aside for meeting
LoicBonavent Apr 8, 2024
268d222
Add webinar utils tests
LoicBonavent Apr 8, 2024
224f281
Management of webinars for the Meeting module and SIPMediaGW API
LoicBonavent Apr 8, 2024
16a0549
Utils to manage webinars for Meeting module
LoicBonavent Apr 8, 2024
bf80707
Manages the sending of messages for live webinars (eplace pod/live/te…
LoicBonavent Apr 8, 2024
6dfa6cd
Add REST meeting views
LoicBonavent Apr 8, 2024
1b11055
Add REST meeting views
LoicBonavent Apr 8, 2024
aef396a
Add needed translations to manage webinars
LoicBonavent Apr 8, 2024
988d08a
Modify translations to manage webinars
LoicBonavent Apr 9, 2024
9be1543
Add REST meeting views
LoicBonavent Apr 9, 2024
55c81e6
Use d-none class
LoicBonavent Apr 9, 2024
388f2c5
Manage spaces and label for textarea
LoicBonavent Apr 9, 2024
a7da6df
Add a line at the end of the file
LoicBonavent Apr 9, 2024
359e0bb
Modify translations
LoicBonavent Apr 9, 2024
4d2e760
Changes in Pydoc
LoicBonavent Apr 9, 2024
27c85b0
Remove useless spaces
LoicBonavent Apr 9, 2024
6f0c3c4
Remove useless spaces
LoicBonavent Apr 9, 2024
57391bb
Correct show_chat init
LoicBonavent Apr 9, 2024
ed04e5c
[DONE] Add a submit button on the add video page (#1088)
Badatos Apr 9, 2024
8b24b35
Auto-update configuration files
invalid-email-address Apr 9, 2024
59d4fd7
Close p before ol
LoicBonavent Apr 9, 2024
5d2da38
Remove show_chat parameter
LoicBonavent Apr 11, 2024
f1bb50c
Remove show_chat parameter
LoicBonavent Apr 11, 2024
5a7353c
Modify translations (replace ingester by live gateway) to manage webi…
LoicBonavent Apr 11, 2024
9122ab0
Remove show_chat parameter
LoicBonavent Apr 11, 2024
d46de65
Add LiveGateway route
LoicBonavent Apr 11, 2024
3dc225e
Remove show_chat parameter and replace ingester by live gateway
LoicBonavent Apr 11, 2024
12a1421
Add LiveGateway route
LoicBonavent Apr 11, 2024
eef5a21
Remove show_chat parameter
LoicBonavent Apr 11, 2024
891be9c
Replace ingester by live gateway to test webinars
LoicBonavent Apr 11, 2024
94b8110
Remove show_chat parameter and replace ingester by live gateway
LoicBonavent Apr 11, 2024
217ac2d
Needs commit
LoicBonavent Apr 11, 2024
787f0d4
Merge translations
LoicBonavent Apr 12, 2024
929825b
Merge
LoicBonavent Apr 12, 2024
1632067
Merge branch 'develop' of https://github.com/EsupPortail/Esup-Pod int…
LoicBonavent Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dev-exemple
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DJANGO_SUPERUSER_USERNAME=<USER>
DJANGO_SUPERUSER_PASSWORD=<PWD>
DJANGO_SUPERUSER_EMAIL=<MAIL>
### You can use internal registry
ELASTICSEARCH_TAG=elasticsearch:8.8.1
ELASTICSEARCH_TAG=elasticsearch:8.13.0
NODE_TAG=node:19
PYTHON_TAG=python:3.9-buster
REDIS_TAG=redis:alpine3.16
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pod_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Flake8 compliance
run: |
flake8 --max-complexity=7 --ignore=E501,W503,E203 --exclude .git,pod/*/migrations/*.py,*_settings.py

## Start remote encoding and transcoding test ##
- name: Create settings local file
run: |
Expand All @@ -93,8 +93,8 @@ jobs:
sudo rm -rf ./pod/log
sudo rm -rf ./pod/static
sudo rm -rf ./pod/node_modules
docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml up --detach --force-recreate --always-recreate-deps
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml up --detach --force-recreate --always-recreate-deps
- name: Sleep for 60 seconds to wait run server on pod back
uses: jakejarvis/wait-action@master
with:
Expand All @@ -107,19 +107,19 @@ jobs:
docker exec pod-back-with-volumes python manage.py loaddata pod/video/fixtures/sample_videos.json
- name: run test in docker
run: docker exec pod-back-with-volumes coverage run --append --source='.' manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode

- name: Run pa11y-ci full
run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config.json

- name: Run pa11y-ci mobile
run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config_mobile.json

- name: show pa11y results
run: cat pa11y-results.json

- name: Stop containers
if: always()
run: docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml down
run: docker compose -f ./docker-compose-full-dev-with-volumes-test.yml down
- name: delete unused file and change owner
run: |
sudo rm -f pod/custom/settings_local.py
Expand Down
6 changes: 4 additions & 2 deletions CONFIGURATION_FR.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,11 @@ Vous pouvez tout à fait rajouter des langues comme vous le souhaitez. Il faudra

- `SECURE_SSL_REDIRECT`

> valeur par défaut : `not DEBUG`

> valeur par défaut : `False`

>> À moins que votre site ne doive être disponible sur des connexions SSL et non SSL, <br>
>> vous souhaiterez probablement définir ce paramètre sur True ou configurer un <br>
>> load balancer ou reverse-proxy pour rediriger toutes les connexions vers HTTPS. <br>

- `SESSION_COOKIE_AGE`

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ createconfigs:
# Use for docker run and docker exec commands
-include .env.dev
export
COMPOSE = docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL = docker-compose -f ./docker-compose-full-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL_TEST = docker-compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod
COMPOSE = docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL = docker compose -f ./docker-compose-full-dev-with-volumes.yml -p esup-pod
COMPOSE_FULL_TEST = docker compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod
DOCKER_LOGS = docker logs -f

#docker-start-build:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev-with-volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
- ./.env.dev
ports:
- 6379:6379

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-full-dev-with-volumes-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
env_file:
- ./.env.dev
volumes: *pod-volumes

pod-transcript:
container_name: pod-transcript-with-volumes
build:
Expand Down Expand Up @@ -83,7 +83,7 @@ services:
depends_on:
- pod-back
volumes: *pod-volumes

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-full-dev-with-volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
env_file:
- ./.env.dev
volumes: *pod-volumes

pod-transcript:
container_name: pod-transcript-with-volumes
build:
Expand Down Expand Up @@ -74,7 +74,7 @@ services:
- ./.env.dev
ports:
- 6379:6379

# redis-commander:
# container_name: redis-commander
# hostname: redis-commander
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ v1.2, 2023-08-30
:toc-title: Liste des rubriques
:imagesdir: ./images

== Docker / docker-compose avec volumes sur la machine hôte
== Docker / docker compose avec volumes sur la machine hôte

=== Conteneur ElasticSearch
http://localhost:9200
Expand Down
16 changes: 8 additions & 8 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ for /f "delims=" %%a in (.env.dev) do call set %%a
if /i "%1"=="docker-build" (
echo "Suppression du repertoire node_modules"
rmdir /s /q .\pod\node_modules
echo "Suppression du repertoire node_modules"
echo "Suppression du repertoire static"
rmdir /s /q .\pod\static
echo "Suppression du repertoire log"
rmdir /s /q .\pod\log
echo "Chargement des variables d'environnement depuis le fichier .env.dev"
for /f "delims=" %%a in (.env.dev) do call set %%a
echo "Debut du build"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=%ELASTICSEARCH_TAG% --build-arg NODE_VERSION=%NODE_TAG% --build-arg PYTHON_VERSION=%PYTHON_TAG% --no-cache
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=%ELASTICSEARCH_TAG% --build-arg NODE_VERSION=%NODE_TAG% --build-arg PYTHON_VERSION=%PYTHON_TAG% --no-cache
echo "Debut du start"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
echo "Vous devriez obtenir ce message une fois esup-pod lance"
echo "pod-dev-with-volumes | Superuser created successfully."
echo "Fin du build"
) else if /i "%1"=="docker-start" (
echo "Debut du start"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod up
echo "Fin du start"
) else if /i "%1"=="docker-stop" (
echo "Debut du stop"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
echo "Fin du stop"
) else if /i "%1"=="docker-reset" (
echo "Debut du reset"
docker-compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
docker compose -f ./docker-compose-dev-with-volumes.yml -p esup-pod down -v
echo "Suppression du repertoire node_modules"
rmdir /s /q .\pod\node_modules
echo "Suppression du repertoire node_modules"
echo "Suppression du repertoire static"
rmdir /s /q .\pod\static
echo "Suppression du repertoire log"
rmdir /s /q .\pod\log
echo "Suppression du repertoire db_migrations"
rmdir /s /q .\pod\db_migrations
echo "Suppression du repertoire db.sqlite3"
echo "Suppression du fichier db.sqlite3"
del /s /q .\pod\db.sqlite3
echo "Suppression du repertoire media"
rmdir /s /q .\pod\media
Expand Down
23 changes: 0 additions & 23 deletions pod/live/templates/bbb/bbb_form.html

This file was deleted.

41 changes: 0 additions & 41 deletions pod/live/templates/live/direct.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,46 +259,5 @@ <h2 class="card-title pod-card__title h4">
if ($("#divvideoplayer")) { $("#divvideoplayer").css("display", "block"); }
})
</script>
{% if display_chat %}
<script>
// Send question for BBB live
$(document).ready(function () {
$('.send-message').click(function (e) {
e.preventDefault();
var message = $('#message').val();
$.ajax
({
type: "GET",
url: "{% url 'bbb:live_publish_chat' id=broadcaster.id %}",
data: { "message": message },
success: function (data) {
$('#live_bbb_chat_form')[0].reset();
if (data.is_sent) {
// message_sent
displayReturnMessage("info", data.message_return);
} else {
// error_no_broadcaster_found: Message not sent: no broadcaster found
// error_no_connection: Message not sent: no connection to REDIS
displayReturnMessage("error", data.message_return);
}
}
});
});
});
function displayReturnMessage(level, returnCode) {
let returnMessage = "";
if (level == "info"){
$("#message_return").attr('class', 'alert alert-info');
} else {
$("#message_return").attr('class', 'alert alert-warning');
}
if (returnCode == "message_sent") { returnMessage = "{% trans 'Message sent' %}";}
if (returnCode == "error_no_broadcaster_found") { returnMessage = "{% trans 'Message not sent: no broadcaster found' %}";}
if (returnCode == "error_no_connection") { returnMessage = "{% trans 'Message not sent: connection problem (REDIS)' %}";}
$("#message_return").html(returnMessage);
$("#message_return").show("slow").delay(3000).hide("slow");
}
</script>
{% endif %}

{% endblock more_script %}
122 changes: 61 additions & 61 deletions pod/live/templates/live/event-script.html
Original file line number Diff line number Diff line change
Expand Up @@ -684,69 +684,69 @@
{% endif %}
}

// BBB message sending
{% if display_chat %}
function displayReturnMessage(level, returnCode) {
let toReturn = "";
let returnElement = document.getElementById("message_return");
if (level === "info") {
returnElement.classList.add('alert');
returnElement.classList.add('alert-info');
} else {
returnElement.classList.add('alert');
returnElement.classList.add('alert-warning');
}
if (returnCode === "message_sent") {
toReturn = "{% trans 'Message sent' %}";
}
if (returnCode === "error_no_broadcaster_found") {
toReturn = "{% trans 'Message not sent: no broadcaster found' %}";
}
if (returnCode === "error_no_connection") {
toReturn = "{% trans 'Message not sent: connection problem (REDIS)' %}";
}

returnElement.innerHTML = toReturn;
returnElement.style.display = "block";
setTimeout(function() {
returnElement.style.display = "none";
}, 3000)
}
// Webinar message sending
{% if enable_chat %}
/**
* Display if message was sent, or not, to the server.
*/
function displayReturnMessage(level, returnCode) {
let toReturn = "";
let returnElement = document.getElementById("message_return");
if (level === "info") {
returnElement.classList.add('alert', 'alert-info');
} else {
returnElement.classList.add('alert', 'alert-danger');
}
if (returnCode === "message_sent") {
toReturn = "{% trans 'Message sent' %}";
}
if (returnCode === "error") {
toReturn = "{% trans 'Message not sent' %}";
}

function sendBBBMessage(e) {
e.preventDefault();
let message = document.getElementById("message").value;
fetch("{% url 'bbb:live_publish_chat' id=event.broadcaster.id %}", {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
"X-CSRFToken": '{{ csrf_token }}'
},
body: JSON.stringify({"message": message}),
}).then((response) => {
if (response.ok)
return response.json();
else
return Promise.reject(response);
}).then((data) => {
document.getElementById('live_bbb_chat_form').reset();
if (data.is_sent) {
// message_sent
displayReturnMessage("info", data.message_return);
} else {
// error_no_broadcaster_found: Message not sent: no broadcaster found
// error_no_connection: Message not sent: no connection to REDIS
displayReturnMessage("error", data.message_return);
}
}).catch((error) => {
console.log("{% trans 'Error calling' %} 'sendBBBMessage' " + error);
});
}
returnElement.innerHTML = toReturn;
returnElement.classList.remove("d-none");
setTimeout(function() {
returnElement.classList.add("d-none");
}, 3000)
}

/**
* Send a message to a webinar live.
* */
function sendWebinarMessage(e) {
e.preventDefault();
let message = document.getElementById("message").value;
fetch("{% url 'meeting:live_publish_chat' id=event.id %}", {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
"X-CSRFToken": '{{ csrf_token }}'
},
body: JSON.stringify({"message": message}),
}).then((response) => {
if (response.ok)
return response.json();
else
return Promise.reject(response);
}).then((data) => {
document.getElementById('live_meeting_chat_form').reset();
console.info(data);
if (data.res) {
// Message_sent
displayReturnMessage("info", data.message_return);
} else {
displayReturnMessage("error", data.message_return);
}
}).catch((error) => {
console.log("{% trans 'Error calling' %} 'sendWebinarMessage' " + error);
});
}

document.getElementById('bbb-send-message').onclick = function ($this) {
sendBBBMessage($this);
};
document.getElementById('webinar-send-message').onclick = function ($this) {
sendWebinarMessage($this);
};

{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions pod/live/templates/live/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ <h1 class="h2" id="livename" data-eventid="{{ event.id }}"><i class="bi bi-broad
</iframe>
{% endif %}

{% if USE_BBB and USE_BBB_LIVE and display_chat %}
{% include "bbb/bbb_form.html" %}
{% if USE_MEETING and USE_MEETING_WEBINAR and enable_chat %}
{% include "meeting/meeting_live_form.html" %}
{% endif %}

<div id="viewers-list"><ul id="viewers-ul"></ul></div>
Expand Down