From 7dc584d8cbc1e8d30709ed520c36ec8b246e396f Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 24 Dec 2021 12:17:14 +0100 Subject: [PATCH] bundles/infobeamer-cms: adjust config to new version --- .../files/infobeamer-cms-runperiodic.service | 2 +- bundles/infobeamer-cms/files/settings.cfg | 25 ++++++++++++++++--- bundles/infobeamer-cms/metadata.py | 4 +-- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service index 1e7ddba..53ae7c2 100644 --- a/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service +++ b/bundles/infobeamer-cms/files/infobeamer-cms-runperiodic.service @@ -7,4 +7,4 @@ Requires=infobeamer-cms.service User=infobeamer-cms Group=infobeamer-cms WorkingDirectory=/opt/infobeamer-cms -ExecStart=curl http://127.0.0.1:8000/sync +ExecStart=curl -H "Host: infobeamer-cms.c3voc.de" http://127.0.0.1:8000/sync diff --git a/bundles/infobeamer-cms/files/settings.cfg b/bundles/infobeamer-cms/files/settings.cfg index 435a2d4..28b2dd9 100644 --- a/bundles/infobeamer-cms/files/settings.cfg +++ b/bundles/infobeamer-cms/files/settings.cfg @@ -29,10 +29,12 @@ SETUP_IDS = ${SETUP_IDS} # urls send to moderators. URL_KEY = b'${URL_KEY}' -# Push notifications for moderation requests user pushover. -# Specify a target key and the app key to use. -PUSHOVER_TARGET = '${PUSHOVER_TARGET}' -PUSHOVER_APP_KEY = '${PUSHOVER_APP_KEY}' +# Push notifications for moderation requests to an mqtt server. +MQTT_SERVER = 'mqtt.c3voc.de' +MQTT_USERNAME = '${MQTT_USERNAME}' +MQTT_PASSWORD = '${MQTT_PASSWORD}' +MQTT_TOPIC = '/voc/alert' +MQTT_MESSAGE = '{{"level":"info","component":"infobeamer-cms","msg":"{asset} uploaded by {user}. Check it at {url}"}}' # Unix timestamp allows for specifying start/end time # of uploaded content @@ -42,6 +44,21 @@ TIME_MAX = ${TIME_MAX} # change this to invalidate cached static files. VERSION = ${VERSION} +# extra assets. If this is empty, only the uploaded content and a notice +# on where to find the CMS will be shown. You can use this to overlay +# content on top of that content. +EXTRA_ASSETS = [ + { + "type": "image", + "asset": 828107, # fairydust + # bottom left, 10px from border + "x1":10, + "y1":1070-66, + "x2":10+100, + "y2":1070, + } +] + # rooms. This is both used for the /last view as well # as the interruption control on /interrupt. ROOMS = ${dumps(node.metadata.get('infobeamer-cms/config/ROOMS', {}))} diff --git a/bundles/infobeamer-cms/metadata.py b/bundles/infobeamer-cms/metadata.py index 5b74877..99e9853 100644 --- a/bundles/infobeamer-cms/metadata.py +++ b/bundles/infobeamer-cms/metadata.py @@ -22,8 +22,8 @@ defaults = { 'MAX_UPLOADS': 5, 'SETUP_IDS': '[212947]', 'URL_KEY': repo.vault.password_for(f'{node.name} infobeamer-cms url key'), - 'PUSHOVER_TARGET': repo.vault.decrypt('encrypt$gAAAAABhxKJJrjd-wBezp1Bl8Lu_8BrMm4jiZvOub_XBnPTXE6mAHCTDCRGqH2-Z---hhuJh50MXroNzzIuA_9uAtwXhtkXkrsR344bcZh-idG6V0tDgzds='), - 'PUSHOVER_APP_KEY': repo.vault.decrypt('encrypt$gAAAAABhxJFqFafr8pZhQPn3HXGx0plLNQpnTDtJhM4PnlWYDBKjMZxUVh0Ol4631ZBTO5Sj8SIq79O2-Lx2eu0cGIZuzPQsZIBFuxv-30d81r6ljmLh8RQ='), + 'MQTT_USERNAME': repo.vault.decrypt('encrypt$gAAAAABhxakKHC_kHmHP2mFHorb4niuNTH4F24w1D6m5JUxl117N7znlZA6fpMmY3_NcmBr2Ihw4hL3FjZr9Fm_1oUZ1ZQdADA=='), + 'MQTT_PASSWORD': repo.vault.decrypt('encrypt$gAAAAABhxakfhhwWn0vxhoO1FiMEpdCkomWvo0dHIuBrqDKav8WDpI6dXpb0hoXiWRsPV6p5m-8RlbfFbjPhz47AY-nFOOAAW6Yis3-IVD-U-InKJo9dvms='), 'TIME_MIN': 1640039559, 'TIME_MAX': 1640905200, 'VERSION': 1,