-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Luigi Context | ||
|
||
The Luigi context contains information about the current context such as the user ID or api urls. | ||
|
||
## Portal Context | ||
|
||
The `portalContext` field in the context provides API URLs to often used services: | ||
|
||
```json | ||
"frameContext": { | ||
"accountsServiceApiUrl": "https://api.example.com/accounts/query", | ||
"organizationServiceApiUrl": "https://api.example.com/org/query" | ||
}, | ||
``` | ||
|
||
## Entity Context | ||
|
||
The `entityContext` field in the context provides information about the current entity. | ||
For example, when the user navigates to a `project` (or a sub entity such as `project.component`) | ||
information about the project is provided. Currently, information about a project and a component are provided. Structure: | ||
|
||
```json | ||
"entityContext": { | ||
"entity1": {...}, | ||
"entity2": {...} | ||
} | ||
``` | ||
|
||
### Project | ||
|
||
```json | ||
"entityContext": { | ||
"project": { | ||
"id": "PROJECT_ID", | ||
"policies": ["POLICY_1","POLICY_2"] // policies for the current user in this project | ||
} | ||
} | ||
``` | ||
|
||
|
||
### Component | ||
|
||
For the entity `component` information from the metadata service is provided, currently the following fields are available: | ||
|
||
```json | ||
"entityContext": { | ||
"component": { | ||
"id": "...", | ||
"type": { | ||
"name": "...", | ||
"lifecycle": "...", | ||
"categories": ["..."] | ||
}, | ||
"labels": [ | ||
{ | ||
"name": "...", | ||
"value": "..." | ||
} | ||
], | ||
"annotations": [ | ||
{ | ||
"name": "...", | ||
"value": "..." | ||
} | ||
], | ||
"tags": [ | ||
"...", | ||
] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters