Diagramme fluxs HTTP

This commit is contained in:
Bruno MATEU 2025-02-16 17:10:52 +01:00
parent c25df1b1df
commit 2914442fea

154
diagrames-flux/web.tex Normal file
View file

@ -0,0 +1,154 @@
\documentclass{standalone}
\usepackage[sfdefault]{noto}
\usepackage[fixed]{fontawesome5}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,matrix,fit,decorations.pathreplacing,arrows.meta}
\tikzset{
single icon/.style={
font={\fontsize{34}{38}\selectfont}
},
every path/.style={
line width=.5mm
},
every label/.style={
label distance=-1mm
},
main/.style={
-Stealth
},
backup/.style={
dashed, -Stealth
},
http/.style={
red
},
pg/.style={
color=green!70!black
},
ldap/.style={
blue
},
segment/.style={
color=gray, draw opacity=0.4, line width=1.2mm, dash pattern=on 10pt off 6pt
},
segment title/.style={
execute at begin node={\bf\fontsize{2.2em}{2.2em}\selectfont\scshape},
color=gray!80
},
mixed/.style={
dash pattern=on 10pt off 10pt
},
% box drawn around all bits defining a region using tikz fit
region box/.style={
inner sep=1em,
rounded corners=1em,
line width=0.1em,
fill=#1!5!white
},
region descriptor/.style={
outer sep=0,
execute at begin node={\bf\fontsize{3em}{3em}\selectfont\scshape},
color=#1!15!white
},
}
\begin{document}
\begin{tikzpicture}
\pgfdeclarelayer{regions}
\pgfsetlayers{regions,main}
\node[single icon] (user) {\faIcon{user}};
\node[single icon, label={[name=front1-label]front1}] at ([shift=({15em, 7em})]user) (front1) {\faIcon{server}};
\node[single icon, label=below:front2] at ([shift=({15em, -7em})]user) (front2) {\faIcon{server}};
\node[single icon, right=15em of front1, label=rp.chapoline] (rp-chapoline) {\faIcon{server}};
\node[single icon, right=15em of front2, label=below:rp.britaliope] (rp-britaliope) {\faIcon{server}};
\node[single icon, right=10em of rp-chapoline, label=app.chapoline] (app-chapoline) {\faIcon{globe}};
\node[single icon, right=10em of rp-britaliope, label=below:app.britaliope] (app-britaliope) {\faIcon{globe}};
\node[single icon, right=15em of app-chapoline, label=ilb.chapoline] (ilb-chapoline) {\faIcon{server}};
\node[single icon, right=15em of app-britaliope, label=below:ilb.britaliope] (ilb-britaliope) {\faIcon{server}};
\node[single icon, label={[name=ldap-chapoline-label]ldap.chapoline}] at ([shift=({15em, 7em})]ilb-chapoline) (ldap-chapoline){\faIcon{id-card}};
\node[single icon, label=pg.chapoline] at ([shift=({15em, -2em})]ilb-chapoline) (pg-chapoline) {\faIcon{database}};
\node[single icon, label={[name=ldap-britaliope-label]below:ldap.britaliope}] at ([shift=({15em, -7em})]ilb-britaliope) (ldap-britaliope){\faIcon{id-card}};
\node[single icon, label=below:pg.britaliope] at ([shift=({15em, 2em})]ilb-britaliope) (pg-britaliope) {\faIcon{database}};
\draw[main, http] (user) -- (front1) node[midway] (z1t) {};
\draw[main, http] (user) -- (front2) node[midway] (z1b) {};
\draw[main, http] (front1) -- (rp-chapoline) node[midway] (z2t) {};
\draw[main, http] (front1) -- (rp-britaliope);
\draw[main, http] (front2) -- (rp-chapoline);
\draw[main, http] (front2) -- (rp-britaliope) node[midway] (z2b) {};
\draw[main, http] (rp-chapoline) -- (app-chapoline);
\draw[backup, http] (rp-chapoline) -- (app-britaliope);
\draw[main, http] (rp-britaliope) -- (app-britaliope);
\draw[backup, http] (rp-britaliope) -- (app-chapoline);
\draw[main, pg] (app-chapoline) -- (ilb-chapoline) node[midway] (z3t) {};
\draw[main, pg] (app-britaliope) -- (ilb-britaliope) node[midway] (z3b) {};
\draw[main, ldap, mixed] (app-chapoline) -- (ilb-chapoline);
\draw[main, ldap, mixed] (app-britaliope) -- (ilb-britaliope);
\draw[main, pg] (ilb-chapoline) -- (pg-chapoline);
\draw[main, pg] (ilb-britaliope) -- (pg-chapoline);
\draw[backup, pg] (ilb-chapoline) -- (pg-britaliope);
\draw[backup, pg] (ilb-britaliope) -- (pg-britaliope);
\draw[main, ldap] (ilb-chapoline) -- (ldap-chapoline);
\draw[backup, ldap] (ilb-britaliope) -- (ldap-chapoline);
\draw[backup, ldap] (ilb-chapoline) -- (ldap-britaliope);
\draw[main, ldap] (ilb-britaliope) -- (ldap-britaliope);
\begin{pgfonlayer}{regions}
\node[region box=blue, fit=(rp-britaliope.west) (pg-britaliope.north east) (ldap-britaliope-label.south east)] (region-britaliope){};
\node[region descriptor=blue, above, anchor=south west, outer sep=1em] at (region-britaliope.south west) { Britaliope };
\node[region box=red, fit=(rp-chapoline.west) (pg-chapoline.south east) (ldap-chapoline-label.north east)] (region-chapoline){};
\node[region descriptor=red, above, anchor=north west, outer sep=1em] at (region-chapoline.north west) { Chapoline };
\node[region box=orange, fit=(front1-label) (front1)] (region-chapoline){};
\node[region descriptor=orange, above, anchor=south, outer sep=1em] at (region-chapoline.north) { Contabo };
\end{pgfonlayer}
\draw[segment] (z1t) ++ (0, 3.72) -- (z1b) -- ++(0, -3.72);
\draw[segment] (z2t) ++ (0, 2.5) -- (z2b) -- ++(0, -2.5);
\draw[segment] (z3t) ++ (0, 2.5) -- (z3b) -- ++(0, -2.5);
\path let \p1 = ($(z1t)!0.5!(z2t)$) in node[segment title] at (\x1, -7) {Frontend};
\path let \p1 = ($(z2t)!0.5!(z3t)$) in node[segment title] at (\x1, -7) {Backend applicatif};
\path let \p1 = ($(z3t)!0.5!(ldap-chapoline.east)$) in node[segment title] at (\x1, -7) {Backend données};
% --------------- start legend ---------------
\matrix[
anchor=north west,
yshift=2em,
matrix of nodes,
row sep=-0.1em,
every node/.style={anchor=west},
font=\small,
above=10em of user
] (legend) {
& {\Large\sffamily\bfseries Légende} \\
\draw[main] (0,0) -- (0.75,0); & Principal \\
\draw[backup] (0,0) -- (0.75,0); & Backup \\
\draw[http] (0,0) -- (0.75,0); & HTTP \\
\draw[pg] (0,0) --(0.75,0); & PostgreSQL \\
\draw[ldap] (0,0) --(0.75,0); & LDAP \\
};
\node[above=0mm of legend.north west, anchor=south west, text width=8em, font=\small] {last updated:\\\today};
% --------------- end legend ---------------
\end{tikzpicture}
\end{document}