From aed574b13ca899aec40b6fe657f07ccf9b75dbcb Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 2 Jul 2024 07:25:22 +0200 Subject: [PATCH 1/5] Add 1 git-crypt collaborator New collaborators: C2175B8A Ramon Wenger --- ...72A3BBE62AD447B5A598326B07671799C2175B8A.gpg | Bin 725 -> 725 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.git-crypt/keys/default/0/72A3BBE62AD447B5A598326B07671799C2175B8A.gpg b/.git-crypt/keys/default/0/72A3BBE62AD447B5A598326B07671799C2175B8A.gpg index db281e8596e15f71b51ce55ce47511b64384505f..b30ef07b0c6955bd5cef8ce8b5dc848011299be9 100644 GIT binary patch literal 725 zcmV;`0xJE50t^Gn*6M@r4BHz45C3j3JFD^v9&Z6bxT3T$<;(7$Xr(1(3c|lL)~0FN zaEp$cy{73qra^*-_l{&WQh8=@%0CEBztwipBydd^2@Hy6C$V@j`*zbZF{B21Z}x+|3d{!C^jJF zn(v@X5;+dnWtH(CbY`xllTCo$YDg+r)hmsvEd}P1Y?oo%Vw%ds*qs0d;=xgap;s>% z&_DGDybJzc_Y@XP5wd^Y1_G^qD`ojR9`bIdOHk>iHP=ADl3yGLk#f@amD;dn#D22A zUG+RTFubuHf=y@pT`SOLSk&oF#SEEtJEQMNNNO3-@gVOh;*;O_`a2D*Ye|37 zbLqWv=jRa>ox~6(-H~;i=Ao>rV7MuF2&53w0@WDlA7c^e6DVQX#L{~rM%_|b+&X-^= H>aLB`3XEPr literal 725 zcmV;`0xJE50t^Gn*6M@r4BHz45C2I8y(M_uxTHXV4Bmn><#*M;Z+Dyn5^Vn!TiMxh zVyEuvd9hni-l`rd>zT-tGyfAZX^-Bv;UuZa;VOLpaYaSUouDBpq_M~+a6Wt3@QnXr zpc#$aJ8XiZ#D2BVbLZlRnssy7NXE`nqM{$(4Bfc8N5NxygO6Q)g?SHU(=x!3en#P# z_Wa(xT08~up!gLZa!!@AHNhQ=9tQ3hq0DT{Z5JJLIb;iBd-Js}(|c`ZX1WV5@m5ru z<*Mcc$4q!c$2+(yAynD4yPi#uKij?B?4L|AJ@v;5c7U0b-?}}c4$7>bxcgna-Ip0a z>8RZp6GB)M{2fK7GA}Bwyp%0vks*KTmjI+w!7JsCrDheb`3QNlLNn}TShC;}>Gn&? zEM~mw3SY7<)d&#n$lrA%v5~GgFr2EDYp~BM5}~4n^x%-K#3{U;XYY#Cw;|ENV{W}(z<}Qz^9wKf60Q3)b3Fq z$IJqwZ!c{}NRA&ZMFSDqDCj}p1U=4GDq3HTD7}lV)JL zKJ{~(>9?Wf=CmQ-V8`Y$wOl$exi==gz!EOK%vAhUL;6`0fJSDU_udMBO*X%%Aj HzzAGn9pZ1O From 4390dc0d472cad2d9b15b447752373ed9fdd5bd7 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 2 Jul 2024 09:11:46 +0200 Subject: [PATCH 2/5] Add 1 git-crypt collaborator [skip ci] New collaborators: 8DFE4008 Ramon Wenger --- .../70D75BE89768BB8DD5609A186CC392238DFE4008.gpg | Bin 0 -> 597 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .git-crypt/keys/default/0/70D75BE89768BB8DD5609A186CC392238DFE4008.gpg diff --git a/.git-crypt/keys/default/0/70D75BE89768BB8DD5609A186CC392238DFE4008.gpg b/.git-crypt/keys/default/0/70D75BE89768BB8DD5609A186CC392238DFE4008.gpg new file mode 100644 index 0000000000000000000000000000000000000000..7329d5db393778249e33db28dc2505fa9a71cf48 GIT binary patch literal 597 zcmV-b0;>Im0gMATvCa4N5Rnf73;rbZz#;oi(_nXC?y*uDzzM3qi#gG9;35Sa#$X%I z@@ex$AXjaTR1nd4BWU)>lxc~)tGh8Chc8;n=ob0*FYLw9 z!UY{)@6IzG&=fB4@%p-6Q$AKNL(W^Mstx{*O_O5(WFWU1*A1~SeOCms<$cT;hy;UH zXeL?(UVty?iD-NmQ4PTBMbKds&E4hlJzEcpM$eto7!@Y2Gw(lisw4T>t}P0Yi@lQH zxAX+PtottRADddFdjsDnIh+!>A+c-9nG4FB*rvz?)#a(Kf3H?e-cH(AoF7KloR;B@ zrZ?qH21NaL^g7`i*_`s6MxI({EYEA|M6pCs|USxFJ+sSPs z>ZZ>*o^PR2-~3ilq*sD}W~z~`DIp0na|oHMND%f$Ut?1`HcV+K=wzK7dWZFE$pjIS zkTwd^p<@<)B0&6|ScYW~!P1BT)OE+-xJb#)fuizD;l{O;WGA?39mf%9AQrx6`hnv* jh7@%9Uv9h?q~=siD;CS$Ea3%qD$@EHTUE)oq^9n6scR+k literal 0 HcmV?d00001 From 767f6c42f6cbfce4d502ef82ef1064b58018f22a Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 2 Jul 2024 14:07:43 +0200 Subject: [PATCH 3/5] Add export to feedback cockpit page --- client/src/pages/cockpit/FeedbackPage.vue | 30 ++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/client/src/pages/cockpit/FeedbackPage.vue b/client/src/pages/cockpit/FeedbackPage.vue index 0267d5f4..8217045d 100644 --- a/client/src/pages/cockpit/FeedbackPage.vue +++ b/client/src/pages/cockpit/FeedbackPage.vue @@ -11,7 +11,18 @@
-

{{ $t("feedback.feedbackPageTitle") }}

+
+

{{ $t("feedback.feedbackPageTitle") }}

+ +

{{ feedbackData.amount }} @@ -37,6 +48,9 @@ import type { FeedbackData, FeedbackType } from "@/types"; import FeedbackPageVV from "@/pages/cockpit/FeedbackPageVV.vue"; import FeedbackPageUK from "@/pages/cockpit/FeedbackPageUK.vue"; import { useExpertCockpitPageData } from "@/pages/cockpit/cockpitPage/composables"; +import { exportFeedback } from "@/services/dashboard"; +import { useUserStore } from "@/stores/user"; +import { openDataAsXls } from "@/utils/export"; const props = defineProps<{ courseSlug: string; @@ -46,9 +60,23 @@ const props = defineProps<{ log.debug("FeedbackPage created", props.circleId); const { loading } = useExpertCockpitPageData(props.courseSlug); const courseSession = useCurrentCourseSession(); +const userStore = useUserStore(); + const feedbackData = ref(undefined); const feedbackType = ref(undefined); +async function exportData() { + log.debug("FeedbackPage exportData"); + const data = await exportFeedback( + { + courseSessionIds: [Number(courseSession.value.id)], + circleIds: [Number(props.circleId)], + }, + userStore.language + ); + openDataAsXls(data.encoded_data, data.file_name); +} + onMounted(async () => { log.debug("FeedbackPage mounted"); feedbackData.value = await itGet( From c0a94ca98841fe78ac8429fb81ab796cf23ce290 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Tue, 2 Jul 2024 15:03:42 +0200 Subject: [PATCH 4/5] Add attendance export in cockpit --- client/src/pages/cockpit/FeedbackPage.vue | 1 - .../AttendanceCheckPage.vue | 39 +++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/client/src/pages/cockpit/FeedbackPage.vue b/client/src/pages/cockpit/FeedbackPage.vue index 8217045d..e48dc6d4 100644 --- a/client/src/pages/cockpit/FeedbackPage.vue +++ b/client/src/pages/cockpit/FeedbackPage.vue @@ -66,7 +66,6 @@ const feedbackData = ref(undefined); const feedbackType = ref(undefined); async function exportData() { - log.debug("FeedbackPage exportData"); const data = await exportFeedback( { courseSessionIds: [Number(courseSession.value.id)], diff --git a/client/src/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue b/client/src/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue index 502c67b4..27460184 100644 --- a/client/src/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue +++ b/client/src/pages/cockpit/attendanceCheckPage/AttendanceCheckPage.vue @@ -2,7 +2,7 @@ import ItCheckbox from "@/components/ui/ItCheckbox.vue"; import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue"; import ItPersonRow from "@/components/ui/ItPersonRow.vue"; -import { useCourseSessionDetailQuery } from "@/composables"; +import { useCourseSessionDetailQuery, useCurrentCourseSession } from "@/composables"; import type { AttendanceUserStatus } from "@/gql/graphql"; import { ATTENDANCE_CHECK_MUTATION } from "@/graphql/mutations"; import type { DropdownSelectable } from "@/types"; @@ -13,10 +13,15 @@ import { computed, onMounted, reactive, watch } from "vue"; import { useTranslation } from "i18next-vue"; import { ATTENDANCE_CHECK_QUERY } from "@/graphql/queries"; import { graphqlClient } from "@/graphql/client"; +import { exportAttendance } from "@/services/dashboard"; +import { openDataAsXls } from "@/utils/export"; +import { useUserStore } from "@/stores/user"; const { t } = useTranslation(); const attendanceMutation = useMutation(ATTENDANCE_CHECK_MUTATION); const courseSessionDetailResult = useCourseSessionDetailQuery(); +const userStore = useUserStore(); +const courseSession = useCurrentCourseSession(); const attendanceCourses = computed(() => { return courseSessionDetailResult.courseSessionDetail.value?.attendance_courses ?? []; @@ -26,6 +31,13 @@ const courseSessionDetail = computed(() => { return courseSessionDetailResult.courseSessionDetail.value; }); +const attendanceCourseCircleId = computed(() => { + const selectedAttendandeCourse = attendanceCourses.value.find( + (course) => course.id === state.attendanceCourseSelected.id + ); + return selectedAttendandeCourse?.learning_content?.circle?.id; +}); + const presenceCoursesDropdownOptions = computed(() => { return attendanceCourses.value.map( (attendanceCourse) => @@ -114,6 +126,17 @@ function editAgain() { state.attendanceSaved = false; } +async function exportData() { + const data = await exportAttendance( + { + courseSessionIds: [Number(courseSession.value.id)], + circleIds: [Number(attendanceCourseCircleId.value)], + }, + userStore.language + ); + openDataAsXls(data.encoded_data, data.file_name); +} + onMounted(() => { log.debug("AttendanceCheckPage mounted"); loadAttendanceData(); @@ -141,8 +164,18 @@ watch( {{ $t("general.back") }} -

{{ $t("Anwesenheit Präsenzkurse") }}
- +
+

{{ $t("Anwesenheit Präsenzkurse") }}

+ +
Date: Wed, 3 Jul 2024 17:07:28 +0200 Subject: [PATCH 5/5] Increase number of gunicorn workers to 8 [skip-ci] --- compose/django/supervisord.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/django/supervisord.conf b/compose/django/supervisord.conf index 2e668f56..08490e64 100644 --- a/compose/django/supervisord.conf +++ b/compose/django/supervisord.conf @@ -8,7 +8,7 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 [program:gunicorn] -command=newrelic-admin run-program gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker +command=newrelic-admin run-program gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker --workers 8 --worker-connections 1000 --backlog 2048 --timeout 60 --keep-alive 3 redirect_stderr=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0