Skip to content

Commit 9de72a3

Browse files
Продолжаем эксперементы с выносом матамодели в свою репу
1 parent 470c8a8 commit 9de72a3

11 files changed

Lines changed: 42 additions & 387 deletions

File tree

src/repository_structure_example/application_arch/systems/_root.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ imports:
33
- allure.yaml
44
- crm.yaml
55
- grafana_dev.yaml
6+
- sid.yaml
67
- spact.yaml
78
- spoll.yaml
9+
- srole.yaml
10+

src/repository_structure_example/application_arch/users/users.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
components:
22
# внутренние клиенты Экосистемы
33

4-
swamp.frog:
5-
title: Лягушка
6-
entity: person
7-
84
swamp.creeping_snake:
95
title: Змей-ползучий
106
entity: person # Сущность компонента из PlantUML (https://plantuml.com/ru/deployment-diagram)

src/repository_structure_example/artefacts/common/pal1_landscape.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ contexts: # Контексты представления архитектур
44
location: ГК Болото
55
extra-links: true
66
# extra-links: false
7-
# uml:
8-
# $notation: plantuml # sber C4Model plantuml
9-
# $autor: Frog
10-
# $version: '0.0.1'
11-
# $moment: 20.11.2022
7+
uml:
8+
$notation: plantuml # sber C4Model plantuml
9+
$autor: Frog
10+
$version: '0.0.1'
11+
$moment: 20.11.2022
1212
components:
1313
- swamp.frog.*
1414
- swamp.hippo.*
15-
- swamp.crocodile.*
16-
- swamp.crocodile.sid
15+
- swamp.crocodile.*

src/repository_structure_example/artefacts/frog_paradise/pal1_landscape.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ contexts: # Контексты представления архитектур
44
location: Лягушачий рай
55
# extra-links: true
66
extra-links: false
7-
# uml:
8-
# $notation: plantuml # sber C4Model plantuml
9-
# $autor: Frog
10-
# $version: 0.0.1
11-
# $moment: 20.11.2022
7+
uml:
8+
$notation: plantuml # sber C4Model plantuml
9+
$autor: Frog
10+
$version: 0.0.1
11+
$moment: 20.11.2022
1212
components:
1313
- swamp.frog.*
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
imports:
2-
- docs.yaml
2+
- docs.yaml
3+
- units.yaml
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
components:
2+
swamp:
3+
title: Болото
4+
entity: unit
5+
swamp.hippo:
6+
title: Бизнес-юнит Бегемота
7+
entity: unit
8+
swamp.frog:
9+
title: Бизнес-юнит Лягушки
10+
entity: unit
11+
swamp.crocodile:
12+
title: Бизнес-юнит Крокодила
13+
entity: unit
14+

src/repository_structure_example/ex_from_max/product.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/repository_structure_example/metamodels/default/entities/contexts/base.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ entities:
113113
/* Обрабатываем параметры */
114114
$params := $;
115115
$manifest := $params.manifest;
116+
/* Признак SELF контекста */
117+
$isSelf := $params.componentId ? true : false;
118+
/* Получаем объект контекста */
116119
$context := $lookup($params.manifest.contexts, contextId);
117120
118121
/* Определяем необходимость показывать ближайшие связи */
@@ -134,15 +137,17 @@ entities:
134137
$mask := $;
135138
$manifest.components.$spread().(
136139
$componentId := $keys()[0];
137-
$wcard($componentId, $mask) ? $
140+
$result := $wcard($componentId, $mask) ? $
138141
)
139142
));
140143

141144
/* Добавляем окружение, если это нужно */
142145
$merge([$components, $isExtraLinks ? (
143146
$components.*.links.(
144147
{
145-
id: $lookup($manifest.components, id)
148+
id: $isSelf
149+
? $merge([$lookup($manifest.components, id), { "links": [] }])
150+
: $lookup($manifest.components, id)
146151
}
147152
);
148153
) : {}]);

0 commit comments

Comments
 (0)