Skip to content

Commit ab81023

Browse files
authored
feat: First iteration of example content for openmfp (#87)
1 parent 0ff73fb commit ab81023

19 files changed

+557
-34
lines changed

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve ui",
7-
"start:wc": "ng serve wc --single-bundle --no-live-reload",
7+
"start:wc": "ng serve wc --single-bundle --no-live-reload --port=4201",
88
"build": "ng build ui",
99
"build:wc": "ng build wc --single-bundle --output-hashing none",
1010
"build-prod": "ng build ui -c production",

frontend/projects/ui/src/app/app.routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ import { CatalogComponent } from './catalog/catalog.component';
33
import { CatalogItemDetailsComponent } from './catalog-item-details/catalog-item-details.component';
44
import { OpenmcpComponent } from './openmcp/openmcp.component';
55
import { IronCoreComponent } from './iron-core/iron-core.component';
6+
import { ShowcaseComponent } from './showcase/showcase.component';
7+
import { ShowcaseDetailsComponent } from './showcase/showcase-details/showcase-details.component';
68

79
export const routes: Routes = [
10+
{ path: 'showcase', component: ShowcaseComponent },
11+
{ path: 'showcase/showcase-details', component: ShowcaseDetailsComponent },
812
{ path: 'global-catalog', component: CatalogComponent },
913
{
1014
path: 'catalog-item/:catalogItemId',
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<ui5-card class="card">
2+
<ui5-card-header slot="header" title-text="Congratulations !"
3+
subtitle-text="Click below to navigate back">
4+
</ui5-card-header>
5+
<div class="content">
6+
<ui5-button (click)="navigate()">Click here !</ui5-button>
7+
</div>
8+
</ui5-card>
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.card {
2+
width: 300px;
3+
}
4+
5+
.content {
6+
margin-left: 10px;
7+
padding: 5px;
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component } from '@angular/core';
2+
import { linkManager } from '@luigi-project/client';
3+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
4+
5+
@Component({
6+
selector: 'app-showcase-details',
7+
standalone: true,
8+
imports: [Ui5WebcomponentsModule],
9+
templateUrl: './showcase-details.component.html',
10+
styleUrl: './showcase-details.component.scss'
11+
})
12+
export class ShowcaseDetailsComponent {
13+
14+
navigate() {
15+
linkManager().fromContext('showcase').navigate(`/`);
16+
}
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ui5-card class="card">
2+
<ui5-card-header slot="header" title-text="Virtualtree navigation example"
3+
subtitle-text="Click below to test the navigation">
4+
</ui5-card-header>
5+
<div class="content">
6+
<ui5-button (click)="navigate()">Click here !</ui5-button>
7+
</div>
8+
</ui5-card>
9+
10+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.card {
2+
width: 300px;
3+
}
4+
5+
.content {
6+
margin-left: 10px;
7+
padding: 5px;
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component } from '@angular/core';
2+
import { Ui5WebcomponentsModule } from '@ui5/webcomponents-ngx';
3+
import { linkManager } from '@luigi-project/client';
4+
5+
@Component({
6+
selector: 'app-showcase',
7+
standalone: true,
8+
imports: [Ui5WebcomponentsModule],
9+
templateUrl: './showcase.component.html',
10+
styleUrl: './showcase.component.scss'
11+
})
12+
export class ShowcaseComponent {
13+
14+
navigate() {
15+
linkManager().fromContext('showcase').navigate(`/showcase-details`);
16+
}
17+
}

frontend/projects/ui/src/assets/accounts.json

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "configuration-examples-overview",
3+
"creationTimestamp": "",
4+
"luigiConfigFragment": {
5+
"data": {
6+
"nodes": [
7+
{
8+
"entityType": "global",
9+
"pathSegment": "home",
10+
"hideFromNav": true,
11+
"defineEntity": {
12+
"id": "main"
13+
},
14+
"children": [
15+
{
16+
"pathSegment": "overview",
17+
"label": "Configuration examples overview",
18+
"icon": "home",
19+
"defineEntity": {
20+
"id": "overview"
21+
},
22+
"compound": {
23+
"renderer": {
24+
"use": "grid",
25+
"config": {
26+
"columns": "1fr 1fr 1fr 1fr"
27+
}
28+
}
29+
}
30+
}
31+
]
32+
},
33+
{
34+
"entityType": "main.overview::compound",
35+
"url": "https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js",
36+
"context": {
37+
"border": "shadow",
38+
"title": "Welcome to OpenMFP Portal",
39+
"description": "Click on Show Example button to preview particular feature."
40+
},
41+
"layoutConfig": {
42+
"row": "1",
43+
"column": "1 / -1"
44+
}
45+
}
46+
]
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)