From 49df4df63dec5c9e1ddb9a433187638b79c8911f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20Echterh=C3=B6lter?= Date: Tue, 2 Jul 2024 10:29:02 +0200 Subject: [PATCH] feat: adding basic account nodes --- charts/example-resources/assets/accounts.json | 47 +++++++++++++++++++ charts/example-resources/assets/home.json | 6 +-- .../content-configurations/accounts.yaml | 10 ++++ 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 charts/example-resources/assets/accounts.json create mode 100644 charts/example-resources/templates/content-configurations/accounts.yaml diff --git a/charts/example-resources/assets/accounts.json b/charts/example-resources/assets/accounts.json new file mode 100644 index 0000000..9ab9572 --- /dev/null +++ b/charts/example-resources/assets/accounts.json @@ -0,0 +1,47 @@ +{ + "name": "overview", + "luigiConfigFragment": [ + { + "data": { + "nodes": [ + { + "entityType": "main", + "pathSegment": "accounts", + "label": "Account List", + "keepSelectedForChildren": true, + "icon": "home", + "url": "https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html", + "context": { + "title": "Welcome to Account List", + "content": " " + }, + "children": [ + { + "pathSegment": ":accountId", + "hideFromNav": true, + "keepSelectedForChildren": false, + "defineEntity": { + "id": "account" + }, + "context": { + "accountId": ":accountId" + } + } + ] + }, + { + "entityType": "main.account", + "pathSegment": "overview", + "label": "Overview", + "icon": "curriculum", + "url": "https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html?acc=:accountId", + "context": { + "title": ":accountId", + "content": " " + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/charts/example-resources/assets/home.json b/charts/example-resources/assets/home.json index ceba401..45e0511 100644 --- a/charts/example-resources/assets/home.json +++ b/charts/example-resources/assets/home.json @@ -7,16 +7,14 @@ { "entityType": "global", "pathSegment": "home", - "label": "Overview", - "icon": "home", "hideFromNav": true, "defineEntity": { - "id": "example" + "id": "main" }, "children": [ { "pathSegment": "overview", - "label": "Overview", + "label": "Overview Home", "icon": "home", "url": "https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html", "context": { diff --git a/charts/example-resources/templates/content-configurations/accounts.yaml b/charts/example-resources/templates/content-configurations/accounts.yaml new file mode 100644 index 0000000..8388c9a --- /dev/null +++ b/charts/example-resources/templates/content-configurations/accounts.yaml @@ -0,0 +1,10 @@ +apiVersion: core.openmfp.io/v1alpha1 +kind: ContentConfiguration +metadata: + name: accounts + namespace: {{ .Release.Namespace }} +spec: + inlineConfiguration: + content: |- + {{ .Files.Get "assets/accounts.json" | nindent 6 }} + contentType: json