-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from H2-invent/development
Development
- Loading branch information
Showing
442 changed files
with
20,019 additions
and
14,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,59 @@ | ||
FROM thecodingmachine/php:8.2-v4-apache-node16 | ||
ENV PHP_EXTENSION_LDAP=1 | ||
ENV PHP_EXTENSION_INTL=1 | ||
ENV TZ=Europe/Berlin | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 | ||
USER root | ||
RUN usermod -a -G www-data docker | ||
#Do npm install | ||
COPY package.json /var/www/html | ||
COPY package-lock.json /var/www/html | ||
COPY webpack.config.js /var/www/html | ||
RUN npm install | ||
#do npm build | ||
COPY assets /var/www/html/assets | ||
COPY public /var/www/html/public | ||
RUN mkdir -m 777 -p public/build | ||
RUN npm run build | ||
RUN rm -rf node_modules/ | ||
#copy all the rest of the app | ||
COPY . /var/www/html | ||
#install all php dependencies | ||
|
||
RUN chown -R docker:docker secretStorage | ||
USER docker | ||
RUN composer install | ||
ARG PHP_IMAGE_VERSION=3.20.6 | ||
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${PHP_IMAGE_VERSION} | ||
|
||
ARG VERSION | ||
ARG SUPERCRONIC_VERSION=0.2.33 | ||
|
||
LABEL version="${VERSION}" \ | ||
Maintainer="H2 invent GmbH" \ | ||
Description="Docker Image for Open Datenschutzcenter" \ | ||
org.opencontainers.version="${VERSION}" \ | ||
org.opencontainers.image.title="Open Datenschutzcenter" \ | ||
org.opencontainers.image.license="AGPLv3" \ | ||
org.opencontainers.image.vendor="H2 invent GmbH" \ | ||
org.opencontainers.image.authors="Andreas Holzmann <support@h2-invent.com>" \ | ||
org.opencontainers.image.source="https://github.com/h2-invent/open-datenschutzcenter" \ | ||
org.opencontainers.image.documentation="https://open-datenschutzcenter.de" \ | ||
org.opencontainers.image.url="https://open-datenschutzcenter.de" | ||
|
||
USER root | ||
#do all the directory stuff | ||
RUN chmod -R 775 public/build | ||
RUN mkdir -p var/cache | ||
RUN chown -R docker:docker var | ||
RUN chmod -R 777 var | ||
RUN chown -R docker:docker var/ | ||
USER docker | ||
|
||
RUN apk --no-cache add \ | ||
unzip \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
RUN mkdir /etc/service/cron \ | ||
&& echo "#!/bin/sh" > /etc/service/cron/run \ | ||
&& echo "exec 2>&1 /supercronic /var/crontab" >> /etc/service/cron/run \ | ||
&& chown -R nobody:nobody /etc/service/cron \ | ||
&& chmod -R +x /etc/service/cron | ||
|
||
RUN wget https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-amd64 -O /supercronic \ | ||
&& chmod +x /supercronic | ||
|
||
RUN wget https://git.h2-invent.com/Public-System-Design/Public-Helperscripts/raw/branch/main/distributed_cron.sh -O /distributed_cron.sh \ | ||
&& chmod +x /distributed_cron.sh | ||
|
||
RUN echo "# Docker Cron Jobs" > /var/crontab \ | ||
&& echo "SHELL=/bin/sh" >> /var/crontab \ | ||
&& echo "* * * * * date" >> /var/crontab \ | ||
&& echo "0 1 * * * curl https://open-datenschutzcenter.de/health/check" >> /var/crontab \ | ||
&& echo "0 9 * * 1-5 /bin/sh /distributed_cron.sh 'data/cron_log' 'php /var/www/html/bin/console app:cron'" >> /var/crontab \ | ||
&& echo "" >> /var/crontab | ||
|
||
RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/01-symfony.sh \ | ||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ | ||
&& echo "php bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/01-symfony.sh \ | ||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ | ||
&& chmod +x /docker-entrypoint-init.d/01-symfony.sh | ||
|
||
USER nobody | ||
|
||
RUN wget https://github.com/H2-invent/open-datenschutzcenter/releases/download/${VERSION}/application.zip -O artifact.zip \ | ||
&& unzip artifact.zip \ | ||
&& mkdir data \ | ||
&& rm -r var/cache \ | ||
&& rm artifact.zip | ||
|
||
ENV nginx_root_directory=/var/www/html/public \ | ||
upload_max_filesize=10M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# RELEASE NOTE | ||
# Release 4.0.0 | ||
|
||
* Fix Downlaod of Documents | ||
## Neue Funktionen und Verbesserungen | ||
* In den TOM Formularen können jetzt die technischen und organisatorischen Maßnahmen mit einem WYSIWYG Editor beschrieben werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/217) | ||
* Der neue Assistent unterstützt beim Erstellen von Verarbeitungen und allen notwendigen Datensätzen. Dieser Assistent erleichtert die Erfassung von neuen Verarbeitungen. (https://github.com/H2-invent/open-datenschutzcenter/pull/204) | ||
* Ab sofort können Datenschutzelemente von einem Team in Kinderteams vererbt werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/205) | ||
* Add new Dockerfile for the ODC | ||
|
||
## Bug fixes | ||
|
||
|
||
## Update Anleitung | ||
* Die Anleitung zum Installieren des ODCs mit hilfe Docker Compose wurde angepasst (https://github.com/H2-invent/open-datenschutzcenter/wiki/Get-Started) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import './bootstrap.js'; | ||
import "trix"; | ||
import './scripts/tailmater.js'; | ||
import './scripts/datatables.js'; | ||
|
||
import 'trix/dist/trix.css'; | ||
import './styles/materialDesignIcons.css'; | ||
import './styles/tailmater.css'; | ||
import './styles/colors.css'; | ||
import './styles/dataTablesTailwind.css'; | ||
import './styles/dataTablesApp.css'; | ||
import './styles/app.css'; | ||
|
||
import $ from 'jquery'; | ||
global.$ = global.jQuery = $; | ||
import {initFreeFields} from "./scripts/freeField"; | ||
|
||
document.getElementById('snackbar-trigger')?.click(); | ||
|
||
(function() { | ||
addEventListener("trix-initialize", function(e) { | ||
const file_tools = document.querySelector(".trix-button-group--file-tools"); | ||
file_tools?.remove(); | ||
}) | ||
addEventListener("trix-file-accept", function(e) { | ||
e.preventDefault(); | ||
}) | ||
})(); | ||
|
||
$(document).ready(function() { | ||
initFreeFields(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { startStimulusApp } from '@symfony/stimulus-bridge'; | ||
|
||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | ||
export const app = startStimulusApp(require.context( | ||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
true, | ||
/\.[jt]sx?$/ | ||
)); | ||
// register any custom, 3rd party controllers here | ||
// app.register('some_controller_name', SomeImportedController); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"controllers": [], | ||
"entrypoints": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { Controller } from '@hotwired/stimulus'; | ||
|
||
export default class extends Controller { | ||
connect() { | ||
this.initTabs(); | ||
this.initClickListeners(); | ||
this.initDisabledForms(); | ||
} | ||
|
||
initDisabledForms() { | ||
Array.prototype.forEach.call(document.querySelectorAll('form[disabled]'), function (form) { | ||
Array.prototype.forEach.call(form.querySelectorAll('input, textarea, select, button'), function (element) { | ||
element.disabled = true; | ||
}); | ||
Array.prototype.forEach.call(form.querySelectorAll('button[type=submit]'), function (button) { | ||
button.remove(); | ||
}); | ||
}); | ||
} | ||
|
||
initClickListeners() { | ||
const selectorConfirm = '.text-danger, .btn-danger, .btw-warning, [data-click-confirm]'; | ||
Array.prototype.forEach.call(document.querySelectorAll(selectorConfirm), function (element) { | ||
element.addEventListener('click', function(event) { | ||
if (confirm(window.translations.confirmAction)) { | ||
return true; | ||
} | ||
event.preventDefault(); | ||
return false; | ||
}); | ||
}); | ||
} | ||
|
||
initTabs() { | ||
self = this; | ||
Array.prototype.forEach.call(document.querySelectorAll('[data-type="tabs"]'), function (element) { | ||
element.addEventListener('click', function(event) { | ||
event.preventDefault(); | ||
//window.location.hash = self.getAttributeFromElementOrParents(event.target, 'data-target'); | ||
history.replaceState(null, null, self.getAttributeFromElementOrParents(event.target, 'data-target')); | ||
}); | ||
}); | ||
if (document.location.toString().match('#')) { | ||
document.querySelector('[data-target="#' + document.location.toString().split('#')[1] + '"]')?.click(); | ||
} | ||
} | ||
|
||
loadContentModal(event) { | ||
event.preventDefault(); | ||
const url = event.target.getAttribute('href'); | ||
const modal = document.getElementById('modal-remote-content'); | ||
const contentContainer = modal.querySelector('.modal-inner'); | ||
contentContainer.innerHTML = '<p class="p-10 italic">Loading ...</p>' | ||
|
||
fetch(url) | ||
.then(response => response.text()) | ||
.then(data => { contentContainer.innerHTML = data; }) | ||
.catch(error => console.error(error)); | ||
} | ||
|
||
getAttributeFromElementOrParents(element, attribute, i = 1) { | ||
if (5 == i) { // max 5 recursive calls | ||
return null; | ||
} | ||
|
||
if (element.getAttribute(attribute)) { | ||
return element.getAttribute(attribute); | ||
} else if (element.parentNode) { | ||
return this.getAttributeFromElementOrParents(element.parentNode, attribute, ++i); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
toggle(event) { | ||
event.preventDefault(); | ||
const containerShow = document.getElementById(this.getAttributeFromElementOrParents(event.target, 'data-show')); | ||
const containerHide = document.getElementById(this.getAttributeFromElementOrParents(event.target, 'data-hide')); | ||
const containerToggle = document.getElementById(this.getAttributeFromElementOrParents(event.target, 'data-toggle')); | ||
containerShow?.classList.remove('hidden'); | ||
containerHide?.classList.add('hidden'); | ||
containerToggle?.classList.toggle('hidden'); | ||
} | ||
} |
Oops, something went wrong.