From f1743725f03a44bcac5c95af6215eb5f1bacc6b5 Mon Sep 17 00:00:00 2001 From: ddamiron <ddamiron@sii.fr> Date: Wed, 12 Jun 2019 10:43:42 +0200 Subject: [PATCH] add plantuml compatibility --- Dockerfile | 2 +- docs/architecture/uml-test.md | 4 ++ docs/miscellaneous/webapp-auth.md | 71 +++++++++++++++++++++++++++++++ mkdocs.yml | 8 +++- 4 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 docs/architecture/uml-test.md diff --git a/Dockerfile b/Dockerfile index 5fe2165..cdf170a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /app # add the current directory to the container as /app ADD . /docs # Perform build and cleanup artifacts -RUN pip install mkdocs && pip install mkdocs-material +RUN pip install mkdocs && pip install mkdocs-material && pip install plantuml-markdown # Set working directory WORKDIR /docs diff --git a/docs/architecture/uml-test.md b/docs/architecture/uml-test.md new file mode 100644 index 0000000..3324a5b --- /dev/null +++ b/docs/architecture/uml-test.md @@ -0,0 +1,4 @@ +```plantuml format="png" classes="uml myDiagram" alt="My super diagram placeholder" title="My super diagram" width="300px" height="300px" + Goofy -> MickeyMouse: calls + Goofy <-- MickeyMouse: responds +``` \ No newline at end of file diff --git a/docs/miscellaneous/webapp-auth.md b/docs/miscellaneous/webapp-auth.md index b6175cb..b78d4a3 100644 --- a/docs/miscellaneous/webapp-auth.md +++ b/docs/miscellaneous/webapp-auth.md @@ -63,6 +63,42 @@ group Authentication with OIDC providers front <-- auth : [302] redirection to the appropriate url end end +``` + +```plantuml + +!define BLACK #333745 +!define RED #d5232a +!define GREEN #37A77C + +' Base Setting +skinparam BackgroundColor transparent + +skinparam Sequence { + ArrowThickness 1 + ArrowColor RED + LifeLineBorderColor GREEN + ParticipantBorderThickness 1 +} +skinparam Participant { + BackgroundColor #FFFFFF + BorderColor BLACK + FontColor BLACK +} + +skinparam note { + BackgroundColor #FFFFFF + BorderColor BLACK + FontColor BLACK +} + +participant "Front" as front +participant "Authentication Service" as auth +participant "Middleware Legacy Auth" as middle +participant "Legacy Auth (Neogeo)" as django +participant "Email Service" as email +participant "Kong" as kong +participant "OIDC Server" as oidc group Authentication with Django Server group Get Public Key @@ -163,7 +199,42 @@ group Authentication with Django Server front <-- middle : void end end +``` +```plantuml + +!define BLACK #333745 +!define RED #d5232a +!define GREEN #37A77C + +' Base Setting +skinparam BackgroundColor transparent + +skinparam Sequence { + ArrowThickness 1 + ArrowColor RED + LifeLineBorderColor GREEN + ParticipantBorderThickness 1 +} +skinparam Participant { + BackgroundColor #FFFFFF + BorderColor BLACK + FontColor BLACK +} + +skinparam note { + BackgroundColor #FFFFFF + BorderColor BLACK + FontColor BLACK +} + +participant "Front" as front +participant "Authentication Service" as auth +participant "Middleware Legacy Auth" as middle +participant "Legacy Auth (Neogeo)" as django +participant "Email Service" as email +participant "Kong" as kong +participant "OIDC Server" as oidc group Authorization with Django server group List User resources front -> middle : <b>POST</b> /user/resources diff --git a/mkdocs.yml b/mkdocs.yml index 18d1c0a..0c84948 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,6 +8,10 @@ theme: primary: 'grey' accent: 'amber' +markdown_extensions: + - plantuml_markdown: + server: http://www.plantuml.com/plantuml + nav: - Home: index.md - Architecture Guide: @@ -23,7 +27,9 @@ nav: - resources: architecture/services/resources.md - Elasticsearch: - Indexer: architecture/services/elasticsearch/indexer.md + - UML Diagrams: + - Test: architecture/uml-test.md + - Webapp-auth: miscellaneous/webapp-auth.md - About: - Gitflow: miscellaneous/gitflow-ci-cd.md - VSCode: miscellaneous/vscode-settings.md - - Webapp: miscellaneous/webapp-auth.md -- GitLab