diff --git a/.github/workflows/feedback.yml b/.github/workflows/feedback.yml new file mode 100644 index 000000000..9929d6cd1 --- /dev/null +++ b/.github/workflows/feedback.yml @@ -0,0 +1,50 @@ +name: feedback CD + +on: + push: + workflow_dispatch: + +jobs: + # JOB to run change detection + changes: + runs-on: ubuntu-latest + # Set job outputs to values from filter step + outputs: + feedback: ${{ steps.filter.outputs.feedback }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + feedback: + - '.github/**' + - 'feedback/**' + feedback-build: + needs: + - changes + if: ${{ needs.changes.outputs.feedback == 'true' }} + uses: ./.github/workflows/docker-build.yml + with: + image_suffix: feedback + context: ./feedback + dockerfile: Dockerfile + permissions: + contents: read + packages: write + feedback-deployment: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: + - feedback-build + steps: + - run: curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && chmod +x /usr/local/bin/argocd + - run: argocd app actions run navigatum-prod restart --kind Deployment --resource-name feedback --auth-token ${{ secrets.ARGOCD_TOKEN }} --server ${{ secrets.ARGOCD_SERVER }} + feedback-staging-deployment: + if: github.ref != 'refs/heads/main' + runs-on: ubuntu-latest + needs: + - feedback-build + steps: + - run: curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && chmod +x /usr/local/bin/argocd + - run: argocd app actions run pr-${{github.event.number}} restart --kind Deployment --resource-name feedback --auth-token ${{ secrets.ARGOCD_TOKEN }} --server ${{ secrets.ARGOCD_SERVER }} diff --git a/README.md b/README.md index ec2958c9d..1afafee51 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ For an overview of how the components work, have a look at the - `data/` contains the code to obtain and process the data - `server/` contains the API server written in Rust, including MeiliSearch as a search backend +- `feedback/` contains the feedback-API server written in Rust - `webclient/` contains a JS based web-frontend for the API - `deployment/` contains deployment related configuration - `map/` contains information about our own map, how to style it and how to run it diff --git a/deployment/README.md b/deployment/README.md index cdb7978f5..8785384e4 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -5,8 +5,10 @@ This Project details how to deploy the NavigaTUM-API, the webclient and the CDN The documentation for the specific sub-services can be found in the respective directories: - [Data](../data/README.md) -- [API/Server](../server/README.md) +- [API Server](../server/README.md) - [Website](../webclient/README.md) +- [Maps](../map/README.md) +- [Feedback](../feedback/README.md) ## General description diff --git a/deployment/k3s/templates/deployments/feedback-deployment.yaml b/deployment/k3s/templates/deployments/feedback-deployment.yaml new file mode 100644 index 000000000..bf38a11c2 --- /dev/null +++ b/deployment/k3s/templates/deployments/feedback-deployment.yaml @@ -0,0 +1,78 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: server + labels: + app: navigatum + deployment: feedback + namespace: {{ .Values.namespace }} +spec: + replicas: 1 + revisionHistoryLimit: 1 + selector: + matchLabels: + app: navigatum + deployment: feedback + strategy: + rollingUpdate: + maxSurge: 100% + maxUnavailable: 0% + type: RollingUpdate + template: + metadata: + labels: + app: navigatum + deployment: api + spec: + containers: + - name: feedback + image: "ghcr.io/tum-dev/navigatum-feedback:{{ .Values.branch }}" + imagePullPolicy: Always + {{ if or (.Values.server.GITHUB_TOKEN) (.Values.server.JWT_KEY) }} + envFrom: + - secretRef: + name: feedback-api-keys # GITHUB_TOKEN, JWT_KEY + {{ end }} + ports: + - containerPort: 6001 + name: feedback + securityContext: + readOnlyRootFilesystem: true + resources: + requests: + cpu: 1m + memory: 1Mi + limits: + cpu: 100m + memory: 100Mi + livenessProbe: + httpGet: + path: /api/feedback/health + port: api + failureThreshold: 2 + periodSeconds: 1 + startupProbe: + httpGet: + path: /api/feedback/health + port: api + failureThreshold: 6 + periodSeconds: 1 +{{ if or (.Values.server.GITHUB_TOKEN) (.Values.server.JWT_KEY) }} +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: feedback-api-keys + namespace: {{ .Values.namespace }} + labels: + app: navigatum + deployment: feedback +data: + {{ if .Values.server.GITHUB_TOKEN }} + GITHUB_TOKEN: {{ .Values.server.GITHUB_TOKEN }} + {{ end }} + {{ if .Values.server.JWT_KEY }} + JWT_KEY: {{ .Values.server.JWT_KEY }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/deployment/k3s/templates/deployments/server-deployment.yaml b/deployment/k3s/templates/deployments/server-deployment.yaml index f90890508..4a17db4fd 100644 --- a/deployment/k3s/templates/deployments/server-deployment.yaml +++ b/deployment/k3s/templates/deployments/server-deployment.yaml @@ -31,10 +31,10 @@ spec: - name: server image: "ghcr.io/tum-dev/navigatum-server:{{ .Values.branch }}" imagePullPolicy: Always - {{ if or (.Values.server.GITHUB_TOKEN) (.Values.server.MEILI_MASTER_KEY) (.Values.server.JWT_KEY) }} + {{ if .Values.server.MEILI_MASTER_KEY }} envFrom: - secretRef: - name: api-keys # GITHUB_TOKEN, MEILI_MASTER_KEY, JWT_KEY + name: server-api-keys # MEILI_MASTER_KEY {{ end }} ports: - containerPort: 8080 @@ -68,7 +68,7 @@ spec: {{ if .Values.server.MEILI_MASTER_KEY }} envFrom: - secretRef: - name: api-keys # MEILI_MASTER_KEY + name: server-api-keys # MEILI_MASTER_KEY env: - name: MEILI_ENV value: production @@ -94,25 +94,19 @@ spec: port: mieli-search failureThreshold: 60 periodSeconds: 1 -{{ if or (.Values.server.GITHUB_TOKEN) (.Values.server.MEILI_MASTER_KEY) (.Values.server.JWT_KEY) }} +{{ if .Values.server.MEILI_MASTER_KEY }} --- apiVersion: v1 kind: Secret type: Opaque metadata: - name: api-keys + name: server-api-keys namespace: {{ .Values.namespace }} labels: app: navigatum deployment: api data: - {{ if .Values.server.GITHUB_TOKEN }} - GITHUB_TOKEN: {{ .Values.server.GITHUB_TOKEN }} - {{ end }} {{ if .Values.server.MEILI_MASTER_KEY }} MEILI_MASTER_KEY: {{ .Values.server.MEILI_MASTER_KEY }} {{ end }} - {{ if .Values.server.JWT_KEY }} - JWT_KEY: {{ .Values.server.JWT_KEY }} - {{ end }} {{ end }} \ No newline at end of file diff --git a/deployment/k3s/templates/ingress/ingress.yaml b/deployment/k3s/templates/ingress/ingress.yaml index 29f5cf1eb..aeee17ef2 100644 --- a/deployment/k3s/templates/ingress/ingress.yaml +++ b/deployment/k3s/templates/ingress/ingress.yaml @@ -12,11 +12,17 @@ spec: # temporary workaround for traefik bug (interoperability with ingress) - kind: Rule match: Host(`{{ .Values.url }}`) && PathPrefix(`/.well-known/acme-challenge/`) - priority: 13 + priority: 14 services: - name: cm-acme-http-solver-wr5tp port: 8089 kind: Service + - kind: Rule + match: Host(`{{ .Values.url }}`) && PathPrefix(`/api/feedback/`) + priority: 13 + services: + - name: feedback-svc + port: 6001 - kind: Rule match: Host(`{{ .Values.url }}`) && PathPrefix(`/api/`) priority: 12 diff --git a/deployment/k3s/templates/service.yaml b/deployment/k3s/templates/service.yaml index f7511a337..673041cbe 100644 --- a/deployment/k3s/templates/service.yaml +++ b/deployment/k3s/templates/service.yaml @@ -21,6 +21,24 @@ spec: --- apiVersion: v1 kind: Service +metadata: + name: feedback-svc + labels: + app: navigatum + deployment: feedback + namespace: {{ .Values.namespace }} +spec: + type: ClusterIP + selector: + app: navigatum + deployment: feedback + ports: + - name: feedback + port: 6001 + targetPort: 6001 +--- +apiVersion: v1 +kind: Service metadata: name: maps-svc labels: diff --git a/feedback/.dockerignore b/feedback/.dockerignore new file mode 100644 index 000000000..a9d37c560 --- /dev/null +++ b/feedback/.dockerignore @@ -0,0 +1,2 @@ +target +Cargo.lock diff --git a/feedback/.gitignore b/feedback/.gitignore new file mode 100644 index 000000000..96ef6c0b9 --- /dev/null +++ b/feedback/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/feedback/Cargo.toml b/feedback/Cargo.toml new file mode 100644 index 000000000..7dbf0f5e0 --- /dev/null +++ b/feedback/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "navigatum-feedback" +version = "1.0.0" +authors = ["Markus A ", "Frank Elsinga "] +edition = "2021" +description = "Navigating around TUM with excellence – A feedback system to submit feedback via github issues" +repository = "https://github.com/TUM-Dev/navigatum" +readme = "README.md" +license = "GPL-3.0" +keywords = ["website", "feedback", "api-rest", "tum"] + +[[bin]] +name = "navigatum-feedback" +path = "src/main.rs" + +[profile.release] +strip = true + +[dependencies] +regex = "1.7.0" +log = "0.4.17" +octocrab = "0.17.0" +actix-web = "4.2.1" +serde = { version = "1.0.148", features = ["derive"] } +serde_json = "1.0.89" +actix-cors = "0.6.4" +tokio = { version = "1.22.0", features = ["full"] } +rand = "0.8.5" +structopt = "0.3.26" +env_logger = "0.10.0" +jsonwebtoken = "8.1.1" +chrono = "0.4.23" diff --git a/feedback/Dockerfile b/feedback/Dockerfile new file mode 100644 index 000000000..b324d21bd --- /dev/null +++ b/feedback/Dockerfile @@ -0,0 +1,27 @@ +# Compile +FROM rust:1.65-alpine AS compiler + +RUN apk add -q --update-cache --no-cache build-base openssl-dev + +WORKDIR /nav +COPY ./Cargo.* ./ +COPY ./src ./src +RUN RUSTFLAGS="-C target-feature=-crt-static" cargo build --release + +# RUN +FROM alpine:3.17 + +RUN apk update --quiet \ + && apk add -q --no-cache openssl1.1-compat libgcc tini + +# add `navigatum-feedback` to the `/bin` so we can run it from anywhere and it's easy to find. +COPY --from=compiler /nav/target/release/navigatum-feedback /bin/navigatum-feedback + +ARG GIT_COMMIT_SHA +ENV GIT_COMMIT_SHA=${GIT_COMMIT_SHA} + +EXPOSE 6001 + +ENTRYPOINT ["tini", "--"] +HEALTHCHECK --start-period=20m --timeout=10s CMD curl --fail localhost:6001/api/feedback/health || exit 1 +CMD /bin/navigatum-feedback diff --git a/feedback/README.md b/feedback/README.md new file mode 100644 index 000000000..58770adff --- /dev/null +++ b/feedback/README.md @@ -0,0 +1,66 @@ +# Server + +This folder contains the feedback-API server for NavigaTUM. + +This is separated from the server because: + +- it has virtually no shared dependencies (natural faultline) +- this way, we can deploy the feedback-API independently of the main server (both in time, scaling and reliability) +- security: this way, we can increase our isolation + +## Getting started + +### Prerequisites + +For getting started, there are some system dependencys which you will need. +Please follow the [system dependencys docs](resources/documentation/Dependencys.md) before trying to run this part of our project. + +### Starting the server + +Run `cargo run` to start the server. +The server should now be available on `localhost:6001`. + +Note that `cargo run --release` is used to start the server for an optimised production build (use this if you want to profile performance, it makes quite a difference). + +### API-Changes + +#### Editing + +If you have made changes to the API, you need to update the API documentation. + +There are two editors for the API documentation (both are imperfect): + +- [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/TUM-Dev/navigatum/main/openapi.yaml) +- [stoplight](stoplight.io) + +#### Testing + +Of course documentation is one part of the process. If the changes are substantial, you should also run an API-Fuzz-Test: +To make sure that this specification is up-to-date and without holes, we run [schemathesis](https://github.com/schemathesis/schemathesis) using the following command on API Server: + +```bash +python -m venv venv +source venv/bin/activate +pip install schemathesis +st run --workers=auto --base-url=http://localhost:6001 --checks=all ../openapi.yaml +``` + +Some fuzzing-goals may not be available for you locally, as they require prefix-routing (f.ex.`/cdn` to the CDN) and some fuzzing-goals are automatically tested in our CI. +You can exchange `--base-url=http://localhost:6001` to `--base-url=https://nav.tum.sexy` for the full public API, or restrict your scope using a option like `--endpoint=/api/feedback/`. + +## License + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +--- diff --git a/server/src/feedback/github.rs b/feedback/src/core/github.rs similarity index 100% rename from server/src/feedback/github.rs rename to feedback/src/core/github.rs diff --git a/server/src/feedback/mod.rs b/feedback/src/core/mod.rs similarity index 98% rename from server/src/feedback/mod.rs rename to feedback/src/core/mod.rs index 45370605d..140101bf2 100644 --- a/server/src/feedback/mod.rs +++ b/feedback/src/core/mod.rs @@ -1,6 +1,6 @@ mod github; mod tokens; -use crate::feedback::tokens::{Claims, RateLimit}; +use crate::core::tokens::{Claims, RateLimit}; use actix_web::web::{Data, Json}; use actix_web::{post, web, HttpResponse}; use jsonwebtoken::{encode, EncodingKey, Header}; diff --git a/server/src/feedback/tokens.rs b/feedback/src/core/tokens.rs similarity index 99% rename from server/src/feedback/tokens.rs rename to feedback/src/core/tokens.rs index 92f582c57..1bffa2779 100644 --- a/server/src/feedback/tokens.rs +++ b/feedback/src/core/tokens.rs @@ -7,7 +7,7 @@ use log::error; use serde::{Deserialize, Serialize}; use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering}; -use crate::feedback::{AppStateFeedback, TokenRecord}; +use crate::core::{AppStateFeedback, TokenRecord}; // Additionally, there is a short delay until a token can be used. // Clients need to wait that time if (for some reason) the user submitted diff --git a/feedback/src/main.rs b/feedback/src/main.rs new file mode 100644 index 000000000..f0ddbdfa9 --- /dev/null +++ b/feedback/src/main.rs @@ -0,0 +1,78 @@ +use actix_cors::Cors; +use actix_web::{get, middleware, web, App, HttpResponse, HttpServer}; + +use structopt::StructOpt; + +mod core; + +const MAX_JSON_PAYLOAD: usize = 1024 * 1024; // 1 MB + +#[derive(StructOpt, Debug)] +#[structopt(name = "server")] +pub struct Opt { + // Feedback + /// GitHub personal access token + #[structopt(short = "t", long)] + github_token: Option, + /// Secret for the feedback token generation + #[structopt(short = "jwt", long)] + jwt_key: Option, +} + +#[get("/api/feedback/source_code")] +async fn source_code_handler() -> HttpResponse { + let gh_base = "https://github.com/TUM-Dev/navigatum".to_string(); + let commit_hash = std::env::var("GIT_COMMIT_SHA"); + let github_link = match commit_hash { + Ok(hash) => format!("{}/tree/{}", gh_base, hash), + Err(_) => gh_base, + }; + HttpResponse::Ok() + .content_type("text/plain") + .body(github_link) +} + +#[get("/api/feedback/health")] +async fn health_handler() -> HttpResponse { + HttpResponse::Ok() + .content_type("text/plain") + .body("healthy") +} + +#[tokio::main] +async fn main() -> std::io::Result<()> { + env_logger::init_from_env(env_logger::Env::default().default_filter_or("info")); + + let mut opt = Opt::from_args(); + if opt.github_token.is_none() { + opt.github_token = std::env::var("GITHUB_TOKEN").ok(); + } + if opt.jwt_key.is_none() { + opt.jwt_key = std::env::var("JWT_KEY").ok(); + } + + let state_feedback = web::Data::new(core::init_state(opt)); + HttpServer::new(move || { + let cors = Cors::default() + .allow_any_origin() + .allow_any_header() + .allowed_methods(vec!["GET", "POST"]) + .max_age(3600); + + App::new() + .wrap(cors) + .wrap(middleware::Logger::default().exclude("/api/feedback/health")) + .wrap(middleware::Compress::default()) + .app_data(web::JsonConfig::default().limit(MAX_JSON_PAYLOAD)) + .service(source_code_handler) + .service(health_handler) + .service( + web::scope("/api/feedback") + .configure(core::configure) + .app_data(state_feedback.clone()), + ) + }) + .bind(std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0:6001".to_string()))? + .run() + .await +} diff --git a/openapi.yaml b/openapi.yaml index 899e45a5c..f5e1d7ef3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -637,7 +637,24 @@ paths: type: string example: 'https://github.com/TUM-Dev/navigatum/tree/eb10c1f4cfbbd66d37f2f9e5e13139c1fde15a4b' tags: - - core + - health + /api/feedback/source_code: + get: + operationId: feedback-source_code + summary: Get link to running source-code + description: | + This endpoint returns a link to the source-code of the repository at the currently running version. + This endpoint is not required for modifications (as the license is not AGPL), but strongly encouraged. + responses: + '200': + description: The link to the source-code of the repository at the currently running version + content: + text/plain: + schema: + type: string + example: 'https://github.com/TUM-Dev/navigatum/tree/eb10c1f4cfbbd66d37f2f9e5e13139c1fde15a4b' + tags: + - health /api/feedback/get_token: post: operationId: get_token @@ -974,6 +991,26 @@ paths: content: {} tags: - health + /api/feedback/health: + get: + operationId: feedback-health + summary: feedback-API healthcheck + description: | + If this endpoint does not return 200, the API is experiencing a catastrophic outage. Should never happen. + responses: + '200': + description: Ok + content: + text/plain: + schema: + type: string + enum: + - healthy + '503': + description: Service Unavailable + content: {} + tags: + - health /cdn/health: get: operationId: cdn-health @@ -1671,7 +1708,7 @@ tags: - name: feedback description: the API to access/search for room information - name: health - description: 'These endpoints are used to check the health of the API, website and cdn' + description: 'These endpoints are used to check the health of our components' externalDocs: description: Visit our Github Page for more in-depth documentation url: 'https://github.com/TUM-Dev/navigatum' diff --git a/resources/deployment/Deployment_Overview.json b/resources/deployment/Deployment_Overview.json index 567ba52a4..9606e2f19 100644 --- a/resources/deployment/Deployment_Overview.json +++ b/resources/deployment/Deployment_Overview.json @@ -1,10 +1,10 @@ { - "id": "406db869-d62b-4235-8027-49f9cbc582aa", + "id": "85c9fbb3-07c0-4de1-aa00-a63f1a00add9", "title": "Deployment Overview", "model": { "version": "2.0.0", "type": "DeploymentDiagram", - "size": { "width": 1920, "height": 840 }, + "size": { "width": 1920, "height": 900 }, "interactive": { "elements": [], "relationships": [] }, "elements": [ { @@ -12,7 +12,7 @@ "name": "NavigaTUM", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 520, "y": 0, "width": 730, "height": 600 }, + "bounds": { "x": 520, "y": 30, "width": 730, "height": 600 }, "stereotype": "server" }, { @@ -20,70 +20,70 @@ "name": "navigatum-data", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 1000, "y": 280, "width": 210, "height": 100 } + "bounds": { "x": 1000, "y": 310, "width": 210, "height": 100 } }, { "id": "add565fd-86c3-4235-8693-db83cecf9f52", "name": "Manual Fixes", "type": "DeploymentArtifact", "owner": "df334929-e6b4-4769-88bc-19700962febd", - "bounds": { "x": 1020, "y": 330, "width": 160, "height": 40 } + "bounds": { "x": 1020, "y": 360, "width": 160, "height": 40 } }, { "id": "edb2bab5-7951-4f24-a627-bd29fe163468", "name": "navigatum-webclient", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 560, "y": 530, "width": 240, "height": 40 } + "bounds": { "x": 560, "y": 560, "width": 240, "height": 40 } }, { "id": "6ceb0838-3430-4101-bb9f-aa9b17db8586", "name": "search_data.json", "type": "DeploymentInterface", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 890, "y": 80, "width": 20, "height": 20 } + "bounds": { "x": 890, "y": 160, "width": 20, "height": 20 } }, { "id": "9339d43b-3f54-4968-8c73-67570bdcc9ca", - "name": "navigatum-server", + "name": "server", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 560, "y": 210, "width": 240, "height": 40 } + "bounds": { "x": 560, "y": 250, "width": 240, "height": 40 } }, { "id": "8d265620-1519-419d-99ac-0dcbd1c4cca3", "name": "MeiliSearch Instance", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 560, "y": 70, "width": 240, "height": 40 } + "bounds": { "x": 560, "y": 150, "width": 240, "height": 40 } }, { "id": "b622e87e-fa8f-42c5-b86a-5eb5a7a012f9", "name": "api_data.json", "type": "DeploymentInterface", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 890, "y": 220, "width": 20, "height": 20 } + "bounds": { "x": 890, "y": 260, "width": 20, "height": 20 } }, { "id": "580f24f1-068c-43f0-9c0e-2bf5b48b07ee", "name": "rendertron", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 970, "y": 520, "width": 170, "height": 60 } + "bounds": { "x": 970, "y": 550, "width": 170, "height": 60 } }, { "id": "cbb4c7ec-e3f6-4e33-aa77-e3a369555c85", "name": "search_synonyms.json", "type": "DeploymentInterface", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 890, "y": 110, "width": 20, "height": 20 } + "bounds": { "x": 890, "y": 190, "width": 20, "height": 20 } }, { "id": "9803c740-2a29-480a-b782-26b084e880e7", "name": "Static Maps", "type": "DeploymentComponent", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 560, "y": 420, "width": 240, "height": 40 }, + "bounds": { "x": 560, "y": 450, "width": 240, "height": 40 }, "strokeColor": "black", "textColor": "black" }, @@ -92,14 +92,21 @@ "name": "Sitemaps", "type": "DeploymentInterface", "owner": "c0793074-7fc3-43b1-9516-40491662a611", - "bounds": { "x": 890, "y": 470, "width": 20, "height": 20 } + "bounds": { "x": 890, "y": 500, "width": 20, "height": 20 } + }, + { + "id": "6ea7a59a-7b26-428a-a82c-2dee126fe09c", + "name": "feedback", + "type": "DeploymentComponent", + "owner": "c0793074-7fc3-43b1-9516-40491662a611", + "bounds": { "x": 560, "y": 90, "width": 240, "height": 40 } }, { "id": "a9507920-1216-49a3-91b2-1bb878ef345b", "name": "mytum/\"Rakete\" Roomfinder", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 1600, "y": 70, "width": 260, "height": 80 }, + "bounds": { "x": 1600, "y": 100, "width": 260, "height": 80 }, "stereotype": "public API" }, { @@ -107,7 +114,7 @@ "name": "TUMonline", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 1640, "y": 230, "width": 200, "height": 100 }, + "bounds": { "x": 1640, "y": 260, "width": 200, "height": 100 }, "stereotype": "public Website" }, { @@ -115,56 +122,56 @@ "name": "existing Rooms", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 100, "width": 20, "height": 20 } + "bounds": { "x": 1420, "y": 130, "width": 20, "height": 20 } }, { "id": "07009480-5dd5-491b-b2a3-fee484254ac4", "name": "Room-Details Website", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 270, "width": 20, "height": 20 } + "bounds": { "x": 1420, "y": 300, "width": 20, "height": 20 } }, { "id": "59046dc5-7ebf-457b-a097-70746672e21c", "name": "Building-maps", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 20, "width": 20, "height": 20 } + "bounds": { "x": 1420, "y": 50, "width": 20, "height": 20 } }, { "id": "bbc2357f-4bc9-404e-85c3-a2c87614417f", "name": "existing Buildings", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 180, "width": 20, "height": 20 } + "bounds": { "x": 1420, "y": 210, "width": 20, "height": 20 } }, { "id": "1a5e8e49-99ef-4237-8112-2ef408f8e9ea", "name": "API (/api/)", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 280, "y": 220, "width": 20, "height": 20 } + "bounds": { "x": 280, "y": 260, "width": 20, "height": 20 } }, { "id": "5f17a5f8-8391-4015-b349-ca9b9879a334", "name": "Maps/Images/Data (/cdn/)", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 300, "y": 320, "width": 20, "height": 20 } + "bounds": { "x": 300, "y": 350, "width": 20, "height": 20 } }, { "id": "6bcd0da5-0a0e-42f5-9a0c-46391e4e4477", "name": "Website (/)", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 280, "y": 610, "width": 20, "height": 20 } + "bounds": { "x": 280, "y": 640, "width": 20, "height": 20 } }, { "id": "ee546041-0181-45cc-844b-1f9c6e961fdb", "name": "Physics Department Roomfinder", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 1610, "y": 410, "width": 270, "height": 100 }, + "bounds": { "x": 1610, "y": 440, "width": 270, "height": 100 }, "strokeColor": "#fd9644", "textColor": "#fd9644", "stereotype": "public API" @@ -174,7 +181,7 @@ "name": "extra Rooms", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 360, "width": 20, "height": 20 }, + "bounds": { "x": 1420, "y": 390, "width": 20, "height": 20 }, "strokeColor": "#fd9644", "textColor": "#fd9644" }, @@ -183,7 +190,7 @@ "name": "extra Buildings", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 450, "width": 20, "height": 20 }, + "bounds": { "x": 1420, "y": 480, "width": 20, "height": 20 }, "strokeColor": "#fd9644", "textColor": "#fd9644" }, @@ -192,7 +199,7 @@ "name": "extra Information", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 540, "width": 20, "height": 20 }, + "bounds": { "x": 1420, "y": 570, "width": 20, "height": 20 }, "strokeColor": "#fd9644", "textColor": "#fd9644" }, @@ -201,7 +208,7 @@ "name": "CampusApps", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 0, "y": 340, "width": 200, "height": 100 }, + "bounds": { "x": 0, "y": 370, "width": 200, "height": 100 }, "strokeColor": "#26de81", "stereotype": "clients" }, @@ -210,7 +217,7 @@ "name": "Users", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 0, "y": 570, "width": 200, "height": 100 }, + "bounds": { "x": 0, "y": 600, "width": 200, "height": 100 }, "strokeColor": "#26de81", "stereotype": "humans" }, @@ -219,14 +226,14 @@ "name": "JS Execution engine (/rendertron/)", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 280, "y": 730, "width": 20, "height": 20 } + "bounds": { "x": 280, "y": 760, "width": 20, "height": 20 } }, { "id": "98998381-e751-4cd8-9385-613f7cb15fdb", "name": "Twitterbot, ...", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 0, "y": 690, "width": 200, "height": 100 }, + "bounds": { "x": 0, "y": 720, "width": 200, "height": 100 }, "strokeColor": "#26de81", "stereotype": "bots" }, @@ -235,7 +242,7 @@ "name": "LMU Roomfinder", "type": "DeploymentNode", "owner": null, - "bounds": { "x": 1610, "y": 660, "width": 270, "height": 100 }, + "bounds": { "x": 1610, "y": 690, "width": 270, "height": 100 }, "strokeColor": "#fd9644", "textColor": "#fd9644", "stereotype": "public Data" @@ -245,7 +252,7 @@ "name": "extra Rooms", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 610, "width": 20, "height": 20 }, + "bounds": { "x": 1420, "y": 640, "width": 20, "height": 20 }, "strokeColor": "#fd9644", "textColor": "#fd9644" }, @@ -254,7 +261,7 @@ "name": "extra Buildings", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 1420, "y": 700, "width": 20, "height": 20 }, + "bounds": { "x": 1420, "y": 730, "width": 20, "height": 20 }, "strokeColor": "#fd9644", "textColor": "#fd9644" }, @@ -263,7 +270,7 @@ "name": "External", "type": "ColorLegend", "owner": null, - "bounds": { "x": 0, "y": 0, "width": 200, "height": 50 }, + "bounds": { "x": 20, "y": 0, "width": 200, "height": 50 }, "fillColor": "#26de81", "strokeColor": "black" }, @@ -272,7 +279,7 @@ "name": "Planned", "type": "ColorLegend", "owner": null, - "bounds": { "x": 0, "y": 60, "width": 200, "height": 50 }, + "bounds": { "x": 240, "y": 0, "width": 200, "height": 50 }, "fillColor": "#fd9644", "strokeColor": "black" }, @@ -281,9 +288,16 @@ "name": "Static maps (/maps/)", "type": "DeploymentInterface", "owner": null, - "bounds": { "x": 320, "y": 430, "width": 20, "height": 20 }, + "bounds": { "x": 320, "y": 460, "width": 20, "height": 20 }, "strokeColor": "black", "textColor": "black" + }, + { + "id": "7f38a685-f44a-441f-b457-3742447c525d", + "name": "feedback-API (/api/feedback)", + "type": "DeploymentInterface", + "owner": null, + "bounds": { "x": 260, "y": 100, "width": 20, "height": 20 } } ], "relationships": [ @@ -292,7 +306,7 @@ "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1210, "y": 30, "width": 210, "height": 300 }, + "bounds": { "x": 1210, "y": 60, "width": 210, "height": 300 }, "path": [ { "x": 210, "y": 0 }, { "x": 105, "y": 0 }, @@ -306,14 +320,15 @@ "target": { "direction": "Right", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "97b98976-99c0-4f9c-b994-bbe6dd846917", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 30, "width": 290, "height": 40 }, + "bounds": { "x": 1440, "y": 60, "width": 290, "height": 40 }, "path": [ { "x": 0, "y": 0 }, { "x": 290, "y": 0 }, @@ -326,14 +341,15 @@ "target": { "direction": "Up", "element": "a9507920-1216-49a3-91b2-1bb878ef345b" - } + }, + "isManuallyLayouted": false }, { "id": "7b324ece-f74c-476b-a666-8fb260463507", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1210, "y": 110, "width": 210, "height": 220 }, + "bounds": { "x": 1210, "y": 140, "width": 210, "height": 220 }, "path": [ { "x": 210, "y": 0 }, { "x": 105, "y": 0 }, @@ -347,14 +363,15 @@ "target": { "direction": "Right", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "0071f1ce-9d24-45ee-8135-e82aa975b3b4", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 110, "width": 160, "height": 1 }, + "bounds": { "x": 1440, "y": 140, "width": 160, "height": 1 }, "path": [ { "x": 0, "y": 0 }, { "x": 160, "y": 0 } @@ -366,14 +383,15 @@ "target": { "direction": "Left", "element": "a9507920-1216-49a3-91b2-1bb878ef345b" - } + }, + "isManuallyLayouted": false }, { "id": "08df7f5a-4d01-4014-8ed2-e93274910e4b", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1210, "y": 280, "width": 210, "height": 50 }, + "bounds": { "x": 1210, "y": 310, "width": 210, "height": 50 }, "path": [ { "x": 210, "y": 0 }, { "x": 105, "y": 0 }, @@ -387,14 +405,15 @@ "target": { "direction": "Right", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "7691ef22-8478-499e-99ab-5f21ad3e6630", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 280, "width": 200, "height": 1 }, + "bounds": { "x": 1440, "y": 310, "width": 200, "height": 1 }, "path": [ { "x": 0, "y": 0 }, { "x": 200, "y": 0 } @@ -406,14 +425,15 @@ "target": { "direction": "Left", "element": "bb7f64f7-ef57-4197-b9c2-8f19324bd3e7" - } + }, + "isManuallyLayouted": false }, { "id": "0bb6f074-d549-4252-9e2c-32219259d73a", "name": "", "type": "DeploymentAssociation", "owner": null, - "bounds": { "x": 1210, "y": 190, "width": 210, "height": 140 }, + "bounds": { "x": 1210, "y": 220, "width": 210, "height": 140 }, "path": [ { "x": 210, "y": 0 }, { "x": 105, "y": 0 }, @@ -427,14 +447,15 @@ "target": { "direction": "Right", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "4d892206-4ab9-4ca9-b02f-6e7e63583a60", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 150, "width": 290, "height": 40 }, + "bounds": { "x": 1440, "y": 180, "width": 290, "height": 40 }, "path": [ { "x": 0, "y": 40 }, { "x": 290, "y": 40 }, @@ -447,16 +468,17 @@ "target": { "direction": "Down", "element": "a9507920-1216-49a3-91b2-1bb878ef345b" - } + }, + "isManuallyLayouted": false }, { "id": "416a9752-76e1-4b8b-b221-b6c0b2133d0d", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 910, "y": 90, "width": 195, "height": 190 }, + "bounds": { "x": 910, "y": 170, "width": 195, "height": 140 }, "path": [ - { "x": 195, "y": 190 }, + { "x": 195, "y": 140 }, { "x": 195, "y": 0 }, { "x": 0, "y": 0 } ], @@ -467,14 +489,15 @@ "target": { "direction": "Right", "element": "6ceb0838-3430-4101-bb9f-aa9b17db8586" - } + }, + "isManuallyLayouted": false }, { "id": "c1e1ca46-9243-4986-adf6-32dfa13c56df", "name": "", "type": "DeploymentDependency", "owner": null, - "bounds": { "x": 800, "y": 90, "width": 90, "height": 1 }, + "bounds": { "x": 800, "y": 170, "width": 90, "height": 1 }, "path": [ { "x": 0, "y": 0 }, { "x": 90, "y": 0 } @@ -486,14 +509,15 @@ "target": { "direction": "Left", "element": "6ceb0838-3430-4101-bb9f-aa9b17db8586" - } + }, + "isManuallyLayouted": false }, { "id": "7a4a03a7-0871-4c0c-aed4-e57a7fe0b04f", "name": "", "type": "DeploymentDependency", "owner": null, - "bounds": { "x": 800, "y": 230, "width": 90, "height": 1 }, + "bounds": { "x": 800, "y": 270, "width": 90, "height": 1 }, "path": [ { "x": 0, "y": 0 }, { "x": 90, "y": 0 } @@ -505,14 +529,15 @@ "target": { "direction": "Left", "element": "b622e87e-fa8f-42c5-b86a-5eb5a7a012f9" - } + }, + "isManuallyLayouted": false }, { "id": "2bd21e8b-56d8-49be-bb13-b1e4dd63a01b", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 297, "y": 327, "width": 263, "height": 223 }, + "bounds": { "x": 297, "y": 357, "width": 263, "height": 223 }, "strokeColor": "black", "path": [ { "x": 263, "y": 223 }, @@ -526,14 +551,15 @@ "target": { "direction": "Down", "element": "5f17a5f8-8391-4015-b349-ca9b9879a334" - } + }, + "isManuallyLayouted": false }, { "id": "e47f3677-feb3-48d5-b92c-9ef5fef9302b", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 300, "y": 230, "width": 260, "height": 1 }, + "bounds": { "x": 300, "y": 270, "width": 260, "height": 1 }, "path": [ { "x": 260, "y": 0 }, { "x": 0, "y": 0 } @@ -545,18 +571,19 @@ "target": { "direction": "Right", "element": "1a5e8e49-99ef-4237-8112-2ef408f8e9ea" - } + }, + "isManuallyLayouted": false }, { "id": "20dcc5bb-c06f-48b8-abce-d032ef67b6d9", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 910, "y": 230, "width": 195, "height": 50 }, + "bounds": { "x": 910, "y": 270, "width": 195, "height": 40 }, "path": [ { "x": 0, "y": 0 }, { "x": 195, "y": 0 }, - { "x": 195, "y": 50 } + { "x": 195, "y": 40 } ], "source": { "direction": "Right", @@ -565,18 +592,19 @@ "target": { "direction": "Up", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "81a638be-0271-4ad6-a418-24af44f29c1d", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 277, "y": 227, "width": 283, "height": 323 }, + "bounds": { "x": 277, "y": 267, "width": 283, "height": 313 }, "strokeColor": "black", "path": [ - { "x": 283, "y": 323 }, - { "x": 13, "y": 323 }, + { "x": 283, "y": 313 }, + { "x": 13, "y": 313 }, { "x": 13, "y": 13 } ], "source": { @@ -586,14 +614,15 @@ "target": { "direction": "Down", "element": "1a5e8e49-99ef-4237-8112-2ef408f8e9ea" - } + }, + "isManuallyLayouted": false }, { "id": "38ff4277-a7b2-4ef9-ab6c-5d55921a7b96", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 320, "y": 330, "width": 680, "height": 1 }, + "bounds": { "x": 320, "y": 360, "width": 680, "height": 1 }, "path": [ { "x": 0, "y": 0 }, { "x": 680, "y": 0 } @@ -605,14 +634,15 @@ "target": { "direction": "Left", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "1f987384-04f6-4e34-bdc9-d0de4fc2308a", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 300, "y": 570, "width": 380, "height": 50 }, + "bounds": { "x": 300, "y": 600, "width": 380, "height": 50 }, "path": [ { "x": 0, "y": 50 }, { "x": 380, "y": 50 }, @@ -625,14 +655,15 @@ "target": { "direction": "Down", "element": "edb2bab5-7951-4f24-a627-bd29fe163468" - } + }, + "isManuallyLayouted": false }, { "id": "12eb7223-2c19-47e7-af2f-1942b5f998f5", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 370, "width": 305, "height": 40 }, + "bounds": { "x": 1440, "y": 400, "width": 305, "height": 40 }, "strokeColor": "#fd9644", "path": [ { "x": 305, "y": 40 }, @@ -646,14 +677,15 @@ "target": { "direction": "Right", "element": "d01d4398-8da0-4977-8566-f78cfa1af782" - } + }, + "isManuallyLayouted": false }, { "id": "43092942-959c-40f8-bfce-682807dbbf6b", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 460, "width": 170, "height": 1 }, + "bounds": { "x": 1440, "y": 490, "width": 170, "height": 1 }, "strokeColor": "#fd9644", "path": [ { "x": 170, "y": 0 }, @@ -666,14 +698,15 @@ "target": { "direction": "Right", "element": "132614f0-c316-4d1c-9f34-f916fd8e8046" - } + }, + "isManuallyLayouted": false }, { "id": "f9d2ff91-a44c-4399-908f-44e237c4ba47", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 510, "width": 305, "height": 40 }, + "bounds": { "x": 1440, "y": 540, "width": 305, "height": 40 }, "strokeColor": "#fd9644", "path": [ { "x": 305, "y": 0 }, @@ -687,17 +720,18 @@ "target": { "direction": "Right", "element": "53f6547e-394c-41a2-8675-fdeb7875459c" - } + }, + "isManuallyLayouted": false }, { "id": "ef877731-d06a-432f-ac62-b96c0f3611ef", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 100, "y": 180, "width": 204, "height": 160 }, + "bounds": { "x": 100, "y": 220, "width": 204, "height": 150 }, "strokeColor": "#26de81", "path": [ - { "x": 0, "y": 160 }, + { "x": 0, "y": 150 }, { "x": 0, "y": 0 }, { "x": 190, "y": 0 }, { "x": 190, "y": 40 } @@ -709,14 +743,15 @@ "target": { "direction": "Up", "element": "1a5e8e49-99ef-4237-8112-2ef408f8e9ea" - } + }, + "isManuallyLayouted": false }, { "id": "7bae1f5d-d16e-469d-a071-90c745f726c7", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 100, "y": 280, "width": 224, "height": 60 }, + "bounds": { "x": 100, "y": 310, "width": 224, "height": 60 }, "strokeColor": "#26de81", "path": [ { "x": 0, "y": 60 }, @@ -731,14 +766,15 @@ "target": { "direction": "Up", "element": "5f17a5f8-8391-4015-b349-ca9b9879a334" - } + }, + "isManuallyLayouted": false }, { "id": "3ab6e852-8b41-4c34-a37a-39adb977775e", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 200, "y": 607, "width": 94, "height": 27 }, + "bounds": { "x": 200, "y": 637, "width": 94, "height": 27 }, "strokeColor": "#26de81", "path": [ { "x": 0, "y": 13 }, @@ -751,14 +787,15 @@ "target": { "direction": "Left", "element": "6bcd0da5-0a0e-42f5-9a0c-46391e4e4477" - } + }, + "isManuallyLayouted": false }, { "id": "bb3937a9-2a0f-4044-a5b0-3d2c20b6cd9c", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 300, "y": 580, "width": 755, "height": 160 }, + "bounds": { "x": 300, "y": 610, "width": 755, "height": 160 }, "path": [ { "x": 755, "y": 0 }, { "x": 755, "y": 160 }, @@ -771,14 +808,15 @@ "target": { "direction": "Right", "element": "58be4097-4f30-400d-9aa1-131df8c563c9" - } + }, + "isManuallyLayouted": false }, { "id": "9f69d649-e1d5-4a58-9aef-e99073deb7aa", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 200, "y": 727, "width": 94, "height": 27 }, + "bounds": { "x": 200, "y": 757, "width": 94, "height": 27 }, "strokeColor": "#26de81", "path": [ { "x": 0, "y": 13 }, @@ -791,18 +829,19 @@ "target": { "direction": "Left", "element": "58be4097-4f30-400d-9aa1-131df8c563c9" - } + }, + "isManuallyLayouted": false }, { "id": "d8b820ea-b587-43ec-8fde-02dc4edaa447", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 910, "y": 120, "width": 195, "height": 160 }, + "bounds": { "x": 910, "y": 200, "width": 195, "height": 110 }, "path": [ { "x": 0, "y": 0 }, { "x": 195, "y": 0 }, - { "x": 195, "y": 160 } + { "x": 195, "y": 110 } ], "source": { "direction": "Right", @@ -811,14 +850,15 @@ "target": { "direction": "Up", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "2d70033b-c3d7-47dc-982a-1e92b59c0636", "name": "", "type": "DeploymentDependency", "owner": null, - "bounds": { "x": 800, "y": 90, "width": 90, "height": 30 }, + "bounds": { "x": 800, "y": 170, "width": 90, "height": 30 }, "path": [ { "x": 0, "y": 0 }, { "x": 45, "y": 0 }, @@ -832,14 +872,15 @@ "target": { "direction": "Left", "element": "cbb4c7ec-e3f6-4e33-aa77-e3a369555c85" - } + }, + "isManuallyLayouted": false }, { "id": "3754f30b-12b0-4aa5-ba91-46e5bcf57a3a", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 710, "width": 170, "height": 1 }, + "bounds": { "x": 1440, "y": 740, "width": 170, "height": 1 }, "strokeColor": "#fd9644", "path": [ { "x": 0, "y": 0 }, @@ -852,14 +893,15 @@ "target": { "direction": "Left", "element": "ab7a6c78-5f44-4945-9e0d-bb2f9ca6c3d0" - } + }, + "isManuallyLayouted": false }, { "id": "3b8fda03-58e8-49c7-86a2-c64c7c4d5e8a", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 1440, "y": 620, "width": 305, "height": 40 }, + "bounds": { "x": 1440, "y": 650, "width": 305, "height": 40 }, "strokeColor": "#fd9644", "path": [ { "x": 0, "y": 0 }, @@ -873,14 +915,15 @@ "target": { "direction": "Up", "element": "ab7a6c78-5f44-4945-9e0d-bb2f9ca6c3d0" - } + }, + "isManuallyLayouted": false }, { "id": "7ea4aaee-348e-4acd-a4fa-94fcf17c7fe1", "name": "", "type": "DeploymentDependency", "owner": null, - "bounds": { "x": 800, "y": 550, "width": 170, "height": 1 }, + "bounds": { "x": 800, "y": 580, "width": 170, "height": 1 }, "path": [ { "x": 170, "y": 0 }, { "x": 0, "y": 0 } @@ -892,14 +935,15 @@ "target": { "direction": "Right", "element": "edb2bab5-7951-4f24-a627-bd29fe163468" - } + }, + "isManuallyLayouted": false }, { "id": "07384d54-6669-4a87-8965-035d6109e834", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 340, "y": 440, "width": 220, "height": 1 }, + "bounds": { "x": 340, "y": 470, "width": 220, "height": 1 }, "strokeColor": "black", "path": [ { "x": 0, "y": 0 }, @@ -912,14 +956,15 @@ "target": { "direction": "Left", "element": "9803c740-2a29-480a-b782-26b084e880e7" - } + }, + "isManuallyLayouted": false }, { "id": "fd941e0d-2c02-4fc2-94f8-599b0af36a37", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 317, "y": 437, "width": 243, "height": 113 }, + "bounds": { "x": 317, "y": 467, "width": 243, "height": 113 }, "strokeColor": "#fd9644", "path": [ { "x": 243, "y": 113 }, @@ -933,35 +978,38 @@ "target": { "direction": "Down", "element": "aecaa77c-a2b6-48d7-9918-cdd6c021e5e3" - } + }, + "isManuallyLayouted": false }, { "id": "cae9c682-a124-4a62-8522-b19c3634cf5a", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 200, "y": 390, "width": 144, "height": 54 }, - "strokeColor": "#fd9644", + "bounds": { "x": 200, "y": 420, "width": 134, "height": 64 }, + "strokeColor": "#26de81", "path": [ { "x": 0, "y": 0 }, - { "x": 130, "y": 0 }, - { "x": 130, "y": 40 } + { "x": 60, "y": 0 }, + { "x": 60, "y": 50 }, + { "x": 120, "y": 50 } ], "source": { "direction": "Right", "element": "50571be1-6b8d-4ccc-b443-ffab9c871245" }, "target": { - "direction": "Up", + "direction": "Left", "element": "aecaa77c-a2b6-48d7-9918-cdd6c021e5e3" - } + }, + "isManuallyLayouted": false }, { "id": "cb65fde3-e2a4-41f4-baa6-c2ac538ca0a4", "name": "", "type": "DeploymentInterfaceProvided", "owner": null, - "bounds": { "x": 910, "y": 380, "width": 195, "height": 100 }, + "bounds": { "x": 910, "y": 410, "width": 195, "height": 100 }, "path": [ { "x": 0, "y": 100 }, { "x": 195, "y": 100 }, @@ -974,14 +1022,15 @@ "target": { "direction": "Down", "element": "df334929-e6b4-4769-88bc-19700962febd" - } + }, + "isManuallyLayouted": false }, { "id": "f84dd657-aafb-4ee6-b355-aea9a69c752c", "name": "", "type": "DeploymentInterfaceRequired", "owner": null, - "bounds": { "x": 680, "y": 467, "width": 224, "height": 63 }, + "bounds": { "x": 680, "y": 497, "width": 224, "height": 63 }, "path": [ { "x": 0, "y": 63 }, { "x": 0, "y": 13 }, @@ -994,16 +1043,17 @@ "target": { "direction": "Left", "element": "b75b552e-dd63-4453-a22f-79294fc74773" - } + }, + "isManuallyLayouted": false }, { "id": "872cfc99-8c9b-4b1d-861b-cbf4b47eb4bb", "name": "", "type": "DeploymentDependency", "owner": null, - "bounds": { "x": 680, "y": 110, "width": 1, "height": 100 }, + "bounds": { "x": 680, "y": 190, "width": 1, "height": 60 }, "path": [ - { "x": 0, "y": 100 }, + { "x": 0, "y": 60 }, { "x": 0, "y": 0 } ], "source": { @@ -1013,7 +1063,94 @@ "target": { "direction": "Down", "element": "8d265620-1519-419d-99ac-0dcbd1c4cca3" - } + }, + "isManuallyLayouted": false + }, + { + "id": "c419e4e4-154c-4b1c-bc8a-4464501e0d8f", + "name": "", + "type": "DeploymentInterfaceProvided", + "owner": null, + "bounds": { "x": 270, "y": 120, "width": 290, "height": 460 }, + "path": [ + { "x": 0, "y": 0 }, + { "x": 0, "y": 460 }, + { "x": 290, "y": 460 } + ], + "source": { + "direction": "Down", + "element": "7f38a685-f44a-441f-b457-3742447c525d" + }, + "target": { + "direction": "Left", + "element": "edb2bab5-7951-4f24-a627-bd29fe163468" + }, + "isManuallyLayouted": false + }, + { + "id": "501bdd20-071c-4540-9774-ee9cbe04ca02", + "name": "", + "type": "DeploymentInterfaceRequired", + "owner": null, + "bounds": { "x": 100, "y": 60, "width": 184, "height": 310 }, + "strokeColor": "#26de81", + "path": [ + { "x": 0, "y": 310 }, + { "x": 0, "y": 0 }, + { "x": 170, "y": 0 }, + { "x": 170, "y": 40 } + ], + "source": { + "direction": "Up", + "element": "50571be1-6b8d-4ccc-b443-ffab9c871245" + }, + "target": { + "direction": "Up", + "element": "7f38a685-f44a-441f-b457-3742447c525d" + }, + "isManuallyLayouted": false + }, + { + "id": "9d92347c-0f95-4792-9dd0-6bb93c21c676", + "name": "", + "type": "DeploymentInterfaceProvided", + "owner": null, + "bounds": { "x": 280, "y": 110, "width": 280, "height": 1 }, + "path": [ + { "x": 0, "y": 0 }, + { "x": 280, "y": 0 } + ], + "source": { + "direction": "Right", + "element": "7f38a685-f44a-441f-b457-3742447c525d" + }, + "target": { + "direction": "Left", + "element": "6ea7a59a-7b26-428a-a82c-2dee126fe09c" + }, + "isManuallyLayouted": false + }, + { + "id": "6c3d840d-66e9-4e5c-8c36-da9ad19c9218", + "name": "", + "type": "DeploymentInterfaceRequired", + "owner": null, + "bounds": { "x": 317, "y": 290, "width": 380, "height": 180 }, + "path": [ + { "x": 363, "y": 0 }, + { "x": 363, "y": 113.80010986328125 }, + { "x": 13, "y": 113.80010986328125 }, + { "x": 13, "y": 170 } + ], + "source": { + "direction": "Down", + "element": "9339d43b-3f54-4968-8c73-67570bdcc9ca" + }, + "target": { + "direction": "Up", + "element": "aecaa77c-a2b6-48d7-9918-cdd6c021e5e3" + }, + "isManuallyLayouted": true } ], "assessments": [] diff --git a/resources/deployment/Deployment_Overview.png b/resources/deployment/Deployment_Overview.png index c97119246..9da944bcd 100644 Binary files a/resources/deployment/Deployment_Overview.png and b/resources/deployment/Deployment_Overview.png differ diff --git a/resources/deployment/Deployment_Overview.svg b/resources/deployment/Deployment_Overview.svg index 5cb6cf6ec..79a7ff3d4 100644 --- a/resources/deployment/Deployment_Overview.svg +++ b/resources/deployment/Deployment_Overview.svg @@ -1,4 +1,4 @@ -«server»NavigaTUMnavigatum-dataManual Fixesnavigatum-webclientsearch_data.jsonserverMeiliSearch Instanceapi_data.jsonrendertronsearch_synonyms.jsonStatic MapsSitemaps«public API»mytum/"Rakete" Roomfinder«public Website»TUMonlineexisting RoomsRoom-Details WebsiteBuilding-mapsexisting BuildingsAPI (/api/)Maps/Images/Data (/cdn/)Website (/)«public API»Physics Department Roomfinderextra Roomsextra Buildingsextra Information«clients»CampusApps«humans»UsersJS Execution engine (/rendertron/)«bots»Twitterbot, ...«public Data»LMU Roomfinderextra Roomsextra BuildingsExternalPlannedStatic maps (/maps/) diff --git a/resources/deployment/Flowchart.json b/resources/deployment/Flowchart.json index 8fddd9f0b..2847cd5c5 100644 --- a/resources/deployment/Flowchart.json +++ b/resources/deployment/Flowchart.json @@ -1,10 +1,10 @@ { - "id": "244eb643-ac90-442d-bee3-0d275702d522", + "id": "d2233c1d-dc88-4aee-a1f7-2928f615b774", "title": "Flowchart", "model": { "version": "2.0.0", "type": "Flowchart", - "size": { "width": 1000, "height": 900 }, + "size": { "width": 920, "height": 800 }, "interactive": { "elements": [], "relationships": [] }, "elements": [ { @@ -12,43 +12,35 @@ "name": "START", "type": "FlowchartTerminal", "owner": null, - "bounds": { "x": 600, "y": 50, "width": 130, "height": 60 } + "bounds": { "x": 630, "y": 50, "width": 130, "height": 60 } }, { "id": "d0225bd8-73f5-41ca-93f7-281ea7a01caf", "name": "endpoint?", "type": "FlowchartDecision", "owner": null, - "bounds": { "x": 380, "y": 170, "width": 150, "height": 75 } + "bounds": { "x": 410, "y": 170, "width": 150, "height": 75 } }, { "id": "97ca81f2-3db4-4970-be23-9d2375583f20", "name": "https?", "type": "FlowchartDecision", "owner": null, - "bounds": { "x": 380, "y": 40, "width": 150, "height": 75 } + "bounds": { "x": 410, "y": 40, "width": 150, "height": 75 } }, { "id": "6d4ee1e8-d04a-4fe3-b112-fe03205c3d5c", "name": "js-execution capability?", "type": "FlowchartDecision", "owner": null, - "bounds": { "x": 320, "y": 510, "width": 270, "height": 95 } - }, - { - "id": "ceb5212d-f0df-46d4-85f0-b1a3340dcddc", - "name": "cdn datastore", - "type": "FlowchartTerminal", - "owner": null, - "bounds": { "x": 680, "y": 390, "width": 130, "height": 55 }, - "fillColor": "#d1d8e0" + "bounds": { "x": 350, "y": 520, "width": 270, "height": 95 } }, { "id": "7cb4fc3c-06a9-4dfc-8977-5c1593836a9c", "name": "server", "type": "FlowchartTerminal", "owner": null, - "bounds": { "x": 550, "y": 390, "width": 110, "height": 55 }, + "bounds": { "x": 550, "y": 430, "width": 110, "height": 55 }, "fillColor": "#d1d8e0" }, { @@ -56,7 +48,7 @@ "name": "webclient", "type": "FlowchartTerminal", "owner": null, - "bounds": { "x": 380, "y": 670, "width": 150, "height": 75 }, + "bounds": { "x": 410, "y": 680, "width": 150, "height": 75 }, "fillColor": "#d1d8e0" }, { @@ -64,7 +56,7 @@ "name": "tileserver", "type": "FlowchartTerminal", "owner": null, - "bounds": { "x": 200, "y": 390, "width": 110, "height": 55 }, + "bounds": { "x": 180, "y": 430, "width": 110, "height": 55 }, "fillColor": "#d1d8e0" }, { @@ -72,7 +64,23 @@ "name": "rendertron rendering-proxy", "type": "FlowchartTerminal", "owner": null, - "bounds": { "x": 0, "y": 530, "width": 250, "height": 55 }, + "bounds": { "x": 0, "y": 540, "width": 250, "height": 55 }, + "fillColor": "#d1d8e0" + }, + { + "id": "5729939f-ab1e-45ea-bcd1-a15ccdbe1d04", + "name": "feedback", + "type": "FlowchartTerminal", + "owner": null, + "bounds": { "x": 680, "y": 430, "width": 110, "height": 55 }, + "fillColor": "#d1d8e0" + }, + { + "id": "3ec90569-2486-4b60-8887-eb482bce3b96", + "name": "cdn", + "type": "FlowchartTerminal", + "owner": null, + "bounds": { "x": 310, "y": 430, "width": 110, "height": 55 }, "fillColor": "#d1d8e0" } ], @@ -82,7 +90,7 @@ "name": "", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 530, "y": 80, "width": 70, "height": 1 }, + "bounds": { "x": 560, "y": 80, "width": 70, "height": 1 }, "path": [ { "x": 70, "y": 0 }, { "x": 0, "y": 0 } @@ -94,18 +102,19 @@ "target": { "direction": "Right", "element": "97ca81f2-3db4-4970-be23-9d2375583f20" - } + }, + "isManuallyLayouted": false }, { "id": "e9214c5a-d70d-4326-85b1-ce38eb3081c9", "name": "/api/", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 530, "y": 207.5, "width": 75, "height": 182.5 }, + "bounds": { "x": 560, "y": 207.5, "width": 45, "height": 222.5 }, "path": [ { "x": 0, "y": 0 }, - { "x": 75, "y": 0 }, - { "x": 75, "y": 182.5 } + { "x": 45, "y": 0 }, + { "x": 45, "y": 222.5 } ], "source": { "direction": "Right", @@ -114,37 +123,39 @@ "target": { "direction": "Up", "element": "7cb4fc3c-06a9-4dfc-8977-5c1593836a9c" - } + }, + "isManuallyLayouted": false }, { "id": "a68ed210-c6e2-4a61-b998-ad83bf34d236", "name": "/cdn/", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 530, "y": 207.5, "width": 215, "height": 182.5 }, + "bounds": { "x": 365, "y": 207.5, "width": 45, "height": 222.5 }, "path": [ + { "x": 45, "y": 0 }, { "x": 0, "y": 0 }, - { "x": 215, "y": 0 }, - { "x": 215, "y": 182.5 } + { "x": 0, "y": 222.5 } ], "source": { - "direction": "Right", + "direction": "Left", "element": "d0225bd8-73f5-41ca-93f7-281ea7a01caf" }, "target": { "direction": "Up", - "element": "ceb5212d-f0df-46d4-85f0-b1a3340dcddc" - } + "element": "3ec90569-2486-4b60-8887-eb482bce3b96" + }, + "isManuallyLayouted": false }, { "id": "07e0ec8d-4028-4563-8874-bac24f5d9bcd", "name": "else", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 455, "y": 245, "width": 1, "height": 265 }, + "bounds": { "x": 485, "y": 245, "width": 1, "height": 275 }, "path": [ { "x": 0, "y": 0 }, - { "x": 0, "y": 265 } + { "x": 0, "y": 275 } ], "source": { "direction": "Down", @@ -153,14 +164,15 @@ "target": { "direction": "Up", "element": "6d4ee1e8-d04a-4fe3-b112-fe03205c3d5c" - } + }, + "isManuallyLayouted": false }, { "id": "3f5755ee-7a29-437d-8b9c-edd8b29ede96", "name": "yes", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 455, "y": 115, "width": 1, "height": 55 }, + "bounds": { "x": 485, "y": 115, "width": 1, "height": 55 }, "path": [ { "x": 0, "y": 0 }, { "x": 0, "y": 55 } @@ -172,14 +184,15 @@ "target": { "direction": "Up", "element": "d0225bd8-73f5-41ca-93f7-281ea7a01caf" - } + }, + "isManuallyLayouted": false }, { "id": "93ac7953-ac74-4d3c-840f-a020f7c3258c", "name": "yes", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 455, "y": 605, "width": 1, "height": 65 }, + "bounds": { "x": 485, "y": 615, "width": 1, "height": 65 }, "path": [ { "x": 0, "y": 0 }, { "x": 0, "y": 65 } @@ -191,16 +204,17 @@ "target": { "direction": "Up", "element": "37998db7-5459-4f9e-89fe-13b545213af7" - } + }, + "isManuallyLayouted": false }, { "id": "0758b4bc-0822-4b77-809f-c2e4d3737f5a", "name": "", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 125, "y": 585, "width": 255, "height": 122.5 }, + "bounds": { "x": 125, "y": 595, "width": 285, "height": 122.5 }, "path": [ - { "x": 255, "y": 122.5 }, + { "x": 285, "y": 122.5 }, { "x": 0, "y": 122.5 }, { "x": 0, "y": 0 } ], @@ -211,18 +225,19 @@ "target": { "direction": "Down", "element": "10d1fe36-1676-4ed9-bb9d-e3899aecb2ae" - } + }, + "isManuallyLayouted": false }, { "id": "ae2aef6b-6867-485d-85fb-060a5e160444", "name": "/rendertron/", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 125, "y": 207.5, "width": 255, "height": 322.5 }, + "bounds": { "x": 125, "y": 207.5, "width": 285, "height": 332.5 }, "path": [ - { "x": 255, "y": 0 }, + { "x": 285, "y": 0 }, { "x": 0, "y": 0 }, - { "x": 0, "y": 322.5 } + { "x": 0, "y": 332.5 } ], "source": { "direction": "Left", @@ -231,14 +246,15 @@ "target": { "direction": "Up", "element": "10d1fe36-1676-4ed9-bb9d-e3899aecb2ae" - } + }, + "isManuallyLayouted": false }, { "id": "f8237def-cca1-4142-8df2-d355fe815fa4", "name": "redirect to https", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 340, "y": 0, "width": 115, "height": 77.5 }, + "bounds": { "x": 370, "y": 0, "width": 115, "height": 77.5 }, "path": [ { "x": 40, "y": 77.5 }, { "x": 0, "y": 77.5 }, @@ -253,16 +269,17 @@ "target": { "direction": "Up", "element": "97ca81f2-3db4-4970-be23-9d2375583f20" - } + }, + "isManuallyLayouted": false }, { "id": "655d6343-25aa-4c54-a4f6-b962ab4bf8ec", "name": "no", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 250, "y": 557.5, "width": 70, "height": 1 }, + "bounds": { "x": 250, "y": 567.5, "width": 100, "height": 1 }, "path": [ - { "x": 70, "y": 0 }, + { "x": 100, "y": 0 }, { "x": 0, "y": 0 } ], "source": { @@ -272,18 +289,19 @@ "target": { "direction": "Right", "element": "10d1fe36-1676-4ed9-bb9d-e3899aecb2ae" - } + }, + "isManuallyLayouted": false }, { "id": "c280e8e2-d5ca-4c04-94bc-a040c8eb4d93", "name": "/maps/", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 255, "y": 207.5, "width": 125, "height": 182.5 }, + "bounds": { "x": 235, "y": 207.5, "width": 175, "height": 222.5 }, "path": [ - { "x": 125, "y": 0 }, + { "x": 175, "y": 0 }, { "x": 0, "y": 0 }, - { "x": 0, "y": 182.5 } + { "x": 0, "y": 222.5 } ], "source": { "direction": "Left", @@ -292,18 +310,19 @@ "target": { "direction": "Up", "element": "2515875a-493b-4142-96b6-f83ed2a8ba07" - } + }, + "isManuallyLayouted": false }, { "id": "c9861868-9906-408f-9aa3-867e051d32c7", "name": "", "type": "FlowchartFlowline", "owner": null, - "bounds": { "x": 125, "y": 585, "width": 255, "height": 122.5 }, + "bounds": { "x": 125, "y": 595, "width": 285, "height": 122.5 }, "path": [ { "x": 0, "y": 0 }, { "x": 0, "y": 122.5 }, - { "x": 255, "y": 122.5 } + { "x": 285, "y": 122.5 } ], "source": { "direction": "Down", @@ -312,7 +331,29 @@ "target": { "direction": "Left", "element": "37998db7-5459-4f9e-89fe-13b545213af7" - } + }, + "isManuallyLayouted": false + }, + { + "id": "05b1bcc9-175b-4ca2-816a-f8800536cc95", + "name": "/api/feedback/", + "type": "FlowchartFlowline", + "owner": null, + "bounds": { "x": 560, "y": 207.5, "width": 175, "height": 222.5 }, + "path": [ + { "x": 0, "y": 0 }, + { "x": 175, "y": 0 }, + { "x": 175, "y": 222.5 } + ], + "source": { + "direction": "Right", + "element": "d0225bd8-73f5-41ca-93f7-281ea7a01caf" + }, + "target": { + "direction": "Up", + "element": "5729939f-ab1e-45ea-bcd1-a15ccdbe1d04" + }, + "isManuallyLayouted": false } ], "assessments": [] diff --git a/resources/deployment/Flowchart.png b/resources/deployment/Flowchart.png index 01f3e748c..3203afe1a 100644 Binary files a/resources/deployment/Flowchart.png and b/resources/deployment/Flowchart.png differ diff --git a/resources/deployment/Flowchart.svg b/resources/deployment/Flowchart.svg index fd16cab33..fb630685c 100644 --- a/resources/deployment/Flowchart.svg +++ b/resources/deployment/Flowchart.svg @@ -1,4 +1,4 @@ -STARTendpoint?https?js-execution capability?serverwebclienttileserverrendertron rendering-proxycdn/api//cdn/elseyesyes/rendertron/redirect to httpsno/maps//api/feedback/ diff --git a/resources/documentation/Dependencys.md b/resources/documentation/Dependencys.md index 7040bbb93..98de51b74 100644 --- a/resources/documentation/Dependencys.md +++ b/resources/documentation/Dependencys.md @@ -55,6 +55,14 @@ Our server is written in [Rust](https://youtu.be/Q3AhzHq8ogs). To get started with Rust, you can follow the [official tutorial](https://www.rust-lang.org/learn/get-started). To install Rust, you can use [rustup](https://rustup.rs/). +### Feedback + +#### Rust + +Our server is written in [Rust](https://youtu.be/Q3AhzHq8ogs). +To get started with Rust, you can follow the [official tutorial](https://www.rust-lang.org/learn/get-started). +To install Rust, you can use [rustup](https://rustup.rs/). + #### OpenSSL The server uses OpenSSL to verify TLS certificates. diff --git a/server/Cargo.toml b/server/Cargo.toml index 4ba7c6400..01bee4e93 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -17,10 +17,8 @@ path = "src/main.rs" strip = true [dependencies] -regex = "1.7.0" log = "0.4.17" rusqlite = "0.28.0" -octocrab = "0.17.0" actix-web = "4.2.1" awc = "3.0.1" cached = "0.41.0" @@ -29,11 +27,7 @@ serde_json = "1.0.89" actix-cors = "0.6.4" tokio = { version = "1.22.0", features = ["full"] } futures = "0.3.25" -rand = "0.8.5" -structopt = "0.3.26" env_logger = "0.10.0" image = "0.24.5" rusttype= "0.9.3" imageproc= "0.23.0" -jsonwebtoken = "8.1.1" -chrono = "0.4.23" diff --git a/server/Dockerfile.server b/server/Dockerfile.server index 1826c494c..b54d936a5 100644 --- a/server/Dockerfile.server +++ b/server/Dockerfile.server @@ -24,7 +24,7 @@ RUN python3 load_api_data_to_db.py FROM alpine:3.17 RUN apk update --quiet \ - && apk add -q --no-cache openssl1.1-compat libgcc sqlite-libs tini curl \ + && apk add -q --no-cache libgcc sqlite-libs tini \ && mkdir -p ./src/maps/font diff --git a/server/src/main.rs b/server/src/main.rs index ea8a31231..1aa5a7b0c 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,27 +1,12 @@ use actix_cors::Cors; use actix_web::{get, middleware, web, App, HttpResponse, HttpServer}; -use structopt::StructOpt; - mod core; -mod feedback; mod maps; mod utils; const MAX_JSON_PAYLOAD: usize = 1024 * 1024; // 1 MB -#[derive(StructOpt, Debug)] -#[structopt(name = "server")] -pub struct Opt { - // Feedback - /// GitHub personal access token - #[structopt(short = "t", long)] - github_token: Option, - /// Secret for the feedback token generation - #[structopt(short = "jwt", long)] - jwt_key: Option, -} - #[get("/api/source_code")] async fn source_code_handler() -> HttpResponse { let gh_base = "https://github.com/TUM-Dev/navigatum".to_string(); @@ -46,38 +31,20 @@ async fn health_handler() -> HttpResponse { async fn main() -> std::io::Result<()> { env_logger::init_from_env(env_logger::Env::default().default_filter_or("info")); - let mut opt = Opt::from_args(); - if opt.github_token.is_none() { - opt.github_token = std::env::var("GITHUB_TOKEN").ok(); - } - if opt.jwt_key.is_none() { - opt.jwt_key = std::env::var("JWT_KEY").ok(); - } - - let state_feedback = web::Data::new(feedback::init_state(opt)); HttpServer::new(move || { let cors = Cors::default() .allow_any_origin() .allow_any_header() - .allowed_methods(vec!["GET", "POST"]) + .allowed_methods(vec!["GET"]) .max_age(3600); - let json_config = web::JsonConfig::default().limit(MAX_JSON_PAYLOAD); - - let logger = middleware::Logger::default().exclude("/api/health"); - App::new() .wrap(cors) - .wrap(logger) + .wrap(middleware::Logger::default().exclude("/api/health")) .wrap(middleware::Compress::default()) - .app_data(json_config) + .app_data(web::JsonConfig::default().limit(MAX_JSON_PAYLOAD)) .service(source_code_handler) .service(health_handler) - .service( - web::scope("/api/feedback") - .configure(feedback::configure) - .app_data(state_feedback.clone()), - ) .service(web::scope("/api/preview").configure(maps::configure)) .service(web::scope("/api").configure(core::configure)) })