Skip to content

Commit

Permalink
feat: make it possible to toggle contentConfigurations and disable ac…
Browse files Browse the repository at this point in the history
…counts by default
  • Loading branch information
nexus49 committed Jul 4, 2024
1 parent a967ff9 commit ae11102
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.contentConfigurations.accounts }}
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
Expand All @@ -8,3 +9,4 @@ spec:
content: |-
{{ .Files.Get "assets/accounts.json" | nindent 6 }}
contentType: json
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.contentConfigurations.home }}
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
Expand All @@ -8,3 +9,4 @@ spec:
content: |-
{{ .Files.Get "assets/home.json" | nindent 6 }}
contentType: json
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,62 +1,5 @@
matches the snapshot:
1: |
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: accounts
namespace: NAMESPACE
spec:
inlineConfiguration:
content: |2-
{
"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": " "
}
}
]
}
}
]
}
contentType: json
2: |
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
Expand Down
8 changes: 6 additions & 2 deletions charts/example-resources/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
accounts:
enabled: false
enabled: true
rootNamespace: openmfp-root
demoRootNamespace: demo-root
demoRootNamespace: demo-root

contentConfigurations:
home: true
accounts: false

0 comments on commit ae11102

Please sign in to comment.