Skip to content

Commit

Permalink
feat/develop-example-content
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Rogoda committed Feb 6, 2025
1 parent d6d08e2 commit 39e8908
Show file tree
Hide file tree
Showing 5 changed files with 268 additions and 73 deletions.
75 changes: 2 additions & 73 deletions charts/example-content/templates/contentconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
content: |-
{
"name": "configuration-examples-overview",
"creationTimestamp": "2025-02-05T08:00:00Z",
"creationTimestamp": "",
"luigiConfigFragment": {
"data": {
"nodes": [
Expand All @@ -36,54 +36,6 @@ spec:
}
}
}
},
{
"pathSegment": "firstExample",
"hideFromNav": true,
"defineEntity": {
"id": "first"
},
"compound": {
"renderer": {
"use": "grid",
"config": {
"columns": "1fr 1fr 1fr 1fr"
}
}
}
},
{
"pathSegment": "secondExample",
"virtualTree": true,
"navigationContext": "showcase",
"url": "{{ .Values.contentProtocolDomain }}/ui/example-content/index.html#/showcase",
"loadingIndicator": {
"enabled": false
},
"requiredIFramePermissions": {
"sandbox": [
"allow-forms",
"allow-modals",
"allow-popups",
"allow-popups-to-escape-sandbox",
"allow-same-origin",
"allow-scripts",
"allow-download"
],
"allow": [
"clipboard-read",
"clipboard-write"
]
}
},
{
"pathSegment": "fourthExample",
"hideFromNav": true,
"defineEntity": {
"id": "fourth"
},
"compound": {
}
}
]
},
Expand Down Expand Up @@ -112,30 +64,7 @@ spec:
"webcomponent": {
"selfRegistered": true
}
},
{
"entityType": "main.first::compound",
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js",
"context": {
"border": "shadow",
"title": "Definition of an Entity",
"description": "Entity is basic building block of configuration."
}
},
{
"entityType": "main.fourth::compound",
"url": "{{ .Values.contentProtocolDomain }}/ui/wc/main.js#account-overview",
"context": {
"title": "Showcase"
},
"layoutConfig": {
"row": "1",
"column": "1 / -1"
},
"webcomponent": {
"selfRegistered": true
}
}
}
]
}
}
Expand Down
60 changes: 60 additions & 0 deletions charts/example-content/templates/firstExample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: entity-definition-example
namespace: openmfp-system
spec:
inlineConfiguration:
content: |-
{
"name": "entity-definition-example",
"creationTimestamp": "",
"luigiConfigFragment": {
"data": {
"nodes": [
{
"entityType": "main",
"pathSegment": "firstExample",
"hideFromNav": true,
"defineEntity": {
"id": "first-example"
},
"compound": {
"renderer": {
"use": "grid",
"config": {
"columns": "1fr 1fr 1fr 1fr"
}
}
}
},
{
"entityType": "main.first-example::compound",
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js",
"context": {
"border": "shadow",
"title": "{{firstExampleTitle}}",
"description": "{{firstExampleDescription}}"
}
}
],
"texts": [
{
"locale": "",
"textDictionary": {
"firstExampleTitle": "Definition of an Entity",
"firstExampleDescription": "Entity is basic building block of configuration."
}
},
{
"locale": "en",
"textDictionary": {
"firstExampleTitle": "Definition of an Entity",
"firstExampleDescription": "Entity is basic building block of configuration."
}
}
]
}
}
}
contentType: json
43 changes: 43 additions & 0 deletions charts/example-content/templates/fourthExample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: web-component-integration-example
namespace: openmfp-system
spec:
inlineConfiguration:
content: |-
{
"name": "web-component-integration-example",
"creationTimestamp": "",
"luigiConfigFragment": {
"data": {
"nodes": [
{
"entityType": "main",
"pathSegment": "fourthExample",
"hideFromNav": true,
"defineEntity": {
"id": "fourth-example"
},
"compound": {
}
},
{
"entityType": "main.fourth-example::compound",
"url": "http://localhost:4200/main.js#account-overview",
"context": {
"title": "Showcase"
},
"layoutConfig": {
"row": "1",
"column": "1 / -1"
},
"webcomponent": {
"selfRegistered": true
}
}
]
}
}
}
contentType: json
44 changes: 44 additions & 0 deletions charts/example-content/templates/secondExample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: micro-frontend-iframe-example
namespace: openmfp-system
spec:
inlineConfiguration:
content: |-
{
"name": "micro-frontend-iframe-example",
"creationTimestamp": "",
"luigiConfigFragment": {
"data": {
"nodes": [
{
"entityType": "main",
"pathSegment": "secondExample",
"virtualTree": true,
"navigationContext": "showcase",
"url": "http://localhost:4400/index.html#/showcase",
"loadingIndicator": {
"enabled": false
},
"requiredIFramePermissions": {
"sandbox": [
"allow-forms",
"allow-modals",
"allow-popups",
"allow-popups-to-escape-sandbox",
"allow-same-origin",
"allow-scripts",
"allow-download"
],
"allow": [
"clipboard-read",
"clipboard-write"
]
}
}
]
}
}
}
contentType: json
119 changes: 119 additions & 0 deletions charts/example-content/templates/tmp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: configuration-examples-overview
namespace: openmfp-system
spec:
inlineConfiguration:
content: |-
{
"name": "configuration-examples-overview",
"creationTimestamp": "2025-02-05T08:00:00Z",
"luigiConfigFragment": {
"data": {
"nodes": [
{
"entityType": "global",
"pathSegment": "home",
"hideFromNav": true,
"defineEntity": {
"id": "main"
},
"children": [
{
"pathSegment": "overview",
"label": "Configuration examples overview",
"icon": "home",
"defineEntity": {
"id": "overview"
},
"compound": {
"renderer": {
"use": "grid",
"config": {
"columns": "1fr 1fr 1fr 1fr"
}
}
}
},
{
"pathSegment": "firstExample",
"hideFromNav": true,
"defineEntity": {
"id": "first-example"
},
"compound": {
"renderer": {
"use": "grid",
"config": {
"columns": "1fr 1fr 1fr 1fr"
}
}
}
},
{
"pathSegment": "secondExample",
"virtualTree": true,
"navigationContext": "showcase",
"url": "http://localhost:4400/index.html#/showcase",
"loadingIndicator": {
"enabled": false
},
"requiredIFramePermissions": {
"sandbox": [
"allow-forms",
"allow-modals",
"allow-popups",
"allow-popups-to-escape-sandbox",
"allow-same-origin",
"allow-scripts",
"allow-download"
],
"allow": [
"clipboard-read",
"clipboard-write"
]
}
},
{
"pathSegment": "fourthExample",
"hideFromNav": true,
"defineEntity": {
"id": "fourth-example"
},
"compound": {
}
}
]
},
{
"entityType": "main.overview::compound",
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js",
"context": {
"border": "shadow",
"title": "Welcome to OpenMFP Portal",
"description": "Click on Show Example button to preview particular feature."
},
"layoutConfig": {
"row": "1",
"column": "1 / -1"
}
},
{
"entityType": "main.overview::compound",
"url": "http://localhost:4200/main.js#showcase",
"context": {
},
"layoutConfig": {
"row": "2",
"column": "1 / -1"
},
"webcomponent": {
"selfRegistered": true
}
}
]
}
}
}
contentType: json

0 comments on commit 39e8908

Please sign in to comment.