@seafteam/seaf-archtool-core-plugin-suite 2026.29.0-rc-test.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +27 -0
- package/documentation/arch/aspects.yaml +81 -0
- package/documentation/arch/components/browser.yaml +51 -0
- package/documentation/arch/components/examples/context.yaml +37 -0
- package/documentation/arch/components/examples/order.yaml +92 -0
- package/documentation/arch/components/examples/payment.yaml +92 -0
- package/documentation/arch/components/examples/root.yaml +42 -0
- package/documentation/arch/components/front.yaml +309 -0
- package/documentation/arch/components/gitlab.yaml +81 -0
- package/documentation/arch/components/plantuml.yaml +57 -0
- package/documentation/arch/components/root.yaml +36 -0
- package/documentation/arch/components/user.yaml +41 -0
- package/documentation/arch/components/web.yaml +39 -0
- package/documentation/arch/contexts.yaml +99 -0
- package/documentation/arch/forms.yaml +36 -0
- package/documentation/arch/namespaces.yaml +43 -0
- package/documentation/arch/root.yaml +43 -0
- package/documentation/arch/rules.yaml +91 -0
- package/documentation/arch/technologies.yaml +84 -0
- package/documentation/dochub.yaml +32 -0
- package/documentation/docs/conception/archdistrib.puml +38 -0
- package/documentation/docs/conception/archeco.puml +11 -0
- package/documentation/docs/conception/archeco_proc.puml +29 -0
- package/documentation/docs/conception/archver.puml +24 -0
- package/documentation/docs/conception/facade.puml +20 -0
- package/documentation/docs/conception/introduction.md +144 -0
- package/documentation/docs/conception/mindmap.puml +55 -0
- package/documentation/docs/conception/root.yaml +66 -0
- package/documentation/docs/manual/aspects.md +37 -0
- package/documentation/docs/manual/backend/api.yaml +664 -0
- package/documentation/docs/manual/backend/search-implementation.md +190 -0
- package/documentation/docs/manual/backend/search.yaml +495 -0
- package/documentation/docs/manual/clickstream-setup.md +50 -0
- package/documentation/docs/manual/components.md +45 -0
- package/documentation/docs/manual/config/deployment.md +337 -0
- package/documentation/docs/manual/context_source.puml +17 -0
- package/documentation/docs/manual/contexts.md +200 -0
- package/documentation/docs/manual/datasets.md +120 -0
- package/documentation/docs/manual/docs/AI_TABLE_INTEGRATION.md +81 -0
- package/documentation/docs/manual/docs/asyncapi.md +63 -0
- package/documentation/docs/manual/docs/bpmn.md +122 -0
- package/documentation/docs/manual/docs/charts.md +371 -0
- package/documentation/docs/manual/docs/docs.md +76 -0
- package/documentation/docs/manual/docs/drawio_intro.md +397 -0
- package/documentation/docs/manual/docs/editable_table/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/root.yaml +9 -0
- package/documentation/docs/manual/docs/editable_table/step_0_base/menu.yaml +6 -0
- package/documentation/docs/manual/docs/editable_table/step_0_base/root.yaml +3 -0
- package/documentation/docs/manual/docs/editable_table/step_0_base/table.yaml +396 -0
- package/documentation/docs/manual/docs/editable_table/step_0_base/template.md +404 -0
- package/documentation/docs/manual/docs/editable_table/step_1_acquaintance/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_1_acquaintance/root.yaml +3 -0
- package/documentation/docs/manual/docs/editable_table/step_1_acquaintance/table.yaml +136 -0
- package/documentation/docs/manual/docs/editable_table/step_1_acquaintance/template.md +247 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/data/pets.yaml +23 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/data/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/menu.yaml +34 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/table.yaml +36 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/template_root.md +110 -0
- package/documentation/docs/manual/docs/editable_table/step_2_parameterization/template_table.md +3 -0
- package/documentation/docs/manual/docs/editable_table/step_3_headers/menu.yaml +6 -0
- package/documentation/docs/manual/docs/editable_table/step_3_headers/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_3_headers/template.md +300 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/data/data.yaml +10 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/data/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/data/data_column_1.yaml +3 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/data/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/menu.yaml +6 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/table.yaml +52 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/auto_imports/template.md +117 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/examples/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/menu.yaml +6 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/root.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/table.yaml +116 -0
- package/documentation/docs/manual/docs/editable_table/step_4_editing/template.md +231 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/base_example/data.yaml +30 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/base_example/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/base_example/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/base_example/table.yaml +122 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/base_example/template.md +276 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/hiding_columns/data.yaml +11 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/hiding_columns/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/hiding_columns/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/hiding_columns/table.yaml +40 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/hiding_columns/template.md +59 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/examples/root.yaml +3 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/table.yaml +35 -0
- package/documentation/docs/manual/docs/editable_table/step_5_styles/template.md +142 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/data_errors/data.yaml +40 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/data_errors/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/data_errors/root.yaml +4 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/data_errors/table.yaml +77 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/data_errors/template.md +146 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/examples/root.yaml +2 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/menu.yaml +5 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/root.yaml +3 -0
- package/documentation/docs/manual/docs/editable_table/step_6_errors/template.md +3 -0
- package/documentation/docs/manual/docs/editable_table/template.md +24 -0
- package/documentation/docs/manual/docs/examples/asyncapi.yaml +77 -0
- package/documentation/docs/manual/docs/examples/asyncapi_template.json +11 -0
- package/documentation/docs/manual/docs/examples/autors.yaml +30 -0
- package/documentation/docs/manual/docs/examples/bpmn.xml +44 -0
- package/documentation/docs/manual/docs/examples/cat.jpg +0 -0
- package/documentation/docs/manual/docs/examples/charts-bar.yaml +61 -0
- package/documentation/docs/manual/docs/examples/charts-bubble.yaml +47 -0
- package/documentation/docs/manual/docs/examples/charts-doughnut.yaml +42 -0
- package/documentation/docs/manual/docs/examples/charts-line.yaml +55 -0
- package/documentation/docs/manual/docs/examples/charts-pie.yaml +37 -0
- package/documentation/docs/manual/docs/examples/charts-polararea.yaml +54 -0
- package/documentation/docs/manual/docs/examples/charts-radar.yaml +50 -0
- package/documentation/docs/manual/docs/examples/charts-scatter.yaml +48 -0
- package/documentation/docs/manual/docs/examples/charts.yaml +91 -0
- package/documentation/docs/manual/docs/examples/contexts.jsonata +8 -0
- package/documentation/docs/manual/docs/examples/date-picker-example.md +5 -0
- package/documentation/docs/manual/docs/examples/example.html +2 -0
- package/documentation/docs/manual/docs/examples/example.puml +17 -0
- package/documentation/docs/manual/docs/examples/example.yaml +53 -0
- package/documentation/docs/manual/docs/examples/ext-schema.yaml +3 -0
- package/documentation/docs/manual/docs/examples/inlinemeta.md +25 -0
- package/documentation/docs/manual/docs/examples/markaper.yaml +225 -0
- package/documentation/docs/manual/docs/examples/mermaid.mmd +32 -0
- package/documentation/docs/manual/docs/examples/openapi_template.json +16 -0
- package/documentation/docs/manual/docs/examples/pizza-collaboration.xml +383 -0
- package/documentation/docs/manual/docs/examples/sa-anim.yaml +209 -0
- package/documentation/docs/manual/docs/examples/sa-complex-hide-boundary.yaml +94 -0
- package/documentation/docs/manual/docs/examples/sa-complex-hide-leaves.yaml +94 -0
- package/documentation/docs/manual/docs/examples/sa-complex-hide-title.yaml +98 -0
- package/documentation/docs/manual/docs/examples/sa-complex.yaml +92 -0
- package/documentation/docs/manual/docs/examples/sa-gravity.yaml +104 -0
- package/documentation/docs/manual/docs/examples/sa-group.yaml +93 -0
- package/documentation/docs/manual/docs/examples/sa-physical-connection.yaml +79 -0
- package/documentation/docs/manual/docs/examples/sa-query.jsonata +74 -0
- package/documentation/docs/manual/docs/examples/sa-symbol.yaml +72 -0
- package/documentation/docs/manual/docs/examples/sa-through-objects.yaml +46 -0
- package/documentation/docs/manual/docs/examples/sa-without-tips.yaml +43 -0
- package/documentation/docs/manual/docs/examples/showcases.jsonata +5 -0
- package/documentation/docs/manual/docs/examples/smartants_.yaml +160 -0
- package/documentation/docs/manual/docs/examples/table.yaml +341 -0
- package/documentation/docs/manual/docs/examples/template.puml +6 -0
- package/documentation/docs/manual/docs/examples/test.jsonata +3 -0
- package/documentation/docs/manual/docs/examples/toc/2header.md +8 -0
- package/documentation/docs/manual/docs/examples/toc/custom-toc-place-dup.md +37 -0
- package/documentation/docs/manual/docs/examples/toc/custom-toc-place.md +35 -0
- package/documentation/docs/manual/docs/examples/toc/root.yaml +38 -0
- package/documentation/docs/manual/docs/examples/toc/test.md +160 -0
- package/documentation/docs/manual/docs/gigachat/agents/aigena/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/agents/aigena/root.yaml +2 -0
- package/documentation/docs/manual/docs/gigachat/agents/aigena/template.md +25 -0
- package/documentation/docs/manual/docs/gigachat/agents/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/agents/react/gigachat.yaml +59 -0
- package/documentation/docs/manual/docs/gigachat/agents/react/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/agents/react/root.yaml +3 -0
- package/documentation/docs/manual/docs/gigachat/agents/react/template.md +138 -0
- package/documentation/docs/manual/docs/gigachat/agents/root.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/agents/simple/gigachat.yaml +14 -0
- package/documentation/docs/manual/docs/gigachat/agents/simple/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/agents/simple/root.yaml +3 -0
- package/documentation/docs/manual/docs/gigachat/agents/simple/template.md +113 -0
- package/documentation/docs/manual/docs/gigachat/agents/template.md +62 -0
- package/documentation/docs/manual/docs/gigachat/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/root.yaml +4 -0
- package/documentation/docs/manual/docs/gigachat/settings/menu.yaml +5 -0
- package/documentation/docs/manual/docs/gigachat/settings/root.yaml +2 -0
- package/documentation/docs/manual/docs/gigachat/settings/template.md +51 -0
- package/documentation/docs/manual/docs/gigachat/template.md +38 -0
- package/documentation/docs/manual/docs/images/cloud.png +0 -0
- package/documentation/docs/manual/docs/images/component.png +0 -0
- package/documentation/docs/manual/docs/images/system.png +0 -0
- package/documentation/docs/manual/docs/images/user.png +0 -0
- package/documentation/docs/manual/docs/markaper.md +278 -0
- package/documentation/docs/manual/docs/markdown.md +148 -0
- package/documentation/docs/manual/docs/mermaid.md +43 -0
- package/documentation/docs/manual/docs/network.md +117 -0
- package/documentation/docs/manual/docs/plantuml.md +28 -0
- package/documentation/docs/manual/docs/root.yaml +736 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/basic.yaml +13 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/diff.yaml +123 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/example_seaf_data.yaml +1689 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/root.yaml +5 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/templates.yaml +55 -0
- package/documentation/docs/manual/docs/seaf2drawio/examples/transformation.yaml +19 -0
- package/documentation/docs/manual/docs/seaf2drawio/object_description.md +35 -0
- package/documentation/docs/manual/docs/seaf2drawio/root.yaml +12 -0
- package/documentation/docs/manual/docs/seaf2drawio/seaf2drawio.md +118 -0
- package/documentation/docs/manual/docs/smartants.md +583 -0
- package/documentation/docs/manual/docs/svg_inline.md +66 -0
- package/documentation/docs/manual/docs/swagger.md +52 -0
- package/documentation/docs/manual/docs/tables.md +264 -0
- package/documentation/docs/manual/docs/templates/example.drawio +43 -0
- package/documentation/docs/manual/docs/templates/test.svg +79 -0
- package/documentation/docs/manual/docs/templates.md +361 -0
- package/documentation/docs/manual/docs/toc.md +137 -0
- package/documentation/docs/manual/entities/bstages.md +43 -0
- package/documentation/docs/manual/entities/bundle.md +105 -0
- package/documentation/docs/manual/entities/entities.md +727 -0
- package/documentation/docs/manual/entities/images/id_errors.png +0 -0
- package/documentation/docs/manual/entities/images/landspace.jpeg +0 -0
- package/documentation/docs/manual/entities/images/menu-single.jpeg +0 -0
- package/documentation/docs/manual/entities/images/menu-tree.jpeg +0 -0
- package/documentation/docs/manual/entities/images/object_select.png +0 -0
- package/documentation/docs/manual/entities/images/problems.png +0 -0
- package/documentation/docs/manual/entities/images/select_inter.png +0 -0
- package/documentation/docs/manual/entities/images/stages.jpg +0 -0
- package/documentation/docs/manual/entities/images/suggests.png +0 -0
- package/documentation/docs/manual/entities/intro.md +73 -0
- package/documentation/docs/manual/entities/rules.md +35 -0
- package/documentation/docs/manual/functions/example.yaml +50 -0
- package/documentation/docs/manual/functions/functions.md +51 -0
- package/documentation/docs/manual/functions/root.yaml +39 -0
- package/documentation/docs/manual/images/jbps1.1.png +0 -0
- package/documentation/docs/manual/images/jbps1.png +0 -0
- package/documentation/docs/manual/images/jbps2.png +0 -0
- package/documentation/docs/manual/images/vsc1.png +0 -0
- package/documentation/docs/manual/imports.md +59 -0
- package/documentation/docs/manual/introduction.md +38 -0
- package/documentation/docs/manual/jsonata.md +268 -0
- package/documentation/docs/manual/plugin-settings.md +134 -0
- package/documentation/docs/manual/plugins/interface.md +226 -0
- package/documentation/docs/manual/plugins/introduction.md +256 -0
- package/documentation/docs/manual/plugins/root.yaml +51 -0
- package/documentation/docs/manual/role-model.md +80 -0
- package/documentation/docs/manual/root-cluster-import.md +82 -0
- package/documentation/docs/manual/root.yaml +199 -0
- package/documentation/docs/manual/rules/exceptions.md +20 -0
- package/documentation/docs/manual/rules/exreason.md +3 -0
- package/documentation/docs/manual/rules/root.yaml +58 -0
- package/documentation/docs/manual/rules/rules.md +8 -0
- package/documentation/docs/manual/rules/standard.md +3 -0
- package/documentation/docs/manual/rules/validators.md +109 -0
- package/documentation/docs/manual/technologies.md +49 -0
- package/documentation/docs/root.yaml +32 -0
- package/documentation/docs/sequence.puml +48 -0
- package/documentation/docs/welcome.md +3 -0
- package/documentation/entities/extentions/entity.yaml +136 -0
- package/documentation/entities/extentions/templates/people.md +4 -0
- package/documentation/entities/interactions/entity.yaml +412 -0
- package/documentation/entities/interactions/templates/blank.puml +18 -0
- package/documentation/entities/interactions/templates/bpmn.xml +59 -0
- package/documentation/entities/interactions/templates/tree.puml +11 -0
- package/documentation/entities/root.yaml +33 -0
- package/documentation/root.yaml +37 -0
- package/metamodel/dochub/entities/aspects/base.yaml +73 -0
- package/metamodel/dochub/entities/aspects/blank.yaml +65 -0
- package/metamodel/dochub/entities/aspects/components.yaml +52 -0
- package/metamodel/dochub/entities/aspects/contexts.yaml +57 -0
- package/metamodel/dochub/entities/aspects/docs.yaml +51 -0
- package/metamodel/dochub/entities/aspects/hierarchy.yaml +80 -0
- package/metamodel/dochub/entities/aspects/root.yaml +9 -0
- package/metamodel/dochub/entities/aspects/summary.yaml +64 -0
- package/metamodel/dochub/entities/aspects/templates/components.md +5 -0
- package/metamodel/dochub/entities/aspects/templates/hierarchy.puml +5 -0
- package/metamodel/dochub/entities/aspects/templates/summary.md +9 -0
- package/metamodel/dochub/entities/aspects/templates/tree.puml +5 -0
- package/metamodel/dochub/entities/aspects/tree.yaml +37 -0
- package/metamodel/dochub/entities/components/base.yaml +97 -0
- package/metamodel/dochub/entities/components/blank.yaml +64 -0
- package/metamodel/dochub/entities/components/contexts.yaml +55 -0
- package/metamodel/dochub/entities/components/docs.yaml +50 -0
- package/metamodel/dochub/entities/components/hierarchy.yaml +84 -0
- package/metamodel/dochub/entities/components/index.yaml +17 -0
- package/metamodel/dochub/entities/components/root.yaml +8 -0
- package/metamodel/dochub/entities/components/summary.yaml +58 -0
- package/metamodel/dochub/entities/components/symbol.yaml +113 -0
- package/metamodel/dochub/entities/components/templates/hierarchy.puml +5 -0
- package/metamodel/dochub/entities/components/templates/summary.md +8 -0
- package/metamodel/dochub/entities/components/templates/tree.puml +5 -0
- package/metamodel/dochub/entities/components/tree.yaml +38 -0
- package/metamodel/dochub/entities/contexts/base.yaml +197 -0
- package/metamodel/dochub/entities/contexts/plantuml.yaml +241 -0
- package/metamodel/dochub/entities/contexts/root.yaml +5 -0
- package/metamodel/dochub/entities/contexts/smartants.yaml +177 -0
- package/metamodel/dochub/entities/contexts/templates/template.puml +183 -0
- package/metamodel/dochub/entities/contexts/templates/tree.puml +5 -0
- package/metamodel/dochub/entities/contexts/tree.yaml +39 -0
- package/metamodel/dochub/entities/documents/base.yaml +73 -0
- package/metamodel/dochub/entities/documents/blank.yaml +28 -0
- package/metamodel/dochub/entities/documents/root.yaml +3 -0
- package/metamodel/dochub/entities/root.yaml +5 -0
- package/metamodel/dochub/functions/root.yaml +2 -0
- package/metamodel/dochub/functions/tools.yaml +46 -0
- package/metamodel/dochub/root.yaml +24 -0
- package/metamodel/dochub/rules/root.yaml +2 -0
- package/metamodel/dochub/rules/validators.yaml +144 -0
- package/metamodel/dochub/samples/01_components.yaml +23 -0
- package/metamodel/dochub/samples/02_contexts.yaml +23 -0
- package/metamodel/dochub/samples/03_documents.yaml +10 -0
- package/metamodel/dochub/samples/root.yaml +4 -0
- package/metamodel/dochub/samples/test.puml +17 -0
- package/metamodel/dochub.yaml +5 -0
- package/metamodel/docs/welcome.md +39 -0
- package/metamodel/root.yaml +8 -0
- package/package.json +29 -0
- package/plugin.html +1961 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Базовое описание сущности "Contexts"
|
|
2
|
+
entities:
|
|
3
|
+
contexts:
|
|
4
|
+
title: Контексты
|
|
5
|
+
description: >
|
|
6
|
+
Представляет указанные архитектурные компоненты в виде диаграмм.
|
|
7
|
+
schema:
|
|
8
|
+
type: object
|
|
9
|
+
patternProperties:
|
|
10
|
+
"^[0-9a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z][a-zA-Z0-9_-]*)*$":
|
|
11
|
+
type: object
|
|
12
|
+
properties:
|
|
13
|
+
title:
|
|
14
|
+
title: Название контекста
|
|
15
|
+
type: string
|
|
16
|
+
location:
|
|
17
|
+
title: Место расположения в меню
|
|
18
|
+
type: string
|
|
19
|
+
icon:
|
|
20
|
+
title: Иконка в меню
|
|
21
|
+
type: string
|
|
22
|
+
components:
|
|
23
|
+
title: Компоненты контекста
|
|
24
|
+
type: array
|
|
25
|
+
items:
|
|
26
|
+
type: string
|
|
27
|
+
title: Идентификатор компонента или маска
|
|
28
|
+
pattern: "^[0-9a-zA-Z][a-zA-Z0-9\\_]*(\\.([a-zA-Z0-9][a-zA-Z0-9\\_]*|\\*))*$"
|
|
29
|
+
extra-links:
|
|
30
|
+
title: Отображать компоненты ближайших связей
|
|
31
|
+
type: boolean
|
|
32
|
+
presentation:
|
|
33
|
+
title: Принудительно определяет презентацию
|
|
34
|
+
type: string
|
|
35
|
+
enum:
|
|
36
|
+
- plantuml
|
|
37
|
+
- smartants
|
|
38
|
+
uml:
|
|
39
|
+
title: Кастомизация контекста
|
|
40
|
+
oneOf:
|
|
41
|
+
- type: string
|
|
42
|
+
title: Путь к файлу PlantUML
|
|
43
|
+
- type: object
|
|
44
|
+
title: Дополнительные параметры
|
|
45
|
+
properties:
|
|
46
|
+
$before:
|
|
47
|
+
title: Код встраиваемый до сгенерированного
|
|
48
|
+
type: string
|
|
49
|
+
$after:
|
|
50
|
+
title: Код встраиваемый после сгенерированного
|
|
51
|
+
type: string
|
|
52
|
+
api:
|
|
53
|
+
type: object
|
|
54
|
+
title: Переопределяемые API
|
|
55
|
+
properties:
|
|
56
|
+
fetchComponents:
|
|
57
|
+
type: string
|
|
58
|
+
title: Возвращает список компонентов в кормате ключ-значение
|
|
59
|
+
fetchLinks:
|
|
60
|
+
type: string
|
|
61
|
+
title: Возвращает список связей компонентов
|
|
62
|
+
source:
|
|
63
|
+
title: Источник данный (запрос или dataset)
|
|
64
|
+
type: string
|
|
65
|
+
anyOf:
|
|
66
|
+
- type: string
|
|
67
|
+
title: Идентификатор dataset
|
|
68
|
+
pattern: "^[0-9a-zA-Z][a-zA-Z0-9\_]*(\\.[a-zA-Z][a-zA-Z0-9\\_]*)*$"
|
|
69
|
+
- type: string
|
|
70
|
+
title: JSONata запрос
|
|
71
|
+
pattern: "\\s*\\((.|\\s)*\\)\\s*"
|
|
72
|
+
required:
|
|
73
|
+
- title
|
|
74
|
+
additionalProperties: false
|
|
75
|
+
menu: >
|
|
76
|
+
(
|
|
77
|
+
$root_menu := entities.contexts.config.root_menu;
|
|
78
|
+
$presentation := entities.contexts.config.defaultPresentation;
|
|
79
|
+
$append([
|
|
80
|
+
{
|
|
81
|
+
"title": "Контексты",
|
|
82
|
+
"location": $root_menu,
|
|
83
|
+
"icon": 'location_searching',
|
|
84
|
+
"link": "entities/contexts/tree"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
contexts.$spread().(
|
|
88
|
+
/* Если указана явно презентация, используем ее */
|
|
89
|
+
$presentation := $.*.presentation ? *.presentation : $presentation;
|
|
90
|
+
*.location ? {
|
|
91
|
+
"location": $root_menu & "/" & *.location,
|
|
92
|
+
"link": "entities/contexts/" & $presentation & "?dh-context-id=" & $keys()[0]
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
);
|
|
96
|
+
)
|
|
97
|
+
# Предопределенные конфигурационные параметры для генерации контекстов
|
|
98
|
+
config:
|
|
99
|
+
# Идентификатор презентации по умолчанию
|
|
100
|
+
defaultPresentation: plantuml # plantuml / smartants
|
|
101
|
+
# Размещение контекстов в меню
|
|
102
|
+
root_menu: Архитектура/Контексты
|
|
103
|
+
# Общие API функции для генерирования контекста
|
|
104
|
+
api:
|
|
105
|
+
# Возвращает компоненты входящие в контекст
|
|
106
|
+
# Входящие параметры:
|
|
107
|
+
# manifest - данные архитектуры
|
|
108
|
+
# contextId - идентификатор контекста
|
|
109
|
+
# extra-links - признак необходимости отразить окружение
|
|
110
|
+
# componentId - идентификатор компонента для контекста SELF
|
|
111
|
+
fetchComponents: >
|
|
112
|
+
(
|
|
113
|
+
/* Обрабатываем параметры */
|
|
114
|
+
$params := $;
|
|
115
|
+
$manifest := $params.manifest;
|
|
116
|
+
/* Признак SELF контекста */
|
|
117
|
+
$isSelf := $params.componentId ? true : false;
|
|
118
|
+
/* Получаем объект контекста */
|
|
119
|
+
$context := $lookup($params.manifest.contexts, contextId);
|
|
120
|
+
|
|
121
|
+
/* Определяем необходимость показывать ближайшие связи */
|
|
122
|
+
$isExtraLinks := $params.componentId ? true : $params."extra-links";
|
|
123
|
+
|
|
124
|
+
/* Определяем, какие компоненты покажем в контексте */
|
|
125
|
+
$showComponents := $params.componentId
|
|
126
|
+
/* Если контекст под определенный компонент, ограничиваемся им. */
|
|
127
|
+
? [$params.componentId]
|
|
128
|
+
/* Если нет берем все компоненты указанные в контексте */
|
|
129
|
+
: $context.components;
|
|
130
|
+
|
|
131
|
+
/* Если в контексте переопределена функция получения компонентов, используем ее*/
|
|
132
|
+
$context.api.fetchComponents ? (
|
|
133
|
+
$eval($context.api.fetchComponents, $params)
|
|
134
|
+
) : (
|
|
135
|
+
/* Получаем все компоненты входящие в контекст */
|
|
136
|
+
$components := $merge($showComponents.(
|
|
137
|
+
$mask := $;
|
|
138
|
+
$manifest.components.$spread().(
|
|
139
|
+
$componentId := $keys()[0];
|
|
140
|
+
$result := $wcard($componentId, $mask) ? $
|
|
141
|
+
)
|
|
142
|
+
));
|
|
143
|
+
|
|
144
|
+
/* Добавляем окружение, если это нужно */
|
|
145
|
+
$merge([$components, $isExtraLinks ? (
|
|
146
|
+
$components.*.links.(
|
|
147
|
+
{
|
|
148
|
+
id: $isSelf
|
|
149
|
+
? $merge([$lookup($manifest.components, id), { "links": [] }])
|
|
150
|
+
: $lookup($manifest.components, id)
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
) : {}]);
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
# На основании списка компонентов генерирует массива областей которые они затрагивают
|
|
157
|
+
# Входящие параметры:
|
|
158
|
+
# components - список компонентов в формате fetchComponents
|
|
159
|
+
fetchAreas: >
|
|
160
|
+
(
|
|
161
|
+
$distinct(components.$spread().(
|
|
162
|
+
$componentId := $keys()[0];
|
|
163
|
+
$domains := $componentId.$split(".");
|
|
164
|
+
$limit := $count($domains) - 1;
|
|
165
|
+
$areaId := $map($domains, function($v, $i) {(
|
|
166
|
+
$join($map($domains, function($sv, $si) {
|
|
167
|
+
$si <= $i ? $sv
|
|
168
|
+
}), ".")
|
|
169
|
+
)});
|
|
170
|
+
))^($);
|
|
171
|
+
)
|
|
172
|
+
# Генерирует список отображаемых связей
|
|
173
|
+
# Входящие параметры:
|
|
174
|
+
# components - список компонентов в формате fetchComponents
|
|
175
|
+
fetchLinks: >
|
|
176
|
+
(
|
|
177
|
+
/* Обрабатываем параметры */
|
|
178
|
+
$components := components;
|
|
179
|
+
$distinct(
|
|
180
|
+
$components.$spread().(
|
|
181
|
+
$from := $keys()[0];
|
|
182
|
+
$direction := $.*.direction ? $.*.direction : "--";
|
|
183
|
+
$.*.links[$lookup($components, id)].(
|
|
184
|
+
$title := title ? title : contract;
|
|
185
|
+
$title := contract ? ("[[/docs/" & contract & " " & $title & "]]") : $title;
|
|
186
|
+
{
|
|
187
|
+
"from": $from,
|
|
188
|
+
"to": (id ? id : "undefined"),
|
|
189
|
+
"title": $title,
|
|
190
|
+
"contract": contract,
|
|
191
|
+
"direction": direction ? direction : "--"
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
);
|
|
196
|
+
)
|
|
197
|
+
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Расширение сущности "Contexts" для генерации PlantUML диаграмм
|
|
2
|
+
entities:
|
|
3
|
+
contexts:
|
|
4
|
+
# Предопределенные конфигурационные параметры для генерации PlantUML
|
|
5
|
+
config:
|
|
6
|
+
# Какой движок будет использоваться для рендера
|
|
7
|
+
renderCore: elk # elk / smetana / graphviz
|
|
8
|
+
# API функции, используемые для генерации PlantUML
|
|
9
|
+
api:
|
|
10
|
+
# Генерирует на данных о компонентах и областях PlantUML диаграмму компонентов
|
|
11
|
+
# Входящие параметры:
|
|
12
|
+
# manifest - данные архитектуры
|
|
13
|
+
# components - список компонентов в формате fetchComponents
|
|
14
|
+
# areas - список компонентов в формате fetchAreas
|
|
15
|
+
# focusId - идентификатор требующий фокус
|
|
16
|
+
makePumlComponentDiagram: >
|
|
17
|
+
(
|
|
18
|
+
/* Обрабатываем параметры */
|
|
19
|
+
$areas := areas;
|
|
20
|
+
$components := components;
|
|
21
|
+
$manifest := manifest;
|
|
22
|
+
$focusId := focusId;
|
|
23
|
+
|
|
24
|
+
$stopBracketsCount := function($a, $b) {$a = 0 ? "}\n" : $a & "}\n"};
|
|
25
|
+
|
|
26
|
+
$join($map($areas, function($domain, $index) {(
|
|
27
|
+
$result := "";
|
|
28
|
+
$component := $lookup($components, $domain);
|
|
29
|
+
$originComponent := $lookup($manifest.components, $domain);
|
|
30
|
+
$context := $lookup($manifest.contexts, $domain);
|
|
31
|
+
|
|
32
|
+
/* Определяем является ли элемент областью */
|
|
33
|
+
$isAreaBegin := $areas[$index + 1].$substring(0, $domain.$length() + 1) = $domain & ".";
|
|
34
|
+
|
|
35
|
+
$result := $result & ($isAreaBegin ? (
|
|
36
|
+
$title := $originComponent.title ? $originComponent.title : (
|
|
37
|
+
$context.title ? $context.title : $domain
|
|
38
|
+
);
|
|
39
|
+
"$Region("
|
|
40
|
+
& $domain
|
|
41
|
+
& ",\"[[/architect/components/"
|
|
42
|
+
& $domain
|
|
43
|
+
& " " & $title
|
|
44
|
+
& "]]\", ) {\n";
|
|
45
|
+
) : "");
|
|
46
|
+
|
|
47
|
+
/* Если домен является компонентом, выводим его на диаграмму */
|
|
48
|
+
$result := $result & (
|
|
49
|
+
$not($isAreaBegin) and $component ? (
|
|
50
|
+
/* Открываем секцию компонента */
|
|
51
|
+
$entity := $component.entity ? $component.entity : "component";
|
|
52
|
+
$color := $domain = $focusId ? "#FFBBCC" : "";
|
|
53
|
+
$result := "$Entity(\""
|
|
54
|
+
& $entity
|
|
55
|
+
& "\", \""
|
|
56
|
+
& "[[/architect/components/" & $domain & " " & $component.title & "]]"
|
|
57
|
+
& "\", "
|
|
58
|
+
& $domain
|
|
59
|
+
& ", \""
|
|
60
|
+
& $component.type
|
|
61
|
+
& "\", \""
|
|
62
|
+
& $color
|
|
63
|
+
& "\" )\n";
|
|
64
|
+
|
|
65
|
+
/* Добавляем аспекты */
|
|
66
|
+
$result := $result & $join($component.aspects.(
|
|
67
|
+
$aspect := $lookup($manifest.aspects, $);
|
|
68
|
+
$title := $aspect ? $aspect.title : $;
|
|
69
|
+
$ = $focusId ?
|
|
70
|
+
"$EntityAspect(\""
|
|
71
|
+
& $entity
|
|
72
|
+
& "\",\" <back:#FFBBCC>"
|
|
73
|
+
& $title
|
|
74
|
+
& "\")\n"
|
|
75
|
+
:
|
|
76
|
+
"$EntityAspect(\""
|
|
77
|
+
& $entity
|
|
78
|
+
& "\",\"* [[/architect/aspects/"
|
|
79
|
+
& $encodeUrlComponent($)
|
|
80
|
+
& " "
|
|
81
|
+
& $title
|
|
82
|
+
& "]]\")\n"
|
|
83
|
+
));
|
|
84
|
+
|
|
85
|
+
/* Если компонент является контекстом добавляем дрилдаун */
|
|
86
|
+
$context ?
|
|
87
|
+
$result := $result & "$EntityExpand(\""
|
|
88
|
+
& $entity
|
|
89
|
+
& "\", "
|
|
90
|
+
& $domain
|
|
91
|
+
& ")\n";
|
|
92
|
+
|
|
93
|
+
/* Закрываем секцию компонента */
|
|
94
|
+
$result := $result &
|
|
95
|
+
"$EntityEnd(\""
|
|
96
|
+
& $entity
|
|
97
|
+
& "\")\n";
|
|
98
|
+
): "";
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
/* Определяем, что область нужно закрыть*/
|
|
102
|
+
$result & (
|
|
103
|
+
$count($split($domain, ".")) > 1
|
|
104
|
+
and ($count($split($domain, ".")) > $count($split($areas[$index + 1], "."))
|
|
105
|
+
) ? (
|
|
106
|
+
$m := $areas[$index + 1] ? 0 : -1;
|
|
107
|
+
$reduce([0..($count($split($domain, ".")) - $count($split($areas[$index + 1], ".")) + $m)], $stopBracketsCount);
|
|
108
|
+
) : "");
|
|
109
|
+
)}));
|
|
110
|
+
)
|
|
111
|
+
# Генерирует PlantUML код связей для диаграммы компонентов
|
|
112
|
+
# Входящие параметры:
|
|
113
|
+
# links - список связей в формате fetchLinks
|
|
114
|
+
makePumlComponentsLinks: >
|
|
115
|
+
(
|
|
116
|
+
$join(links.(
|
|
117
|
+
from & " " & direction & " " & to & (title ? ": " & title : "") & "\n"
|
|
118
|
+
))
|
|
119
|
+
)
|
|
120
|
+
# Представления контекстов в PlantUML
|
|
121
|
+
presentations:
|
|
122
|
+
plantuml:
|
|
123
|
+
title: Представление в PlantUML
|
|
124
|
+
params:
|
|
125
|
+
title: Требуемые параметры для презентации
|
|
126
|
+
type: object
|
|
127
|
+
properties:
|
|
128
|
+
"dh-context-id":
|
|
129
|
+
title: Идентификатор контекста
|
|
130
|
+
type: string
|
|
131
|
+
pattern: ^[0-9a-zA-Z][a-zA-Z0-9_-]*(\.[0-9a-zA-Z][a-zA-Z0-9_-]*)*$
|
|
132
|
+
"dh-focus-id":
|
|
133
|
+
title: Идентификатор требующий подсветку
|
|
134
|
+
type: string
|
|
135
|
+
pattern: ^[0-9a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z0-9][a-zA-Z0-9_-]*)*$
|
|
136
|
+
required:
|
|
137
|
+
- dh-context-id
|
|
138
|
+
type: plantuml
|
|
139
|
+
$constructor: > # Переносим необходимую информацию из контекста в презентацию
|
|
140
|
+
(
|
|
141
|
+
$id := $params."dh-context-id";
|
|
142
|
+
$context := $lookup(contexts, $id);
|
|
143
|
+
$prototype := entities.contexts.presentations.plantuml;
|
|
144
|
+
|
|
145
|
+
/* Преобразует относительные пути к файлам в прямые*/
|
|
146
|
+
$toDirectRes := function($value) {
|
|
147
|
+
$substring($value, 0, 4) = "res:" ? $value : "res://contexts/" & $id & "#" & $value
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/* Если явно указан puml файл, просто рендерим его */
|
|
151
|
+
($type($context.uml) = "string") and ($substring($context.uml, -5) = ".puml") ? (
|
|
152
|
+
{
|
|
153
|
+
"type": "plantuml",
|
|
154
|
+
"source": $toDirectRes($context.uml)
|
|
155
|
+
}
|
|
156
|
+
) : (
|
|
157
|
+
$result := $context.source ? ($merge([$prototype, {
|
|
158
|
+
"origin": { "_source": $context.source, "_origin": "($)" }
|
|
159
|
+
}])) : $prototype;
|
|
160
|
+
|
|
161
|
+
/* Если в контексте переопределен шаблон, используем его по прямой ссылке */
|
|
162
|
+
$result := $context.template
|
|
163
|
+
? $merge([$result, { "template": $toDirectRes($context.template) }])
|
|
164
|
+
: $result;
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
template: templates/template.puml
|
|
168
|
+
source: >
|
|
169
|
+
(
|
|
170
|
+
$id := $params."dh-context-id";
|
|
171
|
+
$focusId := $params."dh-focus-id";
|
|
172
|
+
/* Получаем доступ к оригинальным данным */
|
|
173
|
+
$manifest := _origin ? _origin : $;
|
|
174
|
+
/* Получаем контекст */
|
|
175
|
+
$context := $lookup($manifest.contexts, $id);
|
|
176
|
+
/* Если в контексте задан источник, берем его за основу */
|
|
177
|
+
$manifest := _source ? _source : $;
|
|
178
|
+
|
|
179
|
+
$isExtraLinks := $not($string($context."extra-links") = "false");
|
|
180
|
+
|
|
181
|
+
/* Получаем коллекцию дефолтных вспомогательных функций */
|
|
182
|
+
$defFunctions := $manifest.entities.contexts.api;
|
|
183
|
+
|
|
184
|
+
/* Получаем коллекцию дефолтных параметров */
|
|
185
|
+
$defConfig := $manifest.entities.contexts.config;
|
|
186
|
+
|
|
187
|
+
/* Получаем параметры из контекста */
|
|
188
|
+
$customConfig := $context.config;
|
|
189
|
+
|
|
190
|
+
/* Формируем итоговый конфиг */
|
|
191
|
+
$config := $mergedeep([$defConfig,$customConfig]);
|
|
192
|
+
|
|
193
|
+
/* Определяем движок рендеринга */
|
|
194
|
+
$renderCore := $lookup({
|
|
195
|
+
"elk": "!pragma layout elk",
|
|
196
|
+
"smetana": "!pragma layout smetana"
|
|
197
|
+
}, $config.renderCore);
|
|
198
|
+
|
|
199
|
+
/* Формируем заголовок */
|
|
200
|
+
$header := "$Header(\"" & ($context.title ? $context.title : $id ) & "\", \"" & $context.uml."$autor" & "\", \"" & $context.uml."$version" & "\" , \"" & $context.uml."$moment" & "\")\n";
|
|
201
|
+
|
|
202
|
+
/* Получаем все компоненты входящие в контекст */
|
|
203
|
+
$components := $eval($defFunctions.fetchComponents, $merge([$params, {
|
|
204
|
+
"manifest": $manifest,
|
|
205
|
+
"contextId": $id,
|
|
206
|
+
"extra-links": $isExtraLinks,
|
|
207
|
+
"componentId": $params.componentId
|
|
208
|
+
}]));
|
|
209
|
+
|
|
210
|
+
/* Генерируем области */
|
|
211
|
+
$areas := $eval($defFunctions.fetchAreas, {
|
|
212
|
+
"components": $components
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
/* Генерируем PlantUML диаграмму компонентов */
|
|
216
|
+
$elements := $eval($defFunctions.makePumlComponentDiagram, {
|
|
217
|
+
"manifest": $manifest,
|
|
218
|
+
"areas": $areas,
|
|
219
|
+
"components": $components,
|
|
220
|
+
"focusId": $focusId
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
/* Получаем список связей */
|
|
224
|
+
$links := $eval($defFunctions.fetchLinks, {
|
|
225
|
+
"components": $components
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
/* Генерируем код связей */
|
|
229
|
+
$linksCode := $eval($defFunctions.makePumlComponentsLinks, {
|
|
230
|
+
"links": $links
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
/* Готовим данные для передачи в шаблон */
|
|
234
|
+
{
|
|
235
|
+
"before": $context.uml."$before",
|
|
236
|
+
"after": $context.uml."$after",
|
|
237
|
+
"renderCore": $renderCore,
|
|
238
|
+
"presentation": $defConfig.defaultPresentation,
|
|
239
|
+
"code": $header & $elements & $linksCode
|
|
240
|
+
}
|
|
241
|
+
)
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Расширение сущности "Contexts" для генерации SmartAnts диаграмм
|
|
2
|
+
entities:
|
|
3
|
+
contexts:
|
|
4
|
+
# Предопределенные конфигурационные параметры для генерации контекстов
|
|
5
|
+
config:
|
|
6
|
+
asRowHeight: 14 # Высота строки аспекта
|
|
7
|
+
asPadding: 8 # Отступы
|
|
8
|
+
asFontWidth: 7 # Ширина символов для расчета ширины строк
|
|
9
|
+
asFontHeight: 12 # Высота символов
|
|
10
|
+
# API презентаций SmartAnts
|
|
11
|
+
api:
|
|
12
|
+
# Генерирует ноды для диаграммы
|
|
13
|
+
# Входящие параметры:
|
|
14
|
+
# manifest - данные архитектуры
|
|
15
|
+
# components - архитектурные компоненты
|
|
16
|
+
makeSANodes: >
|
|
17
|
+
(
|
|
18
|
+
$merge(components.$spread().(
|
|
19
|
+
{
|
|
20
|
+
$keys()[0]: {
|
|
21
|
+
"title": $.*.title,
|
|
22
|
+
"symbol":
|
|
23
|
+
/* для boundary символ не нужен */
|
|
24
|
+
$.*.entity = "boundary" ? null : (
|
|
25
|
+
/* Если это актор, то используем встроенный символ */
|
|
26
|
+
$.*.entity = "actor" ? "user" : (
|
|
27
|
+
/* Если аспекты не указаны, выводится стандартный символ системы */
|
|
28
|
+
$count($.*.aspects) = 0
|
|
29
|
+
? "system"
|
|
30
|
+
/* Иначе используем сгенерированные символы */
|
|
31
|
+
: "symbol-" & $keys()[0]
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
))
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# Генерирует символ для элементов диаграммы
|
|
40
|
+
# Входящие параметры:
|
|
41
|
+
# manifest - данные архитектуры
|
|
42
|
+
# components - компоненты, для которых генерируются символы
|
|
43
|
+
# componentId - идентификатор компонента
|
|
44
|
+
makeSASymbol: >
|
|
45
|
+
(
|
|
46
|
+
/* Обрабатываем входящие параметры */
|
|
47
|
+
$manifest := manifest;
|
|
48
|
+
$components := components;
|
|
49
|
+
$component := $lookup($components, componentId);
|
|
50
|
+
$defConfig := $manifest.entities.contexts.config;
|
|
51
|
+
|
|
52
|
+
/* Получаем высоту строки аспекта */
|
|
53
|
+
$rowHeight := $defConfig.asRowHeight;
|
|
54
|
+
/* Получаем отступы */
|
|
55
|
+
$padding := $defConfig.asPadding;
|
|
56
|
+
/* Получаем ширину символа */
|
|
57
|
+
$fontWidth := $defConfig.asFontWidth;
|
|
58
|
+
/* Получаем ширину символа */
|
|
59
|
+
$fontHeight := $defConfig.asFontHeight;
|
|
60
|
+
|
|
61
|
+
/* Определяем количество аспектов для вычисления высоты символа */
|
|
62
|
+
$aspectCount := $count($component.aspects);
|
|
63
|
+
|
|
64
|
+
/* Формируем массив аспектов */
|
|
65
|
+
$aspects := $component.aspects.(
|
|
66
|
+
$aspect := $lookup($manifest.aspects, $);
|
|
67
|
+
{
|
|
68
|
+
"id" : $,
|
|
69
|
+
"title": $aspect.title ? $aspect.title : $
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
/* Определяем максимальную длину текста для вычисления ширины символа */
|
|
74
|
+
$maxTitle := $max($aspects.($length(title)));
|
|
75
|
+
|
|
76
|
+
/* Вычисляем размеры символа */
|
|
77
|
+
$width := $maxTitle ? $maxTitle * $fontWidth + $padding * 2 : 64; /* Умножаем на ширину символа */
|
|
78
|
+
$height := ($aspectCount + 1) * $rowHeight + $padding * 2; /* Умножаем на высоту строки */
|
|
79
|
+
|
|
80
|
+
/* Генерируем символ */
|
|
81
|
+
{
|
|
82
|
+
"symbol-" & componentId:
|
|
83
|
+
"<g>"
|
|
84
|
+
/* Создаем контейнер */
|
|
85
|
+
& "<rect width=" & $width & " height=" & $height & " fill=\"#eee\" stroke=\"#222\" rx=3 />"
|
|
86
|
+
/* Заполняем аспектами */
|
|
87
|
+
& $join($map($aspects, function($v, $i) {(
|
|
88
|
+
"<a href=\"/architect/aspects/" & $v.id & "\" >"
|
|
89
|
+
& "<text x=6 y=" & ($i * $rowHeight + $padding + $rowHeight) & " style=\"font-size:" & $fontHeight & "\" fill=\"blue\">" & $v.title & "</text>"
|
|
90
|
+
& "</a>"
|
|
91
|
+
)}))
|
|
92
|
+
& "</g>"
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
# Генерирует библиотеку символов
|
|
96
|
+
# Входящие параметры:
|
|
97
|
+
# manifest - данные архитектуры
|
|
98
|
+
# components - компоненты выводимые на диаграмму
|
|
99
|
+
makeSASymbolLibrary: >
|
|
100
|
+
(
|
|
101
|
+
/* Обрабатываем входящие параметры */
|
|
102
|
+
$manifest := manifest;
|
|
103
|
+
$components := components;
|
|
104
|
+
$merge(components.$spread().(
|
|
105
|
+
$eval($manifest.entities.contexts.api.makeSASymbol, {
|
|
106
|
+
"manifest": $manifest,
|
|
107
|
+
"components": $components,
|
|
108
|
+
"componentId": $keys()[0]
|
|
109
|
+
})
|
|
110
|
+
));
|
|
111
|
+
)
|
|
112
|
+
# Представления контекстов в SmartAnts
|
|
113
|
+
presentations:
|
|
114
|
+
smartants:
|
|
115
|
+
title: Представление в SmartAnts
|
|
116
|
+
params:
|
|
117
|
+
title: Требуемые параметры для презентации
|
|
118
|
+
type: object
|
|
119
|
+
properties:
|
|
120
|
+
"dh-context-id":
|
|
121
|
+
title: Идентификатор контекста
|
|
122
|
+
type: string
|
|
123
|
+
pattern: ^[0-9a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z][a-zA-Z0-9_-]*)*$
|
|
124
|
+
required:
|
|
125
|
+
- dh-context-id
|
|
126
|
+
type: smartants
|
|
127
|
+
source: >
|
|
128
|
+
(
|
|
129
|
+
$id := $params."dh-context-id";
|
|
130
|
+
$manifest := $;
|
|
131
|
+
$context := $lookup($manifest.contexts, $id);
|
|
132
|
+
$isExtraLinks := $not($string($context."extra-links") = "false");
|
|
133
|
+
|
|
134
|
+
/* Получаем коллекцию дефолтных вспомогательных функций */
|
|
135
|
+
$defFunctions := $manifest.entities.contexts.api;
|
|
136
|
+
|
|
137
|
+
/* Получаем все компоненты входящие в контекст */
|
|
138
|
+
$components := $eval($defFunctions.fetchComponents, $merge([$params, {
|
|
139
|
+
"manifest": $manifest,
|
|
140
|
+
"contextId": $id,
|
|
141
|
+
"extra-links": $isExtraLinks,
|
|
142
|
+
"componentId": $params.componentId
|
|
143
|
+
}]));
|
|
144
|
+
/* Строим из компонентов ноды */
|
|
145
|
+
$nodes := $eval($defFunctions.makeSANodes, {
|
|
146
|
+
"manifest": $manifest,
|
|
147
|
+
"components": $components
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
/* Создаем библиотеку символов */
|
|
151
|
+
$symbols := $eval($defFunctions.makeSASymbolLibrary, {
|
|
152
|
+
"manifest": $manifest,
|
|
153
|
+
"components": $components
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/* Получаем список связей */
|
|
157
|
+
$links := $eval($defFunctions.fetchLinks, {
|
|
158
|
+
"components": $components
|
|
159
|
+
}).{
|
|
160
|
+
"from": from,
|
|
161
|
+
"to": to,
|
|
162
|
+
"style": direction,
|
|
163
|
+
"title": title
|
|
164
|
+
};
|
|
165
|
+
/* Готовим данные для передачи в шаблон */
|
|
166
|
+
{
|
|
167
|
+
"config": {
|
|
168
|
+
"distance": 100,
|
|
169
|
+
"trackWidth": 20,
|
|
170
|
+
"lineWidthLimit": 5,
|
|
171
|
+
"lineOpacity": 0.5
|
|
172
|
+
},
|
|
173
|
+
"nodes": $nodes,
|
|
174
|
+
"links": [$links],
|
|
175
|
+
"symbols": $symbols
|
|
176
|
+
}
|
|
177
|
+
)
|