From ea17833f3ced5e2eaa0f7c6c043a1f32bfea1f3e Mon Sep 17 00:00:00 2001 From: Denis Davydkov Date: Sun, 29 Oct 2023 01:26:47 +0200 Subject: [PATCH] update example --- cloud/legacy.c4 | 17 ++++++++++------- cloud/next.c4 | 37 ++++++++++++++++++++++++++----------- cloud/ui.c4 | 41 ++++++++++++++++++++++++----------------- views.c4 | 28 ++++++---------------------- 4 files changed, 66 insertions(+), 57 deletions(-) diff --git a/cloud/legacy.c4 b/cloud/legacy.c4 index d348943..9d5a89b 100644 --- a/cloud/legacy.c4 +++ b/cloud/legacy.c4 @@ -22,15 +22,18 @@ views { include *, cloud, - // cloud.ui, -> customer -> - style cloud, customer, cloud.* { + style * { + color secondary + } + + style cloud { color muted } style cloud.legacy, cloud.legacy.* { - color primary + color green } } @@ -39,13 +42,13 @@ views { *, cloud - style cloud { - color muted - } - style * { color secondary } + + style cloud { + color muted + } style cloud.legacy.* { color green diff --git a/cloud/next.c4 b/cloud/next.c4 index a4e0765..781beff 100644 --- a/cloud/next.c4 +++ b/cloud/next.c4 @@ -77,10 +77,13 @@ views { cloud.next.backend -> amazon.* style * { - color slate + color secondary } - style cloud.next.* { - color primary + style cloud { + color muted + } + style cloud.next, cloud.next.* { + color green } } @@ -94,23 +97,35 @@ views { cloud.supportUser style * { + color secondary + } + style cloud { color muted } - - style backend { - color primary - } + style cloud.next, cloud.next.* { + color green + } } view graphql of graphql { - include *, cloud.next - + include + *, + amazon, + -> amazon.*, + cloud.next, + cloud.ui.* -> graphql, + customer -> cloud.ui.*, + cloud.supportUser -> cloud.ui.*, + + style * { + color secondary + } + style cloud.next, amazon, cloud.ui { color muted } - style graphql, graphql.* { - color primary + color green } } diff --git a/cloud/ui.c4 b/cloud/ui.c4 index ed69399..c67baae 100644 --- a/cloud/ui.c4 +++ b/cloud/ui.c4 @@ -33,7 +33,7 @@ model { style { shape browser } - -> cloud.next.graphql "updates data in case of a support request" + -> cloud.next.graphql.updateAccount "updates data in case of a support request" -> amazon.aurora.tblUsers "reads users from the database" } @@ -52,39 +52,43 @@ views { include cloud style * { - color muted - } - style customer, cloud.supportUser { color secondary + } + style cloud { + color muted } style cloud.ui, cloud.ui.* { - color primary + color green } } view mobile of mobile { - include * - include cloud + include *, cloud style * { color secondary } + style cloud, cloud.ui { + color muted + } style mobile { - color primary + color green } } view cloud_ui_dashboard of dashboard { include * exclude * -> dashboard - include cloud.ui + include cloud.ui, cloud style * { + color secondary + } + style cloud, cloud.ui { color muted } - - style cloud.ui, cloud.ui.* { - color primary + style cloud.ui.* { + color green } } @@ -93,15 +97,18 @@ views { *, cloud.ui, cloud, - supportPanel -> *, - amazon.aurora - - style cloud, cloud.* { + amazon, + supportPanel -> amazon.* + + style * { + color secondary + } + style cloud, amazon { color muted } style cloud.ui, cloud.ui.* { - color primary + color green } } diff --git a/views.c4 b/views.c4 index b8a6bbb..89ac20b 100644 --- a/views.c4 +++ b/views.c4 @@ -3,32 +3,16 @@ views { view cloud of cloud { title "The Cloud System" - include - *, - ui.*, - next.*, - legacy.* - exclude - supportUser, - ui.supportPanel, - next -> legacy - // include - // cloud.* -> amazon.*, - // amazon - // exclude - // amazon -> * + include * - style amazon { - color indigo + style * { + color secondary } - style customer { - color green - } style cloud { - color sky - } + color muted + } style cloud.* { - color primary + color green } }