Compare commits
129 Commits
feature/js
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 29c1ad1dcf | |||
| 4504e8a2a5 | |||
| 502dd85efb | |||
| 9e6e2b5a03 | |||
| c492b7bda6 | |||
| 0d7e63d3a2 | |||
| 0866e604bc | |||
| 753c00bc45 | |||
| 74d2f15d6a | |||
| 615908e569 | |||
| 55d467ee58 | |||
| 5a1df7345d | |||
| e3c5f6a9d7 | |||
| a26290fc92 | |||
| 08d94a9269 | |||
| 6f8f273344 | |||
| f96226170b | |||
| 0783033c70 | |||
| 35fbfdccec | |||
| 1196d3cdd2 | |||
| df67948efc | |||
| a78f53f58e | |||
| 2c39db104e | |||
| ad17b394a3 | |||
| 745ce4fabc | |||
| b6fbe750a2 | |||
| 89d3eec5fb | |||
| cd4783efc4 | |||
| 9efef2c5e2 | |||
| 09010a117e | |||
| 8ea0937ea4 | |||
| 5330493c85 | |||
| 9e6e9e9830 | |||
| f311050412 | |||
| 492b3c5a20 | |||
| a81b6eb9d5 | |||
| f6be6d6a02 | |||
| c8d3ef4631 | |||
| 46912cff8c | |||
| 1af50c45ff | |||
| 40551094e6 | |||
| 4297c2d8bf | |||
| 3a89f6d871 | |||
| 07ba717de9 | |||
| 048105ef27 | |||
| b579f5fb42 | |||
| db9bd92036 | |||
| 7e89ffb6f1 | |||
| dd6d0fae46 | |||
| e5202d9b2b | |||
| 5535684a45 | |||
| f933b7d99a | |||
| fd729b3019 | |||
| e1c1eafb39 | |||
| 1b016c49f2 | |||
| 4376069b11 | |||
| c285ae81af | |||
| 5bfe4866a4 | |||
| f7799675d5 | |||
| c125427b8d | |||
| a14a80f7bd | |||
| 477143b3ff | |||
| fc404f6755 | |||
| fe7c55eceb | |||
| bb01174bd2 | |||
| 38ce55d8fd | |||
| d439741339 | |||
| bc75cac6cd | |||
| 47c264e8e1 | |||
| 4d0ed116dd | |||
| ceb6e13447 | |||
| 7e9059a9aa | |||
| ccf31e4ef4 | |||
| 94e047c7ff | |||
| 57f2210c77 | |||
| 1745596d14 | |||
| e923624aec | |||
| 3649878b7d | |||
| 179e7d41b3 | |||
| 5f95042cad | |||
| 9a3ab1234a | |||
| 7591de99e0 | |||
| b2e2da95b2 | |||
| 8ec294c8a8 | |||
| 4fece110d9 | |||
| dbc4f89055 | |||
| c5f4715e97 | |||
| cca9022f53 | |||
| 1a1115db6d | |||
| 34275addaf | |||
| 0df0cef681 | |||
| 3c5a69f30a | |||
| aa5a95844a | |||
| eedc63741f | |||
| 105f00f126 | |||
| d0d163282d | |||
| e88f862a0f | |||
| 79cb730115 | |||
| a34ec67576 | |||
| d1c7218fcf | |||
| 683d53dac0 | |||
| d2d260381e | |||
| dfdd68e9de | |||
| 04fa504bb2 | |||
| 2204eb762a | |||
| 892c229647 | |||
| 441b9c99d2 | |||
| a84e5b34b6 | |||
| 55a5b10d6a | |||
| d11d666f45 | |||
| d7b6d05cb5 | |||
| 254317ee08 | |||
| d9345a0251 | |||
| 362f474e3d | |||
| b8069802f6 | |||
| 26d62014c9 | |||
| 69ca9bce4d | |||
| 733a437ae0 | |||
| 277a24bb50 | |||
| 4b15c5f173 | |||
| b8d5bc796d | |||
| 9bd4cb19d3 | |||
| 28f87509d6 | |||
| 9d4c7d5f87 | |||
| f7e6795c00 | |||
| 8520412867 | |||
| e94f61a697 | |||
| 0cd09d0878 | |||
| 994ba5d797 |
287
.gitea/workflows/build-containers-on-demand.yml
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
name: Build containers when image tags change
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Uncomment/adjust once working:
|
||||||
|
# branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "argocd/deployment.yaml"
|
||||||
|
- "Dockerfile"
|
||||||
|
- "data-loader/**"
|
||||||
|
- ".gitea/workflows/build-containers-on-demand.yml"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-if-image-changed:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- container_name: web
|
||||||
|
expected_repo: git.baumann.gr/adebaumann/vui
|
||||||
|
build_context: .
|
||||||
|
container_type: containers
|
||||||
|
description: main container
|
||||||
|
- container_name: loader
|
||||||
|
expected_repo: git.baumann.gr/adebaumann/vui-data-loader
|
||||||
|
build_context: data-loader
|
||||||
|
container_type: initContainers
|
||||||
|
description: init-container
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEPLOY_FILE: "argocd/deployment.yaml"
|
||||||
|
CONTAINER_NAME: ${{ matrix.container_name }}
|
||||||
|
EXPECTED_REPO: ${{ matrix.expected_repo }}
|
||||||
|
CONTAINER_TYPE: ${{ matrix.container_type }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Determine base commit
|
||||||
|
id: base
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if git rev-parse --verify -q HEAD~1 >/dev/null; then
|
||||||
|
echo "base=$(git rev-parse HEAD~1)" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "base=$(git hash-object -t tree /dev/null)" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install yq
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
YQ_VER=v4.44.3
|
||||||
|
curl -sL "https://github.com/mikefarah/yq/releases/download/${YQ_VER}/yq_linux_amd64" -o /usr/local/bin/yq
|
||||||
|
chmod +x /usr/local/bin/yq
|
||||||
|
yq --version
|
||||||
|
|
||||||
|
- name: Read ${{ matrix.description }} image from deployment
|
||||||
|
id: img
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
file="${DEPLOY_FILE:-argocd/deployment.yaml}"
|
||||||
|
cname="${CONTAINER_NAME}"
|
||||||
|
expected_repo="${EXPECTED_REPO}"
|
||||||
|
ctype="${CONTAINER_TYPE}"
|
||||||
|
|
||||||
|
export cname
|
||||||
|
export expected_repo
|
||||||
|
export ctype
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "Checking: $ctype / $cname"
|
||||||
|
echo "Expected repo: $expected_repo"
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
|
# --- functions ------------------------------------------------------
|
||||||
|
have_yq() { command -v yq >/dev/null 2>&1; }
|
||||||
|
|
||||||
|
# yq-based extractor (multi-doc aware; Deployment only; container name match)
|
||||||
|
yq_extract() {
|
||||||
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.initContainers // [] |
|
||||||
|
map(select(.name == env(cname))) |
|
||||||
|
.[]?.image
|
||||||
|
' "$1" 2>/dev/null | tail -n 1
|
||||||
|
else
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.containers // [] |
|
||||||
|
map(select(.name == env(cname))) |
|
||||||
|
.[]?.image
|
||||||
|
' "$1" 2>/dev/null | tail -n 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ultra-tolerant fallback: grep around the appropriate block
|
||||||
|
fallback_extract() {
|
||||||
|
local block_pattern
|
||||||
|
local end_pattern
|
||||||
|
|
||||||
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
|
block_pattern="^[[:space:]]*initContainers:"
|
||||||
|
end_pattern="^[[:space:]]*containers:|^[[:alpha:]][[:alnum:]_:-]*:"
|
||||||
|
else
|
||||||
|
block_pattern="^[[:space:]]*containers:"
|
||||||
|
end_pattern="^[[:alpha:]][[:alnum:]_:-]*:|^[[:space:]]*initContainers:"
|
||||||
|
fi
|
||||||
|
|
||||||
|
awk -v cname="$cname" -v block="$block_pattern" -v endp="$end_pattern" '
|
||||||
|
BEGIN{ in_cont=0; name=""; image="" }
|
||||||
|
$0 ~ block {in_cont=1; next}
|
||||||
|
in_cont {
|
||||||
|
# end of block when we hit the end pattern
|
||||||
|
if ($0 ~ endp) { in_cont=0 }
|
||||||
|
# capture name and image lines
|
||||||
|
if ($0 ~ /^[[:space:]]*-?[[:space:]]*name:[[:space:]]*/) {
|
||||||
|
name=$0; sub(/^.*name:[[:space:]]*/,"",name); gsub(/^[ "\047]+|[ "\047]+$/,"",name)
|
||||||
|
}
|
||||||
|
if ($0 ~ /^[[:space:]]*image:[[:space:]]*/) {
|
||||||
|
image=$0; sub(/^.*image:[[:space:]]*/,"",image); gsub(/^[ "\047]+|[ "\047]+$/,"",image)
|
||||||
|
if (name==cname) { print image; exit }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
list_workload_images() {
|
||||||
|
echo "== workload $ctype in $1 ==" >&2
|
||||||
|
if have_yq; then
|
||||||
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.initContainers // [] |
|
||||||
|
.[] | "\(.name): \(.image)"
|
||||||
|
' "$1" 2>/dev/null | nl -ba >&2 || true
|
||||||
|
else
|
||||||
|
yq -r '
|
||||||
|
select(.kind == "Deployment") |
|
||||||
|
.spec.template.spec.containers // [] |
|
||||||
|
.[] | "\(.name): \(.image)"
|
||||||
|
' "$1" 2>/dev/null | nl -ba >&2 || true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# coarse list for visibility
|
||||||
|
if [[ "$ctype" == "initContainers" ]]; then
|
||||||
|
awk '
|
||||||
|
/^ *initContainers:/, /^ *containers:/ { if ($0 ~ /name:|image:/) print }
|
||||||
|
' "$1" | nl -ba >&2 || true
|
||||||
|
else
|
||||||
|
awk '
|
||||||
|
/^ *containers:/, /^[^ ]/ { if ($0 ~ /name:|image:/) print }
|
||||||
|
' "$1" | nl -ba >&2 || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Ensure yq is present; if install failed earlier, try once more
|
||||||
|
if ! have_yq; then
|
||||||
|
echo "yq missing; attempting quick install..." >&2
|
||||||
|
curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq || true
|
||||||
|
chmod +x /usr/local/bin/yq || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prepare old file (previous commit) if exists
|
||||||
|
if git cat-file -e "${{ steps.base.outputs.base }}":"$file" 2>/dev/null; then
|
||||||
|
git show "${{ steps.base.outputs.base }}:$file" > /tmp/old.yaml
|
||||||
|
else
|
||||||
|
: > /tmp/old.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
|
list_workload_images /tmp/old.yaml || true
|
||||||
|
list_workload_images "$file" || true
|
||||||
|
|
||||||
|
if have_yq; then
|
||||||
|
old_image="$(yq_extract /tmp/old.yaml || true)"
|
||||||
|
new_image="$(yq_extract "$file" || true)"
|
||||||
|
else
|
||||||
|
old_image="$(fallback_extract /tmp/old.yaml || true)"
|
||||||
|
new_image="$(fallback_extract "$file" || true)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If yq path failed to find it, try fallback once more as safety
|
||||||
|
if [ -z "${new_image:-}" ]; then
|
||||||
|
new_image="$(fallback_extract "$file" || true)"
|
||||||
|
fi
|
||||||
|
if [ -z "${old_image:-}" ]; then
|
||||||
|
old_image="$(fallback_extract /tmp/old.yaml || true)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Old $ctype image: ${old_image:-<none>}"
|
||||||
|
echo "New $ctype image: ${new_image:-<none>}"
|
||||||
|
|
||||||
|
if [ -z "${new_image:-}" ]; then
|
||||||
|
echo "ERROR: Could not find $ctype[].name == \"$cname\" image in $file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Split repo and tag
|
||||||
|
new_repo="${new_image%:*}"
|
||||||
|
new_tag="${new_image##*:}"
|
||||||
|
if [[ "$new_repo" != "$expected_repo" ]]; then
|
||||||
|
echo "ERROR: Found $ctype \"$cname\" image repo is \"$new_repo\" but expected \"$expected_repo\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
registry="$(echo "$new_repo" | awk -F/ '{print $1}')"
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "new_image=$new_image"
|
||||||
|
echo "new_repo=$new_repo"
|
||||||
|
echo "new_tag=$new_tag"
|
||||||
|
echo "registry=$registry"
|
||||||
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Check if image exists on registry
|
||||||
|
id: check_image
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
new_repo="${{ steps.img.outputs.new_repo }}"
|
||||||
|
new_tag="${{ steps.img.outputs.new_tag }}"
|
||||||
|
registry_user="${{ secrets.REGISTRY_USER }}"
|
||||||
|
registry_password="${{ secrets.REGISTRY_PASSWORD }}"
|
||||||
|
|
||||||
|
# Extract registry host and image name
|
||||||
|
registry_host=$(echo "$new_repo" | cut -d/ -f1)
|
||||||
|
image_path=$(echo "$new_repo" | cut -d/ -f2-)
|
||||||
|
|
||||||
|
echo "Checking if $new_repo:$new_tag exists on registry $registry_host"
|
||||||
|
|
||||||
|
# Use Docker Registry API v2 to check manifest
|
||||||
|
# Format: https://registry/v2/{image_path}/manifests/{tag}
|
||||||
|
manifest_url="https://${registry_host}/v2/${image_path}/manifests/${new_tag}"
|
||||||
|
|
||||||
|
# Check with authentication
|
||||||
|
http_code=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
|
-u "${registry_user}:${registry_password}" \
|
||||||
|
-H "Accept: application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.list.v2+json" \
|
||||||
|
"$manifest_url" || echo "000")
|
||||||
|
|
||||||
|
if [ "$http_code" = "200" ]; then
|
||||||
|
echo "Image already exists on registry (HTTP $http_code)"
|
||||||
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "Image does not exist on registry (HTTP $http_code)"
|
||||||
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Skip if image already exists
|
||||||
|
if: steps.check_image.outputs.exists == 'true'
|
||||||
|
run: echo "${{ matrix.description }} image ${{ steps.img.outputs.new_image }} already exists on registry; skipping build."
|
||||||
|
|
||||||
|
- name: Set up Buildx
|
||||||
|
if: steps.check_image.outputs.exists == 'false'
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
if: steps.check_image.outputs.exists == 'false'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ steps.img.outputs.registry }}
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push ${{ matrix.description }} (exact tag from deployment)
|
||||||
|
if: steps.check_image.outputs.exists == 'false'
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.build_context }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ steps.img.outputs.new_image }}
|
||||||
|
${{ steps.img.outputs.new_repo }}:latest
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.source=${{ gitea.repository }}
|
||||||
|
org.opencontainers.image.revision=${{ gitea.sha }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
67
.gitea/workflows/check_code_in_sonarqube.yaml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
# - development
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
name: SonarQube Scan
|
||||||
|
jobs:
|
||||||
|
sonarqube:
|
||||||
|
name: SonarQube Trigger
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checking out
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run tests with coverage
|
||||||
|
run: |
|
||||||
|
coverage run --source='.' manage.py test
|
||||||
|
coverage xml
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: Cache SonarQube packages
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.sonar/cache
|
||||||
|
key: ${{ runner.os }}-sonar
|
||||||
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
|
||||||
|
- name: Download and setup SonarScanner
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.sonar
|
||||||
|
wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
|
||||||
|
unzip -q sonar-scanner-cli-5.0.1.3006-linux.zip -d $HOME/.sonar/
|
||||||
|
echo "$HOME/.sonar/sonar-scanner-5.0.1.3006-linux/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Verify Java version
|
||||||
|
run: java -version
|
||||||
|
|
||||||
|
- name: SonarQube Scan
|
||||||
|
env:
|
||||||
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
sonar-scanner \
|
||||||
|
-Dsonar.projectKey=${{ github.event.repository.name }} \
|
||||||
|
-Dsonar.sources=. \
|
||||||
|
-Dsonar.host.url=${SONAR_HOST_URL} \
|
||||||
|
-Dsonar.token=${SONAR_TOKEN} \
|
||||||
|
-Dsonar.python.coverage.reportPaths=coverage.xml
|
||||||
4
.gitignore
vendored
@@ -8,10 +8,12 @@ include/
|
|||||||
keys/
|
keys/
|
||||||
.venv/
|
.venv/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
*.kate-swp
|
*.kate-swp
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
package.json
|
package.json
|
||||||
|
AGENT*.md
|
||||||
# Diagram cache directory
|
# Diagram cache directory
|
||||||
media/diagram_cache/
|
media/diagram_cache/
|
||||||
|
.env
|
||||||
|
data/db.sqlite3
|
||||||
|
|||||||
18
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.13-slim AS baustelle
|
FROM python:3.14 AS baustelle
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
@@ -7,28 +7,30 @@ RUN pip install --upgrade pip
|
|||||||
COPY requirements.txt /app/
|
COPY requirements.txt /app/
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
FROM python:3.13-slim
|
FROM python:3.14-slim
|
||||||
RUN useradd -m -r appuser && \
|
RUN useradd -m -r appuser && \
|
||||||
mkdir /app && \
|
mkdir /app && \
|
||||||
chown -R appuser /app
|
chown -R appuser /app
|
||||||
|
|
||||||
COPY --from=baustelle /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/
|
COPY --from=baustelle /usr/local/lib/python3.14/site-packages/ /usr/local/lib/python3.14/site-packages/
|
||||||
COPY --from=baustelle /usr/local/bin/ /usr/local/bin/
|
COPY --from=baustelle /usr/local/bin/ /usr/local/bin/
|
||||||
RUN rm /usr/bin/tar
|
RUN rm /usr/bin/tar /usr/lib/x86_64-linux-gnu/libncur*
|
||||||
RUN rm /usr/lib/x86_64-linux-gnu/libncur*
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=appuser:appuser . .
|
COPY --chown=appuser:appuser . .
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
USER appuser
|
USER appuser
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
RUN rm -rf /app/Dockerfile* \
|
RUN rm -rvf /app/Dockerfile* \
|
||||||
/app/README.md \
|
/app/README.md \
|
||||||
/app/argocd \
|
/app/argocd \
|
||||||
/app/k8s \
|
/app/k8s \
|
||||||
/app/data-loader \
|
/app/data-loader \
|
||||||
/app/keys \
|
/app/keys \
|
||||||
/app/requirements.txt
|
/app/requirements.txt \
|
||||||
RUN python3 manage.py collectstatic
|
/app/node_modules \
|
||||||
|
/app/*.json \
|
||||||
|
/app/test_*.py && \
|
||||||
|
python3 /app/manage.py collectstatic --noinput
|
||||||
CMD ["gunicorn","--bind","0.0.0.0:8000","--workers","3","VorgabenUI.wsgi:application"]
|
CMD ["gunicorn","--bind","0.0.0.0:8000","--workers","3","VorgabenUI.wsgi:application"]
|
||||||
|
|
||||||
|
|||||||
241
Documentation/ArgoCD.md
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
# ArgoCD Configuration Documentation
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This directory contains the ArgoCD application manifests for deploying the VorgabenUI application and its dependencies to Kubernetes.
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
### Application Manifests
|
||||||
|
|
||||||
|
#### `001_pvc.yaml`
|
||||||
|
- **Purpose**: PersistentVolumeClaim for Django application data
|
||||||
|
- **Storage**: 2Gi storage with ReadWriteMany access mode
|
||||||
|
- **Storage Class**: Uses NFS storage class for shared storage across multiple pods
|
||||||
|
- **Namespace**: vorgabenui
|
||||||
|
|
||||||
|
#### `deployment.yaml`
|
||||||
|
- **Purpose**: Main application deployment configuration
|
||||||
|
- **Contains**: Django application container, environment variables, resource limits
|
||||||
|
- **Replicas**: Configurable replica count for high availability
|
||||||
|
|
||||||
|
#### `ingress.yaml`
|
||||||
|
- **Purpose**: External access configuration
|
||||||
|
- **Host**: Configurable hostname for the application
|
||||||
|
- **TLS**: SSL/TLS termination configuration
|
||||||
|
- **Backend**: Routes traffic to the Django application service
|
||||||
|
|
||||||
|
#### `nfs-pv.yaml`
|
||||||
|
- **Purpose**: PersistentVolume definition for NFS storage
|
||||||
|
- **Server**: 192.168.17.199
|
||||||
|
- **Path**: /mnt/user/vorgabenui
|
||||||
|
- **Access**: ReadWriteMany for multi-pod access
|
||||||
|
- **Reclaim Policy**: Retain (data preserved after PVC deletion)
|
||||||
|
|
||||||
|
#### `nfs-storageclass.yaml`
|
||||||
|
- **Purpose**: StorageClass definition for NFS volumes
|
||||||
|
- **Provisioner**: kubernetes.io/no-provisioner (static provisioning)
|
||||||
|
- **Volume Expansion**: Enabled for growing storage capacity
|
||||||
|
- **Binding Mode**: Immediate (binds PV to PVC as soon as possible)
|
||||||
|
|
||||||
|
#### `diagrammer.yaml`
|
||||||
|
- **Purpose**: Deployment configuration for the diagram generation service
|
||||||
|
- **Function**: Handles diagram creation and caching for the application
|
||||||
|
|
||||||
|
## NFS Storage Configuration
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
1. NFS server must be running at 192.168.17.199
|
||||||
|
2. The directory `/mnt/user/vorgabenui` must exist and be exported
|
||||||
|
3. Kubernetes nodes must have NFS client utilities installed
|
||||||
|
4. For MicroK8s: `microk8s enable nfs`
|
||||||
|
|
||||||
|
## MicroK8s Addons Required
|
||||||
|
|
||||||
|
### Required Addons
|
||||||
|
Enable the following MicroK8s addons before deployment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Enable storage and NFS support
|
||||||
|
sudo microk8s enable storage
|
||||||
|
sudo microk8s enable nfs
|
||||||
|
|
||||||
|
# Enable ingress for external access
|
||||||
|
sudo microk8s enable ingress
|
||||||
|
|
||||||
|
# Enable DNS for service discovery
|
||||||
|
sudo microk8s enable dns
|
||||||
|
|
||||||
|
# Optional: Enable metrics for monitoring
|
||||||
|
sudo microk8s enable metrics-server
|
||||||
|
```
|
||||||
|
|
||||||
|
### Addon Descriptions
|
||||||
|
|
||||||
|
#### `storage`
|
||||||
|
- **Purpose**: Provides default storage class for persistent volumes
|
||||||
|
- **Required for**: Basic PVC functionality
|
||||||
|
- **Note**: Works alongside our custom NFS storage class
|
||||||
|
|
||||||
|
#### `nfs`
|
||||||
|
- **Purpose**: Installs NFS client utilities on all MicroK8s nodes
|
||||||
|
- **Required for**: Mounting NFS volumes in pods
|
||||||
|
- **Components**: Installs `nfs-common` package with mount helpers
|
||||||
|
|
||||||
|
#### `ingress`
|
||||||
|
- **Purpose**: Provides Ingress controller for external HTTP/HTTPS access
|
||||||
|
- **Required for**: `ingress.yaml` to function properly
|
||||||
|
- **Implementation**: Uses NGINX Ingress Controller
|
||||||
|
|
||||||
|
#### `dns`
|
||||||
|
- **Purpose**: Provides DNS service for service discovery within cluster
|
||||||
|
- **Required for**: Inter-service communication
|
||||||
|
- **Note**: Usually enabled by default in MicroK8s
|
||||||
|
|
||||||
|
#### `metrics-server` (Optional)
|
||||||
|
- **Purpose**: Enables resource usage monitoring
|
||||||
|
- **Required for**: `kubectl top` commands and HPA (Horizontal Pod Autoscaling)
|
||||||
|
- **Recommended for**: Production monitoring
|
||||||
|
|
||||||
|
### Addon Verification
|
||||||
|
After enabling addons, verify they are running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check addon status
|
||||||
|
microk8s status
|
||||||
|
|
||||||
|
# Check pods in kube-system namespace
|
||||||
|
microk8s kubectl get pods -n kube-system
|
||||||
|
|
||||||
|
# Check storage classes
|
||||||
|
microk8s kubectl get storageclass
|
||||||
|
|
||||||
|
# Check ingress controller
|
||||||
|
microk8s kubectl get pods -n ingress
|
||||||
|
```
|
||||||
|
|
||||||
|
### Troubleshooting Addons
|
||||||
|
|
||||||
|
#### NFS Addon Issues
|
||||||
|
```bash
|
||||||
|
# Check if NFS utilities are installed
|
||||||
|
which mount.nfs
|
||||||
|
|
||||||
|
# Manually install if addon fails
|
||||||
|
sudo apt update && sudo apt install nfs-common
|
||||||
|
|
||||||
|
# Restart MicroK8s after manual installation
|
||||||
|
sudo microk8s restart
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Ingress Issues
|
||||||
|
```bash
|
||||||
|
# Check ingress controller pods
|
||||||
|
microk8s kubectl get pods -n ingress
|
||||||
|
|
||||||
|
# Check ingress services
|
||||||
|
microk8s kubectl get svc -n ingress
|
||||||
|
|
||||||
|
# Test ingress connectivity
|
||||||
|
curl -k https://your-domain.com
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Storage Issues
|
||||||
|
```bash
|
||||||
|
# List available storage classes
|
||||||
|
microk8s kubectl get storageclass
|
||||||
|
|
||||||
|
# Check default storage class
|
||||||
|
microk8s kubectl get storageclass -o yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Storage Architecture
|
||||||
|
- **Storage Class**: `nfs` - Static provisioning for NFS shares
|
||||||
|
- **Persistent Volume**: Pre-provisioned PV pointing to NFS server
|
||||||
|
- **Persistent Volume Claim**: Claims the NFS storage for application use
|
||||||
|
- **Access Mode**: ReadWriteMany allows multiple pods to access the same data
|
||||||
|
|
||||||
|
### NFS Server Setup
|
||||||
|
On the NFS server (192.168.17.199), ensure the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create the shared directory
|
||||||
|
sudo mkdir -p /mnt/user/vorgabenui
|
||||||
|
sudo chmod 755 /mnt/user/vorgabenui
|
||||||
|
|
||||||
|
# Add to /etc/exports
|
||||||
|
echo "/mnt/user/vorgabenui *(rw,sync,no_subtree_check,no_root_squash)" | sudo tee -a /etc/exports
|
||||||
|
|
||||||
|
# Export the directory
|
||||||
|
sudo exportfs -a
|
||||||
|
sudo systemctl restart nfs-kernel-server
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployment Order
|
||||||
|
|
||||||
|
1. **StorageClass** (`nfs-storageclass.yaml`) - Defines NFS storage class
|
||||||
|
2. **PersistentVolume** (`nfs-pv.yaml`) - Creates the NFS volume
|
||||||
|
3. **PersistentVolumeClaim** (`001_pvc.yaml`) - Claims storage for application
|
||||||
|
4. **Application Deployments** (`deployment.yaml`, `diagrammer.yaml`) - Deploy application services
|
||||||
|
5. **Ingress** (`ingress.yaml`) - Configure external access
|
||||||
|
|
||||||
|
## Configuration Notes
|
||||||
|
|
||||||
|
### Namespace
|
||||||
|
All resources are deployed to the `vorgabenui` namespace.
|
||||||
|
|
||||||
|
### Storage Sizing
|
||||||
|
- Current allocation: 2Gi
|
||||||
|
- Volume expansion is enabled through the StorageClass
|
||||||
|
- Monitor usage and adjust PVC size as needed
|
||||||
|
|
||||||
|
### Access Control
|
||||||
|
- NFS export uses `no_root_squash` for container root access
|
||||||
|
- Ensure proper network security between Kubernetes nodes and NFS server
|
||||||
|
- Consider implementing network policies for additional security
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Common Issues
|
||||||
|
|
||||||
|
#### Mount Failures
|
||||||
|
- **Error**: "bad option; for several filesystems you might need a /sbin/mount.<type> helper program"
|
||||||
|
- **Solution**: Install NFS client utilities or enable NFS addon in MicroK8s
|
||||||
|
|
||||||
|
#### Permission Issues
|
||||||
|
- **Error**: Permission denied when accessing mounted volume
|
||||||
|
- **Solution**: Check NFS export permissions and ensure `no_root_squash` is set
|
||||||
|
|
||||||
|
#### Network Connectivity
|
||||||
|
- **Error**: Connection timeout to NFS server
|
||||||
|
- **Solution**: Verify network connectivity and firewall rules between nodes and NFS server
|
||||||
|
|
||||||
|
### Debug Commands
|
||||||
|
```bash
|
||||||
|
# Check PVC status
|
||||||
|
kubectl get pvc -n vorgabenui
|
||||||
|
|
||||||
|
# Check PV status
|
||||||
|
kubectl get pv
|
||||||
|
|
||||||
|
# Describe PVC for detailed information
|
||||||
|
kubectl describe pvc django-data-pvc -n vorgabenui
|
||||||
|
|
||||||
|
# Check pod mount status
|
||||||
|
kubectl describe pod <pod-name> -n vorgabenui
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Backup Strategy
|
||||||
|
- The NFS server should have regular backups of `/mnt/user/vorgabenui`
|
||||||
|
- Consider snapshot capabilities if using enterprise NFS solutions
|
||||||
|
|
||||||
|
### Monitoring
|
||||||
|
- Monitor NFS server performance and connectivity
|
||||||
|
- Track storage usage and plan capacity upgrades
|
||||||
|
- Monitor pod restarts related to storage issues
|
||||||
|
|
||||||
|
### Updates
|
||||||
|
- When updating storage configuration, update PV first, then PVC
|
||||||
|
- Test changes in non-production environment first
|
||||||
|
- Ensure backward compatibility when modifying NFS exports
|
||||||
491
Documentation/Datei-importieren.md
Normal file
@@ -0,0 +1,491 @@
|
|||||||
|
# Dokumenten-Import: Anleitung
|
||||||
|
|
||||||
|
Diese Anleitung beschreibt, wie Dokumente und Vorgaben mittels des `import-document` Management Commands in die VorgabenUI importiert werden können.
|
||||||
|
|
||||||
|
## Übersicht
|
||||||
|
|
||||||
|
Der `import-document` Command ermöglicht es, strukturierte Textdateien zu importieren, die Dokumente mit Einleitung, Geltungsbereich und Vorgaben enthalten. Das Format ist speziell für die einfache Erfassung und Pflege von IT-Sicherheitsstandards konzipiert.
|
||||||
|
|
||||||
|
## Grundlegende Verwendung
|
||||||
|
|
||||||
|
### Minimaler Aufruf
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py import-document <dateipfad> \
|
||||||
|
--nummer <dokumentnummer> \
|
||||||
|
--name "<dokumentname>" \
|
||||||
|
--dokumententyp "<typ>"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Beispiel
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py import-document Documentation/import\ formats/r009.txt \
|
||||||
|
--nummer "R0009" \
|
||||||
|
--name "Serversysteme" \
|
||||||
|
--dokumententyp "Standard IT-Sicherheit"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parameter
|
||||||
|
|
||||||
|
### Pflichtparameter
|
||||||
|
|
||||||
|
| Parameter | Beschreibung | Beispiel |
|
||||||
|
|-----------|--------------|----------|
|
||||||
|
| `file_path` | Pfad zur Importdatei | `Documentation/import formats/r009.txt` |
|
||||||
|
| `--nummer` | Dokumentnummer (eindeutig) | `R0009`, `R0066` |
|
||||||
|
| `--name` | Dokumentname | `"Logging"`, `"Serversysteme"` |
|
||||||
|
| `--dokumententyp` | Dokumententyp (muss bereits existieren) | `"Standard IT-Sicherheit"` |
|
||||||
|
|
||||||
|
### Optionale Parameter
|
||||||
|
|
||||||
|
| Parameter | Beschreibung | Verwendung |
|
||||||
|
|-----------|--------------|------------|
|
||||||
|
| `--gueltigkeit_von` | Startdatum der Gültigkeit | `--gueltigkeit_von 2024-01-01` |
|
||||||
|
| `--gueltigkeit_bis` | Enddatum der Gültigkeit | `--gueltigkeit_bis 2025-12-31` |
|
||||||
|
| `--dry-run` | Testlauf ohne Datenbankänderungen | `--dry-run` |
|
||||||
|
| `--verbose` | Ausführliche Ausgabe (mit `--dry-run`) | `--dry-run --verbose` |
|
||||||
|
| `--purge` | Löscht bestehende Einleitung/Geltungsbereich/Vorgaben vor Import | `--purge` |
|
||||||
|
|
||||||
|
### Dry-Run Modus
|
||||||
|
|
||||||
|
Der Dry-Run Modus ist besonders nützlich zum Testen:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py import-document r009.txt \
|
||||||
|
--nummer "R0009" \
|
||||||
|
--name "Serversysteme" \
|
||||||
|
--dokumententyp "Standard IT-Sicherheit" \
|
||||||
|
--dry-run --verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
Dies zeigt an, was importiert würde, ohne die Datenbank zu ändern.
|
||||||
|
|
||||||
|
### Purge Modus
|
||||||
|
|
||||||
|
**Achtung:** Der Purge-Modus löscht alle bestehenden Vorgaben des Dokuments!
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py import-document r009.txt \
|
||||||
|
--nummer "R0009" \
|
||||||
|
--name "Serversysteme" \
|
||||||
|
--dokumententyp "Standard IT-Sicherheit" \
|
||||||
|
--purge
|
||||||
|
```
|
||||||
|
|
||||||
|
Nutzen Sie `--dry-run --purge` zuerst, um zu sehen, was gelöscht würde.
|
||||||
|
|
||||||
|
## Dateiformat
|
||||||
|
|
||||||
|
### Grundstruktur
|
||||||
|
|
||||||
|
Die Importdatei ist eine Textdatei (UTF-8 kodiert) mit speziellen Trennzeichen `>>>` am Zeilenanfang.
|
||||||
|
|
||||||
|
### Aufbau
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
[Einleitungstext]
|
||||||
|
|
||||||
|
>>>Geltungsbereich
|
||||||
|
>>>text
|
||||||
|
[Geltungsbereichstext]
|
||||||
|
|
||||||
|
>>>Vorgabe [Thema]
|
||||||
|
>>>Nummer [nummer]
|
||||||
|
>>>Titel
|
||||||
|
[Titel der Vorgabe]
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
[Kurztext-Inhalt]
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
[Langtext-Inhalt]
|
||||||
|
>>>Stichworte
|
||||||
|
[Stichwort1, Stichwort2, ...]
|
||||||
|
>>>Checkliste
|
||||||
|
[Frage 1]
|
||||||
|
[Frage 2]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Abschnitt-Trenner
|
||||||
|
|
||||||
|
Jeder Abschnitt beginnt mit `>>>` gefolgt vom Abschnittstyp:
|
||||||
|
|
||||||
|
- `>>>Einleitung` - Startet den Einleitungsbereich
|
||||||
|
- `>>>Geltungsbereich` - Startet den Geltungsbereichsbereich
|
||||||
|
- `>>>Vorgabe [Thema]` - Startet eine neue Vorgabe mit angegebenem Thema
|
||||||
|
|
||||||
|
### Abschnitttypen für Textinhalte
|
||||||
|
|
||||||
|
Nach `>>>Einleitung`, `>>>Geltungsbereich`, `>>>Kurztext` oder `>>>Langtext` folgt ein Abschnitttyp:
|
||||||
|
|
||||||
|
| Typ | Verwendung | Beispiel |
|
||||||
|
|-----|------------|----------|
|
||||||
|
| `>>>text` oder `>>>Text` | Normaler Fliesstext | `>>>text` |
|
||||||
|
| `>>>liste geordnet` oder `>>>Liste geordnet` | Nummerierte Liste | `>>>Liste geordnet` |
|
||||||
|
| `>>>liste ungeordnet` oder `>>>Liste ungeordnet` | Aufzählungsliste | `>>>liste ungeordnet` |
|
||||||
|
|
||||||
|
**Hinweis:** Gross-/Kleinschreibung und Bindestriche (`liste-ungeordnet`) werden normalisiert.
|
||||||
|
|
||||||
|
## Beispiele
|
||||||
|
|
||||||
|
### Beispiel 1: Einfaches Dokument mit einer Vorgabe
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
Dieser Standard definiert Anforderungen für XYZ.
|
||||||
|
|
||||||
|
>>>Geltungsbereich
|
||||||
|
>>>text
|
||||||
|
Dieser Standard gilt für alle Systeme im BIT.
|
||||||
|
|
||||||
|
>>>Vorgabe Technik
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Verschlüsselung verwenden
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Alle Verbindungen müssen verschlüsselt sein.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Die Verschlüsselung muss mindestens TLS 1.2 verwenden.
|
||||||
|
Es sind folgende Cipher Suites erlaubt:
|
||||||
|
>>>Liste ungeordnet
|
||||||
|
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||||
|
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||||
|
>>>Stichworte
|
||||||
|
Verschlüsselung, TLS, Kryptographie
|
||||||
|
>>>Checkliste
|
||||||
|
TLS 1.2 oder höher ist konfiguriert
|
||||||
|
Schwache Cipher Suites sind deaktiviert
|
||||||
|
```
|
||||||
|
|
||||||
|
### Beispiel 2: Mehrere Vorgaben mit gleichem Thema
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
CMDB-Erfassung
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Alle Assets müssen in der CMDB erfasst sein.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Jedes Asset muss dokumentiert werden...
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 2
|
||||||
|
>>>Titel
|
||||||
|
Verantwortlichkeiten
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Verantwortlichkeiten müssen definiert sein.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Für jedes System muss ein Verantwortlicher...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Beispiel 3: Verschiedene Themen
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Vorgabe Technik
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Firewall-Konfiguration
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Lokale Firewall muss aktiviert sein.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Details zur Firewall-Konfiguration...
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Dokumentation
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Konfiguration muss dokumentiert sein.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Die Firewall-Regeln müssen...
|
||||||
|
|
||||||
|
>>>Vorgabe Informationen
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Datenklassifizierung
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Daten müssen klassifiziert werden.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Klassifizierungsstufen sind...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Beispiel 4: Mehrere Textabschnitte
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Vorgabe Technik
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Komplexe Anforderung
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Erste Zusammenfassung.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Erster Absatz mit Details.
|
||||||
|
>>>Text
|
||||||
|
Zweiter Absatz mit weiteren Informationen.
|
||||||
|
>>>Liste ungeordnet
|
||||||
|
Punkt 1
|
||||||
|
Punkt 2
|
||||||
|
Punkt 3
|
||||||
|
>>>Text
|
||||||
|
Abschliessender Text nach der Liste.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Vorgaben-Struktur
|
||||||
|
|
||||||
|
### Vorgabe-Header
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Vorgabe [Thema]
|
||||||
|
```
|
||||||
|
|
||||||
|
Das Thema muss in der Datenbank bereits als `Thema`-Objekt existieren. Übliche Themen:
|
||||||
|
- Organisation
|
||||||
|
- Technik
|
||||||
|
- Informationen
|
||||||
|
- Systeme
|
||||||
|
- Anwendungen
|
||||||
|
- Zonen
|
||||||
|
|
||||||
|
### Vorgabe-Felder
|
||||||
|
|
||||||
|
#### Nummer (Pflicht)
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Nummer 1
|
||||||
|
```
|
||||||
|
|
||||||
|
oder inline:
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Nummer: 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Die Nummer wird als Integer gespeichert. Sie ist eindeutig innerhalb eines Dokuments und Themas.
|
||||||
|
|
||||||
|
#### Titel (Pflicht)
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Titel
|
||||||
|
Titel der Vorgabe
|
||||||
|
```
|
||||||
|
|
||||||
|
oder inline:
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Titel: Titel der Vorgabe
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Kurztext (Optional)
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Kurze Zusammenfassung der Vorgabe.
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Langtext (Optional)
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Ausführliche Beschreibung der Vorgabe.
|
||||||
|
>>>Liste ungeordnet
|
||||||
|
Punkt 1
|
||||||
|
Punkt 2
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Stichworte (Optional)
|
||||||
|
|
||||||
|
Komma-getrennte Liste:
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Stichworte
|
||||||
|
Firewall, Netzwerk, Sicherheit
|
||||||
|
```
|
||||||
|
|
||||||
|
oder als Block:
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Stichworte
|
||||||
|
>>>Text
|
||||||
|
Firewall, Netzwerk, Sicherheit
|
||||||
|
```
|
||||||
|
|
||||||
|
**Hinweis:** Stichworte werden automatisch in der Datenbank angelegt, falls sie noch nicht existieren.
|
||||||
|
|
||||||
|
#### Checkliste (Optional)
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Checkliste
|
||||||
|
Ist die Firewall aktiviert?
|
||||||
|
Sind alle unnötigen Ports geschlossen?
|
||||||
|
Wurde die Konfiguration dokumentiert?
|
||||||
|
```
|
||||||
|
|
||||||
|
Jede Zeile wird als separate Checklistenfrage gespeichert.
|
||||||
|
|
||||||
|
## Tipps und Best Practices
|
||||||
|
|
||||||
|
### 1. Dry-Run vor Import
|
||||||
|
|
||||||
|
Führen Sie immer zuerst einen Dry-Run durch:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py import-document datei.txt \
|
||||||
|
--nummer "R0XXX" \
|
||||||
|
--name "Test" \
|
||||||
|
--dokumententyp "Standard IT-Sicherheit" \
|
||||||
|
--dry-run --verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Themen vorab erstellen
|
||||||
|
|
||||||
|
Stellen Sie sicher, dass alle verwendeten Themen in der Datenbank existieren:
|
||||||
|
|
||||||
|
```python
|
||||||
|
python manage.py shell
|
||||||
|
>>> from dokumente.models import Thema
|
||||||
|
>>> Thema.objects.get_or_create(name="Organisation")
|
||||||
|
>>> Thema.objects.get_or_create(name="Technik")
|
||||||
|
>>> Thema.objects.get_or_create(name="Informationen")
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Dokumententyp vorab erstellen
|
||||||
|
|
||||||
|
Der Dokumententyp muss existieren:
|
||||||
|
|
||||||
|
```python
|
||||||
|
python manage.py shell
|
||||||
|
>>> from dokumente.models import Dokumententyp
|
||||||
|
>>> Dokumententyp.objects.get_or_create(
|
||||||
|
... name="Standard IT-Sicherheit",
|
||||||
|
... defaults={"verantwortliche_ve": "SR-SUR-SEC"}
|
||||||
|
... )
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Abschnitttypen prüfen
|
||||||
|
|
||||||
|
Folgende Abschnitttypen müssen in der Datenbank existieren:
|
||||||
|
- `text`
|
||||||
|
- `liste geordnet`
|
||||||
|
- `liste ungeordnet`
|
||||||
|
- `code`
|
||||||
|
- `diagramm`
|
||||||
|
|
||||||
|
Prüfen Sie diese in der Autorenumgebung unter "Abschnitttypen".
|
||||||
|
|
||||||
|
### 5. UTF-8 Kodierung
|
||||||
|
|
||||||
|
Stellen Sie sicher, dass Ihre Importdatei UTF-8 kodiert ist, besonders bei Umlauten (ä, ö, ü) und Sonderzeichen.
|
||||||
|
|
||||||
|
### 6. Versionierung mit Purge
|
||||||
|
|
||||||
|
Beim Re-Import mit `--purge`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Backup erstellen
|
||||||
|
python manage.py dumpdata dokumente.Dokument dokumente.Vorgabe > backup.json
|
||||||
|
|
||||||
|
# 2. Import mit Purge
|
||||||
|
python manage.py import-document datei.txt \
|
||||||
|
--nummer "R0009" \
|
||||||
|
--name "Serversysteme" \
|
||||||
|
--dokumententyp "Standard IT-Sicherheit" \
|
||||||
|
--purge
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7. Mehrzeilige Inhalte
|
||||||
|
|
||||||
|
Mehrzeiliger Text wird automatisch erkannt:
|
||||||
|
|
||||||
|
```
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Dies ist Zeile 1.
|
||||||
|
Dies ist Zeile 2.
|
||||||
|
|
||||||
|
Dies ist ein neuer Absatz.
|
||||||
|
```
|
||||||
|
|
||||||
|
### 8. Leerzeilen
|
||||||
|
|
||||||
|
Leerzeilen innerhalb eines Abschnitts werden beibehalten. Eine Leerzeile nach einem `>>>`-Trenner wird ignoriert.
|
||||||
|
|
||||||
|
## Fehlerbehebung
|
||||||
|
|
||||||
|
### "Dokumententyp does not exist"
|
||||||
|
|
||||||
|
Der angegebene Dokumententyp existiert nicht in der Datenbank.
|
||||||
|
|
||||||
|
**Lösung:** Erstellen Sie den Dokumententyp in der Autorenumgebung oder per Shell.
|
||||||
|
|
||||||
|
### "Thema not found, skipping Vorgabe"
|
||||||
|
|
||||||
|
Das in der Vorgabe verwendete Thema existiert nicht.
|
||||||
|
|
||||||
|
**Lösung:** Erstellen Sie das Thema in der Autorenumgebung oder passen Sie die Importdatei an.
|
||||||
|
|
||||||
|
### "AbschnittTyp not found"
|
||||||
|
|
||||||
|
Ein verwendeter Abschnitttyp existiert nicht.
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
- Prüfen Sie die Schreibweise (Gross-/Kleinschreibung wird normalisiert)
|
||||||
|
- Erstellen Sie den Abschnitttyp in der Autorenumgebung
|
||||||
|
- Standardtypen: `text`, `liste geordnet`, `liste ungeordnet`
|
||||||
|
|
||||||
|
### Vorgabe wird nicht importiert
|
||||||
|
|
||||||
|
Prüfen Sie:
|
||||||
|
- Ist `>>>Nummer` gesetzt?
|
||||||
|
- Ist `>>>Titel` gesetzt?
|
||||||
|
- Existiert das Thema?
|
||||||
|
|
||||||
|
Verwenden Sie `--dry-run --verbose` für detaillierte Informationen.
|
||||||
|
|
||||||
|
## Weitere Informationen
|
||||||
|
|
||||||
|
### Beispieldateien
|
||||||
|
|
||||||
|
Beispieldateien finden Sie in:
|
||||||
|
- `Documentation/import formats/r009.txt`
|
||||||
|
- `Documentation/import formats/r0126.txt`
|
||||||
|
|
||||||
|
### Export-Format
|
||||||
|
|
||||||
|
Der Export verwendet JSON statt Textformat. Für JSON-Export siehe:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python manage.py export_json --output dokumente.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Oder über die Web-Oberfläche: `/dokumente/R0066/?format=json`
|
||||||
|
|
||||||
|
### Verwandte Commands
|
||||||
|
|
||||||
|
- `export_json` - Exportiert Dokumente als JSON
|
||||||
|
- `sanity_check_vorgaben` - Prüft Vorgaben auf Konflikte
|
||||||
|
- `clear_diagram_cache` - Löscht Diagramm-Cache
|
||||||
|
|
||||||
|
## Kontakt
|
||||||
|
|
||||||
|
Bei Fragen oder Problemen wenden Sie sich an das Information Security Management BIT.
|
||||||
544
Documentation/diagramm.md
Normal file
@@ -0,0 +1,544 @@
|
|||||||
|
# Diagramme in VorgabenUI
|
||||||
|
|
||||||
|
Diese Anleitung beschreibt, wie Diagramme in Textabschnitten verwendet werden können. VorgabenUI nutzt [Kroki](https://kroki.io/) zur Generierung von Diagrammen aus Textbeschreibungen.
|
||||||
|
|
||||||
|
## Übersicht
|
||||||
|
|
||||||
|
Der Abschnitttyp **"diagramm"** ermöglicht es, verschiedene Diagrammtypen direkt in Vorgaben, Einleitungen und Geltungsbereichen einzubinden. Die Diagramme werden aus Textbeschreibungen automatisch als SVG-Grafiken generiert und gecacht.
|
||||||
|
|
||||||
|
## Grundlegende Verwendung
|
||||||
|
|
||||||
|
### Format
|
||||||
|
|
||||||
|
```
|
||||||
|
[Diagrammtyp]
|
||||||
|
option: [HTML-Attribute] (optional)
|
||||||
|
[Diagramm-Code]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Zeile 1:** Diagrammtyp (z.B. `plantuml`, `mermaid`, `graphviz`)
|
||||||
|
**Zeile 2 (optional):** `option:` gefolgt von HTML-Attributen für die Bildgrösse
|
||||||
|
**Zeile 3+:** Der eigentliche Diagramm-Quellcode
|
||||||
|
|
||||||
|
### Standard-Einstellungen
|
||||||
|
|
||||||
|
Wenn keine `option:`-Zeile angegeben wird, wird das Diagramm mit `width="100%"` dargestellt.
|
||||||
|
|
||||||
|
### Grösse anpassen
|
||||||
|
|
||||||
|
Um die Grösse des Diagramms anzupassen, verwenden Sie die `option:`-Zeile:
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
option: width="50%"
|
||||||
|
@startuml
|
||||||
|
...
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
Weitere Beispiele für Optionen:
|
||||||
|
|
||||||
|
```
|
||||||
|
option: width="800px"
|
||||||
|
option: width="60%" style="max-width: 600px;"
|
||||||
|
option: height="400px"
|
||||||
|
option: width="100%" class="img-fluid"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Unterstützte Diagrammtypen
|
||||||
|
|
||||||
|
Kroki unterstützt über 20 verschiedene Diagrammtypen. Die wichtigsten sind:
|
||||||
|
|
||||||
|
| Typ | Beschreibung | Verwendung |
|
||||||
|
|-----|--------------|------------|
|
||||||
|
| `plantuml` | UML-Diagramme, Sequenzdiagramme, Aktivitätsdiagramme | Prozesse, Architekturen |
|
||||||
|
| `mermaid` | Flussdiagramme, Sequenzdiagramme, Gantt-Charts | Prozessabläufe, Zeitpläne |
|
||||||
|
| `graphviz` | Gerichtete/ungerichtete Graphen | Abhängigkeiten, Netzwerke |
|
||||||
|
| `blockdiag` | Block-Diagramme | Systemübersichten |
|
||||||
|
| `nwdiag` | Netzwerk-Diagramme | Netzwerktopologien |
|
||||||
|
| `seqdiag` | Sequenz-Diagramme | Kommunikationsabläufe |
|
||||||
|
| `c4plantuml` | C4-Modell Diagramme | Software-Architektur |
|
||||||
|
| `ditaa` | ASCII-Art zu Diagrammen | Einfache Skizzen |
|
||||||
|
| `excalidraw` | Hand-gezeichnete Diagramme | Präsentationen |
|
||||||
|
| `bpmn` | Business Process Model Notation | Geschäftsprozesse |
|
||||||
|
|
||||||
|
Vollständige Liste: https://kroki.io/
|
||||||
|
|
||||||
|
## Beispiele
|
||||||
|
|
||||||
|
### PlantUML: Sequenzdiagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
option: width="80%"
|
||||||
|
@startuml
|
||||||
|
Alice -> Bob: Authentifizierungsanfrage
|
||||||
|
Bob --> Alice: Authentifizierungsantwort
|
||||||
|
|
||||||
|
Alice -> Bob: Weitere Anfrage
|
||||||
|
Alice <-- Bob: Weitere Antwort
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Darstellung von Kommunikationsabläufen, API-Interaktionen
|
||||||
|
|
||||||
|
### PlantUML: Aktivitätsdiagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
@startuml
|
||||||
|
start
|
||||||
|
:Sicherheitsrichtlinie prüfen;
|
||||||
|
if (Richtlinie erfüllt?) then (ja)
|
||||||
|
:Zugriff gewähren;
|
||||||
|
else (nein)
|
||||||
|
:Zugriff verweigern;
|
||||||
|
:Incident loggen;
|
||||||
|
endif
|
||||||
|
stop
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Prozesse, Entscheidungsabläufe, Workflows
|
||||||
|
|
||||||
|
### PlantUML: Komponentendiagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
option: width="70%"
|
||||||
|
@startuml
|
||||||
|
package "Web-Tier" {
|
||||||
|
[Web-Server]
|
||||||
|
[Load Balancer]
|
||||||
|
}
|
||||||
|
|
||||||
|
package "App-Tier" {
|
||||||
|
[Application Server]
|
||||||
|
[Cache]
|
||||||
|
}
|
||||||
|
|
||||||
|
package "Data-Tier" {
|
||||||
|
[Datenbank]
|
||||||
|
}
|
||||||
|
|
||||||
|
[Load Balancer] --> [Web-Server]
|
||||||
|
[Web-Server] --> [Application Server]
|
||||||
|
[Application Server] --> [Cache]
|
||||||
|
[Application Server] --> [Datenbank]
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** System-Architekturen, Komponenten-Übersicht
|
||||||
|
|
||||||
|
### Mermaid: Flussdiagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
mermaid
|
||||||
|
option: width="75%"
|
||||||
|
flowchart TD
|
||||||
|
Start[Log-Event empfangen] --> Check{Schweregrad?}
|
||||||
|
Check -->|CRITICAL| Alert[Alert auslösen]
|
||||||
|
Check -->|WARNING| Log[In Log-System speichern]
|
||||||
|
Check -->|INFO| Archive[Archivieren]
|
||||||
|
Alert --> SIEM[An SIEM weiterleiten]
|
||||||
|
Log --> SIEM
|
||||||
|
SIEM --> End[Fertig]
|
||||||
|
Archive --> End
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Prozessabläufe, Entscheidungsbäume
|
||||||
|
|
||||||
|
### Mermaid: Sequenzdiagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant Benutzer
|
||||||
|
participant Firewall
|
||||||
|
participant Server
|
||||||
|
|
||||||
|
Benutzer->>Firewall: Verbindungsanfrage
|
||||||
|
Firewall->>Firewall: Regel-Prüfung
|
||||||
|
alt Regel erlaubt
|
||||||
|
Firewall->>Server: Weiterleitung
|
||||||
|
Server-->>Firewall: Antwort
|
||||||
|
Firewall-->>Benutzer: Antwort
|
||||||
|
else Regel blockiert
|
||||||
|
Firewall-->>Benutzer: Verbindung abgelehnt
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Kommunikationsabläufe mit Bedingungen
|
||||||
|
|
||||||
|
### GraphViz: Abhängigkeitsgraph
|
||||||
|
|
||||||
|
```
|
||||||
|
graphviz
|
||||||
|
digraph G {
|
||||||
|
rankdir=LR;
|
||||||
|
node [shape=box, style=rounded];
|
||||||
|
|
||||||
|
"R0066\nLogging" -> "R0009\nServersysteme";
|
||||||
|
"R0066\nLogging" -> "R0126\nNetzwerksicherheit";
|
||||||
|
"R0009\nServersysteme" -> "R0135\nInformationssicherheit";
|
||||||
|
"R0126\nNetzwerksicherheit" -> "R0135\nInformationssicherheit";
|
||||||
|
|
||||||
|
"R0135\nInformationssicherheit" [style="rounded,filled", fillcolor=lightblue];
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Abhängigkeiten zwischen Dokumenten/Standards
|
||||||
|
|
||||||
|
### GraphViz: Netzwerk-Topologie
|
||||||
|
|
||||||
|
```
|
||||||
|
graphviz
|
||||||
|
option: width="100%"
|
||||||
|
graph G {
|
||||||
|
layout=neato;
|
||||||
|
|
||||||
|
Internet [shape=cloud];
|
||||||
|
Firewall [shape=box, style=filled, fillcolor=red];
|
||||||
|
DMZ [shape=box, style=filled, fillcolor=yellow];
|
||||||
|
LAN [shape=box, style=filled, fillcolor=green];
|
||||||
|
|
||||||
|
Internet -- Firewall [label="WAN"];
|
||||||
|
Firewall -- DMZ [label="DMZ-Segment"];
|
||||||
|
Firewall -- LAN [label="Internes Netz"];
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Netzwerk-Segmentierung, Zonen-Modelle
|
||||||
|
|
||||||
|
### BlockDiag: System-Übersicht
|
||||||
|
|
||||||
|
```
|
||||||
|
blockdiag
|
||||||
|
blockdiag {
|
||||||
|
orientation = portrait;
|
||||||
|
|
||||||
|
Client -> "Load Balancer" -> "Web-Server 1", "Web-Server 2";
|
||||||
|
"Web-Server 1", "Web-Server 2" -> "App-Server";
|
||||||
|
"App-Server" -> "Datenbank Primary";
|
||||||
|
"Datenbank Primary" -> "Datenbank Replica";
|
||||||
|
|
||||||
|
"Load Balancer" [color = "lightblue"];
|
||||||
|
"App-Server" [color = "lightgreen"];
|
||||||
|
"Datenbank Primary" [color = "pink"];
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Einfache System-Diagramme, Datenflüsse
|
||||||
|
|
||||||
|
### NwDiag: Netzwerk-Diagramm
|
||||||
|
|
||||||
|
```
|
||||||
|
nwdiag
|
||||||
|
nwdiag {
|
||||||
|
network dmz {
|
||||||
|
address = "192.168.1.0/24";
|
||||||
|
|
||||||
|
web01 [address = "192.168.1.10"];
|
||||||
|
web02 [address = "192.168.1.11"];
|
||||||
|
}
|
||||||
|
|
||||||
|
network internal {
|
||||||
|
address = "10.0.0.0/8";
|
||||||
|
|
||||||
|
web01 [address = "10.0.1.10"];
|
||||||
|
web02 [address = "10.0.1.11"];
|
||||||
|
app01 [address = "10.0.2.10"];
|
||||||
|
db01 [address = "10.0.3.10"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Netzwerk-Topologien mit IP-Adressen
|
||||||
|
|
||||||
|
### SeqDiag: Authentifizierungsablauf
|
||||||
|
|
||||||
|
```
|
||||||
|
seqdiag
|
||||||
|
seqdiag {
|
||||||
|
Benutzer -> System: Benutzername + Passwort;
|
||||||
|
System -> LDAP: Authentifizierung prüfen;
|
||||||
|
LDAP --> System: Erfolgreich;
|
||||||
|
System -> 2FA: 2FA-Code anfordern;
|
||||||
|
2FA --> Benutzer: Code per SMS;
|
||||||
|
Benutzer -> System: 2FA-Code eingeben;
|
||||||
|
System --> Benutzer: Zugriff gewährt;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Authentifizierungs- und Autorisierungsabläufe
|
||||||
|
|
||||||
|
### C4 PlantUML: System-Kontext
|
||||||
|
|
||||||
|
```
|
||||||
|
c4plantuml
|
||||||
|
@startuml
|
||||||
|
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
|
||||||
|
|
||||||
|
Person(admin, "Administrator", "BIT System-Administrator")
|
||||||
|
System(vorgaben, "VorgabenUI", "IT-Sicherheits-Vorgaben Portal")
|
||||||
|
System_Ext(ldap, "LDAP", "Authentifizierung")
|
||||||
|
|
||||||
|
Rel(admin, vorgaben, "Verwaltet Vorgaben")
|
||||||
|
Rel(vorgaben, ldap, "Authentifiziert über")
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verwendung:** Software-Architektur nach C4-Modell
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
### 1. Diagramm-Grösse anpassen
|
||||||
|
|
||||||
|
Verwenden Sie die `option:`-Zeile, um die Grösse für bessere Lesbarkeit anzupassen:
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
option: width="60%"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
Für sehr detaillierte Diagramme:
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
option: width="100%" style="max-width: 1200px;"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Einfachheit bevorzugen
|
||||||
|
|
||||||
|
Halten Sie Diagramme einfach und fokussiert. Zu komplexe Diagramme sind schwer zu lesen.
|
||||||
|
|
||||||
|
**Gut:**
|
||||||
|
```
|
||||||
|
mermaid
|
||||||
|
flowchart LR
|
||||||
|
A[Start] --> B{Prüfung}
|
||||||
|
B -->|OK| C[Weiter]
|
||||||
|
B -->|Fehler| D[Abbruch]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Zu komplex:** Vermeiden Sie Diagramme mit mehr als 15-20 Elementen.
|
||||||
|
|
||||||
|
### 3. Konsistente Stil-Wahl
|
||||||
|
|
||||||
|
Verwenden Sie für ähnliche Konzepte den gleichen Diagrammtyp:
|
||||||
|
- **Prozesse:** Mermaid Flowchart oder PlantUML Activity
|
||||||
|
- **Kommunikation:** Mermaid/PlantUML Sequence
|
||||||
|
- **Architektur:** PlantUML Component oder C4
|
||||||
|
- **Netzwerke:** NwDiag oder GraphViz
|
||||||
|
|
||||||
|
### 4. Beschriftungen auf Deutsch
|
||||||
|
|
||||||
|
Verwenden Sie deutsche Beschriftungen für bessere Verständlichkeit:
|
||||||
|
|
||||||
|
```
|
||||||
|
mermaid
|
||||||
|
flowchart TD
|
||||||
|
Start[Anfrage empfangen] --> Prüfung{Berechtigung?}
|
||||||
|
Prüfung -->|Ja| Zugriff[Zugriff gewähren]
|
||||||
|
Prüfung -->|Nein| Ablehnung[Zugriff verweigern]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Farben sparsam einsetzen
|
||||||
|
|
||||||
|
Nutzen Sie Farben zur Hervorhebung wichtiger Elemente:
|
||||||
|
|
||||||
|
```
|
||||||
|
graphviz
|
||||||
|
digraph {
|
||||||
|
node [shape=box];
|
||||||
|
|
||||||
|
Kritisch [style=filled, fillcolor=red, fontcolor=white];
|
||||||
|
Wichtig [style=filled, fillcolor=orange];
|
||||||
|
Normal [style=filled, fillcolor=lightgreen];
|
||||||
|
|
||||||
|
Kritisch -> Wichtig -> Normal;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Lesbarkeit testen
|
||||||
|
|
||||||
|
Nach dem Speichern prüfen, ob das Diagramm in der Webansicht gut lesbar ist. Bei Bedarf:
|
||||||
|
- Grösse anpassen (`option: width="..."`)
|
||||||
|
- Diagramm vereinfachen
|
||||||
|
- Anderen Diagrammtyp wählen
|
||||||
|
|
||||||
|
## Fehlerbehandlung
|
||||||
|
|
||||||
|
### Diagramm wird nicht angezeigt
|
||||||
|
|
||||||
|
**Mögliche Ursachen:**
|
||||||
|
|
||||||
|
1. **Syntaxfehler im Diagramm-Code**
|
||||||
|
- Prüfen Sie die Syntax gemäss Dokumentation des Diagrammtyps
|
||||||
|
- Testen Sie den Code auf https://kroki.io/
|
||||||
|
|
||||||
|
2. **Falscher Diagrammtyp**
|
||||||
|
- Erste Zeile muss genau dem Kroki-Typ entsprechen
|
||||||
|
- Beispiel: `plantuml` (nicht `PlantUML` oder `plant-uml`)
|
||||||
|
|
||||||
|
3. **Kroki-Server nicht erreichbar**
|
||||||
|
- Bei Fehlermeldung "Error generating diagram" Server prüfen
|
||||||
|
|
||||||
|
### Fehlersuche
|
||||||
|
|
||||||
|
1. **Code auf kroki.io testen:**
|
||||||
|
```
|
||||||
|
https://kroki.io/
|
||||||
|
```
|
||||||
|
Geben Sie dort den Code ein und testen Sie die Generierung.
|
||||||
|
|
||||||
|
2. **Diagramm-Cache leeren:**
|
||||||
|
```bash
|
||||||
|
python manage.py clear_diagram_cache
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Logs prüfen:**
|
||||||
|
Fehler werden im Application-Log ausgegeben.
|
||||||
|
|
||||||
|
## Häufig verwendete Diagramm-Szenarien
|
||||||
|
|
||||||
|
### IT-Sicherheit: Bedrohungsmodell
|
||||||
|
|
||||||
|
```
|
||||||
|
mermaid
|
||||||
|
flowchart TB
|
||||||
|
Asset[Schützenswertes Asset]
|
||||||
|
Threat[Bedrohung]
|
||||||
|
Vuln[Schwachstelle]
|
||||||
|
Control[Sicherheitsmassnahme]
|
||||||
|
|
||||||
|
Threat -->|nutzt aus| Vuln
|
||||||
|
Vuln -->|betrifft| Asset
|
||||||
|
Control -->|schliesst| Vuln
|
||||||
|
Control -->|schützt| Asset
|
||||||
|
```
|
||||||
|
|
||||||
|
### Netzwerk-Segmentierung
|
||||||
|
|
||||||
|
```
|
||||||
|
nwdiag
|
||||||
|
nwdiag {
|
||||||
|
network internet {
|
||||||
|
address = "Internet";
|
||||||
|
internet [shape = cloud];
|
||||||
|
}
|
||||||
|
network dmz {
|
||||||
|
address = "DMZ (192.168.1.0/24)";
|
||||||
|
fw [address = "192.168.1.1"];
|
||||||
|
web [address = "192.168.1.10"];
|
||||||
|
}
|
||||||
|
network internal {
|
||||||
|
address = "Intern (10.0.0.0/8)";
|
||||||
|
fw [address = "10.0.0.1"];
|
||||||
|
app [address = "10.0.1.10"];
|
||||||
|
db [address = "10.0.2.10"];
|
||||||
|
}
|
||||||
|
|
||||||
|
internet -- fw;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Patch-Management Prozess
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
@startuml
|
||||||
|
start
|
||||||
|
:Patch-Benachrichtigung empfangen;
|
||||||
|
:Schweregrad bewerten;
|
||||||
|
if (Kritischer Patch?) then (ja)
|
||||||
|
:Sofort in Test-Umgebung testen;
|
||||||
|
if (Test erfolgreich?) then (ja)
|
||||||
|
:Notfall-Change erstellen;
|
||||||
|
:In Produktion ausrollen;
|
||||||
|
else (nein)
|
||||||
|
:Vendor kontaktieren;
|
||||||
|
endif
|
||||||
|
else (nein)
|
||||||
|
:In regulären Patch-Zyklus einplanen;
|
||||||
|
:Testen im Change-Window;
|
||||||
|
:Reguläres Rollout;
|
||||||
|
endif
|
||||||
|
:Dokumentation aktualisieren;
|
||||||
|
stop
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Zugriffskontrolle
|
||||||
|
|
||||||
|
```
|
||||||
|
plantuml
|
||||||
|
@startuml
|
||||||
|
skinparam actorStyle awesome
|
||||||
|
|
||||||
|
actor Benutzer
|
||||||
|
actor Administrator
|
||||||
|
actor "Security Team" as ST
|
||||||
|
|
||||||
|
rectangle "VorgabenUI" {
|
||||||
|
usecase "Vorgaben lesen" as UC1
|
||||||
|
usecase "Vorgaben bearbeiten" as UC2
|
||||||
|
usecase "Vorgaben publizieren" as UC3
|
||||||
|
usecase "Sicherheitsreview" as UC4
|
||||||
|
}
|
||||||
|
|
||||||
|
Benutzer --> UC1
|
||||||
|
Administrator --> UC1
|
||||||
|
Administrator --> UC2
|
||||||
|
ST --> UC4
|
||||||
|
UC2 .> UC4 : <<extends>>
|
||||||
|
UC4 --> UC3
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Weiterführende Ressourcen
|
||||||
|
|
||||||
|
- **Kroki Dokumentation:** https://kroki.io/
|
||||||
|
- **PlantUML Dokumentation:** https://plantuml.com/
|
||||||
|
- **Mermaid Dokumentation:** https://mermaid.js.org/
|
||||||
|
- **GraphViz Dokumentation:** https://graphviz.org/
|
||||||
|
- **Live-Editor zum Testen:** https://kroki.io/
|
||||||
|
|
||||||
|
## Tipps für spezifische Diagrammtypen
|
||||||
|
|
||||||
|
### PlantUML Tipps
|
||||||
|
|
||||||
|
```
|
||||||
|
@startuml
|
||||||
|
' Kommentare mit Apostroph
|
||||||
|
skinparam backgroundColor transparent
|
||||||
|
skinparam defaultFontName Arial
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Mermaid Tipps
|
||||||
|
|
||||||
|
```
|
||||||
|
%%{ init: { 'theme': 'base' } }%%
|
||||||
|
flowchart LR
|
||||||
|
%% Kommentare mit doppeltem Prozent
|
||||||
|
```
|
||||||
|
|
||||||
|
### GraphViz Tipps
|
||||||
|
|
||||||
|
```
|
||||||
|
digraph {
|
||||||
|
// Kommentare mit doppeltem Slash
|
||||||
|
rankdir=LR; // Links nach Rechts
|
||||||
|
// rankdir=TB; // Top nach Bottom
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Bei Fragen oder Problemen mit Diagrammen:
|
||||||
|
1. Code auf https://kroki.io/ testen
|
||||||
|
2. Syntax-Dokumentation des jeweiligen Diagrammtyps konsultieren
|
||||||
|
3. (Nur mit Shell-Zugriff auf Kubernetes-Pod möglich): Diagramm-Cache leeren: `python manage.py clear_diagram_cache`
|
||||||
|
4. Bei technischen Problemen: Information Security Management BIT kontaktieren
|
||||||
544
Documentation/modelle.md
Normal file
@@ -0,0 +1,544 @@
|
|||||||
|
# Alle Modelle der vgui-cicd Django-Anwendung
|
||||||
|
|
||||||
|
Dieses Dokument beschreibt alle Datenmodelle in der vgui-cicd Anwendung mit ihren Eigenschaften, Beziehungen und Verwendungszwecken.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## App: dokumente
|
||||||
|
|
||||||
|
Die Hauptmodelle für die Verwaltung von Dokumenten, Vorgaben und deren Metadaten.
|
||||||
|
|
||||||
|
### Dokumententyp
|
||||||
|
|
||||||
|
**Zweck**: Kategorisierung von Dokumenten (z. B. Richtlinie, Standard).
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `name` (CharField, max_length=100, **PRIMARY KEY**)
|
||||||
|
- `verantwortliche_ve` (CharField, max_length=255): Die verantwortliche Verwaltungseinheit
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Namen zurück
|
||||||
|
- Dient als Klassifizierungskategorie für Dokumente
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Dokumententyp"`
|
||||||
|
- `verbose_name_plural = "Dokumententypen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Person
|
||||||
|
|
||||||
|
**Zweck**: Repräsentiert Personen, die als Autoren, Prüfer oder in anderen Rollen tätig sind.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `name` (CharField, max_length=100, **PRIMARY KEY**)
|
||||||
|
- `funktion` (CharField, max_length=255): Funktionsbezeichnung der Person
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Many-to-Many mit `Dokument` über `verfasste_dokumente` (Autoren)
|
||||||
|
- Many-to-Many mit `Dokument` über `gepruefte_dokumente` (Prüfer)
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Namen zurück
|
||||||
|
- `ordering = ['name']`: Alphabetische Sortierung
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Personen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Thema
|
||||||
|
|
||||||
|
**Zweck**: Thematische Einordnung und Kategorisierung von Vorgaben innerhalb von Dokumenten.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `name` (CharField, max_length=100, **PRIMARY KEY**)
|
||||||
|
- `erklaerung` (TextField, blank=True): Optionale Erklärung des Themas
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Namen zurück
|
||||||
|
- Der erste Buchstabe des Themas wird in Vorgabennummern verwendet
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Themen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Dokument
|
||||||
|
|
||||||
|
**Zweck**: Hauptmodell für ein einzelnes Dokument mit allen zugehörigen Metadaten und Inhalten.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `nummer` (CharField, max_length=50, **PRIMARY KEY**): Eindeutige Dokumentennummer
|
||||||
|
- `dokumententyp` (ForeignKey → Dokumententyp, on_delete=PROTECT): Klassifizierung
|
||||||
|
- `name` (CharField, max_length=255): Dokumenttitel
|
||||||
|
- `autoren` (ManyToManyField → Person, related_name='verfasste_dokumente')
|
||||||
|
- `pruefende` (ManyToManyField → Person, related_name='gepruefte_dokumente')
|
||||||
|
- `gueltigkeit_von` (DateField, null=True, blank=True): Gültig ab Datum
|
||||||
|
- `gueltigkeit_bis` (DateField, null=True, blank=True): Gültig bis Datum
|
||||||
|
- `signatur_cso` (CharField, max_length=255, blank=True): CSO-Signatur
|
||||||
|
- `anhaenge` (TextField, blank=True): Beschreibung von Anhängen
|
||||||
|
- `aktiv` (BooleanField, blank=True): Aktivierungsstatus
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- 1-to-Many mit `Vorgabe` (über related_name='vorgaben')
|
||||||
|
- 1-to-Many mit `Geltungsbereich`
|
||||||
|
- 1-to-Many mit `Einleitung`
|
||||||
|
- 1-to-Many mit `Changelog`
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` formatiert als "nummer – name"
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Dokument"`
|
||||||
|
- `verbose_name_plural = "Dokumente"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Vorgabe
|
||||||
|
|
||||||
|
**Zweck**: Repräsentiert eine einzelne Vorgabe oder Anforderung innerhalb eines Dokuments.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `order` (IntegerField): Sortierreihenfolge für die Darstellung
|
||||||
|
- `nummer` (IntegerField): Nummer innerhalb eines Themas/Dokuments. Muss nicht eindeutig sein (z.B. für geänderte Vorgaben)
|
||||||
|
- `dokument` (ForeignKey → Dokument, on_delete=CASCADE, related_name='vorgaben')
|
||||||
|
- `thema` (ForeignKey → Thema, on_delete=PROTECT): Thematische Einordnung
|
||||||
|
- `titel` (CharField, max_length=255): Titel der Vorgabe
|
||||||
|
- `referenzen` (ManyToManyField → Referenz, blank=True): Verweise auf externe Referenzen
|
||||||
|
- `gueltigkeit_von` (DateField): Gültig ab Datum
|
||||||
|
- `gueltigkeit_bis` (DateField, blank=True, null=True): Gültig bis Datum (offen = unbegrenzt)
|
||||||
|
- `stichworte` (ManyToManyField → Stichwort, blank=True): Tags zur Kategorisierung
|
||||||
|
- `relevanz` (ManyToManyField → Rolle, blank=True): Relevante Rollen
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Foreign Key zu `Dokument` und `Thema`
|
||||||
|
- Many-to-Many zu `Referenz`, `Stichwort`, `Rolle`
|
||||||
|
- 1-to-Many zu `VorgabeLangtext`, `VorgabeKurztext`
|
||||||
|
- 1-to-Many zu `Checklistenfrage`
|
||||||
|
|
||||||
|
**Wichtige Methoden**:
|
||||||
|
|
||||||
|
- `Vorgabennummer()` → str
|
||||||
|
- Generiert eine eindeutige, lesbare Kennummer
|
||||||
|
- Format: "{dokument.nummer}.{thema.name[0]}.{nummer}"
|
||||||
|
- Beispiel: "R0066.A.1"
|
||||||
|
|
||||||
|
- `get_status(check_date=None, verbose=False)` → str
|
||||||
|
- Bestimmt den Status einer Vorgabe zu einem gegebenen Datum
|
||||||
|
- Parameter: `check_date` (Default: heute), `verbose` (Deutsche Beschreibung ja/nein)
|
||||||
|
- Rückgabewerte:
|
||||||
|
- "future": Vorgabe ist noch nicht gültig
|
||||||
|
- "active": Vorgabe ist aktuell gültig
|
||||||
|
- "expired": Vorgabe ist nicht mehr gültig
|
||||||
|
- Verbose-Ausgaben enthalten Datumsangaben
|
||||||
|
|
||||||
|
- `sanity_check_vorgaben()` (statisch) → list
|
||||||
|
- Findet zeitliche Konflikte zwischen Vorgaben mit gleicher Nummer/Thema/Dokument
|
||||||
|
- Überprüft, ob sich Geltungszeiträume überschneiden
|
||||||
|
- Gibt Liste mit Konflikt-Dictionaries zurück
|
||||||
|
|
||||||
|
- `clean()`
|
||||||
|
- Validiert die Vorgabe vor dem Speichern
|
||||||
|
- Ruft `find_conflicts()` auf
|
||||||
|
- Wirft `ValidationError` bei erkannten Konflikten
|
||||||
|
|
||||||
|
- `find_conflicts()` → list
|
||||||
|
- Findet Konflikte mit bestehenden Vorgaben (ausgenommen self)
|
||||||
|
- Überprüft auf zeitliche Überschneidungen
|
||||||
|
- Gibt Liste mit Konflikt-Details zurück
|
||||||
|
|
||||||
|
- `_date_ranges_intersect(start1, end1, start2, end2)` (statisch) → bool
|
||||||
|
- Prüft, ob zwei Datumsbereiche sich überschneiden
|
||||||
|
- `None` als Enddatum = unbegrenzter Bereich
|
||||||
|
- Gibt `True` bei Überschneidung zurück
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt "Vorgabennummer: titel" zurück
|
||||||
|
- Validierung von Gültigkeitszeiträumen ist implementiert
|
||||||
|
- Sehr wichtiges Modell im Geschäftslogik-Kontext
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `ordering = ['order']`
|
||||||
|
- `verbose_name_plural = "Vorgaben"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### VorgabeLangtext
|
||||||
|
|
||||||
|
**Zweck**: Speichert ausführliche Textinhalte (Langtext) einer Vorgabe.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `abschnitt` (ForeignKey → Vorgabe, on_delete=CASCADE): Referenz zur Vorgabe
|
||||||
|
- Erbt von `Textabschnitt` (siehe App: abschnitte):
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Langtext-Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Langtext"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### VorgabeKurztext
|
||||||
|
|
||||||
|
**Zweck**: Speichert kurze Textinhalte (Kurztext) einer Vorgabe.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `abschnitt` (ForeignKey → Vorgabe, on_delete=CASCADE): Referenz zur Vorgabe
|
||||||
|
- Erbt von `Textabschnitt` (siehe App: abschnitte):
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Kurztext-Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Kurztext"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Geltungsbereich
|
||||||
|
|
||||||
|
**Zweck**: Speichert den Geltungsbereich-Abschnitt eines Dokuments.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `geltungsbereich` (ForeignKey → Dokument, on_delete=CASCADE): Referenz zum Dokument
|
||||||
|
- Erbt von `Textabschnitt` (siehe App: abschnitte):
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Geltungsbereichs-Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Geltungsbereich"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Einleitung
|
||||||
|
|
||||||
|
**Zweck**: Speichert die Einleitungs-Abschnitte eines Dokuments.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `einleitung` (ForeignKey → Dokument, on_delete=CASCADE): Referenz zum Dokument
|
||||||
|
- Erbt von `Textabschnitt` (siehe App: abschnitte):
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Einleitungs-Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Einleitung"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Checklistenfrage
|
||||||
|
|
||||||
|
**Zweck**: Repräsentiert eine Frage für die Checkliste zu einer Vorgabe.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `vorgabe` (ForeignKey → Vorgabe, on_delete=CASCADE, related_name='checklistenfragen')
|
||||||
|
- `frage` (CharField, max_length=255): Text der Checklistenfrage
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Fragetext zurück
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Frage für Checkliste"`
|
||||||
|
- `verbose_name_plural = "Fragen für Checkliste"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### VorgabenTable
|
||||||
|
|
||||||
|
**Zweck**: Proxy-Modell für `Vorgabe` für die Darstellung von Vorgaben in Tabellenform.
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- Proxy-Modell (kein eigenes Datenbankschema)
|
||||||
|
- Ermöglicht alternative Django-Admin-Ansicht
|
||||||
|
- Erbt alle Felder und Methoden von `Vorgabe`
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `proxy = True`
|
||||||
|
- `verbose_name = "Vorgabe (Tabellenansicht)"`
|
||||||
|
- `verbose_name_plural = "Vorgaben (Tabellenansicht)"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
**Zweck**: Dokumentiert Änderungen und Versionshistorie für Dokumente.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `dokument` (ForeignKey → Dokument, on_delete=CASCADE, related_name='changelog'): Referenz zum Dokument
|
||||||
|
- `autoren` (ManyToManyField → Person): Personen, die die Änderung vorgenommen haben
|
||||||
|
- `datum` (DateField): Datum der Änderung
|
||||||
|
- `aenderung` (TextField): Beschreibung der Änderung
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Foreign Key zu `Dokument`
|
||||||
|
- Many-to-Many zu `Person`
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` formatiert als "datum – dokumentnummer"
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Changelog-Eintrag"`
|
||||||
|
- `verbose_name_plural = "Changelog"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## App: abschnitte
|
||||||
|
|
||||||
|
Modelle für die Verwaltung von Textabschnitten, die von mehreren Modellen geerbt werden.
|
||||||
|
|
||||||
|
### AbschnittTyp
|
||||||
|
|
||||||
|
**Zweck**: Klassifizierung von Textabschnitten (z. B. "Beschreibung", "Erklärung", "Anleitung").
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `abschnitttyp` (CharField, max_length=100, **PRIMARY KEY**): Name des Abschnitttyps
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Namen zurück
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Abschnitttypen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Textabschnitt (abstrakt)
|
||||||
|
|
||||||
|
**Zweck**: Abstrakte Basisklasse für Textinhalte, die mit anderen Modellen verknüpft sind.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, on_delete=PROTECT, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True): Der Textinhalt
|
||||||
|
- `order` (PositiveIntegerField, default=0): Sortierreihenfolge
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- Abstrakte Klasse (wird nicht direkt in der Datenbank gespeichert)
|
||||||
|
- Wird von anderen Modellen geerbt: `VorgabeLangtext`, `VorgabeKurztext`, `Geltungsbereich`, `Einleitung`, `Referenzerklaerung`, `Stichworterklaerung`, `RollenBeschreibung`
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `abstract = True`
|
||||||
|
- `verbose_name = "Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Abschnitte"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## App: referenzen
|
||||||
|
|
||||||
|
Modelle für die Verwaltung von Referenzen und Verweisen auf externe Standards.
|
||||||
|
|
||||||
|
### Referenz (MPTT-Tree)
|
||||||
|
|
||||||
|
**Zweck**: Hierarchische Verwaltung von Referenzen und externen Normen (z. B. ISO-Standards, Gesetze, übergeordnete Vorgaben).
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `id` (AutoField, **PRIMARY KEY**)
|
||||||
|
- `name_nummer` (CharField, max_length=100): Nummer/Kennung der Referenz (z. B. "ISO 27001")
|
||||||
|
- `name_text` (CharField, max_length=255, blank=True): Ausführlicher Name/Beschreibung
|
||||||
|
- `oberreferenz` (TreeForeignKey zu self, optional): Parent-Referenz für Hierarchien
|
||||||
|
- `url` (URLField, blank=True): Link zur Referenz
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Many-to-Many mit `Vorgabe`
|
||||||
|
- MPTT Tree-Struktur für hierarchische Referenzen
|
||||||
|
|
||||||
|
**Wichtige Methoden**:
|
||||||
|
|
||||||
|
- `Path()` → str
|
||||||
|
- Gibt die vollständige Pfad-Hierarchie als String zurück
|
||||||
|
- Format: "Referenz → Subreferenz → Unterreferenz (Beschreibung)"
|
||||||
|
- Beispiel: "ISO → 27000 → 27001 (Information Security Management)"
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- Verwendet MPPT (Modified Preorder Tree Traversal) für Baumoperationen
|
||||||
|
- `get_ancestors(include_self=True)`: Gibt alle Vorfahren zurück
|
||||||
|
- `unterreferenzen`: Related_name für Kindreferenzen
|
||||||
|
- Sortierung: Nach `name_nummer`
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Referenzen"`
|
||||||
|
- **MPTTMeta**:
|
||||||
|
- `parent_attr = 'oberreferenz'`
|
||||||
|
- `order_insertion_by = ['name_nummer']`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Referenzerklaerung
|
||||||
|
|
||||||
|
**Zweck**: Speichert Erklärungen und zusätzliche Informationen zu einer Referenz.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `erklaerung` (ForeignKey → Referenz, on_delete=CASCADE): Referenz zur Referenz
|
||||||
|
- Erbt von `Textabschnitt`:
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Erklärung"`
|
||||||
|
- `verbose_name_plural = "Erklärungen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## App: stichworte
|
||||||
|
|
||||||
|
Modelle für die Verwaltung von Stichworte und Tags.
|
||||||
|
|
||||||
|
### Stichwort
|
||||||
|
|
||||||
|
**Zweck**: Einfache Tag/Keyword-Modell zur Kategorisierung von Vorgaben.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `stichwort` (CharField, max_length=50, **PRIMARY KEY**): Das Stichwort
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Many-to-Many mit `Vorgabe`
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt das Stichwort zurück
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Stichworte"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Stichworterklaerung
|
||||||
|
|
||||||
|
**Zweck**: Speichert Erklärungen zu Stichworten.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `erklaerung` (ForeignKey → Stichwort, on_delete=CASCADE): Referenz zum Stichwort
|
||||||
|
- Erbt von `Textabschnitt`:
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Erklärung"`
|
||||||
|
- `verbose_name_plural = "Erklärungen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## App: rollen
|
||||||
|
|
||||||
|
Modelle für die Verwaltung von Rollen und deren Beschreibungen.
|
||||||
|
|
||||||
|
### Rolle
|
||||||
|
|
||||||
|
**Zweck**: Definiert Rollen/Positionen im Unternehmen (z. B. "Geschäftsleiter", "IT-Sicherheit", "Datenschutzbeauftragter").
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `name` (CharField, max_length=100, **PRIMARY KEY**): Name der Rolle
|
||||||
|
|
||||||
|
**Beziehungen**:
|
||||||
|
- Many-to-Many mit `Vorgabe` (über `relevanz`)
|
||||||
|
|
||||||
|
**Besonderheiten**:
|
||||||
|
- `__str__()` gibt den Namen zurück
|
||||||
|
- Wird verwendet, um Rollen zu markieren, die von einer Vorgabe betroffen sind
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name_plural = "Rollen"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### RollenBeschreibung
|
||||||
|
|
||||||
|
**Zweck**: Speichert detaillierte Beschreibungen und Informationen zu einer Rolle.
|
||||||
|
|
||||||
|
**Wichtige Felder**:
|
||||||
|
- `abschnitt` (ForeignKey → Rolle, on_delete=CASCADE): Referenz zur Rolle
|
||||||
|
- Erbt von `Textabschnitt`:
|
||||||
|
- `abschnitttyp` (ForeignKey → AbschnittTyp, optional)
|
||||||
|
- `inhalt` (TextField, blank=True, null=True)
|
||||||
|
- `order` (PositiveIntegerField, default=0)
|
||||||
|
|
||||||
|
**Meta**:
|
||||||
|
- `verbose_name = "Rollenbeschreibungs-Abschnitt"`
|
||||||
|
- `verbose_name_plural = "Rollenbeschreibung"`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Allgemeine Hinweise zur Modellverwaltung
|
||||||
|
|
||||||
|
### Primärschlüssel-Strategie
|
||||||
|
- Viele Modelle verwenden CharField-basierte Primärschlüssel (`name`, `nummer`, `stichwort`)
|
||||||
|
- Dies ermöglicht direkte Verwendung von Strings als Identifikatoren
|
||||||
|
- Vorteil: Lesbarkeit; Nachteil: Umbenennungen sind kritisch
|
||||||
|
|
||||||
|
### On-Delete-Strategien
|
||||||
|
- **PROTECT**: Verwendet für wichtige Beziehungen (z. B. Dokumententyp, Thema, AbschnittTyp)
|
||||||
|
- Verhindert versehentliches Löschen von Daten, auf die verwiesen wird
|
||||||
|
- **CASCADE**: Verwendet für Unterkomponenten (z. B. Vorgabe → Dokument)
|
||||||
|
- Löscht abhängige Datensätze automatisch
|
||||||
|
- **SET_NULL**: Nur bei optionalen Referenzen (z. B. Oberreferenz in Referenz-Tree)
|
||||||
|
|
||||||
|
### Validierungsmechanismen
|
||||||
|
- **Vorgabe.clean()**: Validiert Gültigkeitszeiträume
|
||||||
|
- **Vorgabe.find_conflicts()**: Prüft zeitliche Überschneidungen
|
||||||
|
- Wird von Django-Admin automatisch aufgerufen vor dem Speichern
|
||||||
|
|
||||||
|
### MPTT (Modified Preorder Tree Traversal)
|
||||||
|
- Verwendet in `Referenz` für hierarchische Strukturen
|
||||||
|
- Ermöglicht effiziente Abfragen von Vorfahren und Nachkommen
|
||||||
|
- Zusätzliche Datenbank-Felder für Tree-Management (automatisch verwaltet)
|
||||||
|
|
||||||
|
### Textabschnitt-Vererbung
|
||||||
|
- Mehrere Modelle erben von `Textabschnitt`
|
||||||
|
- Wird verwendet für Lang-/Kurztexte, Erklärungen, Beschreibungen
|
||||||
|
- `order`-Feld ermöglicht Sortierung mehrerer Abschnitte
|
||||||
|
|
||||||
|
### Datumsverwaltung
|
||||||
|
- `gueltigkeit_von`: Immer erforderlich für Vorgaben
|
||||||
|
- `gueltigkeit_bis`: Optional; `None` bedeutet unbegrenzte Gültigkeit
|
||||||
|
- `_date_ranges_intersect()` prüft korrekt auf Überschneidungen mit None-Werten
|
||||||
|
|
||||||
|
### Many-to-Many-Beziehungen
|
||||||
|
- Vielfach verwendet für flexible Zuordnungen (Autoren, Stichworte, Rollen, Referenzen)
|
||||||
|
- `related_name`-Attribute ermöglichen rückwärts Zugriff
|
||||||
|
- Beispiel: `dokument.vorgaben.all()`, `person.verfasste_dokumente.all()`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Zusammenfassung der Beziehungen
|
||||||
|
|
||||||
|
```
|
||||||
|
Dokumententyp ← Dokument
|
||||||
|
Person ← Dokument (Autoren/Prüfer)
|
||||||
|
Dokument → Vorgabe (1-to-Many)
|
||||||
|
Dokument → Geltungsbereich (1-to-Many)
|
||||||
|
Dokument → Einleitung (1-to-Many)
|
||||||
|
Dokument → Changelog (1-to-Many)
|
||||||
|
|
||||||
|
Thema ← Vorgabe
|
||||||
|
Vorgabe → VorgabeLangtext (1-to-Many)
|
||||||
|
Vorgabe → VorgabeKurztext (1-to-Many)
|
||||||
|
Vorgabe → Checklistenfrage (1-to-Many)
|
||||||
|
Vorgabe ← Referenz (Many-to-Many)
|
||||||
|
Vorgabe ← Stichwort (Many-to-Many)
|
||||||
|
Vorgabe ← Rolle (Many-to-Many)
|
||||||
|
|
||||||
|
Referenz → Referenz (Hierarchie via MPPT)
|
||||||
|
Referenz → Referenzerklaerung (1-to-Many)
|
||||||
|
|
||||||
|
Stichwort → Stichworterklaerung (1-to-Many)
|
||||||
|
|
||||||
|
Rolle → RollenBeschreibung (1-to-Many)
|
||||||
|
|
||||||
|
AbschnittTyp ← Textabschnitt (von verschiedenen Modellen geerbt)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Entwicklungsrichtlinien
|
||||||
|
|
||||||
|
- Alle Modelle sollten aussagekräftige `__str__()`-Methoden haben
|
||||||
|
- `verbose_name` und `verbose_name_plural` sollten auf Deutsch sein (für Django-Admin)
|
||||||
|
- Validierungslogik (z. B. `clean()`) sollte implementiert werden für komplexe Business-Logic
|
||||||
|
- Related-Names sollten aussagekräftig und konsistent sein
|
||||||
|
- Textinhalte sollten die `Textabschnitt`-Basisklasse erben
|
||||||
|
- Datumsverwaltung: Immer auf None-Werte bei `gueltigkeit_bis` achten, wenn Vorgaben noch aktiv sind.
|
||||||
92
Documentation/modelle_dokumente.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# Modelle (App: dokumente)
|
||||||
|
|
||||||
|
Kurzbeschreibungen der Modelle in dokumente/models.py.
|
||||||
|
|
||||||
|
## Dokumententyp
|
||||||
|
- Zweck: Kategorisierung von Dokumenten (z. B. Richtlinie, Verfahren).
|
||||||
|
- Wichtige Felder: `name` (CharField, PK), `verantwortliche_ve` (CharField).
|
||||||
|
- Besonderheiten: `__str__()` gibt `name` zurück.
|
||||||
|
- Meta: `verbose_name` und `verbose_name_plural` gesetzt.
|
||||||
|
|
||||||
|
## Person
|
||||||
|
- Zweck: Repräsentiert Personen (Autoren, Prüfer).
|
||||||
|
- Wichtige Felder: `name` (CharField, PK), `funktion` (CharField).
|
||||||
|
- Beziehungen: Many-to-many mit Dokument über `autoren` und `pruefende`.
|
||||||
|
- Besonderheiten: `__str__()` gibt `name` zurück; `ordering = ['name']`.
|
||||||
|
- Meta: `verbose_name_plural = "Personen"`.
|
||||||
|
|
||||||
|
## Thema
|
||||||
|
- Zweck: Thematische Einordnung von Vorgaben.
|
||||||
|
- Wichtige Felder: `name` (CharField, PK), `erklaerung` (TextField, optional).
|
||||||
|
- Besonderheiten: `__str__()` gibt `name` zurück.
|
||||||
|
|
||||||
|
## Dokument
|
||||||
|
- Zweck: Hauptobjekt; ein einzelnes Dokument mit Metadaten.
|
||||||
|
- Wichtige Felder:
|
||||||
|
- `nummer` (CharField, PK)
|
||||||
|
- `dokumententyp` (FK → Dokumententyp, on_delete=PROTECT)
|
||||||
|
- `name` (CharField)
|
||||||
|
- `autoren`, `pruefende` (ManyToManyField → Person)
|
||||||
|
- `gueltigkeit_von`, `gueltigkeit_bis` (DateField, optional)
|
||||||
|
- `aktiv` (BooleanField)
|
||||||
|
- `signatur_cso`, `anhaenge` (Metadaten)
|
||||||
|
- Besonderheiten: `__str__()` formatiert als "nummer – name".
|
||||||
|
- Meta: `verbose_name` / `verbose_name_plural`.
|
||||||
|
|
||||||
|
## Vorgabe
|
||||||
|
- Zweck: Einzelne Vorgabe / Anforderung innerhalb eines Dokuments.
|
||||||
|
- Wichtige Felder:
|
||||||
|
- `order` (IntegerField) — Sortierreihenfolge
|
||||||
|
- `nummer` (IntegerField) — Nummer innerhalb Thema/Dokument
|
||||||
|
- `dokument` (FK → Dokument, CASCADE, related_name='vorgaben')
|
||||||
|
- `thema` (FK → Thema, PROTECT)
|
||||||
|
- `titel` (CharField)
|
||||||
|
- `referenzen` (M2M → Referenz, optional)
|
||||||
|
- `stichworte` (M2M → Stichwort, optional)
|
||||||
|
- `relevanz` (M2M → Rolle, optional)
|
||||||
|
- `gueltigkeit_von`, `gueltigkeit_bis` (Datum/Felder)
|
||||||
|
- Beziehungen: zu Dokument, Thema, Referenzen, Stichworte, Rollen.
|
||||||
|
- Wichtige Methoden:
|
||||||
|
- `Vorgabennummer()` — generiert eine lesbare Kennung (z. B. "DOK. T. N").
|
||||||
|
- `get_status(check_date, verbose)` — liefert "future", "active" oder "expired" oder eine deutsche Statusbeschreibung, abhängig von Gültigkeitsdaten.
|
||||||
|
- `sanity_check_vorgaben()` (static) — findet Konflikte zwischen Vorgaben mit gleicher Nummer/Thema/Dokument, deren Zeiträume sich überschneiden.
|
||||||
|
- `clean()` — ruft `find_conflicts()` auf und wirft ValidationError bei Konflikten.
|
||||||
|
- `find_conflicts()` — prüft Konflikte mit bestehenden Vorgaben (ohne sich selbst).
|
||||||
|
- `_date_ranges_intersect(...)` (static) — prüft, ob sich zwei Datumsbereiche überschneiden (None = offen).
|
||||||
|
- Besonderheiten: `__str__()` gibt "Vorgabennummer: titel" zurück.
|
||||||
|
- Meta: `ordering = ['order']`, `verbose_name_plural = "Vorgaben"`.
|
||||||
|
|
||||||
|
## VorgabeLangtext, VorgabeKurztext
|
||||||
|
- Zweck: Textabschnitts-Modelle, erben von `Textabschnitt` (aus abschnitte.models).
|
||||||
|
- Wichtige Felder: je ein FK `abschnitt` → Vorgabe.
|
||||||
|
- Besonderheit: konkrete Untertypen für Lang- und Kurztexte; Meta-`verbose_name` gesetzt.
|
||||||
|
|
||||||
|
## Geltungsbereich, Einleitung
|
||||||
|
- Zweck: Dokumentbezogene Textabschnitte (erben von `Textabschnitt`).
|
||||||
|
- Wichtige Felder: FK zum `Dokument` (`geltungsbereich` bzw. `einleitung`).
|
||||||
|
- Meta: `verbose_name`/`verbose_name_plural` gesetzt.
|
||||||
|
|
||||||
|
## Checklistenfrage
|
||||||
|
- Zweck: Einzelne Frage für Checklisten zu einer Vorgabe.
|
||||||
|
- Wichtige Felder: `vorgabe` (FK → Vorgabe, related_name="checklistenfragen"), `frage` (CharField).
|
||||||
|
- Besonderheiten: `__str__()` gibt `frage` zurück.
|
||||||
|
|
||||||
|
## VorgabenTable
|
||||||
|
- Zweck: Proxy-Modell für Vorgabe zur Darstellung (Tabellenansicht).
|
||||||
|
- Besonderheiten: kein eigenes Schema; nur Meta-Attribute (`proxy = True`, `verbose_name`).
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
- Zweck: Änderungsverzeichnis-Eintrag für ein Dokument.
|
||||||
|
- Wichtige Felder:
|
||||||
|
- `dokument` (FK → Dokument, related_name='changelog')
|
||||||
|
- `autoren` (M2M → Person)
|
||||||
|
- `datum` (DateField)
|
||||||
|
- `aenderung` (TextField)
|
||||||
|
- Besonderheiten: `__str__()` formatiert als "datum – dokumentnummer".
|
||||||
|
- Meta: `verbose_name` / `verbose_name_plural`.
|
||||||
|
|
||||||
|
Hinweise zur Pflege
|
||||||
|
- Wichtige Relationen nutzen häufig on_delete=PROTECT, um versehentliche Löschungen zu vermeiden.
|
||||||
|
- Viele Modelle haben CharField-Primärschlüssel (z. B. `nummer`, `name`).
|
||||||
|
- Validierungslogik für zeitliche Konflikte ist in Vorgabe implementiert (clean / find_conflicts).
|
||||||
|
- Textabschnitt-Modelle erben Verhalten aus `abschnitte.models.Textabschnitt` — dort sind Anzeige- und Inhaltsregeln definiert.
|
||||||
431
Test Suite-DE.md
Normal file
@@ -0,0 +1,431 @@
|
|||||||
|
# Test-Suite Dokumentation
|
||||||
|
|
||||||
|
Dieses Dokument bietet einen umfassenden Überblick über alle Tests im vgui-cicd Django-Projekt und beschreibt, was jeder Test tut und wie er funktioniert.
|
||||||
|
|
||||||
|
## Inhaltsverzeichnis
|
||||||
|
|
||||||
|
- [abschnitte App Tests](#abschnitte-app-tests)
|
||||||
|
- [dokumente App Tests](#dokumente-app-tests)
|
||||||
|
- [pages App Tests](#pages-app-tests)
|
||||||
|
- [referenzen App Tests](#referenzen-app-tests)
|
||||||
|
- [rollen App Tests](#rollen-app-tests)
|
||||||
|
- [stichworte App Tests](#stichworte-app-tests)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## abschnitte App Tests
|
||||||
|
|
||||||
|
Die abschnitte App enthält 33 Tests, die Modelle, Utility-Funktionen, Diagram-Caching, Management-Befehle und Sicherheit abdecken.
|
||||||
|
|
||||||
|
### Modell-Tests
|
||||||
|
|
||||||
|
#### AbschnittTypModelTest
|
||||||
|
- **test_abschnitttyp_creation**: Überprüft, dass AbschnittTyp-Objekte korrekt mit den erwarteten Feldwerten erstellt werden
|
||||||
|
- **test_abschnitttyp_primary_key**: Bestätigt, dass das `abschnitttyp`-Feld als Primärschlüssel dient
|
||||||
|
- **test_abschnitttyp_str**: Testet die String-Repräsentation, die den `abschnitttyp`-Wert zurückgibt
|
||||||
|
- **test_abschnitttyp_verbose_name_plural**: Validiert den korrekt gesetzten verbose_name_plural
|
||||||
|
- **test_create_multiple_abschnitttypen**: Stellt sicher, dass mehrere AbschnittTyp-Objekte mit verschiedenen Typen erstellt werden können
|
||||||
|
|
||||||
|
#### TextabschnittModelTest
|
||||||
|
- **test_textabschnitt_creation**: Testet, dass Textabschnitt über das konkrete Modell instanziiert werden kann
|
||||||
|
- **test_textabschnitt_default_order**: Überprüft, dass das `order`-Feld standardmäßig 0 ist
|
||||||
|
- **test_textabschnitt_ordering**: Testet, dass Textabschnitt-Objekte nach dem `order`-Feld sortiert werden können
|
||||||
|
- **test_textabschnitt_blank_fields**: Bestätigt, dass `abschnitttyp`- und `inhalt`-Felder leer/null sein können
|
||||||
|
- **test_textabschnitt_foreign_key_protection**: Testet, dass AbschnittTyp-Objekte vor Löschung geschützt sind, wenn sie von Textabschnitt referenziert werden
|
||||||
|
|
||||||
|
### Utility-Funktions-Tests
|
||||||
|
|
||||||
|
#### MdTableToHtmlTest
|
||||||
|
- **test_simple_table**: Konvertiert eine einfache Markdown-Tabelle mit Überschriften und einer Zeile nach HTML
|
||||||
|
- **test_table_with_multiple_rows**: Testet die Konvertierung von Tabellen mit mehreren Datenzeilen
|
||||||
|
- **test_table_with_empty_cells**: Verarbeitet Tabellen mit leeren Zellen in den Daten
|
||||||
|
- **test_table_with_spaces**: Verarbeitet Tabellen mit zusätzlichen Leerzeichen in Zellen
|
||||||
|
- **test_table_empty_string**: Löst ValueError für leere Eingabe-Strings aus
|
||||||
|
- **test_table_only_whitespace**: Löst ValueError für Strings aus, die nur Leerzeichen enthalten
|
||||||
|
- **test_table_insufficient_lines**: Löst ValueError aus, wenn die Eingabe weniger als 2 Zeilen hat
|
||||||
|
|
||||||
|
#### RenderTextabschnitteTest
|
||||||
|
- **test_render_empty_queryset**: Gibt leeren String für leere Querysets zurück
|
||||||
|
- **test_render_multiple_abschnitte**: Rendert mehrere Textabschnitte in korrekter Reihenfolge
|
||||||
|
- **test_render_text_markdown**: Konvertiert Klartext mit Markdown-Formatierung
|
||||||
|
- **test_render_ordered_list**: Rendert geordnete Listen korrekt
|
||||||
|
- **test_render_unordered_list**: Rendert ungeordnete Listen korrekt
|
||||||
|
- **test_render_code_block**: Rendert Code-Blöcke mit korrekter Syntax-Hervorhebung
|
||||||
|
- **test_render_table**: Konvertiert Markdown-Tabellen mit md_table_to_html nach HTML
|
||||||
|
- **test_render_diagram_success**: Testet die Diagramm-Generierung mit erfolgreichem Caching
|
||||||
|
- **test_render_diagram_error**: Behandelt Diagramm-Generierungsfehler angemessen
|
||||||
|
- **test_render_diagram_with_options**: Testet das Diagramm-Rendering mit benutzerdefinierten Optionen
|
||||||
|
- **test_render_text_with_footnotes**: Verarbeitet Text, der Fußnoten enthält
|
||||||
|
- **test_render_abschnitt_without_type**: Behandelt Textabschnitte ohne AbschnittTyp
|
||||||
|
- **test_render_abschnitt_with_empty_content**: Behandelt Textabschnitte mit leerem Inhalt
|
||||||
|
- **test_render_textabschnitte_xss_prevention**: Überprüft, dass bösartiger HTML-Code und Skript-Tags aus gerenderten Inhalten bereinigt werden, um XSS-Angriffe zu verhindern
|
||||||
|
|
||||||
|
### Diagram-Caching-Tests
|
||||||
|
|
||||||
|
#### DiagramCacheTest
|
||||||
|
- **test_compute_hash**: Generiert konsistente SHA256-Hashes für dieselbe Eingabe
|
||||||
|
- **test_get_cache_path**: Erstellt korrekte Cache-Dateipfade basierend auf Hash und Typ
|
||||||
|
- **test_get_cached_diagram_hit**: Gibt zwischengespeichertes Diagramm zurück bei Cache-Treffer
|
||||||
|
- **test_get_cached_diagram_miss**: Generiert neues Diagramm bei Cache-Fehltreffer
|
||||||
|
- **test_get_cached_diagram_request_error**: Behandelt und löst Request-Fehler korrekt aus
|
||||||
|
- **test_clear_cache_specific_type**: Löscht Cache-Dateien für spezifische Diagrammtypen
|
||||||
|
- **test_clear_cache_all_types**: Löscht alle Cache-Dateien, wenn kein Typ angegeben ist
|
||||||
|
|
||||||
|
### Management-Befehl-Tests
|
||||||
|
|
||||||
|
#### ClearDiagramCacheCommandTest
|
||||||
|
- **test_command_without_type**: Testet die Ausführung des Management-Befehls ohne Angabe des Typs
|
||||||
|
- **test_command_with_type**: Testet die Ausführung des Management-Befehls mit spezifischem Diagrammtyp
|
||||||
|
|
||||||
|
### Integrations-Tests
|
||||||
|
|
||||||
|
#### IntegrationTest
|
||||||
|
- **test_textabschnitt_inheritance**: Überprüft, dass VorgabeLangtext Textabschnitt-Felder korrekt erbt
|
||||||
|
- **test_render_vorgabe_langtext**: Testet das Rendern von VorgabeLangtext durch render_textabschnitte
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## dokumente App Tests
|
||||||
|
|
||||||
|
Die dokumente App enthält 121 Tests und ist damit die umfassendste Test-Suite, die alle Modelle, Views, URLs, Geschäftslogik und Kommentarfunktionalität mit XSS-Schutz abdeckt.
|
||||||
|
|
||||||
|
### Modell-Tests
|
||||||
|
|
||||||
|
#### DokumententypModelTest
|
||||||
|
- **test_dokumententyp_creation**: Überprüft die Erstellung von Dokumententyp mit korrekten Feldwerten
|
||||||
|
- **test_dokumententyp_str**: Testet die String-Repräsentation, die das `typ`-Feld zurückgibt
|
||||||
|
- **test_dokumententyp_verbose_name**: Validiert den korrekt gesetzten verbose_name
|
||||||
|
|
||||||
|
#### PersonModelTest
|
||||||
|
- **test_person_creation**: Testet die Erstellung von Person-Objekten mit Name und optionalem Titel
|
||||||
|
- **test_person_str**: Überprüft, dass die String-Repräsentation Titel und Namen enthält
|
||||||
|
- **test_person_verbose_name_plural**: Testet die Konfiguration von verbose_name_plural
|
||||||
|
|
||||||
|
#### ThemaModelTest
|
||||||
|
- **test_thema_creation**: Testet die Erstellung von Thema mit Name und optionaler Erklärung
|
||||||
|
- **test_thema_str**: Überprüft, dass die String-Repräsentation den Themennamen zurückgibt
|
||||||
|
- **test_thema_blank_erklaerung**: Bestätigt, dass das `erklaerung`-Feld leer sein kann
|
||||||
|
|
||||||
|
#### DokumentModelTest
|
||||||
|
- **test_dokument_creation**: Testet die Erstellung von Dokument mit erforderlichen und optionalen Feldern
|
||||||
|
- **test_dokument_str**: Überprüft, dass die String-Repräsentation den Dokumenttitel zurückgibt
|
||||||
|
- **test_dokument_optional_fields**: Testet, dass optionale Felder None oder leer sein können
|
||||||
|
- **test_dokument_many_to_many_relationships**: Überprüft Many-to-Many-Beziehungen mit Personen und Themen
|
||||||
|
|
||||||
|
#### VorgabeModelTest
|
||||||
|
- **test_vorgabe_creation**: Testet die Erstellung von Vorgabe mit allen erforderlichen Feldern
|
||||||
|
- **test_vorgabe_str**: Überprüft, dass die String-Repräsentation die Vorgabennummer zurückgibt
|
||||||
|
- **test_vorgabennummer**: Testet die automatische Generierung des Vorgabennummer-Formats
|
||||||
|
- **test_get_status_active**: Testet die Statusbestimmung für aktuelle aktive Vorgaben
|
||||||
|
- **test_get_status_expired**: Testet die Statusbestimmung für abgelaufene Vorgaben
|
||||||
|
- **test_get_status_future**: Testet die Statusbestimmung für zukünftige Vorgaben
|
||||||
|
- **test_get_status_with_custom_check_date**: Testet den Status mit benutzerdefiniertem Prüfdatum
|
||||||
|
- **test_get_status_verbose**: Testet die ausführliche Statusausgabe
|
||||||
|
|
||||||
|
#### ChangelogModelTest
|
||||||
|
- **test_changelog_creation**: Testet die Erstellung von Changelog mit Version, Datum und Beschreibung
|
||||||
|
- **test_changelog_str**: Überprüft, dass die String-Repräsentation Version und Datum enthält
|
||||||
|
|
||||||
|
#### ChecklistenfrageModelTest
|
||||||
|
- **test_checklistenfrage_creation**: Testet die Erstellung von Checklistenfrage mit Frage und optionaler Antwort
|
||||||
|
- **test_checklistenfrage_str**: Überprüft, dass die String-Repräsentation lange Fragen kürzt
|
||||||
|
- **test_checklistenfrage_related_name**: Testet die umgekehrte Beziehung von Vorgabe
|
||||||
|
|
||||||
|
#### VorgabeCommentModelTest
|
||||||
|
- **test_comment_creation**: Testet die Erstellung von VorgabeComment mit Vorgabe, Benutzer und Text
|
||||||
|
- **test_comment_str**: Überprüft, dass die String-Repräsentation Benutzername und Vorgabennummer enthält
|
||||||
|
- **test_comment_related_name**: Testet die umgekehrte Beziehung von Vorgabe
|
||||||
|
- **test_comment_ordering**: Testet, dass Kommentare nach created_at absteigend sortiert sind (neueste zuerst)
|
||||||
|
- **test_comment_timestamps_auto_update**: Testet, dass sich updated_at ändert, wenn ein Kommentar geändert wird
|
||||||
|
- **test_multiple_users_can_comment**: Testet, dass mehrere Benutzer zur selben Vorgabe kommentieren können
|
||||||
|
|
||||||
|
### Text-Abschnitt-Tests
|
||||||
|
|
||||||
|
#### DokumentTextAbschnitteTest
|
||||||
|
- **test_einleitung_creation**: Testet die Erstellung von Einleitung und Vererbung von Textabschnitt
|
||||||
|
- **test_geltungsbereich_creation**: Testet die Erstellung von Geltungsbereich und Vererbung
|
||||||
|
|
||||||
|
#### VorgabeTextAbschnitteTest
|
||||||
|
- **test_vorgabe_kurztext_creation**: Testet die Erstellung von VorgabeKurztext und Vererbung
|
||||||
|
- **test_vorgabe_langtext_creation**: Testet die Erstellung von VorgabeLangtext und Vererbung
|
||||||
|
|
||||||
|
### Sanity-Check-Tests
|
||||||
|
|
||||||
|
#### VorgabeSanityCheckTest
|
||||||
|
- **test_date_ranges_intersect_no_overlap**: Testet Datumsüberschneidung mit nicht überlappenden Bereichen
|
||||||
|
- **test_date_ranges_intersect_with_overlap**: Testet Datumsüberschneidung mit überlappenden Bereichen
|
||||||
|
- **test_date_ranges_intersect_identical_ranges**: Testet Datumsüberschneidung mit identischen Bereichen
|
||||||
|
- **test_date_ranges_intersect_with_none_end_date**: Testet Überschneidung mit offenen Endbereichen
|
||||||
|
- **test_date_ranges_intersect_both_none_end_dates**: Testet Überschneidung mit zwei offenen Endbereichen
|
||||||
|
- **test_check_vorgabe_conflicts_utility**: Testet die Utility-Funktion zur Konflikterkennung
|
||||||
|
- **test_find_conflicts_no_conflicts**: Testet die Konflikterkennung bei Vorgabe ohne Konflikte
|
||||||
|
- **test_find_conflicts_with_conflicts**: Testet die Konflikterkennung mit konfliktbehafteten Vorgaben
|
||||||
|
- **test_format_conflict_report_no_conflicts**: Testet die Konfliktbericht-Formatierung ohne Konflikte
|
||||||
|
- **test_format_conflict_report_with_conflicts**: Testet die Konfliktbericht-Formatierung mit Konflikten
|
||||||
|
- **test_sanity_check_vorgaben_no_conflicts**: Testet vollständigen Sanity-Check ohne Konflikte
|
||||||
|
- **test_sanity_check_vorgaben_with_conflicts**: Testet vollständigen Sanity-Check mit Konflikten
|
||||||
|
- **test_sanity_check_vorgaben_multiple_conflicts**: Testet Sanity-Check mit mehreren Konfliktgruppen
|
||||||
|
- **test_vorgabe_clean_no_conflicts**: Testet Vorgabe.clean()-Methode ohne Konflikte
|
||||||
|
- **test_vorgabe_clean_with_conflicts**: Testet, dass Vorgabe.clean() ValidationError bei Konflikten auslöst
|
||||||
|
|
||||||
|
### Management-Befehl-Tests
|
||||||
|
|
||||||
|
#### SanityCheckManagementCommandTest
|
||||||
|
- **test_sanity_check_command_no_conflicts**: Testet Management-Befehlsausgabe ohne Konflikte
|
||||||
|
- **test_sanity_check_command_with_conflicts**: Testet Management-Befehlsausgabe mit Konflikten
|
||||||
|
|
||||||
|
### URL-Pattern-Tests
|
||||||
|
|
||||||
|
#### URLPatternsTest
|
||||||
|
- **test_standard_list_url_resolves**: Überprüft, dass standard_list URL zur korrekten View aufgelöst wird
|
||||||
|
- **test_standard_detail_url_resolves**: Überprüft, dass standard_detail URL mit pk-Parameter aufgelöst wird
|
||||||
|
- **test_standard_history_url_resolves**: Überprüft, dass standard_history URL mit check_date aufgelöst wird
|
||||||
|
- **test_standard_checkliste_url_resolves**: Überprüft, dass standard_checkliste URL mit pk aufgelöst wird
|
||||||
|
|
||||||
|
### View-Tests
|
||||||
|
|
||||||
|
#### ViewsTestCase
|
||||||
|
- **test_standard_list_view**: Testet, dass die Standard-Listen-View 200 zurückgibt und erwartete Inhalte enthält
|
||||||
|
- **test_standard_detail_view**: Testet die Standard-Detail-View mit existierendem Dokument
|
||||||
|
- **test_standard_detail_view_404**: Testet, dass die Standard-Detail-View 404 für nicht existierendes Dokument zurückgibt
|
||||||
|
- **test_standard_history_view**: Testet die Standard-Detail-View mit historischem check_date-Parameter
|
||||||
|
- **test_standard_checkliste_view**: Testet die Funktionalität der Checklisten-View
|
||||||
|
|
||||||
|
### JSON-Export-Tests
|
||||||
|
|
||||||
|
#### JSONExportManagementCommandTest
|
||||||
|
- **test_export_json_command_to_file**: Testet, dass der export_json-Befehl JSON in die angegebene Datei ausgibt
|
||||||
|
- **test_export_json_command_stdout**: Testet, dass der export_json-Befehl JSON an stdout ausgibt, wenn keine Datei angegeben ist
|
||||||
|
- **test_export_json_command_inactive_documents**: Testet, dass der export_json-Befehl inaktive Dokumente herausfiltert
|
||||||
|
- **test_export_json_command_empty_database**: Testet, dass der export_json-Befehl leere Datenbank angemessen behandelt
|
||||||
|
|
||||||
|
#### StandardJSONViewTest
|
||||||
|
- **test_standard_json_view_success**: Testet, dass die standard_json-View korrektes JSON für existierendes Dokument zurückgibt
|
||||||
|
- **test_standard_json_view_not_found**: Testet, dass die standard_json-View 404 für nicht existierendes Dokument zurückgibt
|
||||||
|
- **test_standard_json_view_json_formatting**: Testet, dass die standard_json-View korrekt formatiertes JSON zurückgibt
|
||||||
|
- **test_standard_json_view_null_dates**: Testet, dass die standard_json-View null-Datumfelder korrekt behandelt
|
||||||
|
- **test_standard_json_view_empty_sections**: Testet, dass die standard_json-View leere Dokumentabschnitte behandelt
|
||||||
|
|
||||||
|
### Unvollständige Vorgaben Tests
|
||||||
|
|
||||||
|
#### IncompleteVorgabenTest
|
||||||
|
- **test_incomplete_vorgaben_page_status**: Testet, dass die Seite erfolgreich lädt (200-Status)
|
||||||
|
- **test_incomplete_vorgaben_staff_only**: Testet, dass Nicht-Staff-Benutzer zum Login weitergeleitet werden
|
||||||
|
- **test_incomplete_vorgaben_page_content**: Testet, dass die Seite erwartete Überschriften und Struktur enthält
|
||||||
|
- **test_navigation_link**: Testet, dass die Navigation einen Link zur unvollständigen Vorgaben-Seite enthält
|
||||||
|
- **test_no_references_list**: Testet, dass Vorgaben ohne Referenzen korrekt aufgelistet werden
|
||||||
|
- **test_no_stichworte_list**: Testet, dass Vorgaben ohne Stichworte korrekt aufgelistet werden
|
||||||
|
- **test_no_text_list**: Testet, dass Vorgaben ohne Kurz- oder Langtext korrekt aufgelistet werden
|
||||||
|
- **test_no_checklistenfragen_list**: Testet, dass Vorgaben ohne Checklistenfragen korrekt aufgelistet werden
|
||||||
|
- **test_vorgabe_with_both_text_types**: Testet, dass Vorgabe mit beiden Texttypen als vollständig betrachtet wird
|
||||||
|
- **test_vorgabe_with_langtext_only**: Testet, dass Vorgabe mit nur Langtext immer noch unvollständig für Text ist
|
||||||
|
- **test_empty_lists_message**: Testet angemessene Nachrichten, wenn Listen leer sind
|
||||||
|
- **test_badge_counts**: Testet, dass Badge-Zähler korrekt berechnet werden
|
||||||
|
- **test_summary_section**: Testet, dass die Zusammenfassungssektion korrekte Zähler anzeigt
|
||||||
|
- **test_vorgabe_links**: Testet, dass Vorgaben zu korrekten Admin-Seiten verlinken
|
||||||
|
- **test_back_link**: Testet, dass der Zurück-Link zur Standardübersicht existiert
|
||||||
|
|
||||||
|
### Kommentar-Funktionalität Tests
|
||||||
|
|
||||||
|
#### GetVorgabeCommentsViewTest
|
||||||
|
- **test_get_comments_requires_login**: Testet, dass anonyme Benutzer keine Kommentare sehen können und weitergeleitet werden
|
||||||
|
- **test_regular_user_sees_only_own_comments**: Testet, dass normale Benutzer nur ihre eigenen Kommentare sehen
|
||||||
|
- **test_staff_user_sees_all_comments**: Testet, dass Staff-Benutzer alle Kommentare sehen können
|
||||||
|
- **test_get_comments_returns_404_for_nonexistent_vorgabe**: Testet 404-Antwort für nicht existierende Vorgabe
|
||||||
|
- **test_comments_are_html_escaped**: Testet HTML-Escaping zur Verhinderung von XSS-Angriffen (z.B. `<script>`-Tags)
|
||||||
|
- **test_line_breaks_preserved**: Testet, dass Zeilenumbrüche in `<br>`-Tags umgewandelt werden
|
||||||
|
- **test_security_headers_present**: Testet, dass Content-Security-Policy und X-Content-Type-Options Header gesetzt sind
|
||||||
|
|
||||||
|
#### AddVorgabeCommentViewTest
|
||||||
|
- **test_add_comment_requires_login**: Testet, dass anonyme Benutzer keine Kommentare hinzufügen können
|
||||||
|
- **test_add_comment_requires_post**: Testet, dass nur POST-Methode erlaubt ist (405 für GET)
|
||||||
|
- **test_add_comment_success**: Testet erfolgreiche Kommentarerstellung mit gültigen Daten
|
||||||
|
- **test_add_empty_comment_fails**: Testet, dass leere Kommentare mit 400-Fehler abgelehnt werden
|
||||||
|
- **test_add_whitespace_only_comment_fails**: Testet, dass Kommentare nur mit Leerzeichen abgelehnt werden
|
||||||
|
- **test_add_too_long_comment_fails**: Testet, dass Kommentare über 2000 Zeichen abgelehnt werden
|
||||||
|
- **test_add_comment_xss_script_tag_blocked**: Testet, dass Kommentare mit `<script>`-Tags blockiert werden
|
||||||
|
- **test_add_comment_xss_javascript_protocol_blocked**: Testet, dass `javascript:`-Protokoll blockiert wird
|
||||||
|
- **test_add_comment_xss_event_handlers_blocked**: Testet, dass Event-Handler (onload, onerror, onclick, onmouseover) blockiert werden
|
||||||
|
- **test_add_comment_invalid_json_fails**: Testet, dass ungültige JSON-Payloads abgelehnt werden
|
||||||
|
- **test_add_comment_nonexistent_vorgabe_fails**: Testet 404-Antwort für nicht existierende Vorgabe
|
||||||
|
- **test_add_comment_security_headers**: Testet, dass Sicherheits-Header in Antworten vorhanden sind
|
||||||
|
|
||||||
|
#### DeleteVorgabeCommentViewTest
|
||||||
|
- **test_delete_comment_requires_login**: Testet, dass anonyme Benutzer keine Kommentare löschen können
|
||||||
|
- **test_delete_comment_requires_post**: Testet, dass nur POST-Methode erlaubt ist (405 für GET)
|
||||||
|
- **test_user_can_delete_own_comment**: Testet, dass Benutzer ihre eigenen Kommentare löschen können
|
||||||
|
- **test_user_cannot_delete_other_users_comment**: Testet, dass Benutzer keine Kommentare anderer löschen können (403 Forbidden)
|
||||||
|
- **test_staff_can_delete_any_comment**: Testet, dass Staff-Benutzer jeden Kommentar löschen können
|
||||||
|
- **test_delete_nonexistent_comment_returns_404**: Testet 404-Antwort für nicht existierenden Kommentar
|
||||||
|
- **test_delete_comment_security_headers**: Testet, dass Sicherheits-Header in Antworten vorhanden sind
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## pages App Tests
|
||||||
|
|
||||||
|
Die pages App enthält 4 Tests, die sich auf die Suchfunktionalität und Validierung konzentrieren.
|
||||||
|
|
||||||
|
### ViewsTestCase
|
||||||
|
- **test_search_view_get**: Testet GET-Anfrage an die Search-View gibt 200-Status zurück
|
||||||
|
- **test_search_view_post_with_query**: Testet POST-Anfrage mit Query gibt Ergebnisse zurück
|
||||||
|
- **test_search_view_post_empty_query**: Testet POST-Anfrage mit leerer Query zeigt Validierungsfehler
|
||||||
|
- **test_search_view_post_no_query**: Testet POST-Anfrage ohne Query-Parameter zeigt Validierungsfehler
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## referenzen App Tests
|
||||||
|
|
||||||
|
Die referenzen App enthält 18 Tests, die sich auf MPTT-Hierarchiefunktionalität und Modellbeziehungen konzentrieren.
|
||||||
|
|
||||||
|
### Modell-Tests
|
||||||
|
|
||||||
|
#### ReferenzModelTest
|
||||||
|
- **test_referenz_creation**: Testet die Erstellung von Referenz mit erforderlichen Feldern
|
||||||
|
- **test_referenz_str**: Testet die String-Repräsentation gibt den Referenztext zurück
|
||||||
|
- **test_referenz_ordering**: Testet die Standard-Sortierung nach `order`-Feld
|
||||||
|
- **test_referenz_optional_fields**: Testet, dass optionale Felder leer sein können
|
||||||
|
|
||||||
|
#### ReferenzerklaerungModelTest
|
||||||
|
- **test_referenzerklaerung_creation**: Testet die Erstellung von Referenzerklaerung mit Referenz und Erklärung
|
||||||
|
- **test_referenzerklaerung_str**: Testet die String-Repräsentation enthält Referenz und Erklärungsvorschau
|
||||||
|
- **test_referenzerklaerung_ordering**: Testet die Standard-Sortierung nach `order`-Feld
|
||||||
|
- **test_referenzerklaerung_optional_explanation**: Testet, dass das Erklärungsfeld leer sein kann
|
||||||
|
|
||||||
|
### Hierarchie-Tests
|
||||||
|
|
||||||
|
#### ReferenzHierarchyTest
|
||||||
|
- **test_hierarchy_relationships**: Testet Eltern-Kind-Beziehungen im MPTT-Baum
|
||||||
|
- **test_get_root**: Testet das Abrufen des Wurzelknotens einer Hierarchie
|
||||||
|
- **test_get_children**: Testet das Abrufen direkter Kinder eines Knotens
|
||||||
|
- **test_get_descendants**: Testet das Abrufen aller Nachkommen eines Knotens
|
||||||
|
- **test_get_ancestors**: Testet das Abrufen aller Vorfahren eines Knotens
|
||||||
|
- **test_get_ancestors_include_self**: Testet das Abrufen von Vorfahren einschließlich des Knotens selbst
|
||||||
|
- **test_is_leaf_node**: Testet die Erkennung von Blattknoten
|
||||||
|
- **test_is_root_node**: Testet die Erkennung von Wurzelknoten
|
||||||
|
- **test_tree_ordering**: Testet die Baum-Sortierung mit mehreren Ebenen
|
||||||
|
- **test_move_node**: Testet das Verschieben von Knoten innerhalb der Baumstruktur
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## rollen App Tests
|
||||||
|
|
||||||
|
Die rollen App enthält 18 Tests, die Rollenmodelle und ihre Beziehungen zu Dokumentabschnitten abdecken.
|
||||||
|
|
||||||
|
### Modell-Tests
|
||||||
|
|
||||||
|
#### RolleModelTest
|
||||||
|
- **test_rolle_creation**: Testet die Erstellung von Rolle mit Name und optionaler Beschreibung
|
||||||
|
- **test_rolle_str**: Testet die String-Repräsentation gibt den Rollennamen zurück
|
||||||
|
- **test_rolle_ordering**: Testet die Standard-Sortierung nach `order`-Feld
|
||||||
|
- **test_rolle_unique_name**: Testet, dass Rollennamen einzigartig sein müssen
|
||||||
|
- **test_rolle_optional_beschreibung**: Testet, dass das Beschreibungsfeld leer sein kann
|
||||||
|
|
||||||
|
#### RollenBeschreibungModelTest
|
||||||
|
- **test_rollenbeschreibung_creation**: Testet die Erstellung von RollenBeschreibung mit Rolle und Abschnittstyp
|
||||||
|
- **test_rollenbeschreibung_str**: Testet die String-Repräsentation enthält Rolle und Abschnittstyp
|
||||||
|
- **test_rollenbeschreibung_ordering**: Testet die Standard-Sortierung nach `order`-Feld
|
||||||
|
- **test_rollenbeschreibung_unique_combination**: Testet die Unique-Constraint auf Rolle und Abschnittstyp
|
||||||
|
- **test_rollenbeschreibung_optional_beschreibung**: Testet, dass das Beschreibungsfeld leer sein kann
|
||||||
|
|
||||||
|
### Beziehungs-Tests
|
||||||
|
|
||||||
|
#### RelationshipTest
|
||||||
|
- **test_rolle_rollenbeschreibung_relationship**: Testet die Eins-zu-viele-Beziehung zwischen Rolle und RollenBeschreibung
|
||||||
|
- **test_abschnitttyp_rollenbeschreibung_relationship**: Testet die Beziehung zwischen AbschnittTyp und RollenBeschreibung
|
||||||
|
- **test_cascade_delete**: Testet das Cascade-Delete-Verhalten beim Löschen einer Rolle
|
||||||
|
- **test_protected_delete**: Testet das Protected-Delete-Verhalten, wenn Abschnittstyp referenziert wird
|
||||||
|
- **test_query_related_objects**: Testet das effiziente Abfragen verwandter Objekte
|
||||||
|
- **test_string_representations**: Testet, dass alle String-Repräsentationen korrekt funktionieren
|
||||||
|
- **test_ordering_consistency**: Testet, dass die Sortierung über Abfragen hinweg konsistent ist
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## stichworte App Tests
|
||||||
|
|
||||||
|
Die stichworte App enthält 18 Tests, die Schlüsselwortmodelle und ihre Sortierung abdecken.
|
||||||
|
|
||||||
|
### Modell-Tests
|
||||||
|
|
||||||
|
#### StichwortModelTest
|
||||||
|
- **test_stichwort_creation**: Testet die Erstellung von Stichwort mit Schlüsselworttext
|
||||||
|
- **test_stichwort_str**: Testet die String-Repräsentation gibt den Schlüsselworttext zurück
|
||||||
|
- **test_stichwort_ordering**: Testet die Standard-Sortierung nach `stichwort`-Feld
|
||||||
|
- **test_stichwort_unique**: Testet, dass Schlüsselwörter einzigartig sein müssen
|
||||||
|
- **test_stichwort_case_insensitive**: Testet die Groß-/Kleinschreibungs-unabhängige Eindeutigkeit
|
||||||
|
|
||||||
|
#### StichworterklaerungModelTest
|
||||||
|
- **test_stichworterklaerung_creation**: Testet die Erstellung von Stichworterklaerung mit Schlüsselwort und Erklärung
|
||||||
|
- **test_stichworterklaerung_str**: Testet die String-Repräsentation enthält Schlüsselwort und Erklärungsvorschau
|
||||||
|
- **test_stichworterklaerung_ordering**: Testet die Standard-Sortierung nach `order`-Feld
|
||||||
|
- **test_stichworterklaerung_optional_erklaerung**: Testet, dass das Erklärungsfeld leer sein kann
|
||||||
|
- **test_stichworterklaerung_unique_stichwort**: Testet den Unique-Constraint auf das Schlüsselwort
|
||||||
|
|
||||||
|
### Beziehungs-Tests
|
||||||
|
|
||||||
|
#### RelationshipTest
|
||||||
|
- **test_stichwort_stichworterklaerung_relationship**: Testet die Eins-zu-eins-Beziehung zwischen Stichwort und Stichworterklaerung
|
||||||
|
- **test_cascade_delete**: Testet das Cascade-Delete-Verhalten beim Löschen eines Schlüsselworts
|
||||||
|
- **test_protected_delete**: Testet das Protected-Delete-Verhalten, wenn Erklärung referenziert wird
|
||||||
|
- **test_query_related_objects**: Testet das effiziente Abfragen verwandter Objekte
|
||||||
|
- **test_string_representations**: Testet, dass alle String-Repräsentationen korrekt funktionieren
|
||||||
|
- **test_ordering_consistency**: Testet, dass die Sortierung über Abfragen hinweg konsistent ist
|
||||||
|
- **test_reverse_relationship**: Testet die umgekehrte Beziehung von Erklärung zu Schlüsselwort
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Test-Statistiken
|
||||||
|
|
||||||
|
- **Gesamt-Tests**: 230
|
||||||
|
- **abschnitte**: 33 Tests (einschließlich XSS-Prävention)
|
||||||
|
- **dokumente**: 121 Tests (einschließlich Kommentarfunktionalität mit XSS-Schutz)
|
||||||
|
- Modell-Tests: 44 Tests
|
||||||
|
- View-Tests: 7 Tests
|
||||||
|
- URL-Pattern-Tests: 4 Tests
|
||||||
|
- Sanity-Check-Tests: 16 Tests
|
||||||
|
- Management-Befehl-Tests: 2 Tests
|
||||||
|
- JSON-Export-Tests: 9 Tests
|
||||||
|
- Unvollständige-Vorgaben-Tests: 15 Tests
|
||||||
|
- Kommentar-Tests: 24 Tests (6 Modell + 18 View-Tests)
|
||||||
|
- **pages**: 4 Tests
|
||||||
|
- **referenzen**: 18 Tests
|
||||||
|
- **rollen**: 18 Tests
|
||||||
|
- **stichworte**: 18 Tests
|
||||||
|
|
||||||
|
## Test-Abdeckungsbereiche
|
||||||
|
|
||||||
|
1. **Modell-Validierung**: Feldvalidierung, Constraints und Beziehungen
|
||||||
|
2. **Geschäftslogik**: Statusbestimmung, Konflikterkennung, Hierarchieverwaltung
|
||||||
|
3. **View-Funktionalität**: HTTP-Antworten, Template-Rendering, URL-Auflösung
|
||||||
|
4. **Utility-Funktionen**: Textverarbeitung, Caching, Formatierung
|
||||||
|
5. **Management-Befehle**: CLI-Schnittstelle und Ausgabeverarbeitung
|
||||||
|
6. **Integration**: App-übergreifende Funktionalität und Datenfluss
|
||||||
|
7. **Sicherheit**:
|
||||||
|
- XSS-Prävention durch HTML-Bereinigung beim Rendern von Inhalten
|
||||||
|
- XSS-Angriffsverhinderung im Kommentarsystem (Script-Tags, javascript:-Protokoll, Event-Handler)
|
||||||
|
- Eingabevalidierung und -bereinigung
|
||||||
|
- Autorisierungsprüfungen (Staff vs. normale Benutzer)
|
||||||
|
- Sicherheits-Header (Content-Security-Policy, X-Content-Type-Options)
|
||||||
|
8. **Kommentar-Funktionalität**:
|
||||||
|
- CRUD-Operationen (Create, Read, Delete)
|
||||||
|
- Benutzerberechtigungen und -besitz
|
||||||
|
- HTML-Escaping und Erhalt von Zeilenumbrüchen
|
||||||
|
- Verhinderung mehrerer XSS-Angriffsvektoren
|
||||||
|
|
||||||
|
## Ausführen der Tests
|
||||||
|
|
||||||
|
Um alle Tests auszuführen:
|
||||||
|
```bash
|
||||||
|
python manage.py test
|
||||||
|
```
|
||||||
|
|
||||||
|
Um Tests für eine spezifische App auszuführen:
|
||||||
|
```bash
|
||||||
|
python manage.py test app_name
|
||||||
|
```
|
||||||
|
|
||||||
|
Um mit ausführlicher Ausgabe auszuführen:
|
||||||
|
```bash
|
||||||
|
python manage.py test --verbosity=2
|
||||||
|
```
|
||||||
|
|
||||||
|
Alle Tests laufen derzeit erfolgreich und bieten umfassende Abdeckung der Funktionalität der Anwendung.
|
||||||
431
Test suite.md
Normal file
@@ -0,0 +1,431 @@
|
|||||||
|
# Test Suite Documentation
|
||||||
|
|
||||||
|
This document provides a comprehensive overview of all tests in the vgui-cicd Django project, describing what each test does and how it works.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [abschnitte App Tests](#abschnitte-app-tests)
|
||||||
|
- [dokumente App Tests](#dokumente-app-tests)
|
||||||
|
- [pages App Tests](#pages-app-tests)
|
||||||
|
- [referenzen App Tests](#referenzen-app-tests)
|
||||||
|
- [rollen App Tests](#rollen-app-tests)
|
||||||
|
- [stichworte App Tests](#stichworte-app-tests)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## abschnitte App Tests
|
||||||
|
|
||||||
|
The abschnitte app contains 33 tests covering models, utility functions, diagram caching, management commands, and security.
|
||||||
|
|
||||||
|
### Model Tests
|
||||||
|
|
||||||
|
#### AbschnittTypModelTest
|
||||||
|
- **test_abschnitttyp_creation**: Verifies that AbschnittTyp objects are created correctly with the expected field values
|
||||||
|
- **test_abschnitttyp_primary_key**: Confirms that the `abschnitttyp` field serves as the primary key
|
||||||
|
- **test_abschnitttyp_str**: Tests the string representation returns the `abschnitttyp` value
|
||||||
|
- **test_abschnitttyp_verbose_name_plural**: Validates the verbose name plural is set correctly
|
||||||
|
- **test_create_multiple_abschnitttypen**: Ensures multiple AbschnittTyp objects can be created with different types
|
||||||
|
|
||||||
|
#### TextabschnittModelTest
|
||||||
|
- **test_textabschnitt_creation**: Tests that Textabschnitt can be instantiated through the concrete model
|
||||||
|
- **test_textabschnitt_default_order**: Verifies the `order` field defaults to 0
|
||||||
|
- **test_textabschnitt_ordering**: Tests that Textabschnitt objects can be ordered by the `order` field
|
||||||
|
- **test_textabschnitt_blank_fields**: Confirms that `abschnitttyp` and `inhalt` fields can be blank/null
|
||||||
|
- **test_textabschnitt_foreign_key_protection**: Tests that AbschnittTyp objects are protected from deletion when referenced by Textabschnitt
|
||||||
|
|
||||||
|
### Utility Function Tests
|
||||||
|
|
||||||
|
#### MdTableToHtmlTest
|
||||||
|
- **test_simple_table**: Converts a basic markdown table with headers and one row to HTML
|
||||||
|
- **test_table_with_multiple_rows**: Tests conversion of tables with multiple data rows
|
||||||
|
- **test_table_with_empty_cells**: Handles tables with empty cells in the data
|
||||||
|
- **test_table_with_spaces**: Processes tables with extra spaces in cells
|
||||||
|
- **test_table_empty_string**: Raises ValueError for empty input strings
|
||||||
|
- **test_table_only_whitespace**: Raises ValueError for strings containing only whitespace
|
||||||
|
- **test_table_insufficient_lines**: Raises ValueError when input has fewer than 2 lines
|
||||||
|
|
||||||
|
#### RenderTextabschnitteTest
|
||||||
|
- **test_render_empty_queryset**: Returns empty string for empty querysets
|
||||||
|
- **test_render_multiple_abschnitte**: Renders multiple Textabschnitte in correct order
|
||||||
|
- **test_render_text_markdown**: Converts plain text with markdown formatting
|
||||||
|
- **test_render_ordered_list**: Renders ordered lists correctly
|
||||||
|
- **test_render_unordered_list**: Renders unordered lists correctly
|
||||||
|
- **test_render_code_block**: Renders code blocks with proper syntax highlighting
|
||||||
|
- **test_render_table**: Converts markdown tables to HTML using md_table_to_html
|
||||||
|
- **test_render_diagram_success**: Tests diagram generation with successful caching
|
||||||
|
- **test_render_diagram_error**: Handles diagram generation errors gracefully
|
||||||
|
- **test_render_diagram_with_options**: Tests diagram rendering with custom options
|
||||||
|
- **test_render_text_with_footnotes**: Processes text containing footnotes
|
||||||
|
- **test_render_abschnitt_without_type**: Handles Textabschnitte without AbschnittTyp
|
||||||
|
- **test_render_abschnitt_with_empty_content**: Handles Textabschnitte with empty content
|
||||||
|
- **test_render_textabschnitte_xss_prevention**: Verifies that malicious HTML and script tags are sanitized from rendered content to prevent XSS attacks
|
||||||
|
|
||||||
|
### Diagram Caching Tests
|
||||||
|
|
||||||
|
#### DiagramCacheTest
|
||||||
|
- **test_compute_hash**: Generates consistent SHA256 hashes for the same input
|
||||||
|
- **test_get_cache_path**: Creates correct cache file paths based on hash and type
|
||||||
|
- **test_get_cached_diagram_hit**: Returns cached diagram when cache hit occurs
|
||||||
|
- **test_get_cached_diagram_miss**: Generates new diagram when cache miss occurs
|
||||||
|
- **test_get_cached_diagram_request_error**: Properly handles and raises request errors
|
||||||
|
- **test_clear_cache_specific_type**: Clears cache files for specific diagram types
|
||||||
|
- **test_clear_cache_all_types**: Clears all cache files when no type specified
|
||||||
|
|
||||||
|
### Management Command Tests
|
||||||
|
|
||||||
|
#### ClearDiagramCacheCommandTest
|
||||||
|
- **test_command_without_type**: Tests management command execution without specifying type
|
||||||
|
- **test_command_with_type**: Tests management command execution with specific diagram type
|
||||||
|
|
||||||
|
### Integration Tests
|
||||||
|
|
||||||
|
#### IntegrationTest
|
||||||
|
- **test_textabschnitt_inheritance**: Verifies VorgabeLangtext properly inherits Textabschnitt fields
|
||||||
|
- **test_render_vorgabe_langtext**: Tests rendering VorgabeLangtext through render_textabschnitte
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## dokumente App Tests
|
||||||
|
|
||||||
|
The dokumente app contains 121 tests, making it the most comprehensive test suite, covering all models, views, URLs, business logic, and comment functionality with XSS protection.
|
||||||
|
|
||||||
|
### Model Tests
|
||||||
|
|
||||||
|
#### DokumententypModelTest
|
||||||
|
- **test_dokumententyp_creation**: Verifies Dokumententyp creation with correct field values
|
||||||
|
- **test_dokumententyp_str**: Tests string representation returns the `typ` field
|
||||||
|
- **test_dokumententyp_verbose_name**: Validates verbose name is set correctly
|
||||||
|
|
||||||
|
#### PersonModelTest
|
||||||
|
- **test_person_creation**: Tests Person object creation with name and optional title
|
||||||
|
- **test_person_str**: Verifies string representation includes title and name
|
||||||
|
- **test_person_verbose_name_plural**: Tests verbose name plural configuration
|
||||||
|
|
||||||
|
#### ThemaModelTest
|
||||||
|
- **test_thema_creation**: Tests Thema creation with name and optional explanation
|
||||||
|
- **test_thema_str**: Verifies string representation returns the theme name
|
||||||
|
- **test_thema_blank_erklaerung**: Confirms `erklaerung` field can be blank
|
||||||
|
|
||||||
|
#### DokumentModelTest
|
||||||
|
- **test_dokument_creation**: Tests Dokument creation with required and optional fields
|
||||||
|
- **test_dokument_str**: Verifies string representation returns the document title
|
||||||
|
- **test_dokument_optional_fields**: Tests that optional fields can be None or blank
|
||||||
|
- **test_dokument_many_to_many_relationships**: Verifies many-to-many relationships with Personen and Themen
|
||||||
|
|
||||||
|
#### VorgabeModelTest
|
||||||
|
- **test_vorgabe_creation**: Tests Vorgabe creation with all required fields
|
||||||
|
- **test_vorgabe_str**: Verifies string representation returns the Vorgabennummer
|
||||||
|
- **test_vorgabennummer**: Tests automatic generation of Vorgabennummer format
|
||||||
|
- **test_get_status_active**: Tests status determination for current active Vorgaben
|
||||||
|
- **test_get_status_expired**: Tests status determination for expired Vorgaben
|
||||||
|
- **test_get_status_future**: Tests status determination for future Vorgaben
|
||||||
|
- **test_get_status_with_custom_check_date**: Tests status with custom check date
|
||||||
|
- **test_get_status_verbose**: Tests verbose status output
|
||||||
|
|
||||||
|
#### ChangelogModelTest
|
||||||
|
- **test_changelog_creation**: Tests Changelog creation with version, date, and description
|
||||||
|
- **test_changelog_str**: Verifies string representation includes version and date
|
||||||
|
|
||||||
|
#### ChecklistenfrageModelTest
|
||||||
|
- **test_checklistenfrage_creation**: Tests Checklistenfrage creation with question and optional answer
|
||||||
|
- **test_checklistenfrage_str**: Verifies string representation truncates long questions
|
||||||
|
- **test_checklistenfrage_related_name**: Tests the reverse relationship from Vorgabe
|
||||||
|
|
||||||
|
#### VorgabeCommentModelTest
|
||||||
|
- **test_comment_creation**: Tests VorgabeComment creation with vorgabe, user, and text
|
||||||
|
- **test_comment_str**: Verifies string representation includes username and Vorgabennummer
|
||||||
|
- **test_comment_related_name**: Tests the reverse relationship from Vorgabe
|
||||||
|
- **test_comment_ordering**: Tests comments are ordered by created_at descending (newest first)
|
||||||
|
- **test_comment_timestamps_auto_update**: Tests that updated_at changes when comment is modified
|
||||||
|
- **test_multiple_users_can_comment**: Tests multiple users can comment on same Vorgabe
|
||||||
|
|
||||||
|
### Text Abschnitt Tests
|
||||||
|
|
||||||
|
#### DokumentTextAbschnitteTest
|
||||||
|
- **test_einleitung_creation**: Tests Einleitung creation and inheritance from Textabschnitt
|
||||||
|
- **test_geltungsbereich_creation**: Tests Geltungsbereich creation and inheritance
|
||||||
|
|
||||||
|
#### VorgabeTextAbschnitteTest
|
||||||
|
- **test_vorgabe_kurztext_creation**: Tests VorgabeKurztext creation and inheritance
|
||||||
|
- **test_vorgabe_langtext_creation**: Tests VorgabeLangtext creation and inheritance
|
||||||
|
|
||||||
|
### Sanity Check Tests
|
||||||
|
|
||||||
|
#### VorgabeSanityCheckTest
|
||||||
|
- **test_date_ranges_intersect_no_overlap**: Tests date intersection with non-overlapping ranges
|
||||||
|
- **test_date_ranges_intersect_with_overlap**: Tests date intersection with overlapping ranges
|
||||||
|
- **test_date_ranges_intersect_identical_ranges**: Tests date intersection with identical ranges
|
||||||
|
- **test_date_ranges_intersect_with_none_end_date**: Tests intersection with open-ended ranges
|
||||||
|
- **test_date_ranges_intersect_both_none_end_dates**: Tests intersection with two open-ended ranges
|
||||||
|
- **test_check_vorgabe_conflicts_utility**: Tests the utility function for conflict detection
|
||||||
|
- **test_find_conflicts_no_conflicts**: Tests conflict detection on Vorgabe without conflicts
|
||||||
|
- **test_find_conflicts_with_conflicts**: Tests conflict detection with conflicting Vorgaben
|
||||||
|
- **test_format_conflict_report_no_conflicts**: Tests conflict report formatting with no conflicts
|
||||||
|
- **test_format_conflict_report_with_conflicts**: Tests conflict report formatting with conflicts
|
||||||
|
- **test_sanity_check_vorgaben_no_conflicts**: Tests full sanity check with no conflicts
|
||||||
|
- **test_sanity_check_vorgaben_with_conflicts**: Tests full sanity check with conflicts
|
||||||
|
- **test_sanity_check_vorgaben_multiple_conflicts**: Tests sanity check with multiple conflict groups
|
||||||
|
- **test_vorgabe_clean_no_conflicts**: Tests Vorgabe.clean() method without conflicts
|
||||||
|
- **test_vorgabe_clean_with_conflicts**: Tests Vorgabe.clean() raises ValidationError with conflicts
|
||||||
|
|
||||||
|
### Management Command Tests
|
||||||
|
|
||||||
|
#### SanityCheckManagementCommandTest
|
||||||
|
- **test_sanity_check_command_no_conflicts**: Tests management command output with no conflicts
|
||||||
|
- **test_sanity_check_command_with_conflicts**: Tests management command output with conflicts
|
||||||
|
|
||||||
|
### URL Pattern Tests
|
||||||
|
|
||||||
|
#### URLPatternsTest
|
||||||
|
- **test_standard_list_url_resolves**: Verifies standard_list URL resolves to correct view
|
||||||
|
- **test_standard_detail_url_resolves**: Verifies standard_detail URL resolves with pk parameter
|
||||||
|
- **test_standard_history_url_resolves**: Verifies standard_history URL resolves with check_date
|
||||||
|
- **test_standard_checkliste_url_resolves**: Verifies standard_checkliste URL resolves with pk
|
||||||
|
|
||||||
|
### View Tests
|
||||||
|
|
||||||
|
#### ViewsTestCase
|
||||||
|
- **test_standard_list_view**: Tests standard list view returns 200 and contains expected content
|
||||||
|
- **test_standard_detail_view**: Tests standard detail view with existing document
|
||||||
|
- **test_standard_detail_view_404**: Tests standard detail view returns 404 for non-existent document
|
||||||
|
- **test_standard_history_view**: Tests standard detail view with historical check_date parameter
|
||||||
|
- **test_standard_checkliste_view**: Tests checklist view functionality
|
||||||
|
|
||||||
|
### JSON Export Tests
|
||||||
|
|
||||||
|
#### JSONExportManagementCommandTest
|
||||||
|
- **test_export_json_command_to_file**: Tests export_json command outputs JSON to specified file
|
||||||
|
- **test_export_json_command_stdout**: Tests export_json command outputs JSON to stdout when no file specified
|
||||||
|
- **test_export_json_command_inactive_documents**: Tests export_json command filters out inactive documents
|
||||||
|
- **test_export_json_command_empty_database**: Tests export_json command handles empty database gracefully
|
||||||
|
|
||||||
|
#### StandardJSONViewTest
|
||||||
|
- **test_standard_json_view_success**: Tests standard_json view returns correct JSON for existing document
|
||||||
|
- **test_standard_json_view_not_found**: Tests standard_json view returns 404 for non-existent document
|
||||||
|
- **test_standard_json_view_json_formatting**: Tests standard_json view returns properly formatted JSON
|
||||||
|
- **test_standard_json_view_null_dates**: Tests standard_json view handles null date fields correctly
|
||||||
|
- **test_standard_json_view_empty_sections**: Tests standard_json view handles empty document sections
|
||||||
|
|
||||||
|
### Incomplete Vorgaben Tests
|
||||||
|
|
||||||
|
#### IncompleteVorgabenTest
|
||||||
|
- **test_incomplete_vorgaben_page_status**: Tests page loads successfully (200 status)
|
||||||
|
- **test_incomplete_vorgaben_staff_only**: Tests non-staff users are redirected to login
|
||||||
|
- **test_incomplete_vorgaben_page_content**: Tests page contains expected headings and structure
|
||||||
|
- **test_navigation_link**: Tests navigation includes link to incomplete Vorgaben page
|
||||||
|
- **test_no_references_list**: Tests Vorgaben without references are listed correctly
|
||||||
|
- **test_no_stichworte_list**: Tests Vorgaben without Stichworte are listed correctly
|
||||||
|
- **test_no_text_list**: Tests Vorgaben without Kurz- or Langtext are listed correctly
|
||||||
|
- **test_no_checklistenfragen_list**: Tests Vorgaben without Checklistenfragen are listed correctly
|
||||||
|
- **test_vorgabe_with_both_text_types**: Tests Vorgabe with both text types is considered complete
|
||||||
|
- **test_vorgabe_with_langtext_only**: Tests Vorgabe with only Langtext is still incomplete for text
|
||||||
|
- **test_empty_lists_message**: Tests appropriate messages when lists are empty
|
||||||
|
- **test_badge_counts**: Tests badge counts are calculated correctly
|
||||||
|
- **test_summary_section**: Tests summary section shows correct counts
|
||||||
|
- **test_vorgabe_links**: Tests Vorgaben link to correct admin pages
|
||||||
|
- **test_back_link**: Tests back link to standard list exists
|
||||||
|
|
||||||
|
### Comment Functionality Tests
|
||||||
|
|
||||||
|
#### GetVorgabeCommentsViewTest
|
||||||
|
- **test_get_comments_requires_login**: Tests anonymous users cannot view comments and are redirected
|
||||||
|
- **test_regular_user_sees_only_own_comments**: Tests regular users only see their own comments
|
||||||
|
- **test_staff_user_sees_all_comments**: Tests staff users can see all comments
|
||||||
|
- **test_get_comments_returns_404_for_nonexistent_vorgabe**: Tests 404 response for non-existent Vorgabe
|
||||||
|
- **test_comments_are_html_escaped**: Tests HTML escaping prevents XSS attacks (e.g., `<script>` tags)
|
||||||
|
- **test_line_breaks_preserved**: Tests line breaks are converted to `<br>` tags
|
||||||
|
- **test_security_headers_present**: Tests Content-Security-Policy and X-Content-Type-Options headers are set
|
||||||
|
|
||||||
|
#### AddVorgabeCommentViewTest
|
||||||
|
- **test_add_comment_requires_login**: Tests anonymous users cannot add comments
|
||||||
|
- **test_add_comment_requires_post**: Tests only POST method is allowed (405 for GET)
|
||||||
|
- **test_add_comment_success**: Tests successful comment creation with valid data
|
||||||
|
- **test_add_empty_comment_fails**: Tests empty comments are rejected with 400 error
|
||||||
|
- **test_add_whitespace_only_comment_fails**: Tests whitespace-only comments are rejected
|
||||||
|
- **test_add_too_long_comment_fails**: Tests comments exceeding 2000 characters are rejected
|
||||||
|
- **test_add_comment_xss_script_tag_blocked**: Tests comments with `<script>` tags are blocked
|
||||||
|
- **test_add_comment_xss_javascript_protocol_blocked**: Tests `javascript:` protocol is blocked
|
||||||
|
- **test_add_comment_xss_event_handlers_blocked**: Tests event handlers (onload, onerror, onclick, onmouseover) are blocked
|
||||||
|
- **test_add_comment_invalid_json_fails**: Tests invalid JSON payloads are rejected
|
||||||
|
- **test_add_comment_nonexistent_vorgabe_fails**: Tests 404 response for non-existent Vorgabe
|
||||||
|
- **test_add_comment_security_headers**: Tests security headers are present in responses
|
||||||
|
|
||||||
|
#### DeleteVorgabeCommentViewTest
|
||||||
|
- **test_delete_comment_requires_login**: Tests anonymous users cannot delete comments
|
||||||
|
- **test_delete_comment_requires_post**: Tests only POST method is allowed (405 for GET)
|
||||||
|
- **test_user_can_delete_own_comment**: Tests users can delete their own comments
|
||||||
|
- **test_user_cannot_delete_other_users_comment**: Tests users cannot delete others' comments (403 Forbidden)
|
||||||
|
- **test_staff_can_delete_any_comment**: Tests staff users can delete any comment
|
||||||
|
- **test_delete_nonexistent_comment_returns_404**: Tests 404 response for non-existent comment
|
||||||
|
- **test_delete_comment_security_headers**: Tests security headers are present in responses
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## pages App Tests
|
||||||
|
|
||||||
|
The pages app contains 4 tests focusing on search functionality and validation.
|
||||||
|
|
||||||
|
### ViewsTestCase
|
||||||
|
- **test_search_view_get**: Tests GET request to search view returns 200 status
|
||||||
|
- **test_search_view_post_with_query**: Tests POST request with query returns results
|
||||||
|
- **test_search_view_post_empty_query**: Tests POST request with empty query shows validation error
|
||||||
|
- **test_search_view_post_no_query**: Tests POST request without query parameter shows validation error
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## referenzen App Tests
|
||||||
|
|
||||||
|
The referenzen app contains 18 tests focusing on MPTT hierarchy functionality and model relationships.
|
||||||
|
|
||||||
|
### Model Tests
|
||||||
|
|
||||||
|
#### ReferenzModelTest
|
||||||
|
- **test_referenz_creation**: Tests Referenz creation with required fields
|
||||||
|
- **test_referenz_str**: Tests string representation returns the reference text
|
||||||
|
- **test_referenz_ordering**: Tests default ordering by `order` field
|
||||||
|
- **test_referenz_optional_fields**: Tests optional fields can be blank
|
||||||
|
|
||||||
|
#### ReferenzerklaerungModelTest
|
||||||
|
- **test_referenzerklaerung_creation**: Tests Referenzerklaerung creation with reference and explanation
|
||||||
|
- **test_referenzerklaerung_str**: Tests string representation includes reference and explanation preview
|
||||||
|
- **test_referenzerklaerung_ordering**: Tests default ordering by `order` field
|
||||||
|
- **test_referenzerklaerung_optional_explanation**: Tests explanation field can be blank
|
||||||
|
|
||||||
|
### Hierarchy Tests
|
||||||
|
|
||||||
|
#### ReferenzHierarchyTest
|
||||||
|
- **test_hierarchy_relationships**: Tests parent-child relationships in MPTT tree
|
||||||
|
- **test_get_root**: Tests getting the root node of a hierarchy
|
||||||
|
- **test_get_children**: Tests getting direct children of a node
|
||||||
|
- **test_get_descendants**: Tests getting all descendants of a node
|
||||||
|
- **test_get_ancestors**: Tests getting all ancestors of a node
|
||||||
|
- **test_get_ancestors_include_self**: Tests getting ancestors including the node itself
|
||||||
|
- **test_is_leaf_node**: Tests leaf node detection
|
||||||
|
- **test_is_root_node**: Tests root node detection
|
||||||
|
- **test_tree_ordering**: Tests tree ordering with multiple levels
|
||||||
|
- **test_move_node**: Tests moving nodes within the tree structure
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## rollen App Tests
|
||||||
|
|
||||||
|
The rollen app contains 18 tests covering role models and their relationships with document sections.
|
||||||
|
|
||||||
|
### Model Tests
|
||||||
|
|
||||||
|
#### RolleModelTest
|
||||||
|
- **test_rolle_creation**: Tests Rolle creation with name and optional description
|
||||||
|
- **test_rolle_str**: Tests string representation returns the role name
|
||||||
|
- **test_rolle_ordering**: Tests default ordering by `order` field
|
||||||
|
- **test_rolle_unique_name**: Tests that role names must be unique
|
||||||
|
- **test_rolle_optional_beschreibung**: Tests description field can be blank
|
||||||
|
|
||||||
|
#### RollenBeschreibungModelTest
|
||||||
|
- **test_rollenbeschreibung_creation**: Tests RollenBeschreibung creation with role and section type
|
||||||
|
- **test_rollenbeschreibung_str**: Tests string representation includes role and section type
|
||||||
|
- **test_rollenbeschreibung_ordering**: Tests default ordering by `order` field
|
||||||
|
- **test_rollenbeschreibung_unique_combination**: Tests unique constraint on role and section type
|
||||||
|
- **test_rollenbeschreibung_optional_beschreibung**: Tests description field can be blank
|
||||||
|
|
||||||
|
### Relationship Tests
|
||||||
|
|
||||||
|
#### RelationshipTest
|
||||||
|
- **test_rolle_rollenbeschreibung_relationship**: Tests one-to-many relationship between Rolle and RollenBeschreibung
|
||||||
|
- **test_abschnitttyp_rollenbeschreibung_relationship**: Tests relationship between AbschnittTyp and RollenBeschreibung
|
||||||
|
- **test_cascade_delete**: Tests cascade delete behavior when role is deleted
|
||||||
|
- **test_protected_delete**: Tests protected delete behavior when section type is referenced
|
||||||
|
- **test_query_related_objects**: Tests querying related objects efficiently
|
||||||
|
- **test_string_representations**: Tests all string representations work correctly
|
||||||
|
- **test_ordering_consistency**: Tests ordering is consistent across queries
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## stichworte App Tests
|
||||||
|
|
||||||
|
The stichworte app contains 18 tests covering keyword models and their ordering.
|
||||||
|
|
||||||
|
### Model Tests
|
||||||
|
|
||||||
|
#### StichwortModelTest
|
||||||
|
- **test_stichwort_creation**: Tests Stichwort creation with keyword text
|
||||||
|
- **test_stichwort_str**: Tests string representation returns the keyword text
|
||||||
|
- **test_stichwort_ordering**: Tests default ordering by `stichwort` field
|
||||||
|
- **test_stichwort_unique**: Tests that keywords must be unique
|
||||||
|
- **test_stichwort_case_insensitive**: Tests case-insensitive uniqueness
|
||||||
|
|
||||||
|
#### StichworterklaerungModelTest
|
||||||
|
- **test_stichworterklaerung_creation**: Tests Stichworterklaerung creation with keyword and explanation
|
||||||
|
- **test_stichworterklaerung_str**: Tests string representation includes keyword and explanation preview
|
||||||
|
- **test_stichworterklaerung_ordering**: Tests default ordering by `order` field
|
||||||
|
- **test_stichworterklaerung_optional_erklaerung**: Tests explanation field can be blank
|
||||||
|
- **test_stichworterklaerung_unique_stichwort**: Tests unique constraint on keyword
|
||||||
|
|
||||||
|
### Relationship Tests
|
||||||
|
|
||||||
|
#### RelationshipTest
|
||||||
|
- **test_stichwort_stichworterklaerung_relationship**: Tests one-to-one relationship between Stichwort and Stichworterklaerung
|
||||||
|
- **test_cascade_delete**: Tests cascade delete behavior when keyword is deleted
|
||||||
|
- **test_protected_delete**: Tests protected delete behavior when explanation is referenced
|
||||||
|
- **test_query_related_objects**: Tests querying related objects efficiently
|
||||||
|
- **test_string_representations**: Tests all string representations work correctly
|
||||||
|
- **test_ordering_consistency**: Tests ordering is consistent across queries
|
||||||
|
- **test_reverse_relationship**: Tests reverse relationship from explanation to keyword
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Test Statistics
|
||||||
|
|
||||||
|
- **Total Tests**: 230
|
||||||
|
- **abschnitte**: 33 tests (including XSS prevention)
|
||||||
|
- **dokumente**: 121 tests (including comment functionality with XSS protection)
|
||||||
|
- Model tests: 44 tests
|
||||||
|
- View tests: 7 tests
|
||||||
|
- URL pattern tests: 4 tests
|
||||||
|
- Sanity check tests: 16 tests
|
||||||
|
- Management command tests: 2 tests
|
||||||
|
- JSON export tests: 9 tests
|
||||||
|
- Incomplete Vorgaben tests: 15 tests
|
||||||
|
- Comment tests: 24 tests (6 model + 18 view tests)
|
||||||
|
- **pages**: 4 tests
|
||||||
|
- **referenzen**: 18 tests
|
||||||
|
- **rollen**: 18 tests
|
||||||
|
- **stichworte**: 18 tests
|
||||||
|
|
||||||
|
## Test Coverage Areas
|
||||||
|
|
||||||
|
1. **Model Validation**: Field validation, constraints, and relationships
|
||||||
|
2. **Business Logic**: Status determination, conflict detection, hierarchy management
|
||||||
|
3. **View Functionality**: HTTP responses, template rendering, URL resolution
|
||||||
|
4. **Utility Functions**: Text processing, caching, formatting
|
||||||
|
5. **Management Commands**: CLI interface and output handling
|
||||||
|
6. **Integration**: Cross-app functionality and data flow
|
||||||
|
7. **Security**:
|
||||||
|
- XSS prevention through HTML sanitization in content rendering
|
||||||
|
- XSS attack prevention in comment system (script tags, javascript: protocol, event handlers)
|
||||||
|
- Input validation and sanitization
|
||||||
|
- Authorization checks (staff vs. regular users)
|
||||||
|
- Security headers (Content-Security-Policy, X-Content-Type-Options)
|
||||||
|
8. **Comment Functionality**:
|
||||||
|
- CRUD operations (Create, Read, Delete)
|
||||||
|
- User permissions and ownership
|
||||||
|
- HTML escaping and line break preservation
|
||||||
|
- Multiple XSS attack vector prevention
|
||||||
|
|
||||||
|
## Running the Tests
|
||||||
|
|
||||||
|
To run all tests:
|
||||||
|
```bash
|
||||||
|
python manage.py test
|
||||||
|
```
|
||||||
|
|
||||||
|
To run tests for a specific app:
|
||||||
|
```bash
|
||||||
|
python manage.py test app_name
|
||||||
|
```
|
||||||
|
|
||||||
|
To run with verbose output:
|
||||||
|
```bash
|
||||||
|
python manage.py test --verbosity=2
|
||||||
|
```
|
||||||
|
|
||||||
|
All tests are currently passing and provide comprehensive coverage of the application's functionality.
|
||||||
@@ -24,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
SECRET_KEY = os.environ.get("SECRET_KEY")
|
SECRET_KEY = os.environ.get("SECRET_KEY")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = bool(os.environ.get("DEBUG", default=0)
|
DEBUG = bool(os.environ.get("DEBUG", default=0))
|
||||||
|
|
||||||
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS","127.0.0.1").split(",")
|
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS","127.0.0.1").split(",")
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,6 @@ DEBUG = True
|
|||||||
|
|
||||||
ALLOWED_HOSTS = ["10.128.128.144","localhost","127.0.0.1","*"]
|
ALLOWED_HOSTS = ["10.128.128.144","localhost","127.0.0.1","*"]
|
||||||
|
|
||||||
TEMPLATES = [
|
|
||||||
{"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
||||||
"APP_DIRS": True,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
@@ -51,7 +45,6 @@ INSTALLED_APPS = [
|
|||||||
'mptt',
|
'mptt',
|
||||||
'pages',
|
'pages',
|
||||||
'nested_admin',
|
'nested_admin',
|
||||||
'revproxy.apps.RevProxyConfig',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -134,7 +127,7 @@ USE_TZ = True
|
|||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
#STATIC_ROOT="/home/adebaumann/VorgabenUI/staticfiles/"
|
#STATIC_ROOT="/home/adebaumann/VorgabenUI/staticfiles/"
|
||||||
STATIC_ROOT="/app/staticfiles/"
|
STATIC_ROOT="staticfiles/"
|
||||||
STATICFILES_DIRS= (
|
STATICFILES_DIRS= (
|
||||||
os.path.join(BASE_DIR,"static"),
|
os.path.join(BASE_DIR,"static"),
|
||||||
)
|
)
|
||||||
@@ -153,6 +146,29 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|||||||
DATA_UPLOAD_MAX_NUMBER_FIELDS=10250
|
DATA_UPLOAD_MAX_NUMBER_FIELDS=10250
|
||||||
NESTED_ADMIN_LAZY_INLINES = True
|
NESTED_ADMIN_LAZY_INLINES = True
|
||||||
|
|
||||||
|
# Authentication settings
|
||||||
|
LOGIN_URL = 'login'
|
||||||
|
LOGIN_REDIRECT_URL = '/'
|
||||||
|
LOGOUT_REDIRECT_URL = 'login'
|
||||||
|
|
||||||
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
|
{
|
||||||
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
||||||
|
"OPTIONS": {
|
||||||
|
"min_length": 12,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
#LOGGING = {
|
#LOGGING = {
|
||||||
# "version": 1,
|
# "version": 1,
|
||||||
# "handlers" :{
|
# "handlers" :{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ from django.contrib import admin
|
|||||||
from django.urls import include, path, re_path
|
from django.urls import include, path, re_path
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from diagramm_proxy.views import DiagrammProxyView
|
from django.contrib.auth import views as auth_views
|
||||||
import dokumente.views
|
import dokumente.views
|
||||||
import pages.views
|
import pages.views
|
||||||
import referenzen.views
|
import referenzen.views
|
||||||
@@ -33,7 +33,11 @@ urlpatterns = [
|
|||||||
path('stichworte/', include("stichworte.urls")),
|
path('stichworte/', include("stichworte.urls")),
|
||||||
path('referenzen/', referenzen.views.tree, name="referenz_tree"),
|
path('referenzen/', referenzen.views.tree, name="referenz_tree"),
|
||||||
path('referenzen/<str:refid>/', referenzen.views.detail, name="referenz_detail"),
|
path('referenzen/<str:refid>/', referenzen.views.detail, name="referenz_detail"),
|
||||||
re_path(r'^diagramm/(?P<path>.*)$', DiagrammProxyView.as_view()),
|
# Authentication URLs
|
||||||
|
path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
|
||||||
|
path('logout/', auth_views.LogoutView.as_view(next_page='/'), name='logout'),
|
||||||
|
path('password_change/', auth_views.PasswordChangeView.as_view(template_name='registration/password_change.html', success_url='/'), name='password_change'),
|
||||||
|
path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'), name='password_change_done'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Serve static files
|
# Serve static files
|
||||||
|
|||||||
@@ -467,6 +467,32 @@ A -> B
|
|||||||
typ, html = result[0]
|
typ, html = result[0]
|
||||||
self.assertEqual(typ, "text")
|
self.assertEqual(typ, "text")
|
||||||
|
|
||||||
|
def test_render_textabschnitte_xss_prevention(self):
|
||||||
|
"""Test that malicious HTML is sanitized in rendered content"""
|
||||||
|
from dokumente.models import VorgabeLangtext
|
||||||
|
|
||||||
|
# Create content with malicious HTML
|
||||||
|
malicious_abschnitt = VorgabeLangtext.objects.create(
|
||||||
|
abschnitt=self.vorgabe,
|
||||||
|
abschnitttyp=self.typ_text,
|
||||||
|
inhalt='<script>alert("xss")</script><img src=x onerror=alert(1)>Normal text',
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
result = render_textabschnitte(VorgabeLangtext.objects.filter(pk=malicious_abschnitt.pk))
|
||||||
|
|
||||||
|
self.assertEqual(len(result), 1)
|
||||||
|
typ, html = result[0]
|
||||||
|
self.assertEqual(typ, "text")
|
||||||
|
|
||||||
|
# Dangerous tags and attributes should be removed or sanitized
|
||||||
|
self.assertNotIn('<script>', html) # Script tags should not be present unescaped
|
||||||
|
self.assertNotIn('onerror', html) # Dangerous attributes removed
|
||||||
|
# Note: 'alert' may still be present in escaped script tags, which is safe
|
||||||
|
|
||||||
|
# Safe content should remain
|
||||||
|
self.assertIn('Normal text', html)
|
||||||
|
|
||||||
|
|
||||||
class MdTableToHtmlTest(TestCase):
|
class MdTableToHtmlTest(TestCase):
|
||||||
"""Test cases for md_table_to_html function"""
|
"""Test cases for md_table_to_html function"""
|
||||||
|
|||||||
@@ -4,12 +4,34 @@ import zlib
|
|||||||
import re
|
import re
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
import bleach
|
||||||
|
|
||||||
# Import the caching function
|
# Import the caching function
|
||||||
from diagramm_proxy.diagram_cache import get_cached_diagram
|
from diagramm_proxy.diagram_cache import get_cached_diagram
|
||||||
|
|
||||||
DIAGRAMMSERVER="/diagramm"
|
DIAGRAMMSERVER="/diagramm"
|
||||||
|
|
||||||
|
# Allowed HTML tags for bleach sanitization
|
||||||
|
ALLOWED_TAGS = [
|
||||||
|
'p', 'br', 'strong', 'em', 'u', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||||
|
'ul', 'ol', 'li', 'blockquote', 'code', 'pre', 'hr',
|
||||||
|
'table', 'thead', 'tbody', 'tr', 'th', 'td',
|
||||||
|
'img', 'a', 'sup', 'sub', 'span', 'div'
|
||||||
|
]
|
||||||
|
|
||||||
|
ALLOWED_ATTRIBUTES = {
|
||||||
|
'img': ['src', 'alt', 'width', 'height'],
|
||||||
|
'a': ['href', 'title'],
|
||||||
|
'span': ['class'],
|
||||||
|
'div': ['class'],
|
||||||
|
'p': ['class'],
|
||||||
|
'table': ['class'],
|
||||||
|
'th': ['colspan', 'rowspan', 'class'],
|
||||||
|
'td': ['colspan', 'rowspan', 'class'],
|
||||||
|
'pre': ['class'],
|
||||||
|
'code': ['class'],
|
||||||
|
}
|
||||||
|
|
||||||
def render_textabschnitte(queryset):
|
def render_textabschnitte(queryset):
|
||||||
"""
|
"""
|
||||||
Converts a queryset of Textabschnitt-like models into a list of (typ, html) tuples.
|
Converts a queryset of Textabschnitt-like models into a list of (typ, html) tuples.
|
||||||
@@ -52,6 +74,8 @@ def render_textabschnitte(queryset):
|
|||||||
html += "</code></pre>"
|
html += "</code></pre>"
|
||||||
else:
|
else:
|
||||||
html = markdown(inhalt, extensions=['tables', 'attr_list','footnotes'])
|
html = markdown(inhalt, extensions=['tables', 'attr_list','footnotes'])
|
||||||
|
# Sanitize HTML to prevent XSS
|
||||||
|
html = bleach.clean(html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES)
|
||||||
output.append((typ, html))
|
output.append((typ, html))
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ metadata:
|
|||||||
namespace: vorgabenui
|
namespace: vorgabenui
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ spec:
|
|||||||
fsGroupChangePolicy: "OnRootMismatch"
|
fsGroupChangePolicy: "OnRootMismatch"
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: loader
|
- name: loader
|
||||||
image: git.baumann.gr/adebaumann/vui-data-loader:0.9
|
image: git.baumann.gr/adebaumann/vui-data-loader:0.11
|
||||||
command: [ "sh","-c","cp -n preload/preload.sqlite3 /data/db.sqlite3; chown -R 999:999 /data; ls -la /data; sleep 10; exit 0" ]
|
command: [ "sh","-c","cp -n preload/preload.sqlite3 /data/db.sqlite3; chown -R 999:999 /data; ls -la /data; sleep 10; exit 0" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: git.baumann.gr/adebaumann/vui:0.942
|
image: git.baumann.gr/adebaumann/vui:0.973
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
@@ -63,6 +63,8 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: django
|
app: django
|
||||||
ports:
|
ports:
|
||||||
- port: 8000
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 8000
|
||||||
targetPort: 8000
|
targetPort: 8000
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ metadata:
|
|||||||
name: django
|
name: django
|
||||||
namespace: vorgabenui
|
namespace: vorgabenui
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
argocd.argoproj.io/ignore-healthcheck: "true"
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: vorgabenportal.knowyoursecurity.com
|
- host: vorgabenportal.knowyoursecurity.com
|
||||||
http:
|
http:
|
||||||
|
|||||||
15
argocd/nfs-pv.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: django-data-pv
|
||||||
|
namespace: vorgabenui
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 2Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: nfs
|
||||||
|
nfs:
|
||||||
|
server: 192.168.17.199
|
||||||
|
path: /mnt/user/vorgabenui
|
||||||
8
argocd/nfs-storageclass.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: StorageClass
|
||||||
|
metadata:
|
||||||
|
name: nfs
|
||||||
|
provisioner: kubernetes.io/no-provisioner
|
||||||
|
allowVolumeExpansion: true
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
volumeBindingMode: Immediate
|
||||||
BIN
data/db.sqlite3
@@ -1 +0,0 @@
|
|||||||
# Diagram proxy module
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
from revproxy.views import ProxyView
|
|
||||||
|
|
||||||
class DiagrammProxyView(ProxyView):
|
|
||||||
upstream = "http://svckroki:8000/"
|
|
||||||
@@ -2,6 +2,7 @@ from django.contrib import admin
|
|||||||
#from nested_inline.admin import NestedStackedInline, NestedModelAdmin
|
#from nested_inline.admin import NestedStackedInline, NestedModelAdmin
|
||||||
from nested_admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline
|
from nested_admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.utils.html import format_html
|
||||||
from mptt.forms import TreeNodeMultipleChoiceField
|
from mptt.forms import TreeNodeMultipleChoiceField
|
||||||
from mptt.admin import DraggableMPTTAdmin
|
from mptt.admin import DraggableMPTTAdmin
|
||||||
from adminsortable2.admin import SortableInlineAdminMixin, SortableAdminBase
|
from adminsortable2.admin import SortableInlineAdminMixin, SortableAdminBase
|
||||||
@@ -93,9 +94,17 @@ class EinleitungInline(NestedStackedInline):
|
|||||||
|
|
||||||
class VorgabeForm(forms.ModelForm):
|
class VorgabeForm(forms.ModelForm):
|
||||||
referenzen = TreeNodeMultipleChoiceField(queryset=Referenz.objects.all(), required=False)
|
referenzen = TreeNodeMultipleChoiceField(queryset=Referenz.objects.all(), required=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Vorgabe
|
model = Vorgabe
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
|
||||||
|
def clean_thema(self):
|
||||||
|
"""Validate that thema is provided."""
|
||||||
|
thema = self.cleaned_data.get('thema')
|
||||||
|
if not thema:
|
||||||
|
raise forms.ValidationError('Thema ist ein Pflichtfeld. Bitte wählen Sie ein Thema aus.')
|
||||||
|
return thema
|
||||||
|
|
||||||
class VorgabeInline(SortableInlineAdminMixin, NestedStackedInline):
|
class VorgabeInline(SortableInlineAdminMixin, NestedStackedInline):
|
||||||
model = Vorgabe
|
model = Vorgabe
|
||||||
@@ -132,9 +141,57 @@ class StichworterklaerungInline(NestedTabularInline):
|
|||||||
|
|
||||||
@admin.register(Stichwort)
|
@admin.register(Stichwort)
|
||||||
class StichwortAdmin(NestedModelAdmin):
|
class StichwortAdmin(NestedModelAdmin):
|
||||||
|
list_display = ('stichwort', 'vorgaben_count')
|
||||||
search_fields = ('stichwort',)
|
search_fields = ('stichwort',)
|
||||||
ordering=('stichwort',)
|
ordering=('stichwort',)
|
||||||
inlines=[StichworterklaerungInline]
|
inlines=[StichworterklaerungInline]
|
||||||
|
readonly_fields = ('vorgaben_list',)
|
||||||
|
fieldsets = (
|
||||||
|
(None, {
|
||||||
|
'fields': ('stichwort', 'vorgaben_list')
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
def vorgaben_count(self, obj):
|
||||||
|
"""Count the number of Vorgaben that have this Stichwort"""
|
||||||
|
count = obj.vorgabe_set.count()
|
||||||
|
return f"{count} Vorgabe{'n' if count != 1 else ''}"
|
||||||
|
vorgaben_count.short_description = "Anzahl Vorgaben"
|
||||||
|
|
||||||
|
def vorgaben_list(self, obj):
|
||||||
|
"""Display list of Vorgaben that use this Stichwort"""
|
||||||
|
vorgaben = obj.vorgabe_set.select_related('dokument', 'thema').order_by('dokument__nummer', 'nummer')
|
||||||
|
vorgaben_list = list(vorgaben) # Evaluate queryset once
|
||||||
|
count = len(vorgaben_list)
|
||||||
|
|
||||||
|
if count == 0:
|
||||||
|
return format_html("<em>Keine Vorgaben gefunden</em><p><strong>Gesamt: 0 Vorgaben</strong></p>")
|
||||||
|
|
||||||
|
html = "<div style='max-height: 300px; overflow-y: auto;'>"
|
||||||
|
html += "<table style='width: 100%; border-collapse: collapse;'>"
|
||||||
|
html += "<thead><tr style='background-color: #f5f5f5;'>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Vorgabe</th>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Titel</th>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Dokument</th>"
|
||||||
|
html += "</tr></thead>"
|
||||||
|
html += "<tbody>"
|
||||||
|
|
||||||
|
for vorgabe in vorgaben_list:
|
||||||
|
html += "<tr>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.Vorgabennummer()}</td>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.titel}</td>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.dokument.nummer} – {vorgabe.dokument.name}</td>"
|
||||||
|
html += "</tr>"
|
||||||
|
|
||||||
|
html += "</tbody></table>"
|
||||||
|
html += f"</div><p><strong>Gesamt: {count} Vorgabe{'n' if count != 1 else ''}</strong></p>"
|
||||||
|
|
||||||
|
return format_html(html)
|
||||||
|
vorgaben_list.short_description = "Zugeordnete Vorgaben"
|
||||||
|
|
||||||
|
def get_queryset(self, request):
|
||||||
|
"""Optimize queryset with related data"""
|
||||||
|
return super().get_queryset(request).prefetch_related('vorgabe_set')
|
||||||
|
|
||||||
@admin.register(Person)
|
@admin.register(Person)
|
||||||
class PersonAdmin(admin.ModelAdmin):
|
class PersonAdmin(admin.ModelAdmin):
|
||||||
@@ -142,6 +199,7 @@ class PersonAdmin(admin.ModelAdmin):
|
|||||||
js = ['admin/js/jquery.init.js', 'custom/js/inline_toggle.js']
|
js = ['admin/js/jquery.init.js', 'custom/js/inline_toggle.js']
|
||||||
css = {'all': ['custom/css/admin_extras.css']}
|
css = {'all': ['custom/css/admin_extras.css']}
|
||||||
list_display=['name']
|
list_display=['name']
|
||||||
|
ordering = ['name']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -243,7 +301,6 @@ class VorgabeAdmin(NestedModelAdmin):
|
|||||||
|
|
||||||
admin.site.register(Checklistenfrage)
|
admin.site.register(Checklistenfrage)
|
||||||
admin.site.register(Dokumententyp)
|
admin.site.register(Dokumententyp)
|
||||||
#admin.site.register(Person)
|
admin.site.register(VorgabeComment)
|
||||||
#admin.site.register(Referenz, DraggableM§PTTAdmin)
|
|
||||||
|
|
||||||
#admin.site.register(Changelog)
|
#admin.site.register(Changelog)
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class Command(BaseCommand):
|
|||||||
"name": name,
|
"name": name,
|
||||||
"gueltigkeit_von": options["gueltigkeit_von"],
|
"gueltigkeit_von": options["gueltigkeit_von"],
|
||||||
"gueltigkeit_bis": options["gueltigkeit_bis"],
|
"gueltigkeit_bis": options["gueltigkeit_bis"],
|
||||||
|
"aktiv":False,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if created:
|
if created:
|
||||||
@@ -319,6 +320,7 @@ class Command(BaseCommand):
|
|||||||
thema=thema,
|
thema=thema,
|
||||||
titel=v["titel"],
|
titel=v["titel"],
|
||||||
gueltigkeit_von=timezone.now().date(),
|
gueltigkeit_von=timezone.now().date(),
|
||||||
|
order=0,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Stichworte
|
# Stichworte
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# Generated by Django 5.2.5 on 2025-11-27 22:02
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dokumente', '0009_alter_vorgabe_options_vorgabe_order'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='VorgabenTable',
|
||||||
|
fields=[
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Vorgabe (Tabellenansicht)',
|
||||||
|
'verbose_name_plural': 'Vorgaben (Tabellenansicht)',
|
||||||
|
'proxy': True,
|
||||||
|
'indexes': [],
|
||||||
|
'constraints': [],
|
||||||
|
},
|
||||||
|
bases=('dokumente.vorgabe',),
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='person',
|
||||||
|
options={'ordering': ['name'], 'verbose_name_plural': 'Personen'},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='VorgabeComment',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('text', models.TextField()),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||||||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
('vorgabe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='dokumente.vorgabe')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Vorgabe-Kommentar',
|
||||||
|
'verbose_name_plural': 'Vorgabe-Kommentare',
|
||||||
|
'ordering': ['-created_at'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
from mptt.models import MPTTModel, TreeForeignKey
|
from mptt.models import MPTTModel, TreeForeignKey
|
||||||
|
from django.contrib.auth.models import User
|
||||||
from abschnitte.models import Textabschnitt
|
from abschnitte.models import Textabschnitt
|
||||||
from stichworte.models import Stichwort
|
from stichworte.models import Stichwort
|
||||||
from referenzen.models import Referenz
|
from referenzen.models import Referenz
|
||||||
@@ -26,6 +27,7 @@ class Person(models.Model):
|
|||||||
return self.name
|
return self.name
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural="Personen"
|
verbose_name_plural="Personen"
|
||||||
|
ordering = ['name']
|
||||||
|
|
||||||
class Thema(models.Model):
|
class Thema(models.Model):
|
||||||
name = models.CharField(max_length=100, primary_key=True)
|
name = models.CharField(max_length=100, primary_key=True)
|
||||||
@@ -52,6 +54,34 @@ class Dokument(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.nummer} – {self.name}"
|
return f"{self.nummer} – {self.name}"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dates(self):
|
||||||
|
"""
|
||||||
|
Returns an array of unique, chronologically sorted dates representing
|
||||||
|
state-change dates from all Vorgaben in this document.
|
||||||
|
|
||||||
|
These are dates where Vorgaben become active (gueltigkeit_von) or change state
|
||||||
|
(the day after gueltigkeit_bis). The very last date in the list is excluded
|
||||||
|
as it has no relevance (nothing changes after it).
|
||||||
|
"""
|
||||||
|
dates_set = set()
|
||||||
|
|
||||||
|
# Get all vorgaben for this document
|
||||||
|
for vorgabe in self.vorgaben.all():
|
||||||
|
# Add gueltigkeit_von (when vorgabe becomes active)
|
||||||
|
if vorgabe.gueltigkeit_von:
|
||||||
|
dates_set.add(vorgabe.gueltigkeit_von)
|
||||||
|
|
||||||
|
# Add the day after gueltigkeit_bis (when vorgabe expires/changes state)
|
||||||
|
# Only if gueltigkeit_bis is defined (not None)
|
||||||
|
if vorgabe.gueltigkeit_bis:
|
||||||
|
dates_set.add(vorgabe.gueltigkeit_bis + datetime.timedelta(days=1))
|
||||||
|
|
||||||
|
# Return sorted unique dates from oldest to newest, excluding the last date
|
||||||
|
# (but only if there are multiple dates; single dates are kept)
|
||||||
|
sorted_dates = sorted(list(dates_set))
|
||||||
|
return sorted_dates[:-1] if len(sorted_dates) > 1 else sorted_dates
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural="Dokumente"
|
verbose_name_plural="Dokumente"
|
||||||
verbose_name="Dokument"
|
verbose_name="Dokument"
|
||||||
@@ -139,6 +169,12 @@ class Vorgabe(models.Model):
|
|||||||
"""
|
"""
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
|
|
||||||
|
# Check that thema is provided
|
||||||
|
if not self.thema_id:
|
||||||
|
raise ValidationError({
|
||||||
|
'thema': 'Thema ist ein Pflichtfeld. Bitte wählen Sie ein Thema aus.'
|
||||||
|
})
|
||||||
|
|
||||||
# Check for conflicts with existing Vorgaben
|
# Check for conflicts with existing Vorgaben
|
||||||
conflicts = self.find_conflicts()
|
conflicts = self.find_conflicts()
|
||||||
if conflicts:
|
if conflicts:
|
||||||
@@ -260,3 +296,19 @@ class Changelog(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural="Changelog"
|
verbose_name_plural="Changelog"
|
||||||
verbose_name="Changelog-Eintrag"
|
verbose_name="Changelog-Eintrag"
|
||||||
|
|
||||||
|
|
||||||
|
class VorgabeComment(models.Model):
|
||||||
|
vorgabe = models.ForeignKey(Vorgabe, on_delete=models.CASCADE, related_name='comments')
|
||||||
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
|
text = models.TextField()
|
||||||
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
updated_at = models.DateTimeField(auto_now=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Vorgabe-Kommentar"
|
||||||
|
verbose_name_plural = "Vorgabe-Kommentare"
|
||||||
|
ordering = ['-created_at']
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Kommentar von {self.user.username} zu {self.vorgabe.Vorgabennummer()}"
|
||||||
|
|||||||
67
dokumente/templates/standards/all_comments.html
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Alle Kommentare</h1>
|
||||||
|
|
||||||
|
{% if total_comments == 0 %}
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<p>Es gibt noch keine Kommentare zu Vorgaben.</p>
|
||||||
|
<p><a href="{% url 'standard_list' %}">Zu den Standards</a></p>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-muted">Insgesamt {{ total_comments }} Kommentar{{ total_comments|pluralize:"e" }}</p>
|
||||||
|
|
||||||
|
{% for dokument, comments in comments_by_document.items %}
|
||||||
|
<div class="panel panel-default" style="margin-top: 2rem;">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h2 style="margin: 0;">
|
||||||
|
<a href="{% url 'standard_detail' nummer=dokument.nummer %}">
|
||||||
|
{{ dokument.nummer }} – {{ dokument.name }}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<p style="margin: 0; color: #666; font-size: 0.9rem;">
|
||||||
|
{{ comments|length }} Kommentar{{ comments|length|pluralize:"e" }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="list-group">
|
||||||
|
{% for comment in comments %}
|
||||||
|
<div class="list-group-item" style="border-left: 3px solid #007bff; padding: 1rem;">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
|
||||||
|
<div style="flex: 1;">
|
||||||
|
<h4 style="margin: 0 0 0.5rem 0;">
|
||||||
|
<a href="{% url 'standard_detail' nummer=comment.vorgabe.dokument.nummer %}#{{ comment.vorgabe.Vorgabennummer }}">
|
||||||
|
{{ comment.vorgabe.Vorgabennummer }}
|
||||||
|
</a> {{ comment.vorgabe.titel }}
|
||||||
|
</h4>
|
||||||
|
<p style="margin: 0 0 0.75rem 0; color: #666; font-size: 0.9rem;">
|
||||||
|
<strong>Benutzer:</strong> {{ comment.user.first_name }} {{ comment.user.last_name }}<br>
|
||||||
|
<strong>Erstellt:</strong> {{ comment.created_at|date:"d.m.Y H:i" }}
|
||||||
|
{% if comment.updated_at != comment.created_at %}
|
||||||
|
<br>
|
||||||
|
<strong>Bearbeitet:</strong> {{ comment.updated_at|date:"d.m.Y H:i" }}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<form method="POST" action="{% url 'delete_vorgabe_comment' comment.id %}"
|
||||||
|
style="display: inline; margin-left: 1rem;"
|
||||||
|
onsubmit="return confirm('Sind Sie sicher, dass Sie diesen Kommentar löschen möchten?');">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div style="background: #f8f9fa; padding: 0.75rem; border-radius: 4px; margin-top: 0.5rem; white-space: pre-wrap; word-wrap: break-word;">
|
||||||
|
{{ comment.text }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div style="margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #ddd;">
|
||||||
|
<a href="{% url 'standard_list' %}" class="btn btn-default">Zu den Standards</a>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -105,13 +105,13 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-success" role="alert">
|
<div class="alert alert-success" role="alert">
|
||||||
<h4 class="alert-heading">
|
<h4 class="alert-heading">
|
||||||
<i class="fas fa-check-circle"></i> Alle Vorgaben sind vollständig!
|
<span class="emoji-icon">✅</span> Alle Vorgaben sind vollständig!
|
||||||
</h4>
|
</h4>
|
||||||
<p>Alle Vorgaben haben Referenzen, Stichworte, Text und Checklistenfragen.</p>
|
<p>Alle Vorgaben haben Referenzen, Stichworte, Text und Checklistenfragen.</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
<a href="{% url 'standard_list' %}" class="btn btn-primary">
|
<a href="{% url 'standard_list' %}" class="btn btn-primary">
|
||||||
<i class="fas fa-list"></i> Zurück zur Übersicht
|
<span class="emoji-icon">📋</span> Zurück zur Übersicht
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<a href="{% url 'standard_list' %}" class="btn btn-secondary">
|
<a href="{% url 'standard_list' %}" class="btn btn-secondary">
|
||||||
<i class="fas fa-arrow-left"></i> Zurück zur Übersicht
|
<span class="emoji-icon">←</span> Zurück zur Übersicht
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,110 +1,422 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}{{ standard }}{% endblock %}
|
|
||||||
|
{% block title %}{{ standard.nummer }} – {{ standard.name }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ standard.nummer }} – {{ standard.name }}</h1>
|
<div class="container-fluid">
|
||||||
{% if standard.history == True %}
|
<nav aria-label="breadcrumb">
|
||||||
<h2>Version vom {{ standard.check_date }}</h2>
|
<ol class="breadcrumb">
|
||||||
{% endif %}
|
<li class="breadcrumb-item"><a href="/">Startseite</a></li>
|
||||||
<!-- Autoren, Prüfende etc. -->
|
<li class="breadcrumb-item"><a href="/dokumente">Standards</a></li>
|
||||||
<p><strong>Autoren:</strong> {{ standard.autoren.all|join:", " }}</p>
|
<li class="breadcrumb-item active" aria-current="page">{{ standard.nummer }}</li>
|
||||||
<p><strong>Prüfende:</strong> {{ standard.pruefende.all|join:", " }}</p>
|
</ol>
|
||||||
<p><strong>Gültigkeit:</strong> {{ standard.gueltigkeit_von }} bis {{ standard.gueltigkeit_bis|default_if_none:"auf weiteres" }}</p>
|
</nav>
|
||||||
<p><a href="{% url 'standard_json' standard.nummer %}" class="button" download="{{ standard.nummer }}.json">JSON herunterladen</a></p>
|
|
||||||
|
|
||||||
<!-- Start Einleitung -->
|
<h1>{{ standard.nummer }} – {{ standard.name }}</h1>
|
||||||
{% if standard.einleitung_html %}
|
|
||||||
<h2>Einleitung</h2>
|
|
||||||
{% for typ, html in standard.einleitung_html %}
|
|
||||||
<div>{{ html|safe }}</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
<!-- End Einleitung -->
|
|
||||||
|
|
||||||
<!-- Start Geltungsbereich -->
|
{% if standard.history == True %}
|
||||||
{% if standard.geltungsbereich_html %}
|
<div class="alert alert-warning" role="alert">
|
||||||
<h2>Geltungsbereich</h2>
|
{% if standard.is_future %}
|
||||||
{% for typ, html in standard.geltungsbereich_html %}
|
<strong>Zukünftige Version vom {{ standard.check_date }}</strong>
|
||||||
<div>{{ html|safe }}</div>
|
{% else %}
|
||||||
{% endfor %}
|
<strong>Historische Version vom {{ standard.check_date }}</strong>
|
||||||
{% endif %}
|
|
||||||
<!-- End Geltungsbereich -->
|
|
||||||
|
|
||||||
<h2>Vorgaben</h2>
|
|
||||||
{% for vorgabe in vorgaben %}
|
|
||||||
<!-- Start Vorgabe -->
|
|
||||||
{% if standard.history == True or vorgabe.long_status == "active" %}
|
|
||||||
<a id="{{ vorgabe.Vorgabennummer }}"></a><div class="card mb-4">
|
|
||||||
{% if vorgabe.long_status == "active"%}
|
|
||||||
<div class="card-header d-flex justify-content-between align-items-center bg-secondary text-light">
|
|
||||||
{% elif standard.history == True %}
|
|
||||||
<div class="card-header d-flex justify-content-between align-items-center bg-danger-subtle">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h3 class="h5 m-0">{{ vorgabe.Vorgabennummer }} – {{ vorgabe.titel }}
|
</div>
|
||||||
{% if vorgabe.long_status != "active" and standard.history == True %}<span class="text-danger"> ({{ vorgabe.long_status}})</span>{% endif %}
|
{% endif %}
|
||||||
</h3>
|
|
||||||
{% if vorgabe.relevanzset %}
|
|
||||||
<span class="badge bg-light text-black"> Relevanz:
|
|
||||||
{{ vorgabe.relevanzset|join:", " }}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span class="badge bg-light text-black">{{ vorgabe.thema }}</span>
|
<!-- History Dates Dropdown -->
|
||||||
</div>
|
{% if standard.dates %}
|
||||||
|
<div class="mb-3">
|
||||||
<div class="card-body p-0">
|
<div class="dropdown">
|
||||||
<!-- Start Kurztext -->
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="text-decoration: none;">
|
||||||
{% comment %} KURZTEXT BLOCK {% endcomment %}
|
📅 Historische Versionen
|
||||||
{% if vorgabe.kurztext_html.0.1 %}
|
</a>
|
||||||
<div class="p-3 mb-3 bg-light border-3" style="width: 100%;">
|
<ul class="dropdown-menu" role="menu">
|
||||||
{% for typ, html in vorgabe.kurztext_html %}
|
<li><a href="/dokumente/{{ standard.nummer }}/">Aktuelle Version</a></li>
|
||||||
{% if html %}
|
<li class="divider"></li>
|
||||||
<div class="mb-2">{{ html|safe }}</div>
|
{% for date in standard.dates %}
|
||||||
{% endif %}
|
<li><a href="/dokumente/{{ standard.nummer }}/history/{{ date|date:'Y-m-d' }}/">{{ date|date:'d.m.Y' }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</ul>
|
||||||
{% endif %}
|
</div>
|
||||||
<!-- Langtext -->
|
</div>
|
||||||
<div class="p-3 mb-3">
|
{% endif %}
|
||||||
{% comment %} LANGTEXT BLOCK {% endcomment %}
|
|
||||||
{# <h5>Langtext</h5> #}
|
<!-- Einleitung -->
|
||||||
{% for typ, html in vorgabe.langtext_html %}
|
{% if standard.einleitung_html %}
|
||||||
{% if html %}<div class="mb-3">{{ html|safe }}</div>{% endif %}
|
<div class="row mb-4">
|
||||||
{% endfor %}
|
<div class="col-md-12">
|
||||||
<!-- Checklistenfragen -->
|
<div class="card">
|
||||||
{% comment %} CHECKLISTENFRAGEN BLOCK {% endcomment %}
|
<div class="card-header">
|
||||||
<h5>Checklistenfragen</h5>
|
<h2>Einleitung</h2>
|
||||||
{% if vorgabe.checklistenfragen.all %}
|
</div>
|
||||||
<ul class="list-group">
|
<div class="card-body">
|
||||||
{% for frage in vorgabe.checklistenfragen.all %}
|
{% for typ, html in standard.einleitung_html %}
|
||||||
<li class="list-group-item">{{ frage.frage }}</li>
|
<div class="mb-2">{{ html|safe }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
{% else %}
|
|
||||||
<p><em>Keine Checklistenfragen</em></p>
|
|
||||||
{% endif %}
|
|
||||||
{% comment %} STICHWORTE + REFERENZEN AT BOTTOM {% endcomment %}
|
|
||||||
<div class="mt-4 small text-muted">
|
|
||||||
<strong>Stichworte:</strong>
|
|
||||||
{% if vorgabe.stichworte.all %}
|
|
||||||
{% for s in vorgabe.stichworte.all %}
|
|
||||||
<a href="{% url 'stichwort_detail' stichwort=s %}">{{ s }}</a>{% if not forloop.last %}, {% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<em>Keine</em>
|
|
||||||
{% endif %}
|
|
||||||
<br>
|
|
||||||
<strong>Referenzen:</strong>
|
|
||||||
{% if vorgabe.referenzpfade %}
|
|
||||||
{% for ref in vorgabe.referenzpfade %}
|
|
||||||
{{ ref|safe }}{% if not forloop.last %}, {% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<em>Keine</em>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
|
<!-- Geltungsbereich -->
|
||||||
|
{% if standard.geltungsbereich_html %}
|
||||||
|
<div class="row mb-4">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2>Geltungsbereich</h2>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% for typ, html in standard.geltungsbereich_html %}
|
||||||
|
<div class="mb-2">{{ html|safe }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Vorgaben -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2>Vorgaben</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% for vorgabe in vorgaben %}
|
||||||
|
{% if standard.history == True or vorgabe.long_status == "active" %}
|
||||||
|
<!-- Vorgabe {{ vorgabe.Vorgabennummer }} -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{% if not forloop.first %}
|
||||||
|
<hr style="border: 0; border-top: 1px solid #d3d3d3; margin: 2rem 0;">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a id="{{ vorgabe.Vorgabennummer }}"></a>
|
||||||
|
<div class="card mb-4">
|
||||||
|
<div class="card-header" style="display: flex; justify-content: space-between; align-items: center;">
|
||||||
|
<h3>
|
||||||
|
{{ vorgabe.Vorgabennummer }} – {{ vorgabe.titel }}
|
||||||
|
{% if vorgabe.long_status != "active" and standard.history == True %}
|
||||||
|
<span class="badge badge-danger">{{ vorgabe.long_status }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</h3>
|
||||||
|
<div style="display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; white-space: nowrap;">
|
||||||
|
<span class="badge badge-info">{{ vorgabe.thema }}</span>
|
||||||
|
{% if vorgabe.relevanzset %}
|
||||||
|
<span class="badge badge-secondary">
|
||||||
|
Relevanz: {{ vorgabe.relevanzset|join:", " }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<!-- Kurztext -->
|
||||||
|
{% if vorgabe.kurztext_html.0.1 %}
|
||||||
|
<div class="alert alert-info">
|
||||||
|
{% for typ, html in vorgabe.kurztext_html %}
|
||||||
|
{% if html %}
|
||||||
|
<div class="mb-2">{{ html|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Langtext -->
|
||||||
|
<div class="mb-3">
|
||||||
|
{% for typ, html in vorgabe.langtext_html %}
|
||||||
|
{% if html %}
|
||||||
|
<div class="mb-3">{{ html|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Checklistenfragen -->
|
||||||
|
<h4 class="h6">Checklistenfragen</h4>
|
||||||
|
{% if vorgabe.checklistenfragen.all %}
|
||||||
|
<ul class="list-group mb-3">
|
||||||
|
{% for frage in vorgabe.checklistenfragen.all %}
|
||||||
|
<li class="list-group-item">{{ frage.frage }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-muted"><em>Keine Checklistenfragen</em></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Stichworte und Referenzen -->
|
||||||
|
<div class="mt-4 p-3" style="background-color: #f8f9fa; border-left: 3px solid #dee2e6; padding-left: 0.5en;">
|
||||||
|
<p class="mb-2">
|
||||||
|
<strong>Stichworte:</strong>
|
||||||
|
{% if vorgabe.stichworte.all %}
|
||||||
|
{% for s in vorgabe.stichworte.all %}
|
||||||
|
<a href="{% url 'stichwort_detail' stichwort=s %}" class="badge badge-secondary">{{ s }}</a>{% if not forloop.last %} {% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">Keine</span>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<p class="mb-0">
|
||||||
|
<strong>Referenzen:</strong>
|
||||||
|
{% if vorgabe.referenzpfade %}
|
||||||
|
{% for ref in vorgabe.referenzpfade %}
|
||||||
|
{{ ref|safe }}{% if not forloop.last %}, {% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">Keine</span>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Comment Button -->
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<div class="mt-3 text-right">
|
||||||
|
<button class="btn btn-sm btn-outline-primary comment-btn"
|
||||||
|
data-vorgabe-id="{{ vorgabe.id }}"
|
||||||
|
data-vorgabe-nummer="{{ vorgabe.Vorgabennummer }}">
|
||||||
|
<span class="emoji-icon">💬</span> Kommentare
|
||||||
|
{% if vorgabe.comment_count > 0 %}
|
||||||
|
<span class="comment-count">{{ vorgabe.comment_count }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<!-- Metadata -->
|
||||||
|
|
||||||
|
<h2>Metadaten</h2>
|
||||||
|
<div class="row mb-4">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<dl class="row">
|
||||||
|
<dt class="col-sm-3">Autoren:</dt>
|
||||||
|
<dd class="col-sm-9">{{ standard.autoren.all|join:", " }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-3">Prüfende:</dt>
|
||||||
|
<dd class="col-sm-9">{{ standard.pruefende.all|join:", " }}</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-3">Gültigkeit:</dt>
|
||||||
|
<dd class="col-sm-9">{{ standard.gueltigkeit_von }} bis {{ standard.gueltigkeit_bis|default_if_none:"auf weiteres" }}</dd>
|
||||||
|
</dl>
|
||||||
|
<p>
|
||||||
|
<a href="{% url 'standard_json' standard.nummer %}"
|
||||||
|
class="btn btn-secondary icon icon--before icon--download"
|
||||||
|
download="{{ standard.nummer }}.json">
|
||||||
|
JSON herunterladen
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Comment Modal -->
|
||||||
|
<div class="modal fade" id="commentModal" tabindex="-1" role="dialog" aria-labelledby="commentModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="commentModalLabel">Kommentare für <span id="modalVorgabeNummer"></span></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="commentsContainer">
|
||||||
|
<!-- Comments will be loaded here -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Add Comment Form -->
|
||||||
|
<div class="mt-4">
|
||||||
|
<h6>Neuen Kommentar hinzufügen:</h6>
|
||||||
|
<textarea id="newCommentText" class="form-control" rows="3" placeholder="Ihr Kommentar..."></textarea>
|
||||||
|
<button id="addCommentBtn" class="btn btn-primary btn-sm mt-2">Kommentar hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- JavaScript for Comments -->
|
||||||
|
<script>
|
||||||
|
// Content Security Policy for comment system
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Prevent inline script execution in dynamically loaded content
|
||||||
|
const commentsContainer = document.getElementById('commentsContainer');
|
||||||
|
if (commentsContainer) {
|
||||||
|
// Use DOMPurify-like approach - only allow safe HTML
|
||||||
|
const allowedTags = ['br', 'small', 'div', 'span', 'button'];
|
||||||
|
const allowedAttributes = ['class', 'data-comment-id', 'aria-hidden'];
|
||||||
|
|
||||||
|
// Monitor for any script injection attempts
|
||||||
|
const observer = new MutationObserver(function(mutations) {
|
||||||
|
mutations.forEach(function(mutation) {
|
||||||
|
mutation.addedNodes.forEach(function(node) {
|
||||||
|
if (node.nodeType === 1) { // Element node
|
||||||
|
const tagName = node.tagName.toLowerCase();
|
||||||
|
if (tagName === 'script') {
|
||||||
|
console.warn('Script injection attempt blocked');
|
||||||
|
node.parentNode.removeChild(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
observer.observe(commentsContainer, {
|
||||||
|
childList: true,
|
||||||
|
subtree: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
let currentVorgabeId = null;
|
||||||
|
let currentVorgabeNummer = null;
|
||||||
|
|
||||||
|
// Comment button click handler
|
||||||
|
document.querySelectorAll('.comment-btn').forEach(btn => {
|
||||||
|
btn.addEventListener('click', function() {
|
||||||
|
currentVorgabeId = this.dataset.vorgabeId;
|
||||||
|
currentVorgabeNummer = this.dataset.vorgabeNummer;
|
||||||
|
|
||||||
|
document.getElementById('modalVorgabeNummer').textContent = currentVorgabeNummer;
|
||||||
|
document.getElementById('newCommentText').value = '';
|
||||||
|
|
||||||
|
loadComments();
|
||||||
|
$('#commentModal').modal('show');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Load comments function
|
||||||
|
function loadComments() {
|
||||||
|
fetch(`/dokumente/comments/${currentVorgabeId}/`)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
renderComments(data.comments);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error loading comments:', error);
|
||||||
|
document.getElementById('commentsContainer').innerHTML =
|
||||||
|
'<div class="alert alert-danger">Fehler beim Laden der Kommentare</div>';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render comments function
|
||||||
|
function renderComments(comments) {
|
||||||
|
const container = document.getElementById('commentsContainer');
|
||||||
|
|
||||||
|
if (comments.length === 0) {
|
||||||
|
container.innerHTML = '<p class="text-muted">Noch keine Kommentare vorhanden.</p>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let html = '';
|
||||||
|
comments.forEach(comment => {
|
||||||
|
const canDelete = comment.is_own || {% if user.is_authenticated %}'{{ user.is_staff|yesno:"true,false" }}'{% else %}'false'{% endif %} === 'true';
|
||||||
|
html += `
|
||||||
|
<div class="comment-item border-bottom pb-2 mb-2">
|
||||||
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
|
<div class="flex-grow-1">
|
||||||
|
<strong>${comment.user}</strong>
|
||||||
|
<small class="text-muted">(${comment.created_at})</small>
|
||||||
|
${comment.updated_at !== comment.created_at ? `<small class="text-muted">(bearbeitet: ${comment.updated_at})</small>` : ''}
|
||||||
|
<div class="mt-1">${comment.text}</div>
|
||||||
|
</div>
|
||||||
|
${canDelete ? `
|
||||||
|
<button class="btn btn-sm btn-outline-danger ml-2 delete-comment-btn" data-comment-id="${comment.id}">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
` : ''}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
container.innerHTML = html;
|
||||||
|
|
||||||
|
// Add delete handlers
|
||||||
|
document.querySelectorAll('.delete-comment-btn').forEach(btn => {
|
||||||
|
btn.addEventListener('click', function() {
|
||||||
|
if (confirm('Möchten Sie diesen Kommentar wirklich löschen?')) {
|
||||||
|
deleteComment(this.dataset.commentId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add comment function
|
||||||
|
document.getElementById('addCommentBtn').addEventListener('click', function() {
|
||||||
|
const text = document.getElementById('newCommentText').value.trim();
|
||||||
|
|
||||||
|
if (!text) {
|
||||||
|
alert('Bitte geben Sie einen Kommentar ein.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch(`/dokumente/comments/${currentVorgabeId}/add/`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-CSRFToken': getCookie('csrftoken')
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ text: text })
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.success) {
|
||||||
|
document.getElementById('newCommentText').value = '';
|
||||||
|
loadComments();
|
||||||
|
} else {
|
||||||
|
alert('Fehler: ' + (data.error || 'Unbekannter Fehler'));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error adding comment:', error);
|
||||||
|
alert('Fehler beim Hinzufügen des Kommentars');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Delete comment function
|
||||||
|
function deleteComment(commentId) {
|
||||||
|
fetch(`/dokumente/comments/delete/${commentId}/`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-CSRFToken': getCookie('csrftoken')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.success) {
|
||||||
|
loadComments();
|
||||||
|
} else {
|
||||||
|
alert('Fehler: ' + (data.error || 'Unbekannter Fehler'));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error deleting comment:', error);
|
||||||
|
alert('Fehler beim Löschen des Kommentars');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// CSRF token helper
|
||||||
|
function getCookie(name) {
|
||||||
|
let cookieValue = null;
|
||||||
|
if (document.cookie && document.cookie !== '') {
|
||||||
|
const cookies = document.cookie.split(';');
|
||||||
|
for (let i = 0; i < cookies.length; i++) {
|
||||||
|
const cookie = cookies[i].trim();
|
||||||
|
if (cookie.substring(0, name.length + 1) === (name + '=')) {
|
||||||
|
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cookieValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
66
dokumente/templates/standards/user_comments.html
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Meine Kommentare</h1>
|
||||||
|
|
||||||
|
{% if total_comments == 0 %}
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<p>Sie haben noch keine Kommentare zu Vorgaben hinterlassen.</p>
|
||||||
|
<p><a href="{% url 'standard_list' %}">Zu den Standards</a></p>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-muted">Insgesamt {{ total_comments }} Kommentar{{ total_comments|pluralize:"e" }}</p>
|
||||||
|
|
||||||
|
{% for dokument, comments in comments_by_document.items %}
|
||||||
|
<div class="panel panel-default" style="margin-top: 2rem;">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h2 style="margin: 0;">
|
||||||
|
<a href="{% url 'standard_detail' nummer=dokument.nummer %}">
|
||||||
|
{{ dokument.nummer }} – {{ dokument.name }}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<p style="margin: 0; color: #666; font-size: 0.9rem;">
|
||||||
|
{{ comments|length }} Kommentar{{ comments|length|pluralize:"e" }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="list-group">
|
||||||
|
{% for comment in comments %}
|
||||||
|
<div class="list-group-item" style="border-left: 3px solid #007bff; padding: 1rem;">
|
||||||
|
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
|
||||||
|
<div style="flex: 1;">
|
||||||
|
<h4 style="margin: 0 0 0.5rem 0;">
|
||||||
|
<a href="{% url 'standard_detail' nummer=comment.vorgabe.dokument.nummer %}#{{ comment.vorgabe.Vorgabennummer }}">
|
||||||
|
{{ comment.vorgabe.Vorgabennummer }}
|
||||||
|
</a> {{ comment.vorgabe.titel }}
|
||||||
|
</h4>
|
||||||
|
<p style="margin: 0 0 0.75rem 0; color: #666; font-size: 0.9rem;">
|
||||||
|
<strong>Erstellt:</strong> {{ comment.created_at|date:"d.m.Y H:i" }}
|
||||||
|
{% if comment.updated_at != comment.created_at %}
|
||||||
|
<br>
|
||||||
|
<strong>Bearbeitet:</strong> {{ comment.updated_at|date:"d.m.Y H:i" }}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<form method="POST" action="{% url 'delete_vorgabe_comment' comment.id %}"
|
||||||
|
style="display: inline; margin-left: 1rem;"
|
||||||
|
onsubmit="return confirm('Sind Sie sicher, dass Sie diesen Kommentar löschen möchten?');">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div style="background: #f8f9fa; padding: 0.75rem; border-radius: 4px; margin-top: 0.5rem; white-space: pre-wrap; word-wrap: break-word;">
|
||||||
|
{{ comment.text }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div style="margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #ddd;">
|
||||||
|
<a href="{% url 'standard_list' %}" class="btn btn-default">Zu den Standards</a>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
960
dokumente/test_import_command.py
Normal file
@@ -0,0 +1,960 @@
|
|||||||
|
"""
|
||||||
|
Tests for the import-document management command.
|
||||||
|
|
||||||
|
This test suite covers:
|
||||||
|
- Basic import functionality
|
||||||
|
- Dry-run mode
|
||||||
|
- Purge functionality
|
||||||
|
- Error handling (missing file, dokumententyp, thema, abschnitttyp)
|
||||||
|
- Context switching (einleitung → geltungsbereich → vorgabe)
|
||||||
|
- Header normalization
|
||||||
|
- Vorgaben with Kurztext, Langtext, Stichworte, Checklistenfragen
|
||||||
|
- Edge cases and malformed input
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
from io import StringIO
|
||||||
|
from pathlib import Path
|
||||||
|
from django.test import TestCase
|
||||||
|
from django.core.management import call_command
|
||||||
|
from django.core.management.base import CommandError
|
||||||
|
from dokumente.models import (
|
||||||
|
Dokumententyp,
|
||||||
|
Dokument,
|
||||||
|
Thema,
|
||||||
|
Vorgabe,
|
||||||
|
VorgabeKurztext,
|
||||||
|
VorgabeLangtext,
|
||||||
|
Geltungsbereich,
|
||||||
|
Einleitung,
|
||||||
|
Checklistenfrage,
|
||||||
|
)
|
||||||
|
from abschnitte.models import AbschnittTyp
|
||||||
|
from stichworte.models import Stichwort
|
||||||
|
|
||||||
|
|
||||||
|
class ImportDocumentCommandTestCase(TestCase):
|
||||||
|
"""Test cases for the import-document management command"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test fixtures"""
|
||||||
|
# Create required Dokumententyp
|
||||||
|
self.dokumententyp = Dokumententyp.objects.create(
|
||||||
|
name="IT-Sicherheit",
|
||||||
|
verantwortliche_ve="TEST-VE"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create required AbschnittTyp instances
|
||||||
|
self.text_typ = AbschnittTyp.objects.create(abschnitttyp="text")
|
||||||
|
self.liste_geordnet_typ = AbschnittTyp.objects.create(
|
||||||
|
abschnitttyp="liste geordnet"
|
||||||
|
)
|
||||||
|
self.liste_ungeordnet_typ = AbschnittTyp.objects.create(
|
||||||
|
abschnitttyp="liste ungeordnet"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create test Themen
|
||||||
|
self.thema_organisation = Thema.objects.create(
|
||||||
|
name="Organisation",
|
||||||
|
erklaerung="Organisatorische Anforderungen"
|
||||||
|
)
|
||||||
|
self.thema_technik = Thema.objects.create(
|
||||||
|
name="Technik",
|
||||||
|
erklaerung="Technische Anforderungen"
|
||||||
|
)
|
||||||
|
# Additional Themen for r009.txt example
|
||||||
|
self.thema_informationen = Thema.objects.create(
|
||||||
|
name="Informationen",
|
||||||
|
erklaerung="Informationssicherheit"
|
||||||
|
)
|
||||||
|
self.thema_systeme = Thema.objects.create(
|
||||||
|
name="Systeme",
|
||||||
|
erklaerung="Systemanforderungen"
|
||||||
|
)
|
||||||
|
self.thema_anwendungen = Thema.objects.create(
|
||||||
|
name="Anwendungen",
|
||||||
|
erklaerung="Anwendungsanforderungen"
|
||||||
|
)
|
||||||
|
self.thema_zonen = Thema.objects.create(
|
||||||
|
name="Zonen",
|
||||||
|
erklaerung="Zonenanforderungen"
|
||||||
|
)
|
||||||
|
|
||||||
|
def create_test_file(self, content):
|
||||||
|
"""Helper to create a temporary test file with given content"""
|
||||||
|
fd, path = tempfile.mkstemp(suffix=".txt", text=True)
|
||||||
|
with os.fdopen(fd, 'w', encoding='utf-8') as f:
|
||||||
|
f.write(content)
|
||||||
|
return path
|
||||||
|
|
||||||
|
def test_basic_import_creates_document(self):
|
||||||
|
"""Test that basic import creates a document"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
This is the introduction.
|
||||||
|
|
||||||
|
>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
This is the scope.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Test Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Short description.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Long description.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-001',
|
||||||
|
'--name', 'Test Document',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
# Check document was created
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-001')
|
||||||
|
self.assertEqual(dokument.name, 'Test Document')
|
||||||
|
self.assertEqual(dokument.dokumententyp, self.dokumententyp)
|
||||||
|
|
||||||
|
# Check output message
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('Created Document TEST-001', output)
|
||||||
|
self.assertIn('Imported document TEST-001', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_import_creates_einleitung(self):
|
||||||
|
"""Test that Einleitung sections are created"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
This is the introduction text.
|
||||||
|
|
||||||
|
>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
Scope text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-002',
|
||||||
|
'--name', 'Test Document 2',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-002')
|
||||||
|
einleitung = Einleitung.objects.filter(einleitung=dokument)
|
||||||
|
self.assertEqual(einleitung.count(), 1)
|
||||||
|
self.assertEqual(einleitung.first().inhalt, 'This is the introduction text.')
|
||||||
|
self.assertEqual(einleitung.first().abschnitttyp, self.text_typ)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_import_creates_geltungsbereich(self):
|
||||||
|
"""Test that Geltungsbereich sections are created"""
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
This standard applies to all servers.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-003',
|
||||||
|
'--name', 'Test Document 3',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-003')
|
||||||
|
geltungsbereich = Geltungsbereich.objects.filter(geltungsbereich=dokument)
|
||||||
|
self.assertEqual(geltungsbereich.count(), 1)
|
||||||
|
self.assertEqual(
|
||||||
|
geltungsbereich.first().inhalt,
|
||||||
|
'This standard applies to all servers.'
|
||||||
|
)
|
||||||
|
self.assertEqual(geltungsbereich.first().abschnitttyp, self.text_typ)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_import_creates_vorgabe_with_all_fields(self):
|
||||||
|
"""Test creating a Vorgabe with all fields"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Complete Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Short text here.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Long text here.
|
||||||
|
>>>Stichworte
|
||||||
|
Testing, Management, Security
|
||||||
|
>>>Checkliste
|
||||||
|
Is the requirement met?
|
||||||
|
Has documentation been provided?
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-004',
|
||||||
|
'--name', 'Test Document 4',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-004')
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument, nummer=1)
|
||||||
|
|
||||||
|
# Check basic fields
|
||||||
|
self.assertEqual(vorgabe.titel, 'Complete Requirement')
|
||||||
|
self.assertEqual(vorgabe.thema, self.thema_organisation)
|
||||||
|
|
||||||
|
# Check Kurztext
|
||||||
|
kurztext = VorgabeKurztext.objects.filter(abschnitt=vorgabe)
|
||||||
|
self.assertEqual(kurztext.count(), 1)
|
||||||
|
self.assertEqual(kurztext.first().inhalt, 'Short text here.')
|
||||||
|
|
||||||
|
# Check Langtext
|
||||||
|
langtext = VorgabeLangtext.objects.filter(abschnitt=vorgabe)
|
||||||
|
self.assertEqual(langtext.count(), 1)
|
||||||
|
self.assertEqual(langtext.first().inhalt, 'Long text here.')
|
||||||
|
|
||||||
|
# Check Stichworte
|
||||||
|
stichworte = vorgabe.stichworte.all()
|
||||||
|
self.assertEqual(stichworte.count(), 3)
|
||||||
|
stichwort_names = {s.stichwort for s in stichworte}
|
||||||
|
self.assertEqual(stichwort_names, {'Testing', 'Management', 'Security'})
|
||||||
|
|
||||||
|
# Check Checklistenfragen
|
||||||
|
fragen = Checklistenfrage.objects.filter(vorgabe=vorgabe)
|
||||||
|
self.assertEqual(fragen.count(), 2)
|
||||||
|
frage_texts = {f.frage for f in fragen}
|
||||||
|
self.assertEqual(frage_texts, {
|
||||||
|
'Is the requirement met?',
|
||||||
|
'Has documentation been provided?'
|
||||||
|
})
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_import_multiple_vorgaben(self):
|
||||||
|
"""Test importing multiple Vorgaben"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
First Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
First requirement text.
|
||||||
|
|
||||||
|
>>>Vorgabe Technik
|
||||||
|
>>>Nummer 2
|
||||||
|
>>>Titel
|
||||||
|
Second Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Second requirement text.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 3
|
||||||
|
>>>Titel
|
||||||
|
Third Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Third requirement text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-005',
|
||||||
|
'--name', 'Test Document 5',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-005')
|
||||||
|
vorgaben = Vorgabe.objects.filter(dokument=dokument).order_by('nummer')
|
||||||
|
|
||||||
|
self.assertEqual(vorgaben.count(), 3)
|
||||||
|
self.assertEqual(vorgaben[0].nummer, 1)
|
||||||
|
self.assertEqual(vorgaben[0].thema, self.thema_organisation)
|
||||||
|
self.assertEqual(vorgaben[1].nummer, 2)
|
||||||
|
self.assertEqual(vorgaben[1].thema, self.thema_technik)
|
||||||
|
self.assertEqual(vorgaben[2].nummer, 3)
|
||||||
|
self.assertEqual(vorgaben[2].thema, self.thema_organisation)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_dry_run_creates_no_data(self):
|
||||||
|
"""Test that dry-run mode creates no database records"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
Introduction text.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Test Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Short text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-DRY',
|
||||||
|
'--name', 'Dry Run Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
'--dry-run',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
# Document is created (for counting purposes) but not saved
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('Dry run: no database changes will be made', output)
|
||||||
|
self.assertIn('Dry run complete', output)
|
||||||
|
|
||||||
|
# Check that Einleitung and Vorgabe were NOT created
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-DRY')
|
||||||
|
self.assertEqual(Einleitung.objects.filter(einleitung=dokument).count(), 0)
|
||||||
|
self.assertEqual(Vorgabe.objects.filter(dokument=dokument).count(), 0)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_dry_run_verbose_shows_details(self):
|
||||||
|
"""Test that dry-run with verbose shows detailed output"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
Introduction.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Test
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Short.
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Long.
|
||||||
|
>>>Stichworte
|
||||||
|
Keyword1, Keyword2
|
||||||
|
>>>Checkliste
|
||||||
|
Question 1?
|
||||||
|
Question 2?
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-VERBOSE',
|
||||||
|
'--name', 'Verbose Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
'--dry-run',
|
||||||
|
'--verbose',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('[DRY RUN] Einleitung Abschnitt', output)
|
||||||
|
self.assertIn('[DRY RUN] Would create Vorgabe 1', output)
|
||||||
|
self.assertIn('Stichworte: Keyword1, Keyword2', output)
|
||||||
|
self.assertIn('Checkliste: Question 1?', output)
|
||||||
|
self.assertIn('Checkliste: Question 2?', output)
|
||||||
|
self.assertIn('Kurztext', output)
|
||||||
|
self.assertIn('Langtext', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_purge_deletes_existing_content(self):
|
||||||
|
"""Test that --purge deletes existing content before import"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
New Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
New text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# First import
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-PURGE',
|
||||||
|
'--name', 'Purge Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-PURGE')
|
||||||
|
self.assertEqual(Vorgabe.objects.filter(dokument=dokument).count(), 1)
|
||||||
|
|
||||||
|
# Second import with different content and --purge
|
||||||
|
test_content_2 = """>>>Vorgabe Technik
|
||||||
|
>>>Nummer 2
|
||||||
|
>>>Titel
|
||||||
|
Replacement Requirement
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Replacement text.
|
||||||
|
"""
|
||||||
|
test_file_2 = self.create_test_file(test_content_2)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file_2,
|
||||||
|
'--nummer', 'TEST-PURGE',
|
||||||
|
'--name', 'Purge Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
'--purge',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
# Old Vorgabe should be deleted, only new one exists
|
||||||
|
vorgaben = Vorgabe.objects.filter(dokument=dokument)
|
||||||
|
self.assertEqual(vorgaben.count(), 1)
|
||||||
|
self.assertEqual(vorgaben.first().nummer, 2)
|
||||||
|
self.assertEqual(vorgaben.first().thema, self.thema_technik)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('Purged', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file_2)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_purge_dry_run_shows_what_would_be_deleted(self):
|
||||||
|
"""Test that --purge with --dry-run shows deletion counts"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Original
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# First import to create data
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-PURGE-DRY',
|
||||||
|
'--name', 'Purge Dry Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Dry run with purge
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-PURGE-DRY',
|
||||||
|
'--name', 'Purge Dry Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
'--purge',
|
||||||
|
'--dry-run',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('[DRY RUN] Would purge:', output)
|
||||||
|
self.assertIn('1 Vorgaben', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_header_normalization(self):
|
||||||
|
"""Test that headers with hyphens are normalized correctly"""
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>Liste-ungeordnet
|
||||||
|
Item 1
|
||||||
|
Item 2
|
||||||
|
Item 3
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-NORM',
|
||||||
|
'--name', 'Normalization Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-NORM')
|
||||||
|
geltungsbereich = Geltungsbereich.objects.get(geltungsbereich=dokument)
|
||||||
|
|
||||||
|
# Should have normalized "Liste-ungeordnet" to "liste ungeordnet"
|
||||||
|
self.assertEqual(geltungsbereich.abschnitttyp, self.liste_ungeordnet_typ)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_missing_file_raises_error(self):
|
||||||
|
"""Test that missing file raises CommandError"""
|
||||||
|
with self.assertRaises(CommandError) as cm:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
'/nonexistent/file.txt',
|
||||||
|
'--nummer', 'TEST-ERR',
|
||||||
|
'--name', 'Error Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
self.assertIn('does not exist', str(cm.exception))
|
||||||
|
|
||||||
|
def test_missing_dokumententyp_raises_error(self):
|
||||||
|
"""Test that missing Dokumententyp raises CommandError"""
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
Text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
with self.assertRaises(CommandError) as cm:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-ERR',
|
||||||
|
'--name', 'Error Test',
|
||||||
|
'--dokumententyp', 'NonExistentType'
|
||||||
|
)
|
||||||
|
self.assertIn('does not exist', str(cm.exception))
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_missing_thema_skips_vorgabe(self):
|
||||||
|
"""Test that missing Thema causes Vorgabe to be skipped with warning"""
|
||||||
|
test_content = """>>>Vorgabe NonExistentThema
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Test
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-SKIP',
|
||||||
|
'--name', 'Skip Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-SKIP')
|
||||||
|
# Vorgabe should NOT be created
|
||||||
|
self.assertEqual(Vorgabe.objects.filter(dokument=dokument).count(), 0)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('not found, skipping Vorgabe', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_missing_abschnitttyp_defaults_to_text(self):
|
||||||
|
"""Test that missing AbschnittTyp defaults to 'text' with warning"""
|
||||||
|
# Delete all but text type
|
||||||
|
AbschnittTyp.objects.exclude(abschnitttyp='text').delete()
|
||||||
|
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>liste geordnet
|
||||||
|
Item 1
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-DEFAULT',
|
||||||
|
'--name', 'Default Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-DEFAULT')
|
||||||
|
geltungsbereich = Geltungsbereich.objects.get(geltungsbereich=dokument)
|
||||||
|
|
||||||
|
# Should default to 'text' type
|
||||||
|
self.assertEqual(geltungsbereich.abschnitttyp.abschnitttyp, 'text')
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn("not found; defaulting to 'text'", output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_inline_titel(self):
|
||||||
|
"""Test that inline title (on same line as header) is parsed"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel Inline Title Here
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-INLINE',
|
||||||
|
'--name', 'Inline Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-INLINE')
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument)
|
||||||
|
self.assertEqual(vorgabe.titel, 'Inline Title Here')
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_inline_stichworte(self):
|
||||||
|
"""Test that inline Stichworte (on same line as header) are parsed"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel Test
|
||||||
|
>>>Stichworte Security, Testing, Compliance
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Text.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-INLINE-STW',
|
||||||
|
'--name', 'Inline Stichwort Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-INLINE-STW')
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument)
|
||||||
|
stichworte = {s.stichwort for s in vorgabe.stichworte.all()}
|
||||||
|
self.assertEqual(stichworte, {'Security', 'Testing', 'Compliance'})
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_gueltigkeit_dates(self):
|
||||||
|
"""Test that validity dates are set correctly"""
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
Scope.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-DATES',
|
||||||
|
'--name', 'Date Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
'--gueltigkeit_von', '2024-01-01',
|
||||||
|
'--gueltigkeit_bis', '2024-12-31'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-DATES')
|
||||||
|
self.assertEqual(str(dokument.gueltigkeit_von), '2024-01-01')
|
||||||
|
self.assertEqual(str(dokument.gueltigkeit_bis), '2024-12-31')
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_existing_document_updates(self):
|
||||||
|
"""Test that importing to existing document number shows warning"""
|
||||||
|
test_content = """>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
First version.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# First import
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-EXISTS',
|
||||||
|
'--name', 'Existing Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
output1 = out.getvalue()
|
||||||
|
self.assertIn('Created Document TEST-EXISTS', output1)
|
||||||
|
|
||||||
|
# Second import with same number
|
||||||
|
out2 = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-EXISTS',
|
||||||
|
'--name', 'Existing Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out2
|
||||||
|
)
|
||||||
|
|
||||||
|
output2 = out2.getvalue()
|
||||||
|
self.assertIn('already exists', output2)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_multiple_kurztext_sections(self):
|
||||||
|
"""Test Vorgabe with multiple Kurztext sections"""
|
||||||
|
test_content = """>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel Multiple Sections
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
First kurztext section.
|
||||||
|
>>>Liste ungeordnet
|
||||||
|
Item A
|
||||||
|
Item B
|
||||||
|
>>>Langtext
|
||||||
|
>>>Text
|
||||||
|
Langtext.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-MULTI',
|
||||||
|
'--name', 'Multi Section Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-MULTI')
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument)
|
||||||
|
kurztext_sections = VorgabeKurztext.objects.filter(abschnitt=vorgabe).order_by('id')
|
||||||
|
|
||||||
|
self.assertEqual(kurztext_sections.count(), 2)
|
||||||
|
self.assertEqual(kurztext_sections[0].abschnitttyp.abschnitttyp, 'text')
|
||||||
|
self.assertEqual(kurztext_sections[1].abschnitttyp.abschnitttyp, 'liste ungeordnet')
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_empty_file(self):
|
||||||
|
"""Test importing an empty file"""
|
||||||
|
test_content = ""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-EMPTY',
|
||||||
|
'--name', 'Empty Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-EMPTY')
|
||||||
|
# Document created but no content
|
||||||
|
self.assertEqual(Einleitung.objects.filter(einleitung=dokument).count(), 0)
|
||||||
|
self.assertEqual(Geltungsbereich.objects.filter(geltungsbereich=dokument).count(), 0)
|
||||||
|
self.assertEqual(Vorgabe.objects.filter(dokument=dokument).count(), 0)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('with 0 Vorgaben', output)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_unicode_content(self):
|
||||||
|
"""Test that Unicode characters (German umlauts, etc.) are handled correctly"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
Übersicht über die Sicherheitsanforderungen für IT-Systeme.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel
|
||||||
|
Überprüfung der Systemkonfiguration
|
||||||
|
>>>Kurztext
|
||||||
|
>>>Text
|
||||||
|
Die Konfiguration muss regelmäßig überprüft werden.
|
||||||
|
>>>Stichworte
|
||||||
|
Überprüfung, Sicherheit, Qualität
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-UNICODE',
|
||||||
|
'--name', 'Unicode Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-UNICODE')
|
||||||
|
|
||||||
|
# Check Einleitung
|
||||||
|
einleitung = Einleitung.objects.get(einleitung=dokument)
|
||||||
|
self.assertIn('Übersicht', einleitung.inhalt)
|
||||||
|
|
||||||
|
# Check Vorgabe
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument)
|
||||||
|
self.assertEqual(vorgabe.titel, 'Überprüfung der Systemkonfiguration')
|
||||||
|
|
||||||
|
# Check Kurztext
|
||||||
|
kurztext = VorgabeKurztext.objects.get(abschnitt=vorgabe)
|
||||||
|
self.assertIn('regelmäßig', kurztext.inhalt)
|
||||||
|
|
||||||
|
# Check Stichworte
|
||||||
|
stichworte = {s.stichwort for s in vorgabe.stichworte.all()}
|
||||||
|
self.assertIn('Überprüfung', stichworte)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_context_switching(self):
|
||||||
|
"""Test that context switches correctly between sections"""
|
||||||
|
test_content = """>>>Einleitung
|
||||||
|
>>>text
|
||||||
|
Intro text 1.
|
||||||
|
>>>text
|
||||||
|
Intro text 2.
|
||||||
|
|
||||||
|
>>>geltungsbereich
|
||||||
|
>>>text
|
||||||
|
Scope text 1.
|
||||||
|
>>>text
|
||||||
|
Scope text 2.
|
||||||
|
|
||||||
|
>>>Vorgabe Organisation
|
||||||
|
>>>Nummer 1
|
||||||
|
>>>Titel Test
|
||||||
|
>>>Kurztext
|
||||||
|
>>>text
|
||||||
|
Kurztext 1.
|
||||||
|
>>>text
|
||||||
|
Kurztext 2.
|
||||||
|
>>>Langtext
|
||||||
|
>>>text
|
||||||
|
Langtext 1.
|
||||||
|
"""
|
||||||
|
test_file = self.create_test_file(test_content)
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
test_file,
|
||||||
|
'--nummer', 'TEST-CONTEXT',
|
||||||
|
'--name', 'Context Test',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit'
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='TEST-CONTEXT')
|
||||||
|
|
||||||
|
# Check Einleitung has 2 sections
|
||||||
|
einleitung = Einleitung.objects.filter(einleitung=dokument)
|
||||||
|
self.assertEqual(einleitung.count(), 2)
|
||||||
|
|
||||||
|
# Check Geltungsbereich has 2 sections
|
||||||
|
geltungsbereich = Geltungsbereich.objects.filter(geltungsbereich=dokument)
|
||||||
|
self.assertEqual(geltungsbereich.count(), 2)
|
||||||
|
|
||||||
|
# Check Vorgabe has correct Kurztext and Langtext counts
|
||||||
|
vorgabe = Vorgabe.objects.get(dokument=dokument)
|
||||||
|
kurztext = VorgabeKurztext.objects.filter(abschnitt=vorgabe)
|
||||||
|
langtext = VorgabeLangtext.objects.filter(abschnitt=vorgabe)
|
||||||
|
self.assertEqual(kurztext.count(), 2)
|
||||||
|
self.assertEqual(langtext.count(), 1)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
os.unlink(test_file)
|
||||||
|
|
||||||
|
def test_real_world_example(self):
|
||||||
|
"""Test importing the real r009.txt example document"""
|
||||||
|
# Use the actual example file
|
||||||
|
example_file = Path(__file__).parent.parent / 'Documentation' / 'import formats' / 'r009.txt'
|
||||||
|
|
||||||
|
if not example_file.exists():
|
||||||
|
self.skipTest("r009.txt example file not found")
|
||||||
|
|
||||||
|
out = StringIO()
|
||||||
|
call_command(
|
||||||
|
'import-document',
|
||||||
|
str(example_file),
|
||||||
|
'--nummer', 'R009',
|
||||||
|
'--name', 'IT-Sicherheit Serversysteme',
|
||||||
|
'--dokumententyp', 'IT-Sicherheit',
|
||||||
|
stdout=out
|
||||||
|
)
|
||||||
|
|
||||||
|
dokument = Dokument.objects.get(nummer='R009')
|
||||||
|
|
||||||
|
# Check that Einleitung was created
|
||||||
|
self.assertGreater(Einleitung.objects.filter(einleitung=dokument).count(), 0)
|
||||||
|
|
||||||
|
# Check that Geltungsbereich was created
|
||||||
|
self.assertGreater(Geltungsbereich.objects.filter(geltungsbereich=dokument).count(), 0)
|
||||||
|
|
||||||
|
# Check that multiple Vorgaben were created (r009.txt has 23 Vorgaben)
|
||||||
|
vorgaben = Vorgabe.objects.filter(dokument=dokument)
|
||||||
|
self.assertGreaterEqual(vorgaben.count(), 20)
|
||||||
|
|
||||||
|
# Verify output message
|
||||||
|
output = out.getvalue()
|
||||||
|
self.assertIn('Imported document R009', output)
|
||||||
385
dokumente/test_json.py
Normal file
@@ -0,0 +1,385 @@
|
|||||||
|
from django.test import TestCase, Client
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.core.management import call_command
|
||||||
|
from datetime import date
|
||||||
|
from io import StringIO
|
||||||
|
import tempfile
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
from dokumente.models import (
|
||||||
|
Dokumententyp, Person, Thema, Dokument, Vorgabe,
|
||||||
|
VorgabeLangtext, VorgabeKurztext, Geltungsbereich,
|
||||||
|
Einleitung, Checklistenfrage, Changelog
|
||||||
|
)
|
||||||
|
from abschnitte.models import AbschnittTyp
|
||||||
|
|
||||||
|
|
||||||
|
class JSONExportManagementCommandTest(TestCase):
|
||||||
|
"""Test cases for export_json management command"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data for JSON export"""
|
||||||
|
# Create test data
|
||||||
|
self.dokumententyp = Dokumententyp.objects.create(
|
||||||
|
name="Standard IT-Sicherheit",
|
||||||
|
verantwortliche_ve="SR-SUR-SEC"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.autor1 = Person.objects.create(
|
||||||
|
name="Max Mustermann",
|
||||||
|
funktion="Security Analyst"
|
||||||
|
)
|
||||||
|
self.autor2 = Person.objects.create(
|
||||||
|
name="Erika Mustermann",
|
||||||
|
funktion="Security Manager"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.thema = Thema.objects.create(
|
||||||
|
name="Access Control",
|
||||||
|
erklaerung="Zugangskontrolle"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.dokument = Dokument.objects.create(
|
||||||
|
nummer="TEST-001",
|
||||||
|
dokumententyp=self.dokumententyp,
|
||||||
|
name="Test Standard",
|
||||||
|
gueltigkeit_von=date(2023, 1, 1),
|
||||||
|
gueltigkeit_bis=date(2025, 12, 31),
|
||||||
|
signatur_cso="CSO-123",
|
||||||
|
anhaenge="Anhang1.pdf, Anhang2.pdf",
|
||||||
|
aktiv=True
|
||||||
|
)
|
||||||
|
self.dokument.autoren.add(self.autor1, self.autor2)
|
||||||
|
|
||||||
|
self.vorgabe = Vorgabe.objects.create(
|
||||||
|
order=1,
|
||||||
|
nummer=1,
|
||||||
|
dokument=self.dokument,
|
||||||
|
thema=self.thema,
|
||||||
|
titel="Test Vorgabe",
|
||||||
|
gueltigkeit_von=date(2023, 1, 1),
|
||||||
|
gueltigkeit_bis=date(2025, 12, 31)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create text sections
|
||||||
|
self.abschnitttyp_text = AbschnittTyp.objects.create(abschnitttyp="text")
|
||||||
|
self.abschnitttyp_table = AbschnittTyp.objects.create(abschnitttyp="table")
|
||||||
|
|
||||||
|
self.geltungsbereich = Geltungsbereich.objects.create(
|
||||||
|
geltungsbereich=self.dokument,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="Dies ist der Geltungsbereich",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.einleitung = Einleitung.objects.create(
|
||||||
|
einleitung=self.dokument,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="Dies ist die Einleitung",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.kurztext = VorgabeKurztext.objects.create(
|
||||||
|
abschnitt=self.vorgabe,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="Dies ist der Kurztext",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.langtext = VorgabeLangtext.objects.create(
|
||||||
|
abschnitt=self.vorgabe,
|
||||||
|
abschnitttyp=self.abschnitttyp_table,
|
||||||
|
inhalt="Spalte1|Spalte2\nWert1|Wert2",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.checklistenfrage = Checklistenfrage.objects.create(
|
||||||
|
vorgabe=self.vorgabe,
|
||||||
|
frage="Ist die Zugriffskontrolle implementiert?"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.changelog = Changelog.objects.create(
|
||||||
|
dokument=self.dokument,
|
||||||
|
datum=date(2023, 6, 1),
|
||||||
|
aenderung="Erste Version erstellt"
|
||||||
|
)
|
||||||
|
self.changelog.autoren.add(self.autor1)
|
||||||
|
|
||||||
|
def test_export_json_command_stdout(self):
|
||||||
|
"""Test export_json command output to stdout"""
|
||||||
|
out = StringIO()
|
||||||
|
call_command('export_json', stdout=out)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
|
||||||
|
# Check that output contains expected JSON structure
|
||||||
|
self.assertIn('"Typ": "Standard IT-Sicherheit"', output)
|
||||||
|
self.assertIn('"Nummer": "TEST-001"', output)
|
||||||
|
self.assertIn('"Name": "Test Standard"', output)
|
||||||
|
self.assertIn('"Max Mustermann"', output)
|
||||||
|
self.assertIn('"Erika Mustermann"', output)
|
||||||
|
self.assertIn('"Von": "2023-01-01"', output)
|
||||||
|
self.assertIn('"Bis": "2025-12-31"', output)
|
||||||
|
self.assertIn('"SignaturCSO": "CSO-123"', output)
|
||||||
|
self.assertIn('"Dies ist der Geltungsbereich"', output)
|
||||||
|
self.assertIn('"Dies ist die Einleitung"', output)
|
||||||
|
self.assertIn('"Dies ist der Kurztext"', output)
|
||||||
|
self.assertIn('"Ist die Zugriffskontrolle implementiert?"', output)
|
||||||
|
self.assertIn('"Erste Version erstellt"', output)
|
||||||
|
|
||||||
|
def test_export_json_command_to_file(self):
|
||||||
|
"""Test export_json command output to file"""
|
||||||
|
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.json') as tmp_file:
|
||||||
|
tmp_filename = tmp_file.name
|
||||||
|
|
||||||
|
try:
|
||||||
|
call_command('export_json', output=tmp_filename)
|
||||||
|
|
||||||
|
# Read file content
|
||||||
|
with open(tmp_filename, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
|
||||||
|
# Parse JSON to ensure it's valid
|
||||||
|
data = json.loads(content)
|
||||||
|
|
||||||
|
# Verify structure
|
||||||
|
self.assertIsInstance(data, list)
|
||||||
|
self.assertEqual(len(data), 1)
|
||||||
|
|
||||||
|
doc_data = data[0]
|
||||||
|
self.assertEqual(doc_data['Nummer'], 'TEST-001')
|
||||||
|
self.assertEqual(doc_data['Name'], 'Test Standard')
|
||||||
|
self.assertEqual(doc_data['Typ'], 'Standard IT-Sicherheit')
|
||||||
|
self.assertEqual(len(doc_data['Autoren']), 2)
|
||||||
|
self.assertIn('Max Mustermann', doc_data['Autoren'])
|
||||||
|
self.assertIn('Erika Mustermann', doc_data['Autoren'])
|
||||||
|
|
||||||
|
finally:
|
||||||
|
# Clean up temporary file
|
||||||
|
if os.path.exists(tmp_filename):
|
||||||
|
os.unlink(tmp_filename)
|
||||||
|
|
||||||
|
def test_export_json_command_empty_database(self):
|
||||||
|
"""Test export_json command with no documents"""
|
||||||
|
# Delete all documents
|
||||||
|
Dokument.objects.all().delete()
|
||||||
|
|
||||||
|
out = StringIO()
|
||||||
|
call_command('export_json', stdout=out)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
|
||||||
|
# Should output empty array
|
||||||
|
self.assertEqual(output.strip(), '[]')
|
||||||
|
|
||||||
|
def test_export_json_command_inactive_documents(self):
|
||||||
|
"""Test export_json command filters inactive documents"""
|
||||||
|
# Create inactive document
|
||||||
|
inactive_doc = Dokument.objects.create(
|
||||||
|
nummer="INACTIVE-001",
|
||||||
|
dokumententyp=self.dokumententyp,
|
||||||
|
name="Inactive Document",
|
||||||
|
aktiv=False
|
||||||
|
)
|
||||||
|
|
||||||
|
out = StringIO()
|
||||||
|
call_command('export_json', stdout=out)
|
||||||
|
|
||||||
|
output = out.getvalue()
|
||||||
|
|
||||||
|
# Should not contain inactive document
|
||||||
|
self.assertNotIn('"INACTIVE-001"', output)
|
||||||
|
self.assertNotIn('"Inactive Document"', output)
|
||||||
|
|
||||||
|
# Should still contain active document
|
||||||
|
self.assertIn('"TEST-001"', output)
|
||||||
|
self.assertIn('"Test Standard"', output)
|
||||||
|
|
||||||
|
|
||||||
|
class StandardJSONViewTest(TestCase):
|
||||||
|
"""Test cases for standard_json view"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data for JSON view"""
|
||||||
|
self.client = Client()
|
||||||
|
|
||||||
|
# Create test data
|
||||||
|
self.dokumententyp = Dokumententyp.objects.create(
|
||||||
|
name="Standard IT-Sicherheit",
|
||||||
|
verantwortliche_ve="SR-SUR-SEC"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.autor = Person.objects.create(
|
||||||
|
name="Test Autor",
|
||||||
|
funktion="Security Analyst"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.pruefender = Person.objects.create(
|
||||||
|
name="Test Pruefender",
|
||||||
|
funktion="Security Manager"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.thema = Thema.objects.create(
|
||||||
|
name="Access Control",
|
||||||
|
erklaerung="Zugangskontrolle"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.dokument = Dokument.objects.create(
|
||||||
|
nummer="JSON-001",
|
||||||
|
dokumententyp=self.dokumententyp,
|
||||||
|
name="JSON Test Standard",
|
||||||
|
gueltigkeit_von=date(2023, 1, 1),
|
||||||
|
gueltigkeit_bis=date(2025, 12, 31),
|
||||||
|
signatur_cso="CSO-456",
|
||||||
|
anhaenge="test.pdf",
|
||||||
|
aktiv=True
|
||||||
|
)
|
||||||
|
self.dokument.autoren.add(self.autor)
|
||||||
|
self.dokument.pruefende.add(self.pruefender)
|
||||||
|
|
||||||
|
self.vorgabe = Vorgabe.objects.create(
|
||||||
|
order=1,
|
||||||
|
nummer=1,
|
||||||
|
dokument=self.dokument,
|
||||||
|
thema=self.thema,
|
||||||
|
titel="JSON Test Vorgabe",
|
||||||
|
gueltigkeit_von=date(2023, 1, 1),
|
||||||
|
gueltigkeit_bis=date(2025, 12, 31)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create text sections
|
||||||
|
self.abschnitttyp_text = AbschnittTyp.objects.create(abschnitttyp="text")
|
||||||
|
|
||||||
|
self.geltungsbereich = Geltungsbereich.objects.create(
|
||||||
|
geltungsbereich=self.dokument,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="Dies ist der Geltungsbereich",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.einleitung = Einleitung.objects.create(
|
||||||
|
einleitung=self.dokument,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="Dies ist die Einleitung",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.kurztext = VorgabeKurztext.objects.create(
|
||||||
|
abschnitt=self.vorgabe,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="JSON Kurztext",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.langtext = VorgabeLangtext.objects.create(
|
||||||
|
abschnitt=self.vorgabe,
|
||||||
|
abschnitttyp=self.abschnitttyp_text,
|
||||||
|
inhalt="JSON Langtext",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.checklistenfrage = Checklistenfrage.objects.create(
|
||||||
|
vorgabe=self.vorgabe,
|
||||||
|
frage="JSON Checklistenfrage?"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.changelog = Changelog.objects.create(
|
||||||
|
dokument=self.dokument,
|
||||||
|
datum=date(2023, 6, 1),
|
||||||
|
aenderung="JSON Changelog Eintrag"
|
||||||
|
)
|
||||||
|
self.changelog.autoren.add(self.autor)
|
||||||
|
|
||||||
|
def test_standard_json_view_success(self):
|
||||||
|
"""Test standard_json view returns correct JSON"""
|
||||||
|
url = reverse('standard_json', kwargs={'nummer': 'JSON-001'})
|
||||||
|
response = self.client.get(url)
|
||||||
|
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertEqual(response['Content-Type'], 'application/json')
|
||||||
|
|
||||||
|
# Parse JSON response
|
||||||
|
data = json.loads(response.content)
|
||||||
|
|
||||||
|
# Verify document structure
|
||||||
|
self.assertEqual(data['Nummer'], 'JSON-001')
|
||||||
|
self.assertEqual(data['Name'], 'JSON Test Standard')
|
||||||
|
self.assertEqual(data['Typ'], 'Standard IT-Sicherheit')
|
||||||
|
self.assertEqual(len(data['Autoren']), 1)
|
||||||
|
self.assertEqual(data['Autoren'][0], 'Test Autor')
|
||||||
|
self.assertEqual(len(data['Pruefende']), 1)
|
||||||
|
self.assertEqual(data['Pruefende'][0], 'Test Pruefender')
|
||||||
|
self.assertEqual(data['Gueltigkeit']['Von'], '2023-01-01')
|
||||||
|
self.assertEqual(data['Gueltigkeit']['Bis'], '2025-12-31')
|
||||||
|
self.assertEqual(data['SignaturCSO'], 'CSO-456')
|
||||||
|
self.assertEqual(data['Anhänge'], 'test.pdf')
|
||||||
|
self.assertEqual(data['Verantwortlich'], 'Information Security Management BIT')
|
||||||
|
self.assertIsNone(data['Klassifizierung'])
|
||||||
|
|
||||||
|
def test_standard_json_view_not_found(self):
|
||||||
|
"""Test standard_json view returns 404 for non-existent document"""
|
||||||
|
url = reverse('standard_json', kwargs={'nummer': 'NONEXISTENT'})
|
||||||
|
response = self.client.get(url)
|
||||||
|
|
||||||
|
self.assertEqual(response.status_code, 404)
|
||||||
|
|
||||||
|
def test_standard_json_view_empty_sections(self):
|
||||||
|
"""Test standard_json view handles empty sections correctly"""
|
||||||
|
# Create document without sections
|
||||||
|
empty_doc = Dokument.objects.create(
|
||||||
|
nummer="EMPTY-001",
|
||||||
|
dokumententyp=self.dokumententyp,
|
||||||
|
name="Empty Document",
|
||||||
|
aktiv=True
|
||||||
|
)
|
||||||
|
|
||||||
|
url = reverse('standard_json', kwargs={'nummer': 'EMPTY-001'})
|
||||||
|
response = self.client.get(url)
|
||||||
|
|
||||||
|
data = json.loads(response.content)
|
||||||
|
|
||||||
|
# Verify empty sections are handled correctly
|
||||||
|
self.assertEqual(data['Geltungsbereich'], {})
|
||||||
|
self.assertEqual(data['Einleitung'], {})
|
||||||
|
self.assertEqual(data['Vorgaben'], [])
|
||||||
|
self.assertEqual(data['Changelog'], [])
|
||||||
|
|
||||||
|
def test_standard_json_view_null_dates(self):
|
||||||
|
"""Test standard_json view handles null dates correctly"""
|
||||||
|
# Create document with null dates
|
||||||
|
null_doc = Dokument.objects.create(
|
||||||
|
nummer="NULL-001",
|
||||||
|
dokumententyp=self.dokumententyp,
|
||||||
|
name="Null Dates Document",
|
||||||
|
gueltigkeit_von=None,
|
||||||
|
gueltigkeit_bis=None,
|
||||||
|
aktiv=True
|
||||||
|
)
|
||||||
|
|
||||||
|
url = reverse('standard_json', kwargs={'nummer': 'NULL-001'})
|
||||||
|
response = self.client.get(url)
|
||||||
|
|
||||||
|
data = json.loads(response.content)
|
||||||
|
|
||||||
|
# Verify null dates are handled correctly
|
||||||
|
self.assertEqual(data['Gueltigkeit']['Von'], '')
|
||||||
|
self.assertIsNone(data['Gueltigkeit']['Bis'])
|
||||||
|
|
||||||
|
def test_standard_json_view_json_formatting(self):
|
||||||
|
"""Test standard_json view returns properly formatted JSON"""
|
||||||
|
url = reverse('standard_json', kwargs={'nummer': 'JSON-001'})
|
||||||
|
response = self.client.get(url)
|
||||||
|
|
||||||
|
# Check that response is valid JSON
|
||||||
|
try:
|
||||||
|
data = json.loads(response.content)
|
||||||
|
json_valid = True
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
json_valid = False
|
||||||
|
|
||||||
|
self.assertTrue(json_valid)
|
||||||
|
|
||||||
|
# Check that JSON is properly indented (should be formatted)
|
||||||
|
self.assertIn('\n', response.content.decode())
|
||||||
|
self.assertIn(' ', response.content.decode()) # Check for indentation
|
||||||
1865
dokumente/tests.py
@@ -4,10 +4,15 @@ from . import views
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.standard_list, name='standard_list'),
|
path('', views.standard_list, name='standard_list'),
|
||||||
path('unvollstaendig/', views.incomplete_vorgaben, name='incomplete_vorgaben'),
|
path('unvollstaendig/', views.incomplete_vorgaben, name='incomplete_vorgaben'),
|
||||||
|
path('meine-kommentare/', views.user_comments, name='user_comments'),
|
||||||
|
path('alle-kommentare/', views.all_comments, name='all_comments'),
|
||||||
path('<str:nummer>/', views.standard_detail, name='standard_detail'),
|
path('<str:nummer>/', views.standard_detail, name='standard_detail'),
|
||||||
path('<str:nummer>/history/<str:check_date>/', views.standard_detail),
|
path('<str:nummer>/history/<str:check_date>/', views.standard_detail),
|
||||||
path('<str:nummer>/history/', views.standard_detail, {"check_date":"today"}, name='standard_history'),
|
path('<str:nummer>/history/', views.standard_detail, {"check_date":"today"}, name='standard_history'),
|
||||||
path('<str:nummer>/checkliste/', views.standard_checkliste, name='standard_checkliste'),
|
path('<str:nummer>/checkliste/', views.standard_checkliste, name='standard_checkliste'),
|
||||||
path('<str:nummer>/json/', views.standard_json, name='standard_json')
|
path('<str:nummer>/json/', views.standard_json, name='standard_json'),
|
||||||
|
path('comments/<int:vorgabe_id>/', views.get_vorgabe_comments, name='get_vorgabe_comments'),
|
||||||
|
path('comments/<int:vorgabe_id>/add/', views.add_vorgabe_comment, name='add_vorgabe_comment'),
|
||||||
|
path('comments/delete/<int:comment_id>/', views.delete_vorgabe_comment, name='delete_vorgabe_comment'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ from django.shortcuts import render, get_object_or_404
|
|||||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.core.serializers.json import DjangoJSONEncoder
|
from django.core.serializers.json import DjangoJSONEncoder
|
||||||
|
from django.views.decorators.http import require_POST
|
||||||
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
|
from django.utils.html import escape, mark_safe
|
||||||
|
from django.utils.safestring import SafeString
|
||||||
import json
|
import json
|
||||||
from .models import Dokument, Vorgabe, VorgabeKurztext, VorgabeLangtext, Checklistenfrage
|
from .models import Dokument, Vorgabe, VorgabeKurztext, VorgabeLangtext, Checklistenfrage, VorgabeComment
|
||||||
from abschnitte.utils import render_textabschnitte
|
from abschnitte.utils import render_textabschnitte
|
||||||
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
@@ -25,9 +29,11 @@ def standard_detail(request, nummer,check_date=""):
|
|||||||
if check_date:
|
if check_date:
|
||||||
check_date = calendar.parseDT(check_date)[0].date()
|
check_date = calendar.parseDT(check_date)[0].date()
|
||||||
standard.history = True
|
standard.history = True
|
||||||
|
standard.is_future = check_date > date.today()
|
||||||
else:
|
else:
|
||||||
check_date = date.today()
|
check_date = date.today()
|
||||||
standard.history = False
|
standard.history = False
|
||||||
|
standard.is_future = False
|
||||||
standard.check_date=check_date
|
standard.check_date=check_date
|
||||||
vorgaben = list(standard.vorgaben.order_by("thema","nummer").select_related("thema","dokument")) # convert queryset to list so we can attach attributes
|
vorgaben = list(standard.vorgaben.order_by("thema","nummer").select_related("thema","dokument")) # convert queryset to list so we can attach attributes
|
||||||
|
|
||||||
@@ -44,6 +50,15 @@ def standard_detail(request, nummer,check_date=""):
|
|||||||
for r in vorgabe.referenzen.all():
|
for r in vorgabe.referenzen.all():
|
||||||
referenz_items.append(r.Path())
|
referenz_items.append(r.Path())
|
||||||
vorgabe.referenzpfade = referenz_items
|
vorgabe.referenzpfade = referenz_items
|
||||||
|
|
||||||
|
# Add comment count
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
if request.user.is_staff:
|
||||||
|
vorgabe.comment_count = vorgabe.comments.count()
|
||||||
|
else:
|
||||||
|
vorgabe.comment_count = vorgabe.comments.filter(user=request.user).count()
|
||||||
|
else:
|
||||||
|
vorgabe.comment_count = 0
|
||||||
|
|
||||||
return render(request, 'standards/standard_detail.html', {
|
return render(request, 'standards/standard_detail.html', {
|
||||||
'standard': standard,
|
'standard': standard,
|
||||||
@@ -237,3 +252,173 @@ def standard_json(request, nummer):
|
|||||||
|
|
||||||
# Return JSON response
|
# Return JSON response
|
||||||
return JsonResponse(doc_data, json_dumps_params={'indent': 2, 'ensure_ascii': False}, encoder=DjangoJSONEncoder)
|
return JsonResponse(doc_data, json_dumps_params={'indent': 2, 'ensure_ascii': False}, encoder=DjangoJSONEncoder)
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def get_vorgabe_comments(request, vorgabe_id):
|
||||||
|
"""Get comments for a specific Vorgabe"""
|
||||||
|
vorgabe = get_object_or_404(Vorgabe, id=vorgabe_id)
|
||||||
|
|
||||||
|
if request.user.is_staff:
|
||||||
|
# Staff can see all comments
|
||||||
|
comments = vorgabe.comments.all().select_related('user').order_by('created_at')
|
||||||
|
else:
|
||||||
|
# Regular users can only see their own comments
|
||||||
|
comments = vorgabe.comments.filter(user=request.user).select_related('user').order_by('created_at')
|
||||||
|
|
||||||
|
comments_data = []
|
||||||
|
for comment in comments:
|
||||||
|
# Escape HTML but preserve line breaks
|
||||||
|
escaped_text = escape(comment.text).replace('\n', '<br>')
|
||||||
|
comments_data.append({
|
||||||
|
'id': comment.id,
|
||||||
|
'text': escaped_text,
|
||||||
|
'user': escape(comment.user.first_name+" "+comment.user.last_name),
|
||||||
|
'created_at': comment.created_at.strftime('%d.%m.%Y %H:%M'),
|
||||||
|
'updated_at': comment.updated_at.strftime('%d.%m.%Y %H:%M'),
|
||||||
|
'is_own': comment.user == request.user
|
||||||
|
})
|
||||||
|
|
||||||
|
response = JsonResponse({'comments': comments_data})
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
@require_POST
|
||||||
|
@login_required
|
||||||
|
def add_vorgabe_comment(request, vorgabe_id):
|
||||||
|
"""Add a new comment to a Vorgabe"""
|
||||||
|
vorgabe = get_object_or_404(Vorgabe, id=vorgabe_id)
|
||||||
|
|
||||||
|
try:
|
||||||
|
data = json.loads(request.body)
|
||||||
|
text = data.get('text', '').strip()
|
||||||
|
|
||||||
|
# Validate input
|
||||||
|
if not text:
|
||||||
|
return JsonResponse({'error': 'Kommentar darf nicht leer sein'}, status=400)
|
||||||
|
|
||||||
|
if len(text) > 2000: # Reasonable length limit
|
||||||
|
return JsonResponse({'error': 'Kommentar ist zu lang (max 2000 Zeichen)'}, status=400)
|
||||||
|
|
||||||
|
# Additional XSS prevention - check for dangerous patterns
|
||||||
|
dangerous_patterns = ['<script', 'javascript:', 'onload=', 'onerror=', 'onclick=', 'onmouseover=']
|
||||||
|
text_lower = text.lower()
|
||||||
|
for pattern in dangerous_patterns:
|
||||||
|
if pattern in text_lower:
|
||||||
|
return JsonResponse({'error': 'Kommentar enthält ungültige Zeichen'}, status=400)
|
||||||
|
|
||||||
|
comment = VorgabeComment.objects.create(
|
||||||
|
vorgabe=vorgabe,
|
||||||
|
user=request.user,
|
||||||
|
text=text
|
||||||
|
)
|
||||||
|
|
||||||
|
# Escape HTML but preserve line breaks
|
||||||
|
escaped_text = escape(comment.text).replace('\n', '<br>')
|
||||||
|
response = JsonResponse({
|
||||||
|
'success': True,
|
||||||
|
'comment': {
|
||||||
|
'id': comment.id,
|
||||||
|
'text': escaped_text,
|
||||||
|
'user': escape(comment.user.username),
|
||||||
|
'created_at': comment.created_at.strftime('%d.%m.%Y %H:%M'),
|
||||||
|
'updated_at': comment.updated_at.strftime('%d.%m.%Y %H:%M'),
|
||||||
|
'is_own': True
|
||||||
|
}
|
||||||
|
})
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
response = JsonResponse({'error': 'Ungültige Daten'}, status=400)
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
except Exception as e:
|
||||||
|
response = JsonResponse({'error': 'Serverfehler'}, status=500)
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
@require_POST
|
||||||
|
@login_required
|
||||||
|
def delete_vorgabe_comment(request, comment_id):
|
||||||
|
"""Delete a comment (only own comments or staff can delete)"""
|
||||||
|
comment = get_object_or_404(VorgabeComment, id=comment_id)
|
||||||
|
|
||||||
|
# Check if user can delete this comment
|
||||||
|
if comment.user != request.user and not request.user.is_staff:
|
||||||
|
response = JsonResponse({'error': 'Keine Berechtigung zum Löschen dieses Kommentars'}, status=403)
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
|
||||||
|
try:
|
||||||
|
comment.delete()
|
||||||
|
response = JsonResponse({'success': True})
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
except Exception as e:
|
||||||
|
response = JsonResponse({'error': 'Serverfehler'}, status=500)
|
||||||
|
response['Content-Security-Policy'] = "default-src 'self'"
|
||||||
|
response['X-Content-Type-Options'] = 'nosniff'
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def user_comments(request):
|
||||||
|
"""
|
||||||
|
Display all comments made by the logged-in user, grouped by document.
|
||||||
|
"""
|
||||||
|
# Get all comments by the current user
|
||||||
|
user_comments = VorgabeComment.objects.filter(
|
||||||
|
user=request.user
|
||||||
|
).select_related('vorgabe', 'vorgabe__dokument').order_by(
|
||||||
|
'vorgabe__dokument__nummer', '-created_at'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Group comments by document
|
||||||
|
comments_by_document = {}
|
||||||
|
for comment in user_comments:
|
||||||
|
dokument = comment.vorgabe.dokument
|
||||||
|
if dokument not in comments_by_document:
|
||||||
|
comments_by_document[dokument] = []
|
||||||
|
comments_by_document[dokument].append(comment)
|
||||||
|
|
||||||
|
return render(request, 'standards/user_comments.html', {
|
||||||
|
'comments_by_document': comments_by_document,
|
||||||
|
'total_comments': user_comments.count(),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
@user_passes_test(is_staff_user)
|
||||||
|
def all_comments(request):
|
||||||
|
"""
|
||||||
|
Display all comments from all users, grouped by document.
|
||||||
|
Staff only.
|
||||||
|
"""
|
||||||
|
# Get all comments
|
||||||
|
all_comments_qs = VorgabeComment.objects.select_related(
|
||||||
|
'vorgabe', 'vorgabe__dokument', 'user'
|
||||||
|
).order_by(
|
||||||
|
'vorgabe__dokument__nummer', '-created_at'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Group comments by document
|
||||||
|
comments_by_document = {}
|
||||||
|
for comment in all_comments_qs:
|
||||||
|
dokument = comment.vorgabe.dokument
|
||||||
|
if dokument not in comments_by_document:
|
||||||
|
comments_by_document[dokument] = []
|
||||||
|
comments_by_document[dokument].append(comment)
|
||||||
|
|
||||||
|
return render(request, 'standards/all_comments.html', {
|
||||||
|
'comments_by_document': comments_by_document,
|
||||||
|
'total_comments': all_comments_qs.count(),
|
||||||
|
})
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ spec:
|
|||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: docker.io/adebaumann/vui:0.917
|
image: docker.io/adebaumann/vui:0.918
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: django
|
name: django
|
||||||
namespace: vorgabenui
|
namespace: vorgabenui
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
traefik.ingress.kubernetes.io/router.middlewares: "vorgabenui-vorgabenui-rewrite@kubernetescrd"
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: vorgabenui.adebaumann.com
|
- host: vorgabenui.adebaumann.com
|
||||||
|
|||||||
15
k8s/nfs-pv.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: django-data-pv
|
||||||
|
namespace: vorgabenui
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 2Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: nfs
|
||||||
|
nfs:
|
||||||
|
server: 192.168.17.199
|
||||||
|
path: /mnt/user/vorgabenui
|
||||||
8
k8s/nfs-storageclass.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: StorageClass
|
||||||
|
metadata:
|
||||||
|
name: nfs
|
||||||
|
provisioner: kubernetes.io/no-provisioner
|
||||||
|
allowVolumeExpansion: true
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
volumeBindingMode: Immediate
|
||||||
@@ -5,7 +5,8 @@ metadata:
|
|||||||
namespace: vorgabenui
|
namespace: vorgabenui
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
|
|||||||
9
k8s/traefik-middleware.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: vorgabenui-rewrite
|
||||||
|
namespace: vorgabenui
|
||||||
|
spec:
|
||||||
|
stripPrefix:
|
||||||
|
prefixes:
|
||||||
|
- "/"
|
||||||
5
openspec/changes/archive/2025-11-24-add-login/tasks.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
## 1. Add user login functionality
|
||||||
|
- [x] add a login screen for users
|
||||||
|
- [x] add an icon for logged in user on the top right corner of all page
|
||||||
|
- [x] add a menu to log out and change password on the user icon
|
||||||
|
- [x] all functions should go back to the main page, not the django admin page
|
||||||
63
openspec/project.md
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Project Context
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
This is a Django-based document management system for regulatory documents (Dokumente) and their provisions (Vorgaben). It manages validity periods, conflicts between overlapping provisions, references, keywords, and roles. The system supports importing documents, checking for compliance, and maintaining changelogs.
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
- Python 3.x
|
||||||
|
- Django 5.2.5
|
||||||
|
- SQLite (development), PostgreSQL (production)
|
||||||
|
- Django MPTT for tree structures
|
||||||
|
- Django Nested Admin for inline editing
|
||||||
|
- Kubernetes for deployment
|
||||||
|
- ArgoCD for continuous deployment
|
||||||
|
- Traefik for ingress
|
||||||
|
- Gunicorn for WSGI server
|
||||||
|
|
||||||
|
## Project Conventions
|
||||||
|
|
||||||
|
### Code Style
|
||||||
|
- Language: German for user-facing strings and model names, English for code comments and internal naming
|
||||||
|
- Imports: Standard library first, then Django, then third-party, then local apps
|
||||||
|
- Model naming: German nouns (Dokument, Vorgabe, Person)
|
||||||
|
- Field naming: German for field names, English Django conventions
|
||||||
|
- Class naming: PascalCase for models, snake_case for functions/variables
|
||||||
|
- All models have __str__ methods returning meaningful German strings
|
||||||
|
- Use verbose_name and verbose_name_plural in Meta classes (German)
|
||||||
|
|
||||||
|
### Architecture Patterns
|
||||||
|
- Django apps: abschnitte, dokumente, referenzen, rollen, stichworte, pages
|
||||||
|
- MPTT for hierarchical text sections
|
||||||
|
- Foreign keys with on_delete=models.PROTECT for important relationships
|
||||||
|
- Many-to-many with descriptive related_name
|
||||||
|
- Proxy models for different views (e.g., VorgabenTable)
|
||||||
|
- Management commands for data operations
|
||||||
|
|
||||||
|
### Testing Strategy
|
||||||
|
- Django test framework
|
||||||
|
- Test class names in English, methods in English
|
||||||
|
- Comprehensive model tests
|
||||||
|
- Test both success and error cases
|
||||||
|
- Run with `python manage.py test`
|
||||||
|
|
||||||
|
### Git Workflow
|
||||||
|
- Standard Git workflow
|
||||||
|
- Commits in English
|
||||||
|
- Use Gitea workflows for CI/CD
|
||||||
|
|
||||||
|
## Domain Context
|
||||||
|
The system manages regulatory documents with numbered provisions that have validity dates. Provisions can conflict if they have overlapping date ranges for the same document, theme, and number. The system includes sanity checks for conflicts, diagram caching for visualization, and JSON export functionality.
|
||||||
|
|
||||||
|
## Important Constraints
|
||||||
|
- German language for all user interfaces and data
|
||||||
|
- Strict validation of date ranges to prevent overlapping provisions
|
||||||
|
- Documents have types, authors, reviewers, and validity periods
|
||||||
|
- Provisions linked to themes, references, keywords, and relevant roles
|
||||||
|
- Active/inactive status for documents
|
||||||
|
|
||||||
|
## External Dependencies
|
||||||
|
- Django ecosystem: MPTT, nested-admin, revproxy
|
||||||
|
- Kubernetes cluster for deployment
|
||||||
|
- ArgoCD for GitOps
|
||||||
|
- Traefik for load balancing
|
||||||
|
- External diagram services (diagramm_proxy)
|
||||||
@@ -1,36 +1,236 @@
|
|||||||
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="de-CH" class="no-js no-ie" itemscope itemtype="http://schema.org/WebPage">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>{% block title %}{% endblock %}</title>
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
{% load static %}
|
|
||||||
|
<title>{% block title %}Vorgaben Informatiksicherheit{% endblock %} - Schweizerische Eidgenossenschaft</title>
|
||||||
|
|
||||||
|
<!-- Swiss Design System CSS -->
|
||||||
|
<link rel="stylesheet" href="{% static 'swiss/css/vendors.css' %}">
|
||||||
|
<link rel="stylesheet" href="{% static 'swiss/css/admin.css' %}">
|
||||||
|
<link rel="stylesheet" href="{% static 'swiss/css/print.css' %}" media="print">
|
||||||
|
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link rel="stylesheet" href="{% static 'custom/css/admin_extras.css' %}">
|
||||||
|
|
||||||
|
<!-- Favicons -->
|
||||||
|
<link rel="shortcut icon" href="{% static 'swiss/img/ico/favicon.ico' %}">
|
||||||
|
<link rel="apple-touch-icon" sizes="57x57" href="{% static 'swiss/img/ico/apple-touch-icon-57x57.png' %}">
|
||||||
|
<link rel="apple-touch-icon" sizes="114x114" href="{% static 'swiss/img/ico/apple-touch-icon-114x114.png' %}">
|
||||||
|
<link rel="icon" type="image/png" href="{% static 'swiss/img/ico/favicon-96x96.png' %}" sizes="96x96">
|
||||||
|
<link rel="icon" type="image/png" href="{% static 'swiss/img/ico/favicon-32x32.png' %}" sizes="32x32">
|
||||||
|
<meta name="msapplication-TileColor" content="#ffffff">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
<!-- Accessibility skip links -->
|
||||||
<a class="navbar-brand" href="#">Vorgaben</a>
|
<ul class="access-keys">
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
|
<li><a href="/" accesskey="0">Startseite</a></li>
|
||||||
<span class="navbar-toggler-icon"></span>
|
<li><a href="#main-navigation" accesskey="1">Hauptnavigation</a></li>
|
||||||
</button>
|
<li><a href="#content" accesskey="2">Inhalt</a></li>
|
||||||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
</ul>
|
||||||
<div class="navbar-nav">
|
|
||||||
<a class="nav-item nav-link active" href="/dokumente">Standards</a>
|
<!-- Header with Swiss Logo -->
|
||||||
|
<header>
|
||||||
|
<a href="/" class="brand hidden-xs" title="Zur Startseite">
|
||||||
|
<img src="{% static 'swiss/img/logo-CH.svg' %}"
|
||||||
|
onerror="this.onerror=null; this.src='{% static 'swiss/img/logo-CH.png' %}'"
|
||||||
|
alt="Zur Startseite" />
|
||||||
|
<h1>Vorgaben Informatiksicherheit BIT</h1>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- User Menu -->
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<div class="user-menu" style="position: absolute; top: 20px; right: 20px; z-index: 1000;">
|
||||||
|
<div class="dropdown">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="text-decoration: none; color: #000; display: flex; align-items: center;">
|
||||||
|
<span style="font-size: 24px; margin-right: 8px;">👤</span>
|
||||||
|
<span class="hidden-xs" style="margin-left: 0;">{{ user.first_name }} {{ user.last_name }}</span>
|
||||||
|
<span class="caret" style="margin-left: 8px;"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||||
|
<li><a href="{% url 'user_comments' %}">Meine Kommentare</a></li>
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<li><a href="{% url 'all_comments' %}">Alle Kommentare</a></li>
|
||||||
|
{% endif %}
|
||||||
|
<li><a href="{% url 'password_change' %}">Passwort ändern</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li>
|
||||||
|
<form method="post" action="{% url 'logout' %}" style="display: inline;">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" style="background: none; border: none; color: inherit; padding: 3px 20px; width: 100%; text-align: left; cursor: pointer;">
|
||||||
|
Abmelden
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="user-menu" style="position: absolute; top: 20px; right: 20px; z-index: 1000;">
|
||||||
|
<a href="{% url 'login' %}" class="btn btn-sm btn-primary" style="text-decoration: none;">
|
||||||
|
Anmelden
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Main Navigation -->
|
||||||
|
<nav class="nav-main yamm navbar" id="main-navigation">
|
||||||
|
<h2 class="sr-only">Navigation</h2>
|
||||||
|
|
||||||
|
<!-- Mobile Navigation -->
|
||||||
|
<section class="nav-mobile">
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="nav-mobile-header">
|
||||||
|
<div class="table-row">
|
||||||
|
<span class="nav-mobile-logo">
|
||||||
|
<img src="{% static 'swiss/img/swiss.svg' %}"
|
||||||
|
onerror="this.onerror=null; this.src='{% static 'swiss/img/swiss.png' %}'"
|
||||||
|
alt="Schweizerische Eidgenossenschaft" />
|
||||||
|
</span>
|
||||||
|
<h1><a href="/">Vorgaben Informatiksicherheit</a></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-cell dropdown">
|
||||||
|
<a href="#" class="nav-mobile-menu dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<span class="icon icon--menu"></span>
|
||||||
|
</a>
|
||||||
|
<div class="drilldown dropdown-menu" role="menu">
|
||||||
|
<div class="drilldown-container">
|
||||||
|
<nav class="nav-page-list">
|
||||||
|
<ul>
|
||||||
|
<li><a href="/dokumente">Standards</a></li>
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<li><a href="/dokumente/unvollstaendig/">Unvollständig</a></li>
|
||||||
|
<li><a href="/autorenumgebung/">Autor</a></li>
|
||||||
|
{% endif %}
|
||||||
|
<li><a href="/referenzen">Referenzen</a></li>
|
||||||
|
<li><a href="/stichworte">Stichworte</a></li>
|
||||||
|
<li><a href="/search">Suche</a></li>
|
||||||
|
</ul>
|
||||||
|
<a href="#" class="yamm-close-bottom">
|
||||||
|
<span class="icon icon--top" aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-cell dropdown">
|
||||||
|
<a href="/search" class="nav-mobile-menu">
|
||||||
|
<span class="icon icon--search"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Desktop Tab Navigation -->
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="dropdown {% if request.resolver_match.url_name == 'standard_list' or 'standard' in request.resolver_match.url_name %}current{% endif %}">
|
||||||
|
<a href="/dokumente">Standards</a>
|
||||||
|
</li>
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
<a class="nav-item nav-link" href="/dokumente/unvollstaendig/">Unvollständig</a>
|
<li class="dropdown {% if 'unvollstaendig' in request.path %}current{% endif %}">
|
||||||
|
<a href="/dokumente/unvollstaendig/">Unvollständig</a>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown {% if 'autorenumgebung' in request.path %}current{% endif %}">
|
||||||
|
<a href="/autorenumgebung/">Autor</a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="nav-item nav-link" href="/referenzen">Referenzen</a>
|
<li class="dropdown {% if 'referenzen' in request.path %}current{% endif %}">
|
||||||
<a class="nav-item nav-link" href="/stichworte">Stichworte</a>
|
<a href="/referenzen">Referenzen</a>
|
||||||
<a class="nav-item nav-link" href="/search">Suche</a>
|
</li>
|
||||||
|
<li class="dropdown {% if 'stichworte' in request.path %}current{% endif %}">
|
||||||
|
<a href="/stichworte">Stichworte</a>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown {% if 'search' in request.path %}current{% endif %}">
|
||||||
|
<a href="/search">Suche</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<div class="container container-main" id="content" style="padding: 2rem 3rem;">
|
||||||
|
{% if messages %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
||||||
|
{{ message }}
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Schliessen">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
{% block sidebar_left %}
|
||||||
|
{% if block.super or sidebar_left_content %}
|
||||||
|
<div class="col-md-3">
|
||||||
|
<nav class="nav-page-list" aria-label="Seitennavigation">
|
||||||
|
{{ block.super }}
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<div class="{% if sidebar_left_content or block.super %}col-md-{% if sidebar_right_content %}6{% else %}9{% endif %}{% else %}col-md-{% if sidebar_right_content %}9{% else %}12{% endif %}{% endif %}">
|
||||||
|
{% block content %}
|
||||||
|
<h2>Inhalt</h2>
|
||||||
|
<p>Hauptinhalt der Seite</p>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% block sidebar_right %}
|
||||||
|
{% if block.super or sidebar_right_content %}
|
||||||
|
<div class="col-md-3">
|
||||||
|
<aside>
|
||||||
|
{{ block.super }}
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
|
||||||
<div class="d-flex">
|
<!-- Footer -->
|
||||||
<div class="col-md-2">{% block sidebar_left %}{% endblock %}</div>
|
<footer>
|
||||||
<div class="flex-fill">{% block content %}Main Content{% endblock %}</div>
|
<div class="container-fluid footer-service">
|
||||||
<div class="col-md-2">{% block sidebar_right %}{% endblock %}</div>
|
<div class="row">
|
||||||
</div>
|
<div class="col-sm-12">
|
||||||
<div>VorgabenUI v0.942</div>
|
<h2 class="sr-only">Fussbereich</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid footer-address">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h3>Vorgaben Informatiksicherheit</h3>
|
||||||
|
<p>
|
||||||
|
Bundesamt für Informatik und Telekommunikation BIT<br>
|
||||||
|
<a href="https://www.bit.admin.ch" target="_blank" rel="noopener">www.bit.admin.ch</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 text-right">
|
||||||
|
<p class="text-muted">Version {{ version|default:"0.973" }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Swiss Design System Scripts -->
|
||||||
|
<script src="{% static 'swiss/js/vendors.min.js' %}"></script>
|
||||||
|
<script src="{% static 'swiss/js/main.min.js' %}"></script>
|
||||||
|
|
||||||
|
<!-- Custom Scripts -->
|
||||||
|
{% block extra_js %}{% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
43
pages/templates/registration/login.html
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %}Anmelden{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-md-offset-4">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">Anmelden</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{% if form.errors %}
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<p>Ihr Benutzername und Passwort stimmen nicht überein. Bitte versuchen Sie es erneut.</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="id_username">Benutzername:</label>
|
||||||
|
<input type="text" name="username" class="form-control" id="id_username" required autofocus>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="id_password">Passwort:</label>
|
||||||
|
<input type="password" name="password" class="form-control" id="id_password" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary">Anmelden</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="next" value="{{ next }}">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
56
pages/templates/registration/password_change.html
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %}Passwort ändern{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-md-offset-3">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">Passwort ändern</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{% if form.errors %}
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<p>Bitte korrigieren Sie die Fehler unten.</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="id_old_password">Aktuelles Passwort:</label>
|
||||||
|
<input type="password" name="old_password" class="form-control" id="id_old_password" required>
|
||||||
|
{% if form.old_password.errors %}
|
||||||
|
<div class="text-danger">{{ form.old_password.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="id_new_password1">Neues Passwort:</label>
|
||||||
|
<input type="password" name="new_password1" class="form-control" id="id_new_password1" required>
|
||||||
|
{% if form.new_password1.errors %}
|
||||||
|
<div class="text-danger">{{ form.new_password1.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="id_new_password2">Neues Passwort bestätigen:</label>
|
||||||
|
<input type="password" name="new_password2" class="form-control" id="id_new_password2" required>
|
||||||
|
{% if form.new_password2.errors %}
|
||||||
|
<div class="text-danger">{{ form.new_password2.errors }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary">Passwort ändern</button>
|
||||||
|
<a href="/" class="btn btn-default">Abbrechen</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
24
pages/templates/registration/password_change_done.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %}Passwort geändert{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-md-offset-3">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">Passwort erfolgreich geändert</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<p>Ihr Passwort wurde erfolgreich geändert.</p>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<a href="/" class="btn btn-primary">Zurück zur Startseite</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -1,30 +1,80 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load page_extras %}
|
{% load page_extras %}
|
||||||
|
|
||||||
|
{% block title %}Suchergebnisse für "{{ suchbegriff }}" - Vorgaben Informatiksicherheit{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="mb-4">Suchresultate für {{ suchbegriff }}</h1>
|
<div class="container-fluid">
|
||||||
{% if resultat.geltungsbereich %}
|
<h1>Suchergebnisse für "{{ suchbegriff }}"</h1>
|
||||||
<h2>Standards mit "{{suchbegriff}}" im Geltungsbereich</h2>
|
|
||||||
{% for standard,geltungsbereich in resultat.geltungsbereich.items %}
|
|
||||||
<h4>{{ standard }}</h4>
|
|
||||||
{% for typ, html in geltungsbereich %}
|
|
||||||
<div>{{ html|highlighttext:suchbegriff|safe }}</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if resultat.all %}
|
<div class="row">
|
||||||
<h2>Vorgaben mit "{{ suchbegriff }}"</h2>
|
<div class="col-md-12">
|
||||||
{% for standard, vorgaben in resultat.all.items %}
|
<p class="text-muted">
|
||||||
<h4>{{ standard }}</h4>
|
<a href="/search" class="icon icon--before icon--less">Neue Suche starten</a>
|
||||||
<ul>
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if resultat.geltungsbereich %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2>Standards mit "{{ suchbegriff }}" im Geltungsbereich</h2>
|
||||||
|
|
||||||
|
{% for standard, geltungsbereich in resultat.geltungsbereich.items %}
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="h4 mb-0">{{ standard }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% for typ, html in geltungsbereich %}
|
||||||
|
<div class="mb-2">{{ html|highlighttext:suchbegriff|safe }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if resultat.all %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2>Vorgaben mit "{{ suchbegriff }}"</h2>
|
||||||
|
|
||||||
|
{% for standard, vorgaben in resultat.all.items %}
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="h4 mb-0">{{ standard }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="list-unstyled">
|
||||||
{% for vorgabe in vorgaben %}
|
{% for vorgabe in vorgaben %}
|
||||||
<li><a href="{% url 'standard_detail' nummer=vorgabe.dokument.nummer %}#{{vorgabe.Vorgabennummer}}">{{vorgabe}}</a></li>
|
<li class="mb-2">
|
||||||
{% endfor %}
|
<a href="{% url 'standard_detail' nummer=vorgabe.dokument.nummer %}#{{ vorgabe.Vorgabennummer }}"
|
||||||
</ul>
|
class="icon icon--before icon--external">
|
||||||
{% endfor %}
|
{{ vorgabe }}
|
||||||
{% endif %}
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if not resultat.all %}
|
{% if not resultat.all and not resultat.geltungsbereich %}
|
||||||
<h2>Keine Resultate für "{{suchbegriff}}"</h2>
|
<div class="row">
|
||||||
{% endif %}
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
<span class="icon icon--warning" aria-hidden="true"></span>
|
||||||
|
<strong>Keine Ergebnisse gefunden</strong>
|
||||||
|
<p>Für den Suchbegriff "{{ suchbegriff }}" wurden keine Resultate gefunden.</p>
|
||||||
|
<p>Versuchen Sie es mit einem anderen Suchbegriff oder verwenden Sie weniger spezifische Begriffe.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,28 +1,60 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Suche - Vorgaben Informatiksicherheit{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="mb-4">Suche</h1>
|
<div class="container-fluid">
|
||||||
|
<h1>Suche in den Vorgaben</h1>
|
||||||
|
|
||||||
{% if error_message %}
|
{% if error_message %}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger" role="alert">
|
||||||
<strong>Fehler:</strong> {{ error_message }}
|
<span class="icon icon--error" aria-hidden="true"></span>
|
||||||
|
<strong>Fehler:</strong> {{ error_message }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<!-- Search form -->
|
||||||
|
<form action="." method="post" class="form-horizontal">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="query" class="control-label">Suchbegriff</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="query"
|
||||||
|
name="q"
|
||||||
|
placeholder="Suchbegriff eingeben …"
|
||||||
|
value="{{ search_term|default:'' }}"
|
||||||
|
required
|
||||||
|
maxlength="200"
|
||||||
|
aria-describedby="search-help">
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<span class="icon icon--search" aria-hidden="true"></span>
|
||||||
|
Suchen
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<small id="search-help" class="form-text text-muted">
|
||||||
|
Durchsuchen Sie Standards, Vorgaben und Referenzen nach Stichworten.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- Search form -->
|
<div class="col-md-4">
|
||||||
<form action="." method="post">
|
<div class="alert alert-info" role="alert">
|
||||||
{% csrf_token %}
|
<h3 class="h4">Suchtipps</h3>
|
||||||
<!-- Search field -->
|
<ul>
|
||||||
<div class="mb-3">
|
<li>Verwenden Sie spezifische Begriffe für bessere Ergebnisse</li>
|
||||||
<label for="query" class="form-label">Suchbegriff</label>
|
<li>Die Suche erfasst Titel, Beschreibungen und Inhalte</li>
|
||||||
<input type="text"
|
<li>Groß-/Kleinschreibung wird nicht berücksichtigt</li>
|
||||||
class="form-control"
|
</ul>
|
||||||
id="query"
|
|
||||||
name="q"
|
|
||||||
placeholder="Suchbegriff eingeben …"
|
|
||||||
value="{{ search_term|default:'' }}"
|
|
||||||
required
|
|
||||||
maxlength="200">
|
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Suchen</button>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
{% endblock %}
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,10 +1,77 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Startseite - Vorgaben Informatiksicherheit{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Vorgaben Informatiksicherheit BIT</h1>
|
<div class="container-fluid">
|
||||||
<h2>Aktuell erfasste Standards</h2>
|
<h1>Vorgaben Informatiksicherheit BIT</h1>
|
||||||
<ul>
|
|
||||||
{% for standard in dokumente %}
|
<div class="row">
|
||||||
<li><a href="{% url 'standard_detail' nummer=standard.nummer %}">{{ standard }}</a></li>
|
<div class="col-md-12">
|
||||||
{% endfor %}
|
<p class="lead">
|
||||||
</ul>
|
Willkommen bei den Vorgaben zur Informatiksicherheit des Bundesamts für Informatik und Telekommunikation (BIT).
|
||||||
|
Diese Plattform bietet Ihnen Zugang zu allen aktuellen IT-Sicherheitsstandards der Bundesverwaltung.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2>Aktuell erfasste Standards</h2>
|
||||||
|
|
||||||
|
<div class="list-group">
|
||||||
|
{% for standard in dokumente %}
|
||||||
|
<a href="{% url 'standard_detail' nummer=standard.nummer %}"
|
||||||
|
class="list-group-item list-group-item-action">
|
||||||
|
<div class="d-flex w-100 justify-content-between">
|
||||||
|
<h3 class="h5 mb-1">{{ standard.nummer }} - {{ standard.name }}</h3>
|
||||||
|
{% if standard.status %}
|
||||||
|
<small class="text-muted">{{ standard.status }}</small>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% if standard.kurzbeschreibung %}
|
||||||
|
<p class="mb-1">{{ standard.kurzbeschreibung|truncatewords:30 }}</p>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{% empty %}
|
||||||
|
<div class="alert alert-info" role="alert">
|
||||||
|
<p class="icon icon--info">Aktuell sind keine Standards erfasst.</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mt-4">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="card-title h4">Standards durchsuchen</h3>
|
||||||
|
<p class="card-text">Durchsuchen Sie alle Vorgaben nach Stichworten und Inhalten.</p>
|
||||||
|
<a href="/search" class="btn btn-primary">Zur Suche</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="card-title h4">Referenzen</h3>
|
||||||
|
<p class="card-text">Übersicht über externe Referenzen und Normen.</p>
|
||||||
|
<a href="/referenzen" class="btn btn-secondary">Referenzen anzeigen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="card-title h4">Stichworte</h3>
|
||||||
|
<p class="card-text">Alphabetische Übersicht aller Schlagworte und Kategorien.</p>
|
||||||
|
<a href="/stichworte" class="btn btn-secondary">Stichworte durchsuchen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
266
pages/test_auth.py
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
from django.test import TestCase, Client
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.urls import reverse
|
||||||
|
from django.core.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
|
class AuthenticationTest(TestCase):
|
||||||
|
"""Test login, logout, and password change functionality"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
self.client = Client()
|
||||||
|
self.test_user = User.objects.create_user(
|
||||||
|
username='testuser',
|
||||||
|
password='testpass123',
|
||||||
|
email='test@example.com'
|
||||||
|
)
|
||||||
|
self.staff_user = User.objects.create_user(
|
||||||
|
username='staffuser',
|
||||||
|
password='staffpass123',
|
||||||
|
email='staff@example.com'
|
||||||
|
)
|
||||||
|
self.staff_user.is_staff = True
|
||||||
|
self.staff_user.save()
|
||||||
|
|
||||||
|
def test_login_page_loads(self):
|
||||||
|
"""Test that login page loads correctly"""
|
||||||
|
response = self.client.get(reverse('login'))
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'Anmelden')
|
||||||
|
self.assertContains(response, 'Benutzername:')
|
||||||
|
self.assertContains(response, 'Passwort:')
|
||||||
|
|
||||||
|
def test_login_valid_credentials(self):
|
||||||
|
"""Test successful login with valid credentials"""
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': 'testuser',
|
||||||
|
'password': 'testpass123'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 302) # Redirect after login
|
||||||
|
self.assertRedirects(response, '/') # Should redirect to main page
|
||||||
|
|
||||||
|
# Check user is logged in
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertContains(response, 'testuser') # Username should appear in header
|
||||||
|
|
||||||
|
def test_login_invalid_credentials(self):
|
||||||
|
"""Test login with invalid credentials shows error"""
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': 'testuser',
|
||||||
|
'password': 'wrongpassword'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 200) # Stay on login page
|
||||||
|
self.assertContains(response, 'Ihr Benutzername und Passwort stimmen nicht überein')
|
||||||
|
|
||||||
|
def test_login_empty_credentials(self):
|
||||||
|
"""Test login with empty credentials"""
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': '',
|
||||||
|
'password': ''
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 200) # Stay on login page
|
||||||
|
# Django's form validation should handle this
|
||||||
|
|
||||||
|
def test_logout_functionality(self):
|
||||||
|
"""Test logout functionality"""
|
||||||
|
# First login
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
# Verify user is logged in
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertContains(response, 'testuser')
|
||||||
|
|
||||||
|
# Logout using POST
|
||||||
|
response = self.client.post(reverse('logout'))
|
||||||
|
self.assertEqual(response.status_code, 302) # Redirect after logout
|
||||||
|
self.assertRedirects(response, '/') # Should redirect to main page
|
||||||
|
|
||||||
|
# Verify user is logged out
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertNotContains(response, 'testuser')
|
||||||
|
self.assertContains(response, 'Anmelden') # Should show login link
|
||||||
|
|
||||||
|
def test_logout_requires_post(self):
|
||||||
|
"""Test that logout requires POST method"""
|
||||||
|
# Login first
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
# Try GET logout (should fail with 405)
|
||||||
|
response = self.client.get(reverse('logout'))
|
||||||
|
self.assertEqual(response.status_code, 405) # Method Not Allowed
|
||||||
|
|
||||||
|
# User should still be logged in
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertContains(response, 'testuser')
|
||||||
|
|
||||||
|
def test_password_change_page_loads(self):
|
||||||
|
"""Test that password change page loads for authenticated users"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.get(reverse('password_change'))
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'Passwort ändern')
|
||||||
|
self.assertContains(response, 'Aktuelles Passwort:')
|
||||||
|
self.assertContains(response, 'Neues Passwort:')
|
||||||
|
self.assertContains(response, 'Neues Passwort bestätigen:')
|
||||||
|
|
||||||
|
def test_password_change_requires_authentication(self):
|
||||||
|
"""Test that password change page requires authentication"""
|
||||||
|
response = self.client.get(reverse('password_change'))
|
||||||
|
self.assertEqual(response.status_code, 302) # Redirect to login
|
||||||
|
|
||||||
|
# Should redirect to login page
|
||||||
|
self.assertIn(reverse('login'), response.url)
|
||||||
|
|
||||||
|
def test_password_change_valid(self):
|
||||||
|
"""Test successful password change"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('password_change'), {
|
||||||
|
'old_password': 'testpass123',
|
||||||
|
'new_password1': 'newpass456',
|
||||||
|
'new_password2': 'newpass456'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 302) # Redirect after success
|
||||||
|
self.assertRedirects(response, '/') # Should redirect to main page
|
||||||
|
|
||||||
|
# Verify new password works
|
||||||
|
self.client.logout()
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': 'testuser',
|
||||||
|
'password': 'newpass456'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 302) # Successful login
|
||||||
|
|
||||||
|
def test_password_change_wrong_old_password(self):
|
||||||
|
"""Test password change with wrong old password"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('password_change'), {
|
||||||
|
'old_password': 'wrongpassword',
|
||||||
|
'new_password1': 'newpass456',
|
||||||
|
'new_password2': 'newpass456'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 200) # Stay on form page
|
||||||
|
self.assertContains(response, 'Bitte korrigieren Sie die Fehler unten')
|
||||||
|
|
||||||
|
def test_password_change_mismatched_new_passwords(self):
|
||||||
|
"""Test password change with mismatched new passwords"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('password_change'), {
|
||||||
|
'old_password': 'testpass123',
|
||||||
|
'new_password1': 'newpass456',
|
||||||
|
'new_password2': 'differentpass789'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 200) # Stay on form page
|
||||||
|
self.assertContains(response, 'Bitte korrigieren Sie die Fehler unten')
|
||||||
|
|
||||||
|
def test_password_change_same_as_old_password(self):
|
||||||
|
"""Test password change with same password as old"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('password_change'), {
|
||||||
|
'old_password': 'testpass123',
|
||||||
|
'new_password1': 'testpass123',
|
||||||
|
'new_password2': 'testpass123'
|
||||||
|
})
|
||||||
|
# Django's default validators don't prevent same password, so it should succeed
|
||||||
|
self.assertEqual(response.status_code, 302) # Redirect after success
|
||||||
|
self.assertRedirects(response, '/') # Should redirect to main page
|
||||||
|
|
||||||
|
def test_password_change_cancel_button(self):
|
||||||
|
"""Test password change cancel button"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.get(reverse('password_change'))
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'Abbrechen')
|
||||||
|
# The cancel button should link to main page
|
||||||
|
self.assertContains(response, 'href="/"')
|
||||||
|
|
||||||
|
def test_user_menu_display_for_authenticated_user(self):
|
||||||
|
"""Test that user menu displays correctly for authenticated users"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'testuser') # Username in menu
|
||||||
|
self.assertContains(response, 'Passwort ändern') # Password change link
|
||||||
|
self.assertContains(response, 'Abmelden') # Logout link
|
||||||
|
self.assertNotContains(response, 'Anmelden') # Should not show login link
|
||||||
|
|
||||||
|
def test_login_link_display_for_anonymous_user(self):
|
||||||
|
"""Test that login link displays for anonymous users"""
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'Anmelden') # Should show login link
|
||||||
|
self.assertNotContains(response, 'testuser') # Should not show username
|
||||||
|
self.assertNotContains(response, 'Passwort ändern') # Should not show password change
|
||||||
|
self.assertNotContains(response, 'Abmelden') # Should not show logout
|
||||||
|
|
||||||
|
def test_staff_user_menu(self):
|
||||||
|
"""Test that staff users see appropriate menu"""
|
||||||
|
self.client.login(username='staffuser', password='staffpass123')
|
||||||
|
|
||||||
|
response = self.client.get('/')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'staffuser') # Username in menu
|
||||||
|
self.assertContains(response, 'Passwort ändern') # Password change link
|
||||||
|
self.assertContains(response, 'Abmelden') # Logout link
|
||||||
|
|
||||||
|
def test_login_redirect_to_main_page(self):
|
||||||
|
"""Test that successful login redirects to main page"""
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': 'testuser',
|
||||||
|
'password': 'testpass123'
|
||||||
|
}, follow=True)
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
# Should end up on main page
|
||||||
|
self.assertContains(response, 'Vorgaben Informatiksicherheit')
|
||||||
|
|
||||||
|
def test_logout_redirect_to_main_page(self):
|
||||||
|
"""Test that logout redirects to main page"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('logout'), follow=True)
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
# Should end up on main page
|
||||||
|
self.assertContains(response, 'Vorgaben Informatiksicherheit')
|
||||||
|
# Should show login link for anonymous users
|
||||||
|
self.assertContains(response, 'Anmelden')
|
||||||
|
|
||||||
|
def test_password_change_redirect_to_main_page(self):
|
||||||
|
"""Test that successful password change redirects to main page"""
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
|
||||||
|
response = self.client.post(reverse('password_change'), {
|
||||||
|
'old_password': 'testpass123',
|
||||||
|
'new_password1': 'newpass456',
|
||||||
|
'new_password2': 'newpass456'
|
||||||
|
}, follow=True)
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
# Should end up on main page
|
||||||
|
self.assertContains(response, 'Vorgaben Informatiksicherheit')
|
||||||
|
|
||||||
|
def test_csrf_token_present_in_forms(self):
|
||||||
|
"""Test that CSRF tokens are present in authentication forms"""
|
||||||
|
# Login form
|
||||||
|
response = self.client.get(reverse('login'))
|
||||||
|
self.assertContains(response, 'csrfmiddlewaretoken')
|
||||||
|
|
||||||
|
# Password change form
|
||||||
|
self.client.login(username='testuser', password='testpass123')
|
||||||
|
response = self.client.get(reverse('password_change'))
|
||||||
|
self.assertContains(response, 'csrfmiddlewaretoken')
|
||||||
|
|
||||||
|
def test_login_with_next_parameter(self):
|
||||||
|
"""Test login with next parameter for redirect"""
|
||||||
|
response = self.client.post(reverse('login'), {
|
||||||
|
'username': 'testuser',
|
||||||
|
'password': 'testpass123',
|
||||||
|
'next': '/dokumente/'
|
||||||
|
})
|
||||||
|
self.assertEqual(response.status_code, 302)
|
||||||
|
# Should redirect to the specified next page
|
||||||
|
self.assertRedirects(response, '/dokumente/')
|
||||||
@@ -4,7 +4,6 @@ from django.utils import timezone
|
|||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from dokumente.models import Dokument, Vorgabe, VorgabeKurztext, VorgabeLangtext, Geltungsbereich, Dokumententyp, Thema
|
from dokumente.models import Dokument, Vorgabe, VorgabeKurztext, VorgabeLangtext, Geltungsbereich, Dokumententyp, Thema
|
||||||
from stichworte.models import Stichwort
|
from stichworte.models import Stichwort
|
||||||
from unittest.mock import patch
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@@ -67,24 +66,24 @@ class SearchViewTest(TestCase):
|
|||||||
"""Test POST request with valid search term"""
|
"""Test POST request with valid search term"""
|
||||||
response = self.client.post('/search/', {'q': 'Test'})
|
response = self.client.post('/search/', {'q': 'Test'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, 'Suchresultate für Test')
|
self.assertContains(response, 'Suchergebnisse')
|
||||||
|
|
||||||
def test_search_case_insensitive(self):
|
def test_search_case_insensitive(self):
|
||||||
"""Test that search is case insensitive"""
|
"""Test that search is case insensitive"""
|
||||||
# Search for lowercase
|
# Search for lowercase
|
||||||
response = self.client.post('/search/', {'q': 'test'})
|
response = self.client.post('/search/', {'q': 'test'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, 'Suchresultate für test')
|
self.assertContains(response, 'Suchergebnisse für "test"')
|
||||||
|
|
||||||
# Search for uppercase
|
# Search for uppercase
|
||||||
response = self.client.post('/search/', {'q': 'TEST'})
|
response = self.client.post('/search/', {'q': 'TEST'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, 'Suchresultate für TEST')
|
self.assertContains(response, 'Suchergebnisse für "TEST"')
|
||||||
|
|
||||||
# Search for mixed case
|
# Search for mixed case
|
||||||
response = self.client.post('/search/', {'q': 'TeSt'})
|
response = self.client.post('/search/', {'q': 'TeSt'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, 'Suchresultate für TeSt')
|
self.assertContains(response, 'Suchergebnisse für "TeSt"')
|
||||||
|
|
||||||
def test_search_in_kurztext(self):
|
def test_search_in_kurztext(self):
|
||||||
"""Test search in Kurztext content"""
|
"""Test search in Kurztext content"""
|
||||||
@@ -114,7 +113,7 @@ class SearchViewTest(TestCase):
|
|||||||
"""Test search with no results"""
|
"""Test search with no results"""
|
||||||
response = self.client.post('/search/', {'q': 'NichtVorhanden'})
|
response = self.client.post('/search/', {'q': 'NichtVorhanden'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertContains(response, 'Keine Resultate für "NichtVorhanden"')
|
self.assertContains(response, 'Keine Ergebnisse gefunden')
|
||||||
|
|
||||||
def test_search_expired_vorgabe_not_included(self):
|
def test_search_expired_vorgabe_not_included(self):
|
||||||
"""Test that expired Vorgaben are not included in results"""
|
"""Test that expired Vorgaben are not included in results"""
|
||||||
@@ -160,8 +159,8 @@ class SearchViewTest(TestCase):
|
|||||||
"""Test that HTML tags are stripped from search input"""
|
"""Test that HTML tags are stripped from search input"""
|
||||||
response = self.client.post('/search/', {'q': '<script>alert("xss")</script>Test'})
|
response = self.client.post('/search/', {'q': '<script>alert("xss")</script>Test'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# Should search for "alert('xss')Test" after HTML tag removal
|
# Should search for "alert("xss")Test" after HTML tag removal
|
||||||
self.assertContains(response, 'Suchresultate für alert("xss")Test')
|
self.assertContains(response, 'Suchergebnisse für "alert')
|
||||||
|
|
||||||
def test_search_invalid_characters_validation(self):
|
def test_search_invalid_characters_validation(self):
|
||||||
"""Test validation for invalid characters"""
|
"""Test validation for invalid characters"""
|
||||||
@@ -206,7 +205,7 @@ class SearchViewTest(TestCase):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# The input should be preserved (escaped) in the form
|
# The input should be preserved (escaped) in the form
|
||||||
# Since HTML tags are stripped, we expect "Test" to be searched
|
# Since HTML tags are stripped, we expect "Test" to be searched
|
||||||
self.assertContains(response, 'Suchresultate für Test')
|
self.assertContains(response, 'Suchergebnisse für "Test"')
|
||||||
|
|
||||||
def test_search_xss_prevention_in_results(self):
|
def test_search_xss_prevention_in_results(self):
|
||||||
"""Test that search terms are escaped in results to prevent XSS"""
|
"""Test that search terms are escaped in results to prevent XSS"""
|
||||||
@@ -218,15 +217,14 @@ class SearchViewTest(TestCase):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# The script tag should be escaped in the output
|
# The script tag should be escaped in the output
|
||||||
# Note: This depends on how the template renders the content
|
# Note: This depends on how the template renders the content
|
||||||
self.assertContains(response, 'Suchresultate für term')
|
self.assertContains(response, 'Suchergebnisse für "term"')
|
||||||
|
|
||||||
@patch('pages.views.pprint.pp')
|
def test_search_result_structure(self):
|
||||||
def test_search_result_logging(self, mock_pprint):
|
"""Test that search results have expected structure"""
|
||||||
"""Test that search results are logged for debugging"""
|
|
||||||
response = self.client.post('/search/', {'q': 'Test'})
|
response = self.client.post('/search/', {'q': 'Test'})
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
# Verify that pprint.pp was called with the result
|
# Verify the results page is rendered with correct structure
|
||||||
mock_pprint.assert_called_once()
|
self.assertContains(response, 'Suchergebnisse für "Test"')
|
||||||
|
|
||||||
def test_search_multiple_documents(self):
|
def test_search_multiple_documents(self):
|
||||||
"""Test search across multiple documents"""
|
"""Test search across multiple documents"""
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.utils.html import format_html
|
||||||
from nested_admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline
|
from nested_admin import NestedStackedInline, NestedModelAdmin, NestedTabularInline
|
||||||
from .models import *
|
from .models import *
|
||||||
|
|
||||||
@@ -11,6 +12,50 @@ class ReferenzerklaerungInline(NestedStackedInline):
|
|||||||
|
|
||||||
@admin.register(Referenz)
|
@admin.register(Referenz)
|
||||||
class ReferenzAdmin(NestedModelAdmin):
|
class ReferenzAdmin(NestedModelAdmin):
|
||||||
|
list_display = ('Path', 'vorgaben_count')
|
||||||
inlines=[ReferenzerklaerungInline]
|
inlines=[ReferenzerklaerungInline]
|
||||||
list_display =['Path']
|
search_fields=("name_nummer","Path")
|
||||||
search_fields=("referenz","path")
|
readonly_fields=("vorgaben_list",)
|
||||||
|
fieldsets = (
|
||||||
|
(None, {
|
||||||
|
'fields': ('name_nummer','name_text','oberreferenz','url', 'vorgaben_list')
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
def vorgaben_count(self, obj):
|
||||||
|
"""Count the number of Vorgaben that have this Stichwort"""
|
||||||
|
count = obj.vorgabe_set.count()
|
||||||
|
return f"{count} Vorgabe{'n' if count != 1 else ''}"
|
||||||
|
vorgaben_count.short_description = "Anzahl Vorgaben"
|
||||||
|
|
||||||
|
def vorgaben_list(self, obj):
|
||||||
|
"""Display list of Vorgaben that use this Stichwort"""
|
||||||
|
vorgaben = obj.vorgabe_set.order_by('dokument__nummer', 'nummer')
|
||||||
|
vorgaben_list = list(vorgaben) # Evaluate queryset once
|
||||||
|
count = len(vorgaben_list)
|
||||||
|
if count == 0:
|
||||||
|
return format_html("<em>Keine Vorgaben gefunden</em><p><strong>Gesamt: 0 Vorgaben</strong></p>")
|
||||||
|
|
||||||
|
html = "<div style='max-height: 300px; overflow-y: auto;'>"
|
||||||
|
html += "<table style='width: 100%; border-collapse: collapse;'>"
|
||||||
|
html += "<thead><tr style='background-color: #f5f5f5;'>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Vorgabe</th>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Titel</th>"
|
||||||
|
html += "<th style='padding: 8px; border: 1px solid #ddd; text-align: left;'>Dokument</th>"
|
||||||
|
html += "</tr></thead>"
|
||||||
|
html += "<tbody>"
|
||||||
|
|
||||||
|
for vorgabe in vorgaben_list:
|
||||||
|
html += "<tr>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.Vorgabennummer()}</td>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.titel}</td>"
|
||||||
|
html += f"<td style='padding: 6px; border: 1px solid #ddd;'>{vorgabe.dokument.nummer} – {vorgabe.dokument.name}</td>"
|
||||||
|
html += "</tr>"
|
||||||
|
|
||||||
|
html += "</tbody></table>"
|
||||||
|
html += f"</div><p><strong>Gesamt: {count} Vorgabe{'n' if count != 1 else ''}</strong></p>"
|
||||||
|
|
||||||
|
return format_html(html)
|
||||||
|
|
||||||
|
vorgaben_list.short_description = "Zugeordnete Vorgaben"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 5.2.5 on 2025-11-27 22:02
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('referenzen', '0002_alter_referenz_table_alter_referenzerklaerung_table'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='referenzerklaerung',
|
||||||
|
options={'verbose_name': 'Erklärung', 'verbose_name_plural': 'Erklärungen'},
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -31,3 +31,4 @@ class Referenzerklaerung (Textabschnitt):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name="Erklärung"
|
verbose_name="Erklärung"
|
||||||
|
verbose_name_plural="Erklärungen"
|
||||||
|
|||||||
@@ -1,51 +1,92 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load mptt_tags %}
|
{% load mptt_tags %}
|
||||||
|
|
||||||
|
{% block title %}{{ referenz.Path }} - Referenzen{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1><a href="../{{ referenz.ParentID }}">⭡</a>{{ referenz.Path }}</h1>
|
<div class="container-fluid">
|
||||||
{% if referenz.erklaerung %}
|
<nav aria-label="breadcrumb">
|
||||||
<div class="card mb-4">
|
<ol class="breadcrumb">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center bg-secondary text-light">
|
<li class="breadcrumb-item"><a href="/">Startseite</a></li>
|
||||||
<h3 class="h5 m-0">Beschreibung</h3>
|
<li class="breadcrumb-item"><a href="/referenzen">Referenzen</a></li>
|
||||||
{% if referenz.url %}
|
{% if referenz.ParentID %}
|
||||||
<span class="badge bg-light text-black">
|
<li class="breadcrumb-item"><a href="../{{ referenz.ParentID }}">Übergeordnet</a></li>
|
||||||
<a href="{{ referenz.url }}">Link</a>
|
{% endif %}
|
||||||
</span>{% endif %}
|
<li class="breadcrumb-item active" aria-current="page">{{ referenz.name_nummer }}</li>
|
||||||
</div>
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<div class="card-body p-2">
|
<h1>{{ referenz.Path }}</h1>
|
||||||
{% for typ, html in referenz.erklaerung %}
|
|
||||||
{% if html %}<div>{{ html|safe }}</div>{% endif %}{% endfor %}
|
{% if referenz.url %}
|
||||||
|
<p>
|
||||||
|
<a href="{{ referenz.url }}" class="btn btn-secondary icon icon--before icon--external" target="_blank" rel="noopener">
|
||||||
|
Externe Referenz öffnen
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if referenz.erklaerung %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card mb-4">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="h4 mb-0">Beschreibung</h2>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% for typ, html in referenz.erklaerung %}
|
||||||
|
{% if html %}
|
||||||
|
<div class="mb-2">{{ html|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="card mb-4">
|
<div class="row">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center bg-secondary text-light">
|
<div class="col-md-12">
|
||||||
<h3 class="h5 m-0">Referenzierte Vorgaben</h3>
|
<div class="card mb-4">
|
||||||
</div>
|
<div class="card-header">
|
||||||
|
<h2 class="h4 mb-0">Referenzierte Vorgaben</h2>
|
||||||
<div class="card-body p-2">
|
</div>
|
||||||
{% recursetree referenz.children %}
|
<div class="card-body">
|
||||||
{% if not node == referenz %}
|
<div class="referenz-tree">
|
||||||
{#<a href="../{{node.id}}">#}
|
{% recursetree referenz.children %}
|
||||||
{{ node.Path }}
|
<div class="mb-3">
|
||||||
{#</a>#}
|
<strong>
|
||||||
{% else %}
|
{% if not node == referenz %}
|
||||||
|
<a href="../{{ node.id }}">{{ node.Path }}</a>
|
||||||
|
{% else %}
|
||||||
{{ node.Path }}
|
{{ node.Path }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
</strong>
|
||||||
{% if node.referenziertvon %}
|
|
||||||
<ul>
|
{% if node.referenziertvon %}
|
||||||
|
<ul class="list-unstyled mt-2 ml-3">
|
||||||
{% for ref in node.referenziertvon %}
|
{% for ref in node.referenziertvon %}
|
||||||
<li><a href="{% url 'standard_detail' nummer=ref.dokument.nummer %}#{{ref.Vorgabennummer}}">{{ref}}</a></li>
|
<li class="mb-1">
|
||||||
|
<a href="{% url 'standard_detail' nummer=ref.dokument.nummer %}#{{ ref.Vorgabennummer }}"
|
||||||
|
class="icon icon--before icon--external">
|
||||||
|
{{ ref }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% if not node.is_leaf_node %}
|
{% if not node.is_leaf_node %}
|
||||||
|
<div class="ml-4 mt-2">
|
||||||
{{ children }}
|
{{ children }}
|
||||||
{% endif %}
|
</div>
|
||||||
{% endrecursetree %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endrecursetree %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,21 +1,39 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% load mptt_tags %}
|
||||||
|
|
||||||
|
{% block title %}Referenzen - Vorgaben Informatiksicherheit{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Referenzen</h1>
|
<div class="container-fluid">
|
||||||
|
<h1>Referenzen</h1>
|
||||||
|
<p class="lead">Hierarchische Übersicht externer Referenzen und Normen</p>
|
||||||
|
|
||||||
<div>
|
<div class="row">
|
||||||
{% load mptt_tags %}
|
<div class="col-md-12">
|
||||||
<ul class="tree">
|
<div class="card">
|
||||||
{% recursetree referenzen %}
|
<div class="card-body">
|
||||||
<li>
|
<nav aria-label="Referenzen-Hierarchie">
|
||||||
<a href="{{node.id}}">{{ node.name_nummer }}{% if node.name_text %} ({{node.name_text}}){% endif %}</a>
|
<ul class="nav nav-page-list">
|
||||||
{% if not node.is_leaf_node %}
|
{% recursetree referenzen %}
|
||||||
<ul class="children">
|
<li>
|
||||||
{{ children }}
|
<a href="{{ node.id }}">
|
||||||
|
<strong>{{ node.name_nummer }}</strong>
|
||||||
|
{% if node.name_text %}
|
||||||
|
<span class="text-muted"> - {{ node.name_text }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{% if not node.is_leaf_node %}
|
||||||
|
<ul class="nav nav-page-list">
|
||||||
|
{{ children }}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endrecursetree %}
|
{% endrecursetree %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,3 +1,398 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
from django.core.exceptions import ValidationError
|
||||||
|
from .models import Referenz, Referenzerklaerung
|
||||||
|
from abschnitte.models import AbschnittTyp
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
class ReferenzModelTest(TestCase):
|
||||||
|
"""Test cases for Referenz model"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.referenz = Referenz.objects.create(
|
||||||
|
name_nummer="ISO-27001",
|
||||||
|
name_text="Information Security Management",
|
||||||
|
url="https://www.iso.org/isoiec-27001-information-security.html"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_referenz_creation(self):
|
||||||
|
"""Test that Referenz is created correctly"""
|
||||||
|
self.assertEqual(self.referenz.name_nummer, "ISO-27001")
|
||||||
|
self.assertEqual(self.referenz.name_text, "Information Security Management")
|
||||||
|
self.assertEqual(self.referenz.url, "https://www.iso.org/isoiec-27001-information-security.html")
|
||||||
|
self.assertIsNone(self.referenz.oberreferenz)
|
||||||
|
|
||||||
|
def test_referenz_str(self):
|
||||||
|
"""Test string representation of Referenz"""
|
||||||
|
self.assertEqual(str(self.referenz), "ISO-27001")
|
||||||
|
|
||||||
|
def test_referenz_verbose_name_plural(self):
|
||||||
|
"""Test verbose name plural"""
|
||||||
|
self.assertEqual(
|
||||||
|
Referenz._meta.verbose_name_plural,
|
||||||
|
"Referenzen"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_referenz_path_method(self):
|
||||||
|
"""Test Path method for root reference"""
|
||||||
|
path = self.referenz.Path()
|
||||||
|
self.assertEqual(path, "ISO-27001 (Information Security Management)")
|
||||||
|
|
||||||
|
def test_referenz_path_without_name_text(self):
|
||||||
|
"""Test Path method when name_text is empty"""
|
||||||
|
referenz_no_text = Referenz.objects.create(
|
||||||
|
name_nummer="NIST-800-53"
|
||||||
|
)
|
||||||
|
path = referenz_no_text.Path()
|
||||||
|
self.assertEqual(path, "NIST-800-53")
|
||||||
|
|
||||||
|
def test_referenz_blank_fields(self):
|
||||||
|
"""Test that optional fields can be blank"""
|
||||||
|
referenz_minimal = Referenz.objects.create(
|
||||||
|
name_nummer="TEST-001"
|
||||||
|
)
|
||||||
|
self.assertEqual(referenz_minimal.name_text, "")
|
||||||
|
self.assertEqual(referenz_minimal.url, "")
|
||||||
|
self.assertIsNone(referenz_minimal.oberreferenz)
|
||||||
|
|
||||||
|
def test_referenz_max_lengths(self):
|
||||||
|
"""Test max_length constraints"""
|
||||||
|
max_name_nummer = "a" * 100
|
||||||
|
max_name_text = "b" * 255
|
||||||
|
|
||||||
|
referenz = Referenz.objects.create(
|
||||||
|
name_nummer=max_name_nummer,
|
||||||
|
name_text=max_name_text
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertEqual(referenz.name_nummer, max_name_nummer)
|
||||||
|
self.assertEqual(referenz.name_text, max_name_text)
|
||||||
|
|
||||||
|
def test_create_multiple_references(self):
|
||||||
|
"""Test creating multiple Referenz objects"""
|
||||||
|
references = [
|
||||||
|
("ISO-9001", "Quality Management"),
|
||||||
|
("ISO-14001", "Environmental Management"),
|
||||||
|
("ISO-45001", "Occupational Health and Safety")
|
||||||
|
]
|
||||||
|
|
||||||
|
for name_nummer, name_text in references:
|
||||||
|
Referenz.objects.create(
|
||||||
|
name_nummer=name_nummer,
|
||||||
|
name_text=name_text
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertEqual(Referenz.objects.count(), 4) # Including setUp referenz
|
||||||
|
|
||||||
|
|
||||||
|
class ReferenzHierarchyTest(TestCase):
|
||||||
|
"""Test cases for Referenz hierarchy using MPTT"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up hierarchical test data"""
|
||||||
|
# Create root references
|
||||||
|
self.iso_root = Referenz.objects.create(
|
||||||
|
name_nummer="ISO",
|
||||||
|
name_text="International Organization for Standardization"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.iso_27000_series = Referenz.objects.create(
|
||||||
|
name_nummer="ISO-27000",
|
||||||
|
name_text="Information Security Management System Family",
|
||||||
|
oberreferenz=self.iso_root
|
||||||
|
)
|
||||||
|
|
||||||
|
self.iso_27001 = Referenz.objects.create(
|
||||||
|
name_nummer="ISO-27001",
|
||||||
|
name_text="Information Security Management",
|
||||||
|
oberreferenz=self.iso_27000_series
|
||||||
|
)
|
||||||
|
|
||||||
|
self.iso_27002 = Referenz.objects.create(
|
||||||
|
name_nummer="ISO-27002",
|
||||||
|
name_text="Code of Practice for Information Security Controls",
|
||||||
|
oberreferenz=self.iso_27000_series
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_hierarchy_relationships(self):
|
||||||
|
"""Test parent-child relationships"""
|
||||||
|
self.assertEqual(self.iso_27000_series.oberreferenz, self.iso_root)
|
||||||
|
self.assertEqual(self.iso_27001.oberreferenz, self.iso_27000_series)
|
||||||
|
self.assertEqual(self.iso_27002.oberreferenz, self.iso_27000_series)
|
||||||
|
|
||||||
|
def test_get_ancestors(self):
|
||||||
|
"""Test getting ancestors"""
|
||||||
|
ancestors = self.iso_27001.get_ancestors()
|
||||||
|
expected_ancestors = [self.iso_root, self.iso_27000_series]
|
||||||
|
self.assertEqual(list(ancestors), expected_ancestors)
|
||||||
|
|
||||||
|
def test_get_ancestors_include_self(self):
|
||||||
|
"""Test getting ancestors including self"""
|
||||||
|
ancestors = self.iso_27001.get_ancestors(include_self=True)
|
||||||
|
expected_ancestors = [self.iso_root, self.iso_27000_series, self.iso_27001]
|
||||||
|
self.assertEqual(list(ancestors), expected_ancestors)
|
||||||
|
|
||||||
|
def test_get_descendants(self):
|
||||||
|
"""Test getting descendants"""
|
||||||
|
descendants = self.iso_27000_series.get_descendants()
|
||||||
|
expected_descendants = [self.iso_27001, self.iso_27002]
|
||||||
|
self.assertEqual(list(descendants), expected_descendants)
|
||||||
|
|
||||||
|
def test_get_children(self):
|
||||||
|
"""Test getting direct children"""
|
||||||
|
children = self.iso_27000_series.get_children()
|
||||||
|
expected_children = [self.iso_27001, self.iso_27002]
|
||||||
|
self.assertEqual(list(children), expected_children)
|
||||||
|
|
||||||
|
def test_get_root(self):
|
||||||
|
"""Test getting root of hierarchy"""
|
||||||
|
root = self.iso_27001.get_root()
|
||||||
|
self.assertEqual(root, self.iso_root)
|
||||||
|
|
||||||
|
def test_is_root(self):
|
||||||
|
"""Test is_root method"""
|
||||||
|
self.assertTrue(self.iso_root.is_root_node())
|
||||||
|
self.assertFalse(self.iso_27001.is_root_node())
|
||||||
|
|
||||||
|
def test_is_leaf(self):
|
||||||
|
"""Test is_leaf method"""
|
||||||
|
self.assertFalse(self.iso_root.is_leaf_node())
|
||||||
|
self.assertFalse(self.iso_27000_series.is_leaf_node())
|
||||||
|
self.assertTrue(self.iso_27001.is_leaf_node())
|
||||||
|
self.assertTrue(self.iso_27002.is_leaf_node())
|
||||||
|
|
||||||
|
def test_level_property(self):
|
||||||
|
"""Test level property"""
|
||||||
|
self.assertEqual(self.iso_root.level, 0)
|
||||||
|
self.assertEqual(self.iso_27000_series.level, 1)
|
||||||
|
self.assertEqual(self.iso_27001.level, 2)
|
||||||
|
self.assertEqual(self.iso_27002.level, 2)
|
||||||
|
|
||||||
|
def test_path_method_with_hierarchy(self):
|
||||||
|
"""Test Path method with hierarchical references"""
|
||||||
|
path = self.iso_27001.Path()
|
||||||
|
expected_path = "ISO → ISO-27000 → ISO-27001 (Information Security Management)"
|
||||||
|
self.assertEqual(path, expected_path)
|
||||||
|
|
||||||
|
def test_path_method_without_name_text_in_hierarchy(self):
|
||||||
|
"""Test Path method when intermediate nodes have no name_text"""
|
||||||
|
# Create reference without name_text
|
||||||
|
ref_no_text = Referenz.objects.create(
|
||||||
|
name_nummer="NO-TEXT",
|
||||||
|
oberreferenz=self.iso_root
|
||||||
|
)
|
||||||
|
|
||||||
|
child_ref = Referenz.objects.create(
|
||||||
|
name_nummer="CHILD",
|
||||||
|
name_text="Child Reference",
|
||||||
|
oberreferenz=ref_no_text
|
||||||
|
)
|
||||||
|
|
||||||
|
path = child_ref.Path()
|
||||||
|
expected_path = "ISO → NO-TEXT → CHILD (Child Reference)"
|
||||||
|
self.assertEqual(path, expected_path)
|
||||||
|
|
||||||
|
def test_order_insertion_by(self):
|
||||||
|
"""Test that references are ordered by name_nummer"""
|
||||||
|
# Create more children in different order
|
||||||
|
ref_c = Referenz.objects.create(
|
||||||
|
name_nummer="C-REF",
|
||||||
|
oberreferenz=self.iso_root
|
||||||
|
)
|
||||||
|
ref_a = Referenz.objects.create(
|
||||||
|
name_nummer="A-REF",
|
||||||
|
oberreferenz=self.iso_root
|
||||||
|
)
|
||||||
|
ref_b = Referenz.objects.create(
|
||||||
|
name_nummer="B-REF",
|
||||||
|
oberreferenz=self.iso_root
|
||||||
|
)
|
||||||
|
|
||||||
|
children = list(self.iso_root.get_children())
|
||||||
|
# Should be ordered alphabetically by name_nummer
|
||||||
|
expected_order = [ref_a, ref_b, ref_c, self.iso_27000_series]
|
||||||
|
self.assertEqual(children, expected_order)
|
||||||
|
|
||||||
|
|
||||||
|
class ReferenzerklaerungModelTest(TestCase):
|
||||||
|
"""Test cases for Referenzerklaerung model"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.referenz = Referenz.objects.create(
|
||||||
|
name_nummer="ISO-27001",
|
||||||
|
name_text="Information Security Management"
|
||||||
|
)
|
||||||
|
self.abschnitttyp = AbschnittTyp.objects.create(
|
||||||
|
abschnitttyp="text"
|
||||||
|
)
|
||||||
|
self.erklaerung = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.referenz,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Dies ist eine Erklärung für ISO-27001.",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_creation(self):
|
||||||
|
"""Test that Referenzerklaerung is created correctly"""
|
||||||
|
self.assertEqual(self.erklaerung.erklaerung, self.referenz)
|
||||||
|
self.assertEqual(self.erklaerung.abschnitttyp, self.abschnitttyp)
|
||||||
|
self.assertEqual(self.erklaerung.inhalt, "Dies ist eine Erklärung für ISO-27001.")
|
||||||
|
self.assertEqual(self.erklaerung.order, 1)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_foreign_key_relationship(self):
|
||||||
|
"""Test foreign key relationship to Referenz"""
|
||||||
|
self.assertEqual(self.erklaerung.erklaerung.name_nummer, "ISO-27001")
|
||||||
|
self.assertEqual(self.erklaerung.erklaerung.name_text, "Information Security Management")
|
||||||
|
|
||||||
|
def test_referenzerklaerung_cascade_delete(self):
|
||||||
|
"""Test that deleting Referenz cascades to Referenzerklaerung"""
|
||||||
|
referenz_count = Referenz.objects.count()
|
||||||
|
erklaerung_count = Referenzerklaerung.objects.count()
|
||||||
|
|
||||||
|
self.referenz.delete()
|
||||||
|
|
||||||
|
self.assertEqual(Referenz.objects.count(), referenz_count - 1)
|
||||||
|
self.assertEqual(Referenzerklaerung.objects.count(), erklaerung_count - 1)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_verbose_name(self):
|
||||||
|
"""Test verbose name"""
|
||||||
|
self.assertEqual(
|
||||||
|
Referenzerklaerung._meta.verbose_name,
|
||||||
|
"Erklärung"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_multiple_explanations(self):
|
||||||
|
"""Test creating multiple explanations for one Referenz"""
|
||||||
|
abschnitttyp2 = AbschnittTyp.objects.create(abschnitttyp="liste ungeordnet")
|
||||||
|
erklaerung2 = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.referenz,
|
||||||
|
abschnitttyp=abschnitttyp2,
|
||||||
|
inhalt="Zweite Erklärung für ISO-27001.",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
explanations = Referenzerklaerung.objects.filter(erklaerung=self.referenz)
|
||||||
|
self.assertEqual(explanations.count(), 2)
|
||||||
|
self.assertIn(self.erklaerung, explanations)
|
||||||
|
self.assertIn(erklaerung2, explanations)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_ordering(self):
|
||||||
|
"""Test that explanations can be ordered"""
|
||||||
|
erklaerung2 = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.referenz,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Zweite Erklärung",
|
||||||
|
order=3
|
||||||
|
)
|
||||||
|
erklaerung3 = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.referenz,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Erste Erklärung",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
ordered = Referenzerklaerung.objects.filter(erklaerung=self.referenz).order_by('order')
|
||||||
|
expected_order = [self.erklaerung, erklaerung3, erklaerung2]
|
||||||
|
self.assertEqual(list(ordered), expected_order)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_blank_fields(self):
|
||||||
|
"""Test that optional fields can be blank/null"""
|
||||||
|
referenz2 = Referenz.objects.create(name_nummer="TEST-001")
|
||||||
|
erklaerung_blank = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=referenz2
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertIsNone(erklaerung_blank.abschnitttyp)
|
||||||
|
self.assertIsNone(erklaerung_blank.inhalt)
|
||||||
|
self.assertEqual(erklaerung_blank.order, 0)
|
||||||
|
|
||||||
|
def test_referenzerklaerung_inheritance(self):
|
||||||
|
"""Test that Referenzerklaerung inherits from Textabschnitt"""
|
||||||
|
# Check that it has the expected fields from Textabschnitt
|
||||||
|
self.assertTrue(hasattr(self.erklaerung, 'abschnitttyp'))
|
||||||
|
self.assertTrue(hasattr(self.erklaerung, 'inhalt'))
|
||||||
|
self.assertTrue(hasattr(self.erklaerung, 'order'))
|
||||||
|
|
||||||
|
# Check that the fields work as expected
|
||||||
|
self.assertIsInstance(self.erklaerung.abschnitttyp, AbschnittTyp)
|
||||||
|
self.assertIsInstance(self.erklaerung.inhalt, str)
|
||||||
|
self.assertIsInstance(self.erklaerung.order, int)
|
||||||
|
|
||||||
|
|
||||||
|
class ReferenzIntegrationTest(TestCase):
|
||||||
|
"""Integration tests for Referenz app"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.root_ref = Referenz.objects.create(
|
||||||
|
name_nummer="ROOT",
|
||||||
|
name_text="Root Reference"
|
||||||
|
)
|
||||||
|
|
||||||
|
self.child_ref = Referenz.objects.create(
|
||||||
|
name_nummer="CHILD",
|
||||||
|
name_text="Child Reference",
|
||||||
|
oberreferenz=self.root_ref
|
||||||
|
)
|
||||||
|
|
||||||
|
self.abschnitttyp = AbschnittTyp.objects.create(abschnitttyp="text")
|
||||||
|
|
||||||
|
self.erklaerung = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.child_ref,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Explanation for child reference",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_reference_with_explanations_query(self):
|
||||||
|
"""Test querying references with their explanations"""
|
||||||
|
references_with_explanations = Referenz.objects.filter(
|
||||||
|
referenzerklaerung__isnull=False
|
||||||
|
).distinct()
|
||||||
|
|
||||||
|
self.assertEqual(references_with_explanations.count(), 1)
|
||||||
|
self.assertIn(self.child_ref, references_with_explanations)
|
||||||
|
self.assertNotIn(self.root_ref, references_with_explanations)
|
||||||
|
|
||||||
|
def test_reference_without_explanations(self):
|
||||||
|
"""Test finding references without explanations"""
|
||||||
|
references_without_explanations = Referenz.objects.filter(
|
||||||
|
referenzerklaerung__isnull=True
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertEqual(references_without_explanations.count(), 1)
|
||||||
|
self.assertEqual(references_without_explanations.first(), self.root_ref)
|
||||||
|
|
||||||
|
def test_explanation_count_annotation(self):
|
||||||
|
"""Test annotating references with explanation count"""
|
||||||
|
from django.db.models import Count
|
||||||
|
|
||||||
|
references_with_count = Referenz.objects.annotate(
|
||||||
|
explanation_count=Count('referenzerklaerung')
|
||||||
|
)
|
||||||
|
|
||||||
|
for reference in references_with_count:
|
||||||
|
if reference == self.child_ref:
|
||||||
|
self.assertEqual(reference.explanation_count, 1)
|
||||||
|
else:
|
||||||
|
self.assertEqual(reference.explanation_count, 0)
|
||||||
|
|
||||||
|
def test_hierarchy_with_explanations(self):
|
||||||
|
"""Test that explanations work correctly with hierarchical references"""
|
||||||
|
# Add explanation to root reference
|
||||||
|
root_erklaerung = Referenzerklaerung.objects.create(
|
||||||
|
erklaerung=self.root_ref,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Explanation for root reference",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
# Both references should now have explanations
|
||||||
|
references_with_explanations = Referenz.objects.filter(
|
||||||
|
referenzerklaerung__isnull=False
|
||||||
|
).distinct()
|
||||||
|
|
||||||
|
self.assertEqual(references_with_explanations.count(), 2)
|
||||||
|
self.assertIn(self.root_ref, references_with_explanations)
|
||||||
|
self.assertIn(self.child_ref, references_with_explanations)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ certifi==2025.8.3
|
|||||||
charset-normalizer==3.4.3
|
charset-normalizer==3.4.3
|
||||||
curtsies==0.4.3
|
curtsies==0.4.3
|
||||||
cwcwidth==0.1.10
|
cwcwidth==0.1.10
|
||||||
Django==5.2.5
|
Django==5.2.9
|
||||||
django-admin-sortable2==2.2.8
|
django-admin-sortable2==2.2.8
|
||||||
django-js-asset==3.1.2
|
django-js-asset==3.1.2
|
||||||
django-mptt==0.17.0
|
django-mptt==0.17.0
|
||||||
@@ -30,5 +30,7 @@ pyxdg==0.28
|
|||||||
requests==2.32.5
|
requests==2.32.5
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
sqlparse==0.5.3
|
sqlparse==0.5.3
|
||||||
urllib3==2.5.0
|
urllib3==2.6.0
|
||||||
wcwidth==0.2.13
|
wcwidth==0.2.13
|
||||||
|
bleach==6.1.0
|
||||||
|
coverage==7.6.1
|
||||||
|
|||||||
366
rollen/tests.py
@@ -1,3 +1,367 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
from django.core.exceptions import ValidationError
|
||||||
|
from django.db.models import Count
|
||||||
|
from .models import Rolle, RollenBeschreibung
|
||||||
|
from abschnitte.models import AbschnittTyp
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
class RolleModelTest(TestCase):
|
||||||
|
"""Test cases for Rolle model"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.rolle = Rolle.objects.create(
|
||||||
|
name="Systemadministrator"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_rolle_creation(self):
|
||||||
|
"""Test that Rolle is created correctly"""
|
||||||
|
self.assertEqual(self.rolle.name, "Systemadministrator")
|
||||||
|
|
||||||
|
def test_rolle_str(self):
|
||||||
|
"""Test string representation of Rolle"""
|
||||||
|
self.assertEqual(str(self.rolle), "Systemadministrator")
|
||||||
|
|
||||||
|
def test_rolle_primary_key(self):
|
||||||
|
"""Test that name field is the primary key"""
|
||||||
|
pk_field = Rolle._meta.pk
|
||||||
|
self.assertEqual(pk_field.name, 'name')
|
||||||
|
self.assertEqual(pk_field.max_length, 100)
|
||||||
|
|
||||||
|
def test_rolle_verbose_name_plural(self):
|
||||||
|
"""Test verbose name plural"""
|
||||||
|
self.assertEqual(
|
||||||
|
Rolle._meta.verbose_name_plural,
|
||||||
|
"Rollen"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_rolle_max_length(self):
|
||||||
|
"""Test max_length constraint"""
|
||||||
|
max_length_rolle = "a" * 100
|
||||||
|
rolle = Rolle.objects.create(name=max_length_rolle)
|
||||||
|
self.assertEqual(rolle.name, max_length_rolle)
|
||||||
|
|
||||||
|
def test_rolle_unique(self):
|
||||||
|
"""Test that name must be unique"""
|
||||||
|
with self.assertRaises(Exception):
|
||||||
|
Rolle.objects.create(name="Systemadministrator")
|
||||||
|
|
||||||
|
def test_create_multiple_rollen(self):
|
||||||
|
"""Test creating multiple Rolle objects"""
|
||||||
|
rollen = [
|
||||||
|
"Datenschutzbeauftragter",
|
||||||
|
"IT-Sicherheitsbeauftragter",
|
||||||
|
"Risikomanager",
|
||||||
|
"Compliance-Officer"
|
||||||
|
]
|
||||||
|
for rolle_name in rollen:
|
||||||
|
Rolle.objects.create(name=rolle_name)
|
||||||
|
|
||||||
|
self.assertEqual(Rolle.objects.count(), 5) # Including setUp rolle
|
||||||
|
|
||||||
|
def test_rolle_case_sensitivity(self):
|
||||||
|
"""Test that role name is case sensitive"""
|
||||||
|
rolle_lower = Rolle.objects.create(name="systemadministrator")
|
||||||
|
self.assertNotEqual(self.rolle.pk, rolle_lower.pk)
|
||||||
|
self.assertEqual(Rolle.objects.count(), 2)
|
||||||
|
|
||||||
|
def test_rolle_with_special_characters(self):
|
||||||
|
"""Test creating roles with special characters"""
|
||||||
|
special_roles = [
|
||||||
|
"IT-Administrator",
|
||||||
|
"CISO (Chief Information Security Officer)",
|
||||||
|
"Datenschutz-Beauftragter/-in",
|
||||||
|
"Sicherheitsbeauftragter"
|
||||||
|
]
|
||||||
|
|
||||||
|
for role_name in special_roles:
|
||||||
|
rolle = Rolle.objects.create(name=role_name)
|
||||||
|
self.assertEqual(rolle.name, role_name)
|
||||||
|
|
||||||
|
self.assertEqual(Rolle.objects.count(), 5) # Including setUp rolle
|
||||||
|
|
||||||
|
|
||||||
|
class RollenBeschreibungModelTest(TestCase):
|
||||||
|
"""Test cases for RollenBeschreibung model"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.rolle = Rolle.objects.create(
|
||||||
|
name="Systemadministrator"
|
||||||
|
)
|
||||||
|
self.abschnitttyp = AbschnittTyp.objects.create(
|
||||||
|
abschnitttyp="text"
|
||||||
|
)
|
||||||
|
self.beschreibung = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Der Systemadministrator ist für die Verwaltung und Wartung der IT-Systeme verantwortlich.",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_creation(self):
|
||||||
|
"""Test that RollenBeschreibung is created correctly"""
|
||||||
|
self.assertEqual(self.beschreibung.abschnitt, self.rolle)
|
||||||
|
self.assertEqual(self.beschreibung.abschnitttyp, self.abschnitttyp)
|
||||||
|
self.assertEqual(self.beschreibung.inhalt, "Der Systemadministrator ist für die Verwaltung und Wartung der IT-Systeme verantwortlich.")
|
||||||
|
self.assertEqual(self.beschreibung.order, 1)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_foreign_key_relationship(self):
|
||||||
|
"""Test foreign key relationship to Rolle"""
|
||||||
|
self.assertEqual(self.beschreibung.abschnitt.name, "Systemadministrator")
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_cascade_delete(self):
|
||||||
|
"""Test that deleting Rolle cascades to RollenBeschreibung"""
|
||||||
|
rolle_count = Rolle.objects.count()
|
||||||
|
beschreibung_count = RollenBeschreibung.objects.count()
|
||||||
|
|
||||||
|
self.rolle.delete()
|
||||||
|
|
||||||
|
self.assertEqual(Rolle.objects.count(), rolle_count - 1)
|
||||||
|
self.assertEqual(RollenBeschreibung.objects.count(), beschreibung_count - 1)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_verbose_names(self):
|
||||||
|
"""Test verbose names"""
|
||||||
|
self.assertEqual(
|
||||||
|
RollenBeschreibung._meta.verbose_name,
|
||||||
|
"Rollenbeschreibungs-Abschnitt"
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
RollenBeschreibung._meta.verbose_name_plural,
|
||||||
|
"Rollenbeschreibung"
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_multiple_descriptions(self):
|
||||||
|
"""Test creating multiple descriptions for one Rolle"""
|
||||||
|
abschnitttyp2 = AbschnittTyp.objects.create(abschnitttyp="liste ungeordnet")
|
||||||
|
beschreibung2 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=abschnitttyp2,
|
||||||
|
inhalt="Aufgaben:\n- Systemüberwachung\n- Backup-Management\n- Benutzeradministration",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
descriptions = RollenBeschreibung.objects.filter(abschnitt=self.rolle)
|
||||||
|
self.assertEqual(descriptions.count(), 2)
|
||||||
|
self.assertIn(self.beschreibung, descriptions)
|
||||||
|
self.assertIn(beschreibung2, descriptions)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_ordering(self):
|
||||||
|
"""Test that descriptions can be ordered"""
|
||||||
|
beschreibung2 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Zweite Beschreibung",
|
||||||
|
order=3
|
||||||
|
)
|
||||||
|
beschreibung3 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Erste Beschreibung",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
ordered = RollenBeschreibung.objects.filter(abschnitt=self.rolle).order_by('order')
|
||||||
|
expected_order = [self.beschreibung, beschreibung3, beschreibung2]
|
||||||
|
self.assertEqual(list(ordered), expected_order)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_blank_fields(self):
|
||||||
|
"""Test that optional fields can be blank/null"""
|
||||||
|
rolle2 = Rolle.objects.create(name="Testrolle")
|
||||||
|
beschreibung_blank = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=rolle2
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertIsNone(beschreibung_blank.abschnitttyp)
|
||||||
|
self.assertIsNone(beschreibung_blank.inhalt)
|
||||||
|
self.assertEqual(beschreibung_blank.order, 0)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_inheritance(self):
|
||||||
|
"""Test that RollenBeschreibung inherits from Textabschnitt"""
|
||||||
|
# Check that it has the expected fields from Textabschnitt
|
||||||
|
self.assertTrue(hasattr(self.beschreibung, 'abschnitttyp'))
|
||||||
|
self.assertTrue(hasattr(self.beschreibung, 'inhalt'))
|
||||||
|
self.assertTrue(hasattr(self.beschreibung, 'order'))
|
||||||
|
|
||||||
|
# Check that the fields work as expected
|
||||||
|
self.assertIsInstance(self.beschreibung.abschnitttyp, AbschnittTyp)
|
||||||
|
self.assertIsInstance(self.beschreibung.inhalt, str)
|
||||||
|
self.assertIsInstance(self.beschreibung.order, int)
|
||||||
|
|
||||||
|
def test_rollenbeschreibung_different_types(self):
|
||||||
|
"""Test creating descriptions with different section types"""
|
||||||
|
# Create different section types
|
||||||
|
typ_list = AbschnittTyp.objects.create(abschnitttyp="liste ungeordnet")
|
||||||
|
typ_table = AbschnittTyp.objects.create(abschnitttyp="tabelle")
|
||||||
|
|
||||||
|
# Create descriptions with different types
|
||||||
|
beschreibung_text = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Textbeschreibung der Rolle",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
beschreibung_list = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=typ_list,
|
||||||
|
inhalt="Aufgabe 1\nAufgabe 2\nAufgabe 3",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
beschreibung_table = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle,
|
||||||
|
abschnitttyp=typ_table,
|
||||||
|
inhalt="| Verantwortung | Priorität |\n|--------------|------------|\n| Systemwartung | Hoch |",
|
||||||
|
order=3
|
||||||
|
)
|
||||||
|
|
||||||
|
# Verify all descriptions are created
|
||||||
|
descriptions = RollenBeschreibung.objects.filter(abschnitt=self.rolle)
|
||||||
|
self.assertEqual(descriptions.count(), 4) # Including setUp beschreibung
|
||||||
|
|
||||||
|
# Verify types are correct
|
||||||
|
self.assertEqual(beschreibung_text.abschnitttyp, self.abschnitttyp)
|
||||||
|
self.assertEqual(beschreibung_list.abschnitttyp, typ_list)
|
||||||
|
self.assertEqual(beschreibung_table.abschnitttyp, typ_table)
|
||||||
|
|
||||||
|
|
||||||
|
class RolleIntegrationTest(TestCase):
|
||||||
|
"""Integration tests for Rolle app"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
"""Set up test data"""
|
||||||
|
self.rolle1 = Rolle.objects.create(name="IT-Sicherheitsbeauftragter")
|
||||||
|
self.rolle2 = Rolle.objects.create(name="Datenschutzbeauftragter")
|
||||||
|
|
||||||
|
self.abschnitttyp = AbschnittTyp.objects.create(abschnitttyp="text")
|
||||||
|
|
||||||
|
self.beschreibung1 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle1,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Beschreibung für IT-Sicherheitsbeauftragten",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
self.beschreibung2 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle2,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Beschreibung für Datenschutzbeauftragten",
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_rolle_with_descriptions_query(self):
|
||||||
|
"""Test querying Rollen with their descriptions"""
|
||||||
|
rollen_with_descriptions = Rolle.objects.filter(
|
||||||
|
rollenbeschreibung__isnull=False
|
||||||
|
).distinct()
|
||||||
|
|
||||||
|
self.assertEqual(rollen_with_descriptions.count(), 2)
|
||||||
|
self.assertIn(self.rolle1, rollen_with_descriptions)
|
||||||
|
self.assertIn(self.rolle2, rollen_with_descriptions)
|
||||||
|
|
||||||
|
def test_rolle_without_descriptions(self):
|
||||||
|
"""Test finding Rollen without descriptions"""
|
||||||
|
rolle3 = Rolle.objects.create(name="Compliance-Officer")
|
||||||
|
|
||||||
|
rollen_without_descriptions = Rolle.objects.filter(
|
||||||
|
rollenbeschreibung__isnull=True
|
||||||
|
)
|
||||||
|
|
||||||
|
self.assertEqual(rollen_without_descriptions.count(), 1)
|
||||||
|
self.assertEqual(rollen_without_descriptions.first(), rolle3)
|
||||||
|
|
||||||
|
def test_description_count_annotation(self):
|
||||||
|
"""Test annotating Rollen with description count"""
|
||||||
|
from django.db.models import Count
|
||||||
|
|
||||||
|
rollen_with_count = Rolle.objects.annotate(
|
||||||
|
description_count=Count('rollenbeschreibung')
|
||||||
|
)
|
||||||
|
|
||||||
|
for rolle in rollen_with_count:
|
||||||
|
if rolle.name in ["IT-Sicherheitsbeauftragter", "Datenschutzbeauftragter"]:
|
||||||
|
self.assertEqual(rolle.description_count, 1)
|
||||||
|
else:
|
||||||
|
self.assertEqual(rolle.description_count, 0)
|
||||||
|
|
||||||
|
def test_multiple_descriptions_per_rolle(self):
|
||||||
|
"""Test multiple descriptions for a single role"""
|
||||||
|
# Add more descriptions to rolle1
|
||||||
|
abschnitttyp2 = AbschnittTyp.objects.create(abschnitttyp="liste ungeordnet")
|
||||||
|
|
||||||
|
beschreibung2 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle1,
|
||||||
|
abschnitttyp=abschnitttyp2,
|
||||||
|
inhalt="Zusätzliche Aufgaben:\n- Überwachung\n- Berichterstattung",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
# Check that rolle1 now has 2 descriptions
|
||||||
|
descriptions = RollenBeschreibung.objects.filter(abschnitt=self.rolle1)
|
||||||
|
self.assertEqual(descriptions.count(), 2)
|
||||||
|
|
||||||
|
# Check annotation
|
||||||
|
rolle_with_count = Rolle.objects.annotate(
|
||||||
|
description_count=Count('rollenbeschreibung')
|
||||||
|
).get(pk=self.rolle1.pk)
|
||||||
|
self.assertEqual(rolle_with_count.description_count, 2)
|
||||||
|
|
||||||
|
def test_role_descriptions_ordered(self):
|
||||||
|
"""Test that role descriptions are returned in correct order"""
|
||||||
|
# Add more descriptions in random order
|
||||||
|
beschreibung2 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle1,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Dritte Beschreibung",
|
||||||
|
order=3
|
||||||
|
)
|
||||||
|
|
||||||
|
beschreibung3 = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=self.rolle1,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt="Zweite Beschreibung",
|
||||||
|
order=2
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get descriptions in order
|
||||||
|
ordered_descriptions = RollenBeschreibung.objects.filter(
|
||||||
|
abschnitt=self.rolle1
|
||||||
|
).order_by('order')
|
||||||
|
|
||||||
|
expected_order = [self.beschreibung1, beschreibung3, beschreibung2]
|
||||||
|
self.assertEqual(list(ordered_descriptions), expected_order)
|
||||||
|
|
||||||
|
def test_role_search_by_name(self):
|
||||||
|
"""Test searching roles by name"""
|
||||||
|
# Test exact match
|
||||||
|
exact_match = Rolle.objects.filter(name="IT-Sicherheitsbeauftragter")
|
||||||
|
self.assertEqual(exact_match.count(), 1)
|
||||||
|
self.assertEqual(exact_match.first(), self.rolle1)
|
||||||
|
|
||||||
|
# Test case-sensitive contains
|
||||||
|
contains_match = Rolle.objects.filter(name__contains="Sicherheits")
|
||||||
|
self.assertEqual(contains_match.count(), 1)
|
||||||
|
self.assertEqual(contains_match.first(), self.rolle1)
|
||||||
|
|
||||||
|
# Test case-insensitive contains
|
||||||
|
icontains_match = Rolle.objects.filter(name__icontains="sicherheits")
|
||||||
|
self.assertEqual(icontains_match.count(), 1)
|
||||||
|
self.assertEqual(icontains_match.first(), self.rolle1)
|
||||||
|
|
||||||
|
def test_role_with_long_descriptions(self):
|
||||||
|
"""Test roles with long description content"""
|
||||||
|
long_content = "Dies ist eine sehr lange Beschreibung " * 50 # Repeat to make it long
|
||||||
|
|
||||||
|
rolle_long = Rolle.objects.create(name="Rolle mit langer Beschreibung")
|
||||||
|
beschreibung_long = RollenBeschreibung.objects.create(
|
||||||
|
abschnitt=rolle_long,
|
||||||
|
abschnitttyp=self.abschnitttyp,
|
||||||
|
inhalt=long_content,
|
||||||
|
order=1
|
||||||
|
)
|
||||||
|
|
||||||
|
# Verify the long content is stored correctly
|
||||||
|
retrieved = RollenBeschreibung.objects.get(pk=beschreibung_long.pk)
|
||||||
|
self.assertEqual(retrieved.inhalt, long_content)
|
||||||
|
self.assertGreater(len(retrieved.inhalt), 1000) # Should be quite long
|
||||||
|
|||||||
@@ -11,4 +11,93 @@
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Comment System Styles */
|
||||||
|
.comment-btn {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-btn .comment-count {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
right: -8px;
|
||||||
|
background-color: #dc3545;
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
font-size: 11px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-item {
|
||||||
|
max-width: 100%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-item .text-muted {
|
||||||
|
font-size: 0.85em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#commentModal .modal-body {
|
||||||
|
max-height: 60vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#commentsContainer {
|
||||||
|
min-height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-comment-btn {
|
||||||
|
opacity: 0.7;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-comment-btn:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-comment-btn {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1;
|
||||||
|
color: #721c24;
|
||||||
|
border: 1px solid #f5c6cb;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-comment-btn:hover {
|
||||||
|
opacity: 1;
|
||||||
|
background-color: #f8d7da;
|
||||||
|
border-color: #f5c6cb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icon styling for emoji replacements */
|
||||||
|
.emoji-icon {
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin-right: 0.3em;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive adjustments */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.comment-item .d-flex {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-comment-btn {
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
static/swiss/css/admin.css
Executable file
BIN
static/swiss/css/images/2-klick-logo.jpg
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
static/swiss/css/images/dummy_facebook.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
static/swiss/css/images/dummy_gplus.png
Normal file
|
After Width: | Height: | Size: 775 B |
BIN
static/swiss/css/images/dummy_twitter.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/swiss/css/images/ssp_sprite.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/swiss/css/images/ssp_sprite.psd
Normal file
1
static/swiss/css/print.css
Executable file
1
static/swiss/css/twitter-inject.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.TweetAuthor-name,.TweetAuthor-name:hover{color:#454545!important}.TweetAuthor-link:hover{-webkit-text-decoration-color:#454545!important;-moz-text-decoration-color:#454545!important;text-decoration-color:#454545!important}a:hover{text-decoration:underline;color:#069!important}.SandboxRoot.env-bp-min .TweetAuthor-avatar,.TweetAuthor-avatar{height:48px;width:48px;margin-right:10px}.SandboxRoot.env-bp-min .TweetAuthor-avatar .Avatar,.TweetAuthor-avatar .Avatar{border-radius:5px}.timeline-Tweet-author{padding-left:58px}.TweetAuthor-name.Identity-name{font-size:1.1em}.TweetAuthor-screenName.Identity-screenName{font-size:.9em;color:#757575}.SandboxRoot.env-bp-min .timeline-Tweet-text,.timeline-Tweet-text{font-size:1.1em!important;line-height:1.5;padding-left:58px;margin-left:0;color:#454545}.TweetAuthor-verifiedBadge,.timeline-Tweet-action.timeline-ShareMenu,.timeline-Tweet-brand{display:none}.timeline-Tweet-metadata *,.timeline-Tweet-metadata :hover,.timeline-Tweet-retweetCredit{color:#757575;text-decoration:none}.Icon--retweetBadge{background:url(../img/twitter_sprite.png) no-repeat;height:15px;width:15px;margin-right:5px}.Icon--heart.TweetAction-icon.Icon--heartEdge,.timeline-Tweet:hover .Icon--heart.TweetAction-icon.Icon--heartEdge{background:url(../img/twitter_sprite.png) no-repeat -33px 0}.TweetAction:focus .Icon--heart.TweetAction-icon.Icon--heartEdge,.TweetAction:hover .Icon--heart.TweetAction-icon.Icon--heartEdge{background:url(../img/twitter_sprite.png) no-repeat -49px 0!important}.Icon.Icon--retweetBadge{background-position:-81px 0;margin-bottom:2px}.timeline-Body{border-top:none}.timeline-ShowMoreButton{display:inline-block;color:#fff;font-size:14px;line-height:1.2;text-align:center;vertical-align:middle;background-color:#069;border:1px solid #069;border-radius:3px;padding:.45em .9em;margin:15px 0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:manipulation;touch-action:manipulation}.timeline-ShowMoreButton:active,.timeline-ShowMoreButton:focus,.timeline-ShowMoreButton:hover{background-color:#046;color:#fff}
|
||||||
9
static/swiss/css/vendors.css
Normal file
BIN
static/swiss/fonts/AdminCH_Symbols.eot
Executable file
64
static/swiss/fonts/AdminCH_Symbols.svg
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>Generated by IcoMoon</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="icomoon" horiz-adv-x="1024">
|
||||||
|
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||||
|
<missing-glyph horiz-adv-x="1024" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||||
|
<glyph unicode="" glyph-name="uni21" horiz-adv-x="364" d="M292.812 247.296v-128q0-15.36-11.264-25.6t-25.6-11.264h-146.432q-14.336 0-25.6 11.264t-11.264 25.6v128q0 14.336 11.264 25.6t25.6 10.24h146.432q15.36 0 25.6-10.24t11.264-25.6zM309.196 850.432l-15.36-439.296q-1.024-14.336-12.288-25.6t-25.6-10.24h-146.432q-14.336 0-25.6 10.24t-12.288 25.6l-15.36 439.296q-1.024 14.336 9.216 25.6t25.6 11.264h183.296q14.336 0 25.6-11.264t9.216-25.6z" />
|
||||||
|
<glyph unicode="" glyph-name="uni23" d="M658.286 9.143h73.143v-73.143h-438.857v73.143h73.143v512h-73.143v73.143h365.714v-585.143zM658.286 813.714c0-80.791-65.494-146.286-146.286-146.286s-146.286 65.494-146.286 146.286c0 80.791 65.494 146.286 146.286 146.286s146.286-65.494 146.286-146.286z" />
|
||||||
|
<glyph unicode="" glyph-name="uni24" horiz-adv-x="960" d="M0 444.928q0 26.624 18.432 44.032t44.032 17.408h657.408l-247.808 249.856q-19.456 18.432-19.456 45.056t19.456 43.008q17.408 19.456 43.008 19.456t45.056-19.456l399.36-399.36-399.36-400.384q-20.48-18.432-45.056-18.432t-43.008 18.432-19.456 45.056 19.456 44.032l247.808 247.808h-657.408q-25.6 0-44.032 18.432t-18.432 45.056z" />
|
||||||
|
<glyph unicode="" glyph-name="uni2B" d="M0.806 90.336c-0.244 2.532-0.452 5.070-0.584 7.63 0.13-2.56 0.34-5.098 0.584-7.63zM235.908 394.852c92.010-2.738 153.734 92.698 137.862 213.198-15.894 120.48-103.396 217.168-195.408 219.922-92.026 2.73-153.74-89.482-137.852-210 15.882-120.468 103.352-220.374 195.398-223.12zM1024 704v85.31c0 93.88-76.782 170.69-170.658 170.69h-682.656c-92.276 0-168.012-74.232-170.564-165.926 58.362 51.386 139.324 94.316 222.874 94.316 89.304 0 357.244 0 357.244 0l-79.948-67.618h-113.268c75.13-28.804 115.156-116.124 115.156-205.722 0-75.248-41.81-139.954-100.888-185.968-57.644-44.902-68.572-63.708-68.572-101.878 0-32.578 61.746-88 94.032-110.788 94.382-66.538 124.916-128.312 124.916-231.456 0-16.428-2.042-32.83-6.066-48.96h307.742c93.874 0 170.656 76.75 170.656 170.69v533.308h-192v-191.998h-64v192h-191.998v64h191.998v192h64v-192h192zM185.886 194.064c21.614 0 41.422 0.59 61.936 0.59-27.146 26.334-48.626 58.6-48.626 98.38 0 23.608 7.564 46.336 18.134 66.52-10.782-0.77-21.79-0.994-33.126-0.994-74.356 0-137.506 24.076-184.204 63.854v-67.242l0.006-201.73c53.44 25.374 116.888 40.622 185.88 40.622zM3.42 72.742c-1.112 5.458-1.966 11.006-2.542 16.634 0.574-5.628 1.43-11.176 2.542-16.634zM455.45 7.154c-15.058 58.806-68.454 87.964-142.888 139.568-27.072 8.732-56.894 13.874-88.894 14.208-89.618 0.964-173.108-34.942-220.216-88.372 15.92-77.706 85.034-136.558 167.234-136.558h286.444c1.816 11.128 2.696 22.632 2.696 34.432 0 12.534-1.534 24.792-4.376 36.722z" />
|
||||||
|
<glyph unicode="" glyph-name="uni2C" horiz-adv-x="584" d="M584.5 557.568q0-14.336-10.24-25.6l-256-256q-11.264-11.264-25.6-11.264t-25.6 11.264l-256 256q-11.264 11.264-11.264 25.6t11.264 25.6 25.6 11.264h512q14.336 0 25.6-11.264t10.24-25.6z" />
|
||||||
|
<glyph unicode="" glyph-name="uni2E" horiz-adv-x="364" d="M365.516 704v-512q0-14.336-10.24-25.6t-26.624-11.264-25.6 11.264l-256 256q-10.24 11.264-10.24 25.6t10.24 25.6l256 256q11.264 11.264 25.6 11.264t26.624-11.264 10.24-25.6z" />
|
||||||
|
<glyph unicode="" glyph-name="uni30" d="M1024 448c0-282.77-229.23-512-512-512s-512 229.23-512 512c0 282.77 229.23 512 512 512s512-229.23 512-512z" />
|
||||||
|
<glyph unicode="" glyph-name="uni31" horiz-adv-x="1025" d="M997.696 896.928c-18.432 17.76-39.936 26.624-64.512 26.624h-841.728c-25.248 0-46.752-8.864-64.512-26.624s-26.624-39.264-26.624-64.512v-621.568c0-24.576 8.864-46.080 26.624-64.512s39.264-27.648 64.512-27.648h316.864c-4.032-8.992-33.344-72.512-58.080-72.512h-111.328c-5.472 0.672-9.888-1.024-13.312-5.12s-5.12-8.544-5.12-13.312v-36.864c0-4.096 1.696-8.192 5.12-12.288s7.84-6.144 13.312-6.144h547.84c5.472 0.672 9.888 2.72 13.312 6.144s5.12 7.52 5.12 12.288v36.864c0 5.472-1.696 9.888-5.12 13.312s-7.84 5.12-13.312 5.12h-112c-25.952 0-54.24 63.52-58.112 72.512h316.544c25.248 0.672 46.752 9.888 64.512 27.648s26.624 39.264 26.624 64.512v621.568c0.672 25.248-8.192 46.752-26.624 64.512zM951.616 357.28c-0.672-5.472-2.72-9.888-6.144-13.312s-7.52-5.12-12.288-5.12h-841.728c-4.096 0-8.192 1.696-12.288 5.12s-6.144 7.84-6.144 13.312v475.136c0.672 4.096 2.72 8.192 6.144 12.288s7.52 6.144 12.288 6.144h841.728c4.096-0.672 8.192-2.72 12.288-6.144s6.144-7.52 6.144-12.288v-475.136z" />
|
||||||
|
<glyph unicode="" glyph-name="uni32" horiz-adv-x="1025" d="M992.672 192v576c0 35.2-28.8 64-64 64h-832.672c-35.2 0-64-28.8-64-64v-576h-32v-64c0-35.2 28.8-64 64-64h896.672c35.2 0 64 28.8 64 64v64h-32zM112.32 752h800v-480h-800v480zM624.32 112h-224c-8.8 0-16 7.2-16 16s7.2 16 16 16h224c8.8 0 16-7.2 16-16s-7.168-16-16-16z" />
|
||||||
|
<glyph unicode="" glyph-name="uni33" horiz-adv-x="1025" d="M736.352 960h-448c-35.2 0-64-28.8-64-64v-896c0-35.2 28.8-64 64-64h448c35.2 0 64 28.8 64 64v896c0 35.2-28.8 64-64 64zM416.352 896h192v-32h-192v32zM512.352-32c-26.496 0-48 21.504-48 48s21.504 48 48 48c26.496 0 48-21.504 48-48s-21.504-48-48-48zM736.352 96h-448v704h448v-704z" />
|
||||||
|
<glyph unicode="" glyph-name="uni34" horiz-adv-x="1025" d="M960.352 736h-896c-35.2 0-64-28.8-64-64v-448c0-35.2 28.8-64 64-64h896c35.2 0 64 28.8 64 64v448c0 35.2-28.8 64-64 64zM96.352 352h-32v192h32v-192zM864.352 224h-704v448h704v-448zM944.352 400c-26.496 0-48 21.504-48 48s21.504 48 48 48 48-21.504 48-48c0-26.496-21.504-48-48-48z" />
|
||||||
|
<glyph unicode="" glyph-name="uni35" horiz-adv-x="1025" d="M791.616 960.352c57.6 0 104.736-43.2 104.736-96v-832.672c0-52.8-47.136-96-104.736-96h-558.56c-57.6 0-104.736 43.2-104.736 96v832.672c0 52.8 47.136 96 104.736 96h558.56zM224.352 863.648v-832h576v832h-576z" />
|
||||||
|
<glyph unicode="" glyph-name="uni36" horiz-adv-x="1025" d="M1024.672 168.736c0-57.6-43.2-104.736-96-104.736h-832.672c-52.8 0-96 47.136-96 104.736v558.528c0 57.6 43.2 104.736 96 104.736h832.672c52.8 0 96-47.136 96-104.736v-558.528zM928 736h-832v-576h832v576z" />
|
||||||
|
<glyph unicode="" glyph-name="uni3A" horiz-adv-x="364" d="M328.652 448q0-14.336-10.24-25.6l-256-256q-11.264-11.264-25.6-11.264t-25.6 11.264-11.264 25.6v512q0 15.36 11.264 25.6t25.6 11.264 25.6-11.264l256-256q10.24-10.24 10.24-25.6z" />
|
||||||
|
<glyph unicode="" glyph-name="uni3B" horiz-adv-x="584" d="M584.5 264.704q0-14.336-10.24-25.6t-25.6-10.24h-512q-15.36 0-25.6 10.24t-11.264 25.6 11.264 26.624l256 256q10.24 10.24 25.6 10.24t25.6-10.24l256-256q10.24-11.264 10.24-26.624z" />
|
||||||
|
<glyph unicode="" glyph-name="uni3C" horiz-adv-x="348" d="M247.808 730.624q14.336 16.384 39.936 16.384t41.984-16.384q38.912-36.864 0-81.92l-190.464-200.704 190.464-198.656q38.912-45.056 0-81.92-16.384-16.384-40.96-16.384t-40.96 16.384l-231.424 241.664q-16.384 16.384-16.384 38.912 0 24.576 16.384 40.96 210.944 219.136 231.424 241.664z" />
|
||||||
|
<glyph unicode="" glyph-name="uni3E" horiz-adv-x="348" d="M100.352 730.624l231.424-241.664q16.384-16.384 16.384-40.96 0-22.528-16.384-38.912l-231.424-241.664q-16.384-16.384-40.96-16.384t-40.96 16.384q-36.864 36.864 0 81.92l190.464 198.656-190.464 200.704q-36.864 45.056 0 81.92 16.384 16.384 41.984 16.384t39.936-16.384z" />
|
||||||
|
<glyph unicode="" glyph-name="uni3F" d="M951.296 411.136q-87.040 135.168-218.112 201.728 34.816-59.392 34.816-128 0-106.496-74.752-181.248t-181.248-74.752-181.248 74.752-74.752 181.248q0 68.608 34.816 128-131.072-66.56-218.112-201.728 76.8-116.736 191.488-186.368t247.808-69.632 247.808 69.632 191.488 186.368zM539.648 631.296q0 11.264-8.192 19.456t-19.456 7.168q-71.68 0-122.88-51.2t-51.2-121.856q0-12.288 8.192-19.456t19.456-8.192 19.456 8.192 8.192 19.456q0 49.152 34.816 83.968t83.968 34.816q11.264 0 19.456 8.192t8.192 19.456zM1024 411.136q0-19.456-11.264-38.912-79.872-132.096-215.040-210.944t-285.696-78.848-285.696 78.848-215.040 210.944q-11.264 19.456-11.264 38.912t11.264 39.936q79.872 131.072 215.040 209.92t285.696 79.872 285.696-79.872 215.040-209.92q11.264-20.48 11.264-39.936z" />
|
||||||
|
<glyph unicode="" glyph-name="uni41" d="M903.424 760.576l-142.88 142.848c-31.072 31.136-92.544 56.576-136.544 56.576h-480c-44 0-80-36-80-112v-864c0-12 36-48 80-48h736c44 0 80 36 80 80v608c0 44-25.472 105.472-56.576 136.576zM704 867.456c4.352-3.040 8.192-6.144 11.328-9.28l142.848-142.848c3.136-3.136 6.24-6.976 9.28-11.328h-163.456v163.456zM128 880c0 8.672 7.328 16 16 16h480c4.832 0 10.24-0.608 16-1.696v-254.304h254.304c1.088-5.76 1.696-11.168 1.696-16v-48h-768v304zM880 0h-736c-8.672 0-16 7.328-16 16v112h768v-112c0-8.672-7.328-16-16-16zM876.928 376.224v-57.248h-111.328v-116.864h-67.904v301.152h198.624v-57.28h-130.72v-69.76h111.328zM627.456 354.048c0-25.92-3.456-48.384-10.4-67.488s-16.64-34.848-29.088-47.296c-12.48-12.48-27.328-21.792-44.576-27.936s-36.352-9.248-57.28-9.248h-85.472v301.184h81.76c21.856 0 41.728-2.912 59.584-8.768s33.12-14.848 45.728-27.040c12.64-12.16 22.4-27.648 29.344-46.432s10.4-41.088 10.4-66.976zM535.776 428.192c-6.944 7.232-15.232 12.384-24.96 15.488-9.696 3.072-20.416 4.608-32.096 4.608h-9.696v-191.232h9.696c11.712 0 22.4 1.696 32.096 5.088s18.016 8.864 24.96 16.416c6.944 7.552 12.32 17.472 16.16 29.792s5.76 27.552 5.76 45.728c0 17.856-1.92 32.864-5.76 45.024s-9.248 21.856-16.16 29.088zM355.424 406.272c0-17.6-3.2-32.8-9.472-45.728-6.304-12.96-14.848-23.552-25.632-31.872-10.784-8.352-23.264-14.464-37.408-18.464-14.176-4-29.248-6.016-45.28-6.016h-42.080v-102.048h-67.872v301.152h109.952c16.32 0 31.648-1.632 45.952-4.864s26.784-8.608 37.408-16.16c10.624-7.552 19.008-17.568 25.184-30.016 6.176-12.512 9.248-27.84 9.248-45.984zM233.472 449.248h-37.92v-91.008l37.92-0.032c36.64 0 54.976 16 54.976 48.096 0 15.712-4.608 26.784-13.856 33.248s-22.944 9.696-41.12 9.696z" />
|
||||||
|
<glyph unicode="" glyph-name="uni42" horiz-adv-x="802" d="M292.506 539.136v-328.704q0-8.192-5.12-13.312t-13.312-5.12h-36.864q-8.192 0-13.312 5.12t-5.12 13.312v328.704q0 8.192 5.12 13.312t13.312 5.12h36.864q8.192 0 13.312-5.12t5.12-13.312zM438.938 539.136v-328.704q0-8.192-5.12-13.312t-13.312-5.12h-36.864q-8.192 0-13.312 5.12t-5.12 13.312v328.704q0 8.192 5.12 13.312t13.312 5.12h36.864q8.192 0 13.312-5.12t5.12-13.312zM584.346 539.136v-328.704q0-8.192-5.12-13.312t-12.288-5.12h-36.864q-8.192 0-13.312 5.12t-5.12 13.312v328.704q0 8.192 5.12 13.312t13.312 5.12h36.864q7.168 0 12.288-5.12t5.12-13.312zM658.074 125.44v541.696h-512v-541.696q0-12.288 4.096-22.528t8.192-15.36 6.144-5.12h475.136q2.048 0 6.144 5.12t8.192 15.36 4.096 22.528zM274.074 740.864h256l-27.648 66.56q-4.096 5.12-9.216 6.144h-181.248q-6.144-1.024-10.24-6.144zM804.506 722.432v-36.864q0-8.192-5.12-13.312t-13.312-5.12h-55.296v-541.696q0-47.104-26.624-81.92t-64.512-34.816h-475.136q-37.888 0-64.512 33.792t-27.648 80.896v543.744h-54.272q-8.192 0-13.312 5.12t-5.12 13.312v36.864q0 8.192 5.12 13.312t13.312 5.12h176.128l39.936 95.232q9.216 21.504 31.744 35.84t45.056 15.36h182.272q22.528 0 45.056-15.36t30.72-35.84l39.936-95.232h177.152q8.192 0 13.312-5.12t5.12-13.312z" />
|
||||||
|
<glyph unicode="" glyph-name="uni43" horiz-adv-x="1026" d="M972.8 821.76q23.552 0 39.936-18.432t14.336-43.008l-54.272-373.76q-2.048-18.432-17.408-31.744t-34.816-12.288h-604.16l9.216-54.272h540.672q22.528 0 37.888-16.384t16.384-36.864-16.384-37.888-37.888-15.36h-585.728q-20.48 0-35.84 13.312t-16.384 30.72l-100.352 595.968h-73.728q-22.528 0-37.888 15.36t-16.384 37.888 16.384 36.864 37.888 16.384h118.784q19.456 0 34.816-12.288t17.408-32.768l11.264-61.44h736.256zM911.36 714.24h-204.8v-105.472h189.44zM653.312 714.24h-160.768v-105.472h160.768v105.472zM653.312 554.496h-160.768v-106.496h160.768v106.496zM440.32 714.24h-186.368l18.432-107.52q3.072 2.048 8.192 2.048h159.744v105.472zM280.576 554.496l17.408-106.496h142.336v106.496h-159.744zM706.56 448h167.936l14.336 106.496h-182.272v-106.496zM280.576 48.64q0 79.872 78.848 79.872 80.896 0 80.896-79.872t-80.896-79.872q-78.848 0-78.848 79.872zM760.832 48.64q0 79.872 78.848 79.872 80.896 0 80.896-79.872t-80.896-79.872q-78.848 0-78.848 79.872z" />
|
||||||
|
<glyph unicode="" glyph-name="uni46" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
|
||||||
|
<glyph unicode="" glyph-name="uni49" d="M219.136 155.136q0-45.056-31.744-77.824t-77.824-31.744-77.824 31.744-31.744 77.824 31.744 77.824 77.824 31.744 77.824-31.744 31.744-77.824zM219.136 448q0-46.080-31.744-77.824t-77.824-31.744-77.824 31.744-31.744 77.824 31.744 77.824 77.824 31.744 77.824-31.744 31.744-77.824zM1024 210.432v-109.568q0-7.168-5.12-13.312t-13.312-5.12h-694.272q-8.192 0-13.312 5.12t-5.12 13.312v109.568q0 7.168 5.12 12.288t13.312 6.144h694.272q7.168 0 13.312-6.144t5.12-12.288zM219.136 740.864q0-46.080-31.744-77.824t-77.824-31.744-77.824 31.744-31.744 77.824 31.744 77.824 77.824 31.744 77.824-31.744 31.744-77.824zM1024 503.296v-110.592q0-7.168-5.12-12.288t-13.312-5.12h-694.272q-8.192 0-13.312 5.12t-5.12 12.288v110.592q0 7.168 5.12 12.288t13.312 5.12h694.272q7.168 0 13.312-5.12t5.12-12.288zM1024 795.136v-109.568q0-7.168-5.12-12.288t-13.312-6.144h-694.272q-8.192 0-13.312 6.144t-5.12 12.288v109.568q0 8.192 5.12 13.312t13.312 5.12h694.272q7.168 0 13.312-5.12t5.12-13.312z" />
|
||||||
|
<glyph unicode="" glyph-name="uni4D" horiz-adv-x="906" d="M593.92 402.944l264.192-273.408h-807.936l265.216 270.336 138.24-130.048zM64.512 766.464h778.24l-389.12-370.688zM644.096 450.048l263.168 247.808v-520.192zM0 177.664v520.192l265.216-248.832z" />
|
||||||
|
<glyph unicode="" glyph-name="uni50" horiz-adv-x="962" d="M886.784 667.136c40.96 0 76.8-35.84 76.8-79.872v-374.784c0-43.008-35.84-78.848-76.8-78.848h-77.824l34.816-156.672h-707.584l27.648 156.672h-83.968c-46.080 0-79.872 35.84-79.872 78.848v374.784c0 44.032 33.792 79.872 79.872 79.872h98.304v119.808h34.816v132.096h539.648v-132.096h34.816v-119.808h99.328zM248.832 870.912v-299.008h467.968v299.008h-467.968zM133.12 472.576c30.72 0 56.32 24.576 56.32 55.296 0 28.672-25.6 54.272-56.32 54.272-29.696 0-55.296-25.6-55.296-54.272 0-30.72 25.6-55.296 55.296-55.296zM197.632 24.064h580.608l-48.128 247.808h-495.616zM455.68 139.776h-142.336v35.84h142.336v-35.84zM658.432 139.776h-142.336v35.84h142.336v-35.84z" />
|
||||||
|
<glyph unicode="" glyph-name="uni52" horiz-adv-x="802" d="M218.778 192q0-46.080-31.744-77.824t-77.824-31.744-77.824 31.744-31.744 77.824 31.744 77.824 77.824 31.744 77.824-31.744 31.744-77.824zM511.642 121.344q1.024-15.36-9.216-26.624-11.264-12.288-27.648-12.288h-76.8q-14.336 0-24.576 9.216t-11.264 23.552q-12.288 131.072-105.472 224.256t-224.256 105.472q-14.336 1.024-23.552 11.264t-9.216 24.576v76.8q0 16.384 12.288 26.624 9.216 10.24 24.576 10.24h3.072q91.136-7.168 174.080-46.080t148.48-103.424q64.512-64.512 103.424-148.48t46.080-175.104zM804.506 120.32q1.024-15.36-10.24-26.624-10.24-11.264-26.624-11.264h-81.92q-14.336 0-25.6 10.24t-11.264 23.552q-6.144 122.88-57.344 233.472t-132.096 192.512-192.512 132.096-232.448 58.368q-14.336 0-24.576 11.264t-10.24 24.576v81.92q0 15.36 11.264 26.624 10.24 10.24 25.6 10.24h1.024q150.528-8.192 286.72-68.608t243.712-167.936q106.496-106.496 167.936-243.712t68.608-286.72z" />
|
||||||
|
<glyph unicode="" glyph-name="uni53" d="M993.739 104.201l-213.99 212.347c41.476 64.862 65.525 141.72 65.525 224.057 0 231.257-189.591 419.396-422.638 419.396-233.041 0-422.635-188.139-422.635-419.396s189.588-419.396 422.635-419.396c78.851 0 152.719 21.56 215.964 59.024l215.877-214.228c92.112-91.403 231.456 46.712 139.263 138.197zM131.050 540.604c0 159.551 130.798 289.359 291.586 289.359s291.595-129.805 291.595-289.359-130.805-289.356-291.595-289.356c-160.786 0-291.586 129.806-291.586 289.356z" />
|
||||||
|
<glyph unicode="" glyph-name="uni57" d="M639.776 484.096h44.224l-51.008-226.176-66.336 318.016h-106.56l-77.12-318.016-57.792 318.016h-111.392l113.088-511.872h108.832l76.288 302.688 68.256-302.688h100.352l129.632 511.872h-170.464zM903.424 760.576l-142.88 142.848c-31.072 31.136-92.544 56.576-136.544 56.576h-480c-44 0-80-36-80-80v-864c0-44 36-80 80-80h736c44 0 80 36 80 80v608c0 44-25.472 105.472-56.576 136.576zM858.176 715.328c3.136-3.136 6.24-6.976 9.28-11.328h-163.456v163.456c4.352-3.040 8.192-6.144 11.328-9.28l142.848-142.848zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16h480c4.832 0 10.24-0.608 16-1.696v-254.304h254.304c1.088-5.76 1.696-11.168 1.696-16v-608z" />
|
||||||
|
<glyph unicode="" glyph-name="uni58" d="M743.040 576h-135.296l-95.744-141.024-95.744 141.024h-135.296l162.176-242.464-182.976-269.536h262.24v91.584h-60.544l50.144 74.976 111.392-166.56h140.448l-182.976 269.536zM903.424 760.576l-142.88 142.848c-31.072 31.136-92.544 56.576-136.544 56.576h-480c-44 0-80-36-80-80v-864c0-44 36-80 80-80h736c44 0 80 36 80 80v608c0 44-25.472 105.472-56.576 136.576zM858.176 715.328c3.136-3.136 6.24-6.976 9.28-11.328h-163.456v163.456c4.352-3.040 8.192-6.144 11.328-9.28l142.848-142.848zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16h480c4.832 0 10.24-0.608 16-1.696v-254.304h254.304c1.088-5.76 1.696-11.168 1.696-16v-608z" />
|
||||||
|
<glyph unicode="" glyph-name="uni5E" horiz-adv-x="592" d="M577.536 376.32q16.384-16.384 16.384-41.984t-16.384-41.984q-38.912-38.912-79.872 0l-200.704 192.512-200.704-192.512q-40.96-38.912-79.872 0-16.384 16.384-16.384 41.984t16.384 41.984l239.616 229.376q16.384 16.384 40.96 16.384t40.96-16.384z" />
|
||||||
|
<glyph unicode="" glyph-name="uni63" d="M320 576h128v-128h-128zM512 576h128v-128h-128zM704 576h128v-128h-128zM128 192h128v-128h-128zM320 192h128v-128h-128zM512 192h128v-128h-128zM320 384h128v-128h-128zM512 384h128v-128h-128zM704 384h128v-128h-128zM128 384h128v-128h-128zM832 960v-64h-128v64h-448v-64h-128v64h-128v-1024h960v1024h-128zM896 0h-832v704h832v-704z" />
|
||||||
|
<glyph unicode="" glyph-name="uni64" d="M903.432 760.57l-142.864 142.862c-31.112 31.112-92.568 56.568-136.568 56.568h-480c-44 0-80-36-80-80v-864c0-44 36-80 80-80h736c44 0 80 36 80 80v608c0 44-25.456 105.458-56.568 136.57zM858.178 715.314c3.13-3.13 6.25-6.974 9.28-11.314h-163.458v163.456c4.34-3.030 8.184-6.15 11.314-9.28l142.864-142.862zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16h480c4.832 0 10.254-0.61 16-1.704v-254.296h254.296c1.094-5.746 1.704-11.166 1.704-16v-608z" />
|
||||||
|
<glyph unicode="" glyph-name="uni65" horiz-adv-x="768" d="M0 64v768h320.512v-768h-320.512zM448.512 64v768h319.488v-768h-319.488z" />
|
||||||
|
<glyph unicode="" glyph-name="uni66" horiz-adv-x="876" d="M746.444 435.712l13.312 124.928h-112.64v62.464q0 27.648 8.192 38.912t40.96 11.264h63.488v124.928h-100.352q-87.040 0-124.928-40.96t-36.864-121.856v-74.752h-75.776v-124.928h75.776v-363.52h149.504v363.52h99.328zM877.516 722.432v-548.864q0-67.584-48.128-115.712t-116.736-49.152h-547.84q-68.608 0-116.736 49.152t-48.128 115.712v548.864q0 67.584 48.128 115.712t116.736 49.152h547.84q68.608 0 116.736-49.152t48.128-115.712z" />
|
||||||
|
<glyph unicode="" glyph-name="uni67" horiz-adv-x="446" d="M0 64v768h128v-352.256l320.512 320.512v-704.512l-320.512 320.512v-352.256h-128z" />
|
||||||
|
<glyph unicode="" glyph-name="uni68" horiz-adv-x="446" d="M0 95.744v704.512l320.512-320.512v352.256h128v-768h-128v352.256z" />
|
||||||
|
<glyph unicode="" glyph-name="uni69" d="M219.136 283.136v-35.84q0-8.192-5.12-13.312t-13.312-5.12h-35.84q-7.168 0-13.312 5.12t-5.12 13.312v35.84q0 8.192 5.12 13.312t13.312 5.12h35.84q8.192 0 13.312-5.12t5.12-13.312zM219.136 429.568v-36.864q0-7.168-5.12-12.288t-13.312-5.12h-35.84q-7.168 0-13.312 5.12t-5.12 12.288v36.864q0 7.168 5.12 13.312t13.312 5.12h35.84q8.192 0 13.312-5.12t5.12-13.312zM219.136 576v-36.864q0-7.168-5.12-12.288t-13.312-6.144h-35.84q-7.168 0-13.312 6.144t-5.12 12.288v36.864q0 7.168 5.12 13.312t13.312 5.12h35.84q8.192 0 13.312-5.12t5.12-13.312zM877.568 283.136v-35.84q0-8.192-5.12-13.312t-13.312-5.12h-547.84q-8.192 0-13.312 5.12t-5.12 13.312v35.84q0 8.192 5.12 13.312t13.312 5.12h547.84q8.192 0 13.312-5.12t5.12-13.312zM877.568 429.568v-36.864q0-7.168-5.12-12.288t-13.312-5.12h-547.84q-8.192 0-13.312 5.12t-5.12 12.288v36.864q0 7.168 5.12 13.312t13.312 5.12h547.84q8.192 0 13.312-5.12t5.12-13.312zM877.568 576v-36.864q0-7.168-5.12-12.288t-13.312-6.144h-547.84q-8.192 0-13.312 6.144t-5.12 12.288v36.864q0 7.168 5.12 13.312t13.312 5.12h547.84q8.192 0 13.312-5.12t5.12-13.312zM951.296 173.568v475.136q0 8.192-6.144 13.312t-12.288 5.12h-841.728q-7.168 0-12.288-5.12t-6.144-13.312v-475.136q0-7.168 6.144-12.288t12.288-6.144h841.728q7.168 0 12.288 6.144t6.144 12.288zM1024 795.136v-621.568q0-37.888-26.624-64.512t-64.512-26.624h-841.728q-36.864 0-64.512 26.624t-26.624 64.512v621.568q0 37.888 26.624 64.512t64.512 27.648h841.728q37.888 0 64.512-27.648t26.624-64.512z" />
|
||||||
|
<glyph unicode="" glyph-name="uni6A" horiz-adv-x="670" d="M0 448l352.256 352.256v-320.512l319.488 320.512v-704.512l-319.488 320.512v-320.512z" />
|
||||||
|
<glyph unicode="" glyph-name="uni6B" horiz-adv-x="670" d="M0 95.744v704.512l320.512-320.512v320.512l351.232-352.256-351.232-352.256v320.512z" />
|
||||||
|
<glyph unicode="" glyph-name="uni6C" d="M804.864 429.568v-182.272q0-68.608-48.128-116.736t-116.736-48.128h-475.136q-68.608 0-116.736 48.128t-48.128 116.736v475.136q0 67.584 48.128 115.712t116.736 49.152h402.432q7.168 0 12.288-5.12t5.12-13.312v-36.864q0-8.192-5.12-13.312t-12.288-5.12h-402.432q-37.888 0-64.512-26.624t-27.648-64.512v-475.136q0-37.888 27.648-64.512t64.512-27.648h475.136q37.888 0 64.512 27.648t26.624 64.512v182.272q0 8.192 5.12 13.312t13.312 5.12h36.864q8.192 0 13.312-5.12t5.12-13.312zM1024 923.136v-291.84q0-15.36-11.264-26.624t-25.6-10.24-25.6 10.24l-100.352 101.376-372.736-372.736q-5.12-6.144-13.312-6.144t-13.312 6.144l-64.512 64.512q-6.144 6.144-6.144 13.312t6.144 13.312l372.736 372.736-101.376 100.352q-10.24 11.264-10.24 25.6t10.24 25.6 26.624 11.264h291.84q15.36 0 25.6-11.264t11.264-25.6z" />
|
||||||
|
<glyph unicode="" glyph-name="uni6D" d="M0 521.094h1024v-146.286h-1024v146.286zM0 155.281h1024v-146.088h-1024v146.088zM0 886.808h1024v-146.286h-1024v146.286z" />
|
||||||
|
<glyph unicode="" glyph-name="uni6F" d="M0 960l1024-1024h-1024z" />
|
||||||
|
<glyph unicode="" glyph-name="uni70" d="M897.984 821.76c-14.496 45.376-50.688 89.312-108.608 131.776-8.704 6.752-15.456 8.192-20.288 4.352-4.832-3.872-5.792-9.184-2.912-15.936 0.96-2.912 3.616-16.16 7.968-39.84 4.352-23.648 7.968-39.84 10.848-48.512 11.584-48.256-6.272-76.736-53.568-85.44-31.84-4.8-54.272-1.664-67.328 9.44-13.024 11.104-18.592 22.432-16.64 34.048-16.416 49.248-24.608 79.648-24.608 91.232-0.96 4.832-5.056 7.968-12.32 9.408-7.232 1.44-12.32-2.176-15.2-10.848-34.752-88.832-41.504-149.632-20.288-182.464 7.712-13.504 20.512-28.736 38.368-45.6 17.856-16.896 32.096-34.048 42.72-51.424s15.936-37.664 15.936-60.832l1.44-99.936-10.144-497.408c-0.96-20.288 8.192-29.44 27.52-27.52h66.624c16.416 0.96 24.608 11.104 24.608 30.4l-2.912 487.264 2.912 115.84c0 42.464 16.416 74.336 49.248 95.584 62.752 37.664 84.96 89.824 66.624 156.416zM398.432 800l-48 160h-96l-48-160h48v-384h-16c-17.6 0-32-14.4-32-32s7.2-32 16-32c8.8 0 16-14.4 16-32s-7.2-32-16-32c-8.8 0-16-14.4-16-32v-288c0-17.6 14.4-32 32-32h128c17.6 0 32 14.4 32 32v288c0 17.6-7.2 32-16 32s-16 14.4-16 32 7.2 32 16 32c8.8 0 16 14.4 16 32s-14.4 32-32 32h-16v384h48z" />
|
||||||
|
<glyph unicode="" glyph-name="uni71" horiz-adv-x="640" d="M0 64v768l640-384z" />
|
||||||
|
<glyph unicode="" glyph-name="uni73" d="M419.168 274.464l-69.28-15.392c-7.68 9.888-16.416 18.72-25.952 26.432l16.608 68.992-58.848 24.992-38.080-59.872c-12.16 1.536-24.576 1.664-37.024 0.32l-37.024 60.512-59.264-23.936 15.392-69.28c-9.888-7.68-18.72-16.384-26.432-25.952l-68.992 16.608-24.96-58.848 59.872-38.080c-1.536-12.16-1.664-24.608-0.32-37.024l-60.512-37.024 23.936-59.264 69.28 15.392c7.68-9.888 16.416-18.72 25.952-26.432l-16.608-68.992 58.848-24.992 38.080 59.872c12.16-1.536 24.576-1.664 37.024-0.32l37.024-60.512 59.264 23.936-15.392 69.28c9.888 7.68 18.72 16.416 26.432 25.952l68.992-16.608 24.96 58.848-59.872 38.080c1.536 12.16 1.664 24.608 0.32 37.024l60.544 37.024-23.968 59.264zM247.648 101.792c-32.736-13.216-69.984 2.592-83.2 35.328s2.592 69.984 35.328 83.2c32.736 13.216 69.984-2.592 83.2-35.328s-2.592-69.984-35.328-83.2zM960 608l56.64 42.496c-3.296 16.736-7.872 32.992-13.248 48.864l-70.24 8.928-32 55.424 27.68 64.8c-11.168 12.768-23.168 24.768-35.904 35.936l-65.184-27.328-55.424 32-8.448 70.080c-15.872 5.408-32.096 10.048-48.832 13.344l-43.040-56.544h-64l-42.496 56.64c-16.736-3.296-32.992-7.872-48.864-13.248l-8.928-70.24-55.424-32-64.8 27.68c-12.768-11.168-24.768-23.168-35.936-35.904l27.328-65.184-32-55.424-70.080-8.448c-5.408-15.872-10.048-32.096-13.344-48.832l56.544-43.040v-64l-56.64-42.496c3.296-16.736 7.872-32.992 13.248-48.864l70.24-8.928 32-55.424-27.68-64.8c11.168-12.768 23.168-24.768 35.904-35.936l65.184 27.328 55.424-32 8.448-70.080c15.872-5.408 32.096-10.048 48.832-13.344l43.040 56.544h64l42.496-56.64c16.736 3.296 32.992 7.872 48.864 13.248l8.928 70.24 55.424 32 64.8-27.68c12.768 11.168 24.768 23.168 35.936 35.904l-27.328 65.184 32 55.424 70.080 8.448c5.408 15.872 10.048 32.096 13.344 48.832l-56.544 43.040v64zM640 432c-79.52 0-144 64.48-144 144s64.48 144 144 144 144-64.48 144-144-64.48-144-144-144z" />
|
||||||
|
<glyph unicode="" glyph-name="uni74" horiz-adv-x="950" d="M925.388 726.528q-37.888-55.296-92.16-95.232 0-8.192 0-23.552 0-74.752-21.504-148.48t-65.536-142.336-105.472-119.808-147.456-83.968-185.344-30.72q-154.624 0-282.624 82.944 19.456-3.072 44.032-3.072 129.024 0 229.376 78.848-60.416 2.048-107.52 36.864t-65.536 91.136q19.456-2.048 34.816-2.048 24.576 0 49.152 6.144-64.512 13.312-106.496 63.488t-41.984 117.76v2.048q38.912-21.504 83.968-23.552-37.888 25.6-60.416 65.536t-22.528 88.064q0 50.176 25.6 93.184 69.632-84.992 167.936-136.192t212.992-56.32q-5.12 21.504-5.12 41.984 0 76.8 54.272 130.048t130.048 54.272q80.896 0 135.168-58.368 62.464 12.288 116.736 45.056-20.48-65.536-80.896-102.4 53.248 6.144 106.496 28.672z" />
|
||||||
|
<glyph unicode="" glyph-name="uni75" horiz-adv-x="768" d="M0 95.744v704.512l320.512-320.512v320.512l319.488-320.512v352.256h128v-768h-128v352.256l-319.488-320.512v320.512z" />
|
||||||
|
<glyph unicode="" glyph-name="uni76" horiz-adv-x="592" d="M577.536 521.728l-239.616-229.376q-18.432-18.432-40.96-18.432t-40.96 18.432l-239.616 229.376q-16.384 16.384-16.384 41.984t16.384 41.984q38.912 38.912 79.872 0l200.704-192.512 200.704 192.512q40.96 38.912 79.872 0 16.384-16.384 16.384-41.984t-16.384-41.984z" />
|
||||||
|
<glyph unicode="" glyph-name="uni77" horiz-adv-x="768" d="M0 64v768h768v-768h-768z" />
|
||||||
|
<glyph unicode="" glyph-name="uni78" d="M615.362 448l408.217-408.217-103.362-103.362-408.217 408.217-408.217-408.217-103.362 103.362 408.217 408.217-408.217 408.217 103.362 103.362 408.217-408.217 408.217 408.217 103.362-103.362z" />
|
||||||
|
<glyph unicode="" glyph-name="uni7A" horiz-adv-x="768" d="M0 64v768h128v-352.256l320.512 320.512v-320.512l319.488 320.512v-704.512l-319.488 320.512v-320.512l-320.512 320.512v-352.256h-128z" />
|
||||||
|
<glyph unicode="" glyph-name="uniE4" horiz-adv-x="836" d="M-0.204 379.392q0 25.6 18.432 44.032t45.056 18.432 43.008-18.432l249.856-248.832v657.408q0 25.6 18.432 44.032t44.032 18.432 44.032-18.432 18.432-44.032v-657.408l248.832 248.832q18.432 18.432 44.032 18.432t44.032-18.432 18.432-44.032-18.432-45.056l-399.36-399.36-400.384 399.36q-18.432 20.48-18.432 45.056z" />
|
||||||
|
<glyph unicode="" glyph-name="uniF6" horiz-adv-x="960" d="M0 451.072l399.36 400.384q19.456 18.432 45.056 18.432t44.032-18.432 18.432-45.056-18.432-44.032l-248.832-248.832h657.408q25.6 0 44.032-18.432t18.432-44.032-18.432-44.032-44.032-18.432h-657.408l248.832-248.832q18.432-18.432 18.432-45.056t-18.432-44.032-44.032-18.432-45.056 18.432z" />
|
||||||
|
<glyph unicode="" glyph-name="uniFC" horiz-adv-x="836" d="M-0.204 452.096q0 26.624 18.432 45.056l400.384 399.36 399.36-399.36q18.432-18.432 18.432-45.056t-18.432-44.032q-18.432-18.432-44.032-18.432t-44.032 18.432l-248.832 248.832v-657.408q0-25.6-18.432-44.032t-44.032-18.432q-26.624 0-45.056 18.432t-17.408 44.032v657.408l-249.856-248.832q-18.432-18.432-44.032-18.432t-44.032 18.432q-18.432 17.408-18.432 44.032z" />
|
||||||
|
</font></defs></svg>
|
||||||
|
After Width: | Height: | Size: 28 KiB |
BIN
static/swiss/fonts/AdminCH_Symbols.ttf
Executable file
BIN
static/swiss/fonts/AdminCH_Symbols.woff
Executable file
BIN
static/swiss/fonts/AdminCH_Symbols.woff2
Executable file
41
static/swiss/fonts/LICENSE
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
Hinweis
|
||||||
|
|
||||||
|
Schutzmechanismen für die Webfonts 'Frutiger'
|
||||||
|
|
||||||
|
Die Schweizerische Bundeskanzlei hat die Webfonts für die Schrift Frutiger für die Internetauftritte der ganzen Bundesverwaltung lizenziert. Hierbei musste die folgende Vertragsbedingung akzeptiert werden:
|
||||||
|
|
||||||
|
________________________________
|
||||||
|
5. Schutz der Schriften-Software
|
||||||
|
|
||||||
|
Die Bestellering und ggf. der Betreiber eines Webfont-Hosting Service sind dafür verantwortlich, dass die Schriften-Software nur hinsichtlich der lizenzierten Websites verwendet werden und nicht durch andere Websites benutzt oder von dort darauf verwiesen wird. Dies beinhaltet unter anderem die Einrichtung von hinreichenden Schutzmassnahmen, die die Verwendung der und/oder den Zugriff auf die Schriften-Software und/oder abgeleiteten Werke beschränken, beispielweise, indem die Nutzung von EOT-Schriften-Software auf die lizenzierten Websites beschränkt wird (Domain-Bindung) oder JavaScript oder andere Zugriffskontrollmechanismen den Verweise auf die Schriften-Software von nicht lizenzierten Quellen beschränken. Eine Schutzmassnahme, die den vom Browser gelieferten Referrer prüft, ist ebenfalls eine ausreichende Schutzmassnahme.
|
||||||
|
Die Verletzung dieser Pflicht stellt eine wesentliche Vertagsverletzung dar, welche die Lieferantin zur ausserordentlichen Kündigung berechtigt, wenn der Verletzung von der Bestellerin nicht innerhalb von vierzehn (14) Tagen nach der schriftlichen Mitteilung über die Verletzung abgeholfen wird.
|
||||||
|
_________________________________
|
||||||
|
|
||||||
|
|
||||||
|
Im Rahmen der Vertragsverhandlungen wurden die Auflagen vom Lizenzgeber wie folgt erläutert:
|
||||||
|
|
||||||
|
Technisch kann man natürlich alle diese Schutzmaßnahmen auf die eine oder andere Weise umgehen.
|
||||||
|
Bisher ging es uns hauptsächlich darum, den direkten Download der Font-Dateien zu verhindern bzw. zu erschweren. Das muss natürlich server-seitig passieren.
|
||||||
|
|
||||||
|
Hier ein Auszug aus einer E-Mail, die ich an einen Kunden gesendet habe:
|
||||||
|
|
||||||
|
Man kann das Herunterladen per Link auf jeden Fall durch HTTP referrer checking erschweren. D.h. ein Web Server liefert einen Web Font nur aus, wenn der vom anfragenden Browser mitgeschickte Referrer eine erlaubte URL ist.
|
||||||
|
|
||||||
|
Im u.a. Fall würde der WebFont also nur ausgeliefert, wenn er von einer HTML-Seite / CSS auf www.xxx.com verlinkt wird (dann ist der im Browser gesetzte Referrer www.xxx.com). Ko-piere ich den Link auf den WebFont heraus und rufe ihn direkt auf (der Browser sendet keinen Referrer) oder integriere den Link in einer anderen Webite (der Referrer wä-re www.anderewebsite.de), antwortet der Server mit einem 403/Forbidden Fehler.
|
||||||
|
|
||||||
|
Referrer checking lässt sich natürlich umgehen. Das nennt sich dann Referrer Spoofing. Dafür muss man aber entsprechendes Fachwissen haben bzw. entsprechende Tools kennen und nutzen.
|
||||||
|
|
||||||
|
So würde man Referrer checking bspw. beim Apache Web Server konfigurieren:
|
||||||
|
http://wiki.apache.org/httpd/DisableImageHotLinking
|
||||||
|
|
||||||
|
Ich würde eine solche "Hot-Link-Protection" als wirksame Schutzmaßnahme bezeichnen, die zwischen gültigen (korrekter Referrer) und ungültigen (Referrer ist eine andere Website oder leer) Anfragen unterscheidet.
|
||||||
|
|
||||||
|
|
||||||
|
Um die vertraglich eingegangen Auflagen einzuhalten legt die Bundeskanzlei mit der Abgabe der Schriften-Software fest:
|
||||||
|
|
||||||
|
• Die Webverantwortlichen der Departemente und der Bundeskanzlei sorgen dafür, dass die technischen Auflagen zum Schutz der Schriften-Software eingehalten werden, indem Sie die bundesinterne Betreiber (IKT-Leistungserbringer) über die zu implementierenden Schutzmechanismen informieren und eine Bestätigung verlangen, dass diese durchgeführt werden. Ist der Betreiber bundesextern, so wird die Auflage unter den besonderen Vertragbedigungen entsprechend vereinbart.
|
||||||
|
• Die Webverantwortlichen der Departemente verpflichten sich im Fall der Verletzung der Pflicht das Notwendige zu unternehmen, damit die Pflicht innerhalb von 14 Tagen eingehalten wird und die ausserordentlich Kündigung abgewendet werden kann.
|
||||||
|
|
||||||
|
Bern, 28. Februar 2014
|
||||||
|
|
||||||
|
Bundeskanzlei, SCI
|
||||||
6
static/swiss/fonts/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Frutiger
|
||||||
|
The Confederation Web Guidelines should come with Frutiger as the main font. But due to [licence](LICENSE) restrictions, the font files cannot be distributed on this repository.
|
||||||
|
A copy can be obtained on the [federal chancellery intranet](
|
||||||
|
https://intranet.bk.admin.ch/bk-intra/de/home/dl-koordination-bund/kommunikation/webforum-bund/Downloads.html) or directly requested per email: [webforum@bk.admin.ch](mailto:webforum@bk.admin.ch). The font files then have to be copied into the `src/assets/fonts` directory.
|
||||||
|
|
||||||
|
According to the Frutiger [licence](LICENSE), the font files have to be protected. Each project should ensure that only allowed domains have access the font. The proposed solution is to check that the REFERER http header is present and contains the project's domain.
|
||||||
BIN
static/swiss/fonts/glyphicons-halflings-regular.eot
Normal file
288
static/swiss/fonts/glyphicons-halflings-regular.svg
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata></metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
|
||||||
|
<font-face units-per-em="1200" ascent="960" descent="-240" />
|
||||||
|
<missing-glyph horiz-adv-x="500" />
|
||||||
|
<glyph horiz-adv-x="0" />
|
||||||
|
<glyph horiz-adv-x="400" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
|
||||||
|
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode=" " />
|
||||||
|
<glyph unicode="¥" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="650" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="1300" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="650" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="1300" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="433" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="325" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="216" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="216" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="162" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="260" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="72" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="260" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="325" />
|
||||||
|
<glyph unicode="€" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
|
||||||
|
<glyph unicode="₽" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
|
||||||
|
<glyph unicode="−" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="⌛" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
|
||||||
|
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
||||||
|
<glyph unicode="☁" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
|
||||||
|
<glyph unicode="⛺" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
|
||||||
|
<glyph unicode="✉" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
|
||||||
|
<glyph unicode="✏" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
|
||||||
|
<glyph unicode="" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
|
||||||
|
<glyph unicode="" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
|
||||||
|
<glyph unicode="" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
|
||||||
|
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
|
||||||
|
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
|
||||||
|
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
|
||||||
|
<glyph unicode="" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
|
||||||
|
<glyph unicode="" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
|
||||||
|
<glyph unicode="" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
|
||||||
|
<glyph unicode="" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
|
||||||
|
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
|
||||||
|
<glyph unicode="" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
|
||||||
|
<glyph unicode="" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
|
||||||
|
<glyph unicode="" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
|
||||||
|
<glyph unicode="" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
|
||||||
|
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
|
||||||
|
<glyph unicode="" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||||
|
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
|
||||||
|
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
|
||||||
|
<glyph unicode="" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
|
||||||
|
<glyph unicode="" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
|
||||||
|
<glyph unicode="" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
|
||||||
|
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
|
||||||
|
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
|
||||||
|
<glyph unicode="" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
|
||||||
|
<glyph unicode="" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
|
||||||
|
<glyph unicode="" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
|
||||||
|
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||||
|
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||||
|
<glyph unicode="" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
|
||||||
|
<glyph unicode="" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
|
||||||
|
<glyph unicode="" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
|
||||||
|
<glyph unicode="" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
|
||||||
|
<glyph unicode="" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
|
||||||
|
<glyph unicode="" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
|
||||||
|
<glyph unicode="" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
|
||||||
|
<glyph unicode="" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
|
||||||
|
<glyph unicode="" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
|
||||||
|
<glyph unicode="" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
|
||||||
|
<glyph unicode="" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
|
||||||
|
<glyph unicode="" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
|
||||||
|
<glyph unicode="" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
|
||||||
|
<glyph unicode="" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
|
||||||
|
<glyph unicode="" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
|
||||||
|
<glyph unicode="" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
|
||||||
|
<glyph unicode="" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
|
||||||
|
<glyph unicode="" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
|
||||||
|
<glyph unicode="" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||||
|
<glyph unicode="" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
|
||||||
|
<glyph unicode="" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
|
||||||
|
<glyph unicode="" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
|
||||||
|
<glyph unicode="" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
|
||||||
|
<glyph unicode="" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
|
||||||
|
<glyph unicode="" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
|
||||||
|
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
|
||||||
|
<glyph unicode="" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
|
||||||
|
<glyph unicode="" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
|
||||||
|
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
|
||||||
|
<glyph unicode="" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
|
||||||
|
<glyph unicode="" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
|
||||||
|
<glyph unicode="" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||||
|
<glyph unicode="" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||||
|
<glyph unicode="" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
|
||||||
|
<glyph unicode="" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
|
||||||
|
<glyph unicode="" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
|
||||||
|
<glyph unicode="" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
|
||||||
|
<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
|
||||||
|
<glyph unicode="" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
|
||||||
|
<glyph unicode="" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
|
||||||
|
<glyph unicode="" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
|
||||||
|
<glyph unicode="" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||||
|
<glyph unicode="" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
|
||||||
|
<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
|
||||||
|
<glyph unicode="" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
|
||||||
|
<glyph unicode="" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||||
|
<glyph unicode="" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
|
||||||
|
<glyph unicode="" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
|
||||||
|
<glyph unicode="" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
|
||||||
|
<glyph unicode="" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
|
||||||
|
<glyph unicode="" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
|
||||||
|
<glyph unicode="" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
|
||||||
|
<glyph unicode="" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
|
||||||
|
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
|
||||||
|
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
|
||||||
|
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
|
||||||
|
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
|
||||||
|
<glyph unicode="" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
|
||||||
|
<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
|
||||||
|
<glyph unicode="" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
|
||||||
|
<glyph unicode="" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
|
||||||
|
<glyph unicode="" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
|
||||||
|
<glyph unicode="" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
|
||||||
|
<glyph unicode="" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
|
||||||
|
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
|
||||||
|
<glyph unicode="" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
|
||||||
|
<glyph unicode="" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
|
||||||
|
<glyph unicode="" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
|
||||||
|
<glyph unicode="" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
|
||||||
|
<glyph unicode="" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||||
|
<glyph unicode="" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
|
||||||
|
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
|
||||||
|
<glyph unicode="" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
|
||||||
|
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||||
|
<glyph unicode="" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
|
||||||
|
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
|
||||||
|
<glyph unicode="" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||||
|
<glyph unicode="" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
|
||||||
|
<glyph unicode="" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||||
|
<glyph unicode="" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
|
||||||
|
<glyph unicode="" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
|
||||||
|
<glyph unicode="" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||||
|
<glyph unicode="" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||||
|
<glyph unicode="" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
|
||||||
|
<glyph unicode="" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||||
|
<glyph unicode="" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||||
|
<glyph unicode="" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
|
||||||
|
<glyph unicode="" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
|
||||||
|
<glyph unicode="" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
|
||||||
|
<glyph unicode="" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
|
||||||
|
<glyph unicode="" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
|
||||||
|
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
|
||||||
|
<glyph unicode="" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
|
||||||
|
<glyph unicode="" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
|
||||||
|
<glyph unicode="" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
|
||||||
|
<glyph unicode="" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
|
||||||
|
<glyph unicode="" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
|
||||||
|
<glyph unicode="" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
|
||||||
|
<glyph unicode="" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
|
||||||
|
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
|
||||||
|
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
|
||||||
|
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
|
||||||
|
<glyph unicode="" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
|
||||||
|
<glyph unicode="" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
|
||||||
|
<glyph unicode="" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
|
||||||
|
<glyph unicode="" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
|
||||||
|
<glyph unicode="" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
|
||||||
|
<glyph unicode="" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
|
||||||
|
<glyph unicode="" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
|
||||||
|
<glyph unicode="" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
|
||||||
|
<glyph unicode="" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
|
||||||
|
<glyph unicode="" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
|
||||||
|
<glyph unicode="" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
|
||||||
|
<glyph unicode="" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
|
||||||
|
<glyph unicode="" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
|
||||||
|
<glyph unicode="" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
|
||||||
|
<glyph unicode="" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
|
||||||
|
<glyph unicode="" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
|
||||||
|
<glyph unicode="" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
|
||||||
|
<glyph unicode="" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
|
||||||
|
<glyph unicode="" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||||
|
<glyph unicode="" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||||
|
<glyph unicode="" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
|
||||||
|
<glyph unicode="" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||||
|
<glyph unicode="" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||||
|
<glyph unicode="" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||||
|
<glyph unicode="" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
|
||||||
|
<glyph unicode="" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
|
||||||
|
<glyph unicode="" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
|
||||||
|
<glyph unicode="" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
|
||||||
|
<glyph unicode="" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||||
|
<glyph unicode="" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
|
||||||
|
<glyph unicode="" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
|
||||||
|
<glyph unicode="" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
|
||||||
|
<glyph unicode="" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
|
||||||
|
<glyph unicode="" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
|
||||||
|
<glyph unicode="" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||||
|
<glyph unicode="" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
|
||||||
|
<glyph unicode="" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
|
||||||
|
<glyph unicode="" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
|
||||||
|
<glyph unicode="" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
|
||||||
|
<glyph unicode="" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
|
||||||
|
<glyph unicode="" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
|
||||||
|
<glyph unicode="" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
|
||||||
|
<glyph unicode="" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
|
||||||
|
<glyph unicode="" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
|
||||||
|
<glyph unicode="" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
|
||||||
|
<glyph unicode="" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
|
||||||
|
<glyph unicode="" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
|
||||||
|
<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
|
||||||
|
<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
|
||||||
|
</font>
|
||||||
|
</defs></svg>
|
||||||
|
After Width: | Height: | Size: 106 KiB |
BIN
static/swiss/fonts/glyphicons-halflings-regular.ttf
Normal file
BIN
static/swiss/fonts/glyphicons-halflings-regular.woff
Normal file
BIN
static/swiss/fonts/glyphicons-halflings-regular.woff2
Normal file
BIN
static/swiss/img/FB-f-Logo__blue_29.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/swiss/img/Twitter_logo_blue.png
Normal file
|
After Width: | Height: | Size: 408 B |
BIN
static/swiss/img/bg-striped.png
Executable file
|
After Width: | Height: | Size: 1013 B |
BIN
static/swiss/img/chosen-sprite.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/swiss/img/chosen-sprite@2x.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/swiss/img/error.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
5
static/swiss/img/error.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64">
|
||||||
|
<circle cx="32" cy="32" r="25" stroke="red" stroke-width="7" fill="black" fill-opacity="0.2"/>
|
||||||
|
<rect x="28" y="7" width="8" height="50" fill="red" transform="rotate(45, 32, 32)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 306 B |
BIN
static/swiss/img/form-icons.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
71
static/swiss/img/form-icons.svg
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="15px" height="555.246px" viewBox="0 0 15 555.246" enable-background="new 0 0 15 555.246" xml:space="preserve">
|
||||||
|
<g transform="translate(0 0)">
|
||||||
|
<path d="M6.587,12.009L3.001,8.423l1.131-1.131l2.251,2.251l4.316-6.042L12,4.431L6.587,12.009z"/>
|
||||||
|
<path fill="#66afe9" d="M12,1.123c1.103,0,2,0.783,2,1.886v9c0,1.103-0.897,2.114-2,2.114H3c-1.103,0-2-1.011-2-2.114v-9
|
||||||
|
c0-1.103,0.897-1.886,2-1.886L12,1.123 M12,0.123H3c-1.65,0-3,1.236-3,2.886v9c0,1.65,1.35,3.114,3,3.114h9c1.65,0,3-1.464,3-3.114
|
||||||
|
v-9C15,1.359,13.65,0.123,12,0.123L12,0.123z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 0)">
|
||||||
|
<path d="M6.587,57.222l-3.586-3.586l1.131-1.131l2.251,2.251l4.316-6.042L12,49.644L6.587,57.222z"/>
|
||||||
|
<path fill="#757575" d="M12,46.123c1.103,0,2,0.996,2,2.099v9c0,1.103-0.897,1.901-2,1.901H3c-1.103,0-2-0.798-2-1.901v-9
|
||||||
|
c0-1.103,0.897-2.099,2-2.099H12 M12,45.123H3c-1.65,0-3,1.449-3,3.099v9c0,1.65,1.35,2.901,3,2.901h9c1.65,0,3-1.251,3-2.901v-9
|
||||||
|
C15,46.572,13.65,45.123,12,45.123L12,45.123z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 90)">
|
||||||
|
<path fill="#757575" d="M12,1.123c1.103,0,2,0.783,2,1.886v9c0,1.103-0.897,2.114-2,2.114H3c-1.103,0-2-1.011-2-2.114v-9
|
||||||
|
c0-1.103,0.897-1.886,2-1.886L12,1.123 M12,0.123H3c-1.65,0-3,1.236-3,2.886v9c0,1.65,1.35,3.114,3,3.114h9c1.65,0,3-1.464,3-3.114
|
||||||
|
v-9C15,1.359,13.65,0.123,12,0.123L12,0.123z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 135)">
|
||||||
|
<path fill="#454545" d="M6,6.123l4.5,4l4.5-4H6z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 180)">
|
||||||
|
<path fill="#757575" d="M11,7.5C11,9.433,9.433,11,7.5,11S4,9.433,4,7.5S5.567,4,7.5,4S11,5.567,11,7.5z"/>
|
||||||
|
<path fill="#66afe9" d="M7.5,1C11.084,1,14,3.916,14,7.5S11.084,14,7.5,14S1,11.084,1,7.5S3.916,1,7.5,1 M7.5,0
|
||||||
|
C3.358,0,0,3.358,0,7.5S3.358,15,7.5,15S15,11.642,15,7.5S11.642,0,7.5,0L7.5,0z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 180)">
|
||||||
|
<path fill="#757575" d="M11,52.614c0,1.933-1.567,3.5-3.5,3.5S4,54.547,4,52.614c0-1.933,1.567-3.5,3.5-3.5S11,50.681,11,52.614z"
|
||||||
|
/>
|
||||||
|
<path fill="#757575" d="M7.5,46.114c3.584,0,6.5,2.916,6.5,6.5s-2.916,6.5-6.5,6.5S1,56.198,1,52.614S3.916,46.114,7.5,46.114
|
||||||
|
M7.5,45.114c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5s7.5-3.358,7.5-7.5S11.642,45.114,7.5,45.114L7.5,45.114z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 270)">
|
||||||
|
<path fill="#757575" d="M7.5,1.141c3.584,0,6.5,2.916,6.5,6.5s-2.916,6.5-6.5,6.5S1,11.225,1,7.641S3.916,1.141,7.5,1.141
|
||||||
|
M7.5,0.141c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5s7.5-3.358,7.5-7.5S11.642,0.141,7.5,0.141L7.5,0.141z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 315)">
|
||||||
|
<path fill="#66afe9" d="M7.5,1C11.084,1,14,3.916,14,7.5S11.084,14,7.5,14S1,11.084,1,7.5S3.916,1,7.5,1 M7.5,0
|
||||||
|
C3.358,0,0,3.358,0,7.5S3.358,15,7.5,15S15,11.642,15,7.5S11.642,0,7.5,0L7.5,0z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 360)">
|
||||||
|
<path fill="#66afe9" d="M12,1c1.103,0,2,0.906,2,2.009v9C14,13.112,13.103,14,12,14H3c-1.103,0-2-0.888-2-1.991v-9
|
||||||
|
C1,1.906,1.897,1,3,1H12 M12,0H3C1.35,0,0,1.359,0,3.009v9C0,13.659,1.35,15,3,15h9c1.65,0,3-1.341,3-2.991v-9
|
||||||
|
C15,1.359,13.65,0,12,0L12,0z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 45)">
|
||||||
|
<path fill="#CCCCCC" d="M6.587,507.246l-3.586-3.586l1.131-1.131l2.251,2.251l4.316-6.042l1.301,0.93L6.587,507.246z"/>
|
||||||
|
<path fill="#CCCCCC" d="M12,496.246c1.103,0,2,0.897,2,2v9c0,1.103-0.897,2-2,2H3c-1.103,0-2-0.897-2-2v-9c0-1.103,0.897-2,2-2H12
|
||||||
|
M12,495.246H3c-1.65,0-3,1.35-3,3v9c0,1.65,1.35,3,3,3h9c1.65,0,3-1.35,3-3v-9C15,496.596,13.65,495.246,12,495.246L12,495.246z"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 315)">
|
||||||
|
<path fill="#CCCCCC" d="M7.5,91c3.584,0,6.5,2.916,6.5,6.5s-2.916,6.5-6.5,6.5S1,101.084,1,97.5S3.916,91,7.5,91 M7.5,90
|
||||||
|
C3.358,90,0,93.358,0,97.5s3.358,7.5,7.5,7.5s7.5-3.358,7.5-7.5S11.642,90,7.5,90L7.5,90z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 360)">
|
||||||
|
<path fill="#CCCCCC" d="M12,91c1.103,0,2,0.906,2,2.009v9c0,1.103-0.897,1.991-2,1.991H3c-1.103,0-2-0.888-2-1.991v-9
|
||||||
|
C1,91.906,1.897,91,3,91H12 M12,90H3c-1.65,0-3,1.359-3,3.009v9C0,103.659,1.35,105,3,105h9c1.65,0,3-1.341,3-2.991v-9
|
||||||
|
C15,91.359,13.65,90,12,90L12,90z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0 315)">
|
||||||
|
<path fill="#CCCCCC" d="M7.5,181c3.584,0,6.5,2.916,6.5,6.5s-2.916,6.5-6.5,6.5S1,191.084,1,187.5S3.916,181,7.5,181 M7.5,180
|
||||||
|
c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5s7.5-3.358,7.5-7.5S11.642,180,7.5,180L7.5,180z"/>
|
||||||
|
</g>
|
||||||
|
<path fill="#CCCCCC" d="M11,502.667c0,1.933-1.567,3.5-3.5,3.5S4,504.6,4,502.667s1.567-3.5,3.5-3.5S11,500.734,11,502.667z"/>
|
||||||
|
<rect x="15" y="238.123" fill="#757575" width="1" height="1.844"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.6 KiB |
BIN
static/swiss/img/ico/apple-touch-icon-114x114.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
static/swiss/img/ico/apple-touch-icon-120x120.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
static/swiss/img/ico/apple-touch-icon-144-precomposed.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/swiss/img/ico/apple-touch-icon-144x144.png
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
static/swiss/img/ico/apple-touch-icon-57x57.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |