Skip to content

Commit 8d19e00

Browse files
committed
fixes
1 parent 793cf5d commit 8d19e00

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

docs/build-your-software-catalog/customize-integrations/configure-data-model/setup-blueprint/properties/aggregation-property.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,9 @@ The `pathFilter` option lets you control which entities are included in your agg
908908

909909
When a `pathFilter` is defined, Port will include only entities that can be reached through the exact relationship path you specify.
910910

911+
- **Forwards path**: Following relations forwards, from the source of a relation to its target (e.g., from a repository to its services)
912+
- **Backwards path**: Following relations backwards, from the target of a relation to its source (e.g., from a service back to its repository)
913+
911914
<h4> Structure </h4>
912915

913916
| Field | Description |
@@ -916,7 +919,7 @@ When a `pathFilter` is defined, Port will include only entities that can be reac
916919
| `pathFilter.fromBlueprint` | *(Optional)* The blueprint to start the path traversal from. Can be the target blueprint or omitted. If omitted, traversal starts from the source blueprint. |
917920

918921

919-
<h4> For upstream paths </h4>
922+
<h4> For forwards paths </h4>
920923

921924
```json showLineNumbers
922925
{
@@ -928,7 +931,7 @@ When a `pathFilter` is defined, Port will include only entities that can be reac
928931
}
929932
```
930933

931-
<h4> For downstream paths </h4>
934+
<h4> For backwards paths </h4>
932935

933936
```json showLineNumbers
934937
{
@@ -955,7 +958,7 @@ Suppose you have the following data model:
955958

956959
<TabItem value="api">
957960

958-
<h4>Example 1: Standard Path Filter</h4>
961+
<h4>Example 1: Standard Path Filter - forwards path</h4>
959962

960963
Count how many deployments are directly related to a cluster:
961964

@@ -969,7 +972,7 @@ Count how many deployments are directly related to a cluster:
969972
"target": "deployment",
970973
"pathFilter": [
971974
{
972-
"path": ["deployments_rel"]
975+
"path": ["deployments_relation"]
973976
}
974977
],
975978
"calculationSpec": {
@@ -981,9 +984,9 @@ Count how many deployments are directly related to a cluster:
981984
}
982985
```
983986

984-
The `pathFilter` with `"path": ["deployments_rel"]` counts deployments that are directly related to the cluster through the `deployments_rel` relation.
987+
The `pathFilter` with `"path": ["deployments_relation"]` counts deployments that are directly related to the cluster through the `deployments_relation` relation.
985988

986-
<h4>Example 2: Using fromBlueprint</h4>
989+
<h4>Example 2: Using fromBlueprint - backwards path</h4>
987990

988991
Count how many clusters are related to a deployment:
989992

@@ -997,7 +1000,7 @@ Count how many clusters are related to a deployment:
9971000
"target": "cluster",
9981001
"pathFilter": [
9991002
{
1000-
"path": ["deployments_rel"],
1003+
"path": ["deployments_relation"],
10011004
"fromBlueprint": "cluster"
10021005
}
10031006
],
@@ -1010,13 +1013,13 @@ Count how many clusters are related to a deployment:
10101013
}
10111014
```
10121015

1013-
The `fromBlueprint: "cluster"` specifies that the path traversal should start from the cluster blueprint (the target), then follow the path backwards through `deployments_rel` to deployment.
1016+
The `fromBlueprint: "cluster"` specifies that the path traversal should start from the cluster blueprint (the target), then follow the path backwards through `deployments_relation` to deployment.
10141017

10151018
</TabItem>
10161019

10171020
<TabItem value="tf">
10181021

1019-
<h4>Example 1: Standard Path Filter</h4>
1022+
<h4>Example 1: Standard Path Filter - forwards path</h4>
10201023

10211024
Count how many deployments are directly related to a cluster:
10221025

@@ -1025,7 +1028,7 @@ resource "port_blueprint" "cluster_blueprint" {
10251028
identifier = "cluster"
10261029
title = "Cluster"
10271030
relations = {
1028-
"deployments_rel" = {
1031+
"deployments_relation" = {
10291032
title = "Deployments"
10301033
target = port_blueprint.deployment_blueprint.identifier
10311034
}
@@ -1047,7 +1050,7 @@ resource "port_aggregation_properties" "cluster_aggregation_properties" {
10471050
description = "Deployment Count"
10481051
path_filter = [
10491052
{
1050-
path = ["deployments_rel"]
1053+
path = ["deployments_relation"]
10511054
}
10521055
]
10531056
method = {
@@ -1058,9 +1061,9 @@ resource "port_aggregation_properties" "cluster_aggregation_properties" {
10581061
}
10591062
```
10601063

1061-
The `path = ["deployments_rel"]` counts deployments that are directly related to the cluster through the `deployments_rel` relation.
1064+
The `path = ["deployments_relation"]` counts deployments that are directly related to the cluster through the `deployments_relation` relation.
10621065

1063-
<h4>Example 2: Using fromBlueprint</h4>
1066+
<h4>Example 2: Using fromBlueprint - backwards path</h4>
10641067

10651068
Count how many clusters are related to a deployment:
10661069

@@ -1074,7 +1077,7 @@ resource "port_blueprint" "cluster_blueprint" {
10741077
identifier = "cluster"
10751078
title = "Cluster"
10761079
relations = {
1077-
"deployments_rel" = {
1080+
"deployments_relation" = {
10781081
title = "Deployments"
10791082
target = port_blueprint.deployment_blueprint.identifier
10801083
}
@@ -1091,7 +1094,7 @@ resource "port_aggregation_properties" "deployment_aggregation_properties" {
10911094
description = "Cluster Count"
10921095
path_filter = [
10931096
{
1094-
path = ["deployments_rel"]
1097+
path = ["deployments_relation"]
10951098
from_blueprint = "cluster"
10961099
}
10971100
]
@@ -1103,7 +1106,7 @@ resource "port_aggregation_properties" "deployment_aggregation_properties" {
11031106
}
11041107
```
11051108

1106-
The `from_blueprint = "cluster"` specifies that the path traversal should start from the cluster blueprint (the target), then follow the path backwards through `deployments_rel` to deployment.
1109+
The `from_blueprint = "cluster"` specifies that the path traversal should start from the cluster blueprint (the target), then follow the path backwards through `deployments_relation` to deployment.
11071110

11081111
</TabItem>
11091112

1.65 KB
Loading

0 commit comments

Comments
 (0)