Skip to content

Commit 01533f6

Browse files
authored
Merge pull request #997 from dwolfson/main
Updates to allow rendering of mermaid markdown in web site documentation
2 parents bfb8bc1 + 31b9ded commit 01533f6

File tree

3 files changed

+180
-129
lines changed

3 files changed

+180
-129
lines changed

Diff for: site/docs/user-interfaces/mermaid/overview.md

+41-3
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,59 @@
66
Egeria visualizes collections of related metadata elements as graphs using Mermaid.
77
[Mermaid](https://mermaid.js.org/) is a markdown extension for representing diagram using structured text that can then be rendered in a JavaScript environment. Selected [Open Metadata View Services (OMVSs)](/services/omvs) REST API calls return a Mermaid markdown string that can be used to render a visual representation of the elements returned on the same request.
88

9+
910
## Asset graphs
1011

1112
[Asset Catalog OMVS](/services/omvs/asset-catalog/overview) supports a REST API called *getAssetGraph(assetGUID)* which returns a graph of metadata elements that begins with the requested asset, and includes all the elements anchored to it, along with all the relationships that are attached to the requested asset and all its anchored elements. In addition it returns a Mermaid string that can be used to visualise this structure. Below is a screen capture of a rendered asset.
1213

13-
![View Server Mermaid Graph](view-server-mermaid-graph.png)
14+
```mermaid
15+
flowchart LR
16+
%%{init: {"flowchart\": {"htmlLabels\": false}} }%%
17+
ViewServer:view-server("`*SoftwareServer*\n**view-server**`")
18+
ViewServer:view-server:SecretStoreEndpoint("`*Endpoint*\n**view-server secret store endpoint**`")
19+
ViewServer:view-server:SecretsStoreConnection("`*Connection*\n**view-server secrets store connection**`")
20+
ViewServer:view-server:Endpoint("`*Endpoint*\n**view-server endpoint**`")
21+
ViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs("`*APIManager*\n**Open Metadata and Governance End User APIs**`")
22+
ViewServer:view-server:Connection("`*VirtualConnection*\n**view-server connection**`")
23+
ViewServer:view-server-->|SupportedSoftwareCapability|ViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs
24+
ViewServer:view-server:SecretsStoreConnection-->|ConnectionConnectorType|Egeria:SecretsStoreConnector:YAMLFile
25+
ViewServer:view-server:Connection-->|ConnectionToAsset|ViewServer:view-server
26+
ViewServer:view-server-->|ServerEndpoint|ViewServer:view-server:Endpoint
27+
ViewServer:view-server:Connection-->|EmbeddedConnection|ViewServer:view-server:SecretsStoreConnection
28+
ViewServer:view-server-->|SourcedFrom|ViewServer:serverName
29+
ViewServer:view-server-->|DeployedOn|OMAGServerPlatform:DefaultLocalOMAGServerPlatform
30+
ViewServer:view-server:Endpoint-->|ConnectionEndpoint|ViewServer:view-server:Connection
31+
ViewServer:view-server:Connection-->|ConnectionConnectorType|Egeria:ResourceConnector:System:ViewServer
32+
ViewServer:view-server:SecretStoreEndpoint-->|ConnectionEndpoint|ViewServer:view-server:SecretsStoreConnection
33+
```
1434

1535
The asset is on the far left-hand side. Each box on the graph is a metadata element in the open metadata repository. The text in *italics* is the element's type, and the text below is the element's display name. If the box has rounded corners, it is anchored to the starting asset. If it has square corners, it is an element that is just linked to one of the anchored elements. The lines between the boxes represent relationships in the open metadata repository. The label on the lines is the relationship type. The arrow-head is at end 2 of the relationship. Details of the types shown on the diagram can be found on the [Open Metadata Types](/types) pages.
1636

1737
??? education "Implementation details"
1838
The Mermaid graph above is rendered from this string:
19-
2039
```
21-
"---\ntitle: Asset - view-server [5ae81670-0710-45b7-94bf-6337871b7dc1]\n---\nflowchart LR\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n\nViewServer:view-server(\"`*SoftwareServer*\n**view-server**`\")\nViewServer:view-server:SecretStoreEndpoint(\"`*Endpoint*\n**view-server secret store endpoint**`\")\nViewServer:view-server:SecretsStoreConnection(\"`*Connection*\n**view-server secrets store connection**`\")\nViewServer:view-server:Endpoint(\"`*Endpoint*\n**view-server endpoint**`\")\nViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs(\"`*APIManager*\n**Open Metadata and Governance End User APIs**`\")\nViewServer:view-server:Connection(\"`*VirtualConnection*\n**view-server connection**`\")\nViewServer:view-server-->|SupportedSoftwareCapability|ViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs\nViewServer:view-server:SecretsStoreConnection-->|ConnectionConnectorType|Egeria:SecretsStoreConnector:YAMLFile\nViewServer:view-server:Connection-->|ConnectionToAsset|ViewServer:view-server\nViewServer:view-server-->|ServerEndpoint|ViewServer:view-server:Endpoint\nViewServer:view-server:Connection-->|EmbeddedConnection|ViewServer:view-server:SecretsStoreConnection\nViewServer:view-server-->|SourcedFrom|ViewServer:serverName\nViewServer:view-server-->|DeployedOn|OMAGServerPlatform:DefaultLocalOMAGServerPlatform\nViewServer:view-server:Endpoint-->|ConnectionEndpoint|ViewServer:view-server:Connection\nViewServer:view-server:Connection-->|ConnectionConnectorType|Egeria:ResourceConnector:System:ViewServer\nViewServer:view-server:SecretStoreEndpoint-->|ConnectionEndpoint|ViewServer:view-server:SecretsStoreConnection\n"
40+
flowchart LR
41+
%%{init: {"flowchart\": {"htmlLabels\": false}} }%%
42+
ViewServer:view-server("`*SoftwareServer*\n**view-server**`")
43+
ViewServer:view-server:SecretStoreEndpoint("`*Endpoint*\n**view-server secret store endpoint**`")
44+
ViewServer:view-server:SecretsStoreConnection("`*Connection*\n**view-server secrets store connection**`")
45+
ViewServer:view-server:Endpoint("`*Endpoint*\n**view-server endpoint**`")
46+
ViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs("`*APIManager*\n**Open Metadata and Governance End User APIs**`")
47+
ViewServer:view-server:Connection("`*VirtualConnection*\n**view-server connection**`")
48+
ViewServer:view-server-->|SupportedSoftwareCapability|ViewServer:view-server:OpenMetadataandGovernanceEndUserAPIs
49+
ViewServer:view-server:SecretsStoreConnection-->|ConnectionConnectorType|Egeria:SecretsStoreConnector:YAMLFile
50+
ViewServer:view-server:Connection-->|ConnectionToAsset|ViewServer:view-server
51+
ViewServer:view-server-->|ServerEndpoint|ViewServer:view-server:Endpoint
52+
ViewServer:view-server:Connection-->|EmbeddedConnection|ViewServer:view-server:SecretsStoreConnection
53+
ViewServer:view-server-->|SourcedFrom|ViewServer:serverName
54+
ViewServer:view-server-->|DeployedOn|OMAGServerPlatform:DefaultLocalOMAGServerPlatform
55+
ViewServer:view-server:Endpoint-->|ConnectionEndpoint|ViewServer:view-server:Connection
56+
ViewServer:view-server:Connection-->|ConnectionConnectorType|Egeria:ResourceConnector:System:ViewServer
57+
ViewServer:view-server:SecretStoreEndpoint-->|ConnectionEndpoint|ViewServer:view-server:SecretsStoreConnection
2258
```
59+
2360
which is returned in the getAssetGraph() response like this(go to end):
61+
2462
```json
2563
{
2664
"class": "AssetGraphResponse",

0 commit comments

Comments
 (0)