Skip to content

Commit

Permalink
change template views
Browse files Browse the repository at this point in the history
  • Loading branch information
davydkov committed May 24, 2024
1 parent 3c8e337 commit f53d177
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 26 deletions.
16 changes: 14 additions & 2 deletions src/_spec.c4
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ specification {
}
}

element system
element component
element system {
style {
opacity 20%
}
}
element component {
style {
opacity 20%
}
}
element service
element webapp {
style {
Expand All @@ -30,4 +38,8 @@ specification {
shape storage
}
}

relationship solid {
line solid
}
}
39 changes: 24 additions & 15 deletions src/cloud/backend.c4
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ model {
tbl_sessions = db_table '[ sessions ]' {
technology '<< private schema >>'
description '
Active sessions of logged in customers
Active sessions of
authenticated customers
'
}
tbl_sessions -> tbl_customers 'belongs to'
tbl_sessions -> tbl_customers 'references to' {
style {
line solid
}
}
}
}

Expand All @@ -44,41 +49,45 @@ views {

include
*,
cloud,
aws,
aws.pg,
cloud.backend -> aws.*,
cloud.backend -> aws.pg.*
aws._,
aws.pg._,
backend with {
navigateTo cloud
}

style * {
color secondary
}

style cloud, aws, aws.pg {
color muted
color amber
opacity 10%
}

style cloud.backend, cloud.backend.* {
color green
}
style aws.pg {
border solid
}
style cloud.ui {
color secondary
}
}

view aws_pg of aws.pg {
title 'Databases'
include
*,
aws with {
pg with {
title 'AWS - PostgreSQL'
navigateTo aws
},
cloud,
cloud.* -> pg.*
exclude pg

style * {
color secondary
opacity 10%
}

style cloud, aws {
style cloud, pg {
color muted
}

Expand Down
15 changes: 10 additions & 5 deletions src/cloud/ui.c4
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ views {
view cloud_ui of cloud.ui {
include
*,
cloud,
aws,
cloud.ui -> aws.*
ui with {
navigateTo cloud
},
aws._,

exclude
cloud.ui
cloud.backend -> aws.cognito

style * {
color secondary
Expand All @@ -44,8 +46,11 @@ views {
color muted
}

style cloud.ui.* {
style ui, ui.* {
color green
}
style aws, aws.* {
color amber
}
}
}
29 changes: 25 additions & 4 deletions src/views.c4
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
views {

view index {
view index of customer {
title 'System Landscape'
include *
include
*,
element.kind = system
}

view cloud of cloud {
Expand All @@ -18,13 +20,32 @@ views {
include
*,
cloud,
cloud.* -> aws.*
style aws, cloud {
cloud.* -> aws

style * {
color muted
border dotted
opacity 5%
}
style aws.* {
color green
}
style cloud.* {
color secondary
}
}

view aws_cognito of aws.cognito {
include
*,
cloud.* ->

style cloud.* {
color secondary
}
style aws.cognito {
color amber
}
}

}

0 comments on commit f53d177

Please sign in to comment.