FIORI App gegenereerd

This commit is contained in:
2026-07-26 08:41:40 +00:00
parent c83b0a545a
commit 09f1e3c1e6
18 changed files with 13488 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
{
"generationParameters": {
"generationDate": "Sun Jul 26 2026 06:25:31 GMT+0000 (Coordinated Universal Time)",
"generatorPlatform": "SAP Business Application Studio",
"serviceType": "Local CAP",
"metadataFilename": "",
"serviceUrl": "http://localhost:4004/odata/v4/processor/",
"appName": "incidents",
"appTitle": "Incidents-Management",
"appDescription": "An SAP Fiori application.",
"appNamespace": "ns",
"ui5Theme": "sap_horizon",
"ui5Version": "1.150.0",
"enableEslint": true,
"enableTypeScript": false,
"showMockDataInfo": false,
"generatorVersion": "1.29.0",
"template": "List Report Page V4",
"generatorName": "SAP Fiori Application Generator",
"entityRelatedConfig": [
{
"type": "Main Entity",
"value": "Incidents"
},
{
"type": "Navigation Entity",
"value": "None"
}
],
"launchText": "To launch the generated app, start your CAP project: and navigate to the following location in your browser:\n\nhttp://localhost:4004/incidents/webapp/index.html"
}
}

35
app/incidents/README.md Normal file
View File

@@ -0,0 +1,35 @@
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Sun Jul 26 2026 06:25:31 GMT+0000 (Coordinated Universal Time)|
|**App Generator**<br>SAP Fiori Application Generator|
|**App Generator Version**<br>1.29.0|
|**Generation Platform**<br>SAP Business Application Studio|
|**Template Used**<br>List Report Page V4|
|**Service Type**<br>Local CAP|
|**Service URL**<br>http://localhost:4004/odata/v4/processor/|
|**Module Name**<br>incidents|
|**Application Title**<br>Incidents-Management|
|**Namespace**<br>ns|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.150.0|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>True, see https://www.npmjs.com/package/@sap-ux/eslint-plugin-fiori-tools#rules for the eslint rules.|
|**Main Entity**<br>Incidents|
|**Navigation Entity**<br>None|
## incidents
An SAP Fiori application.
### Starting the generated app
- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. To launch the generated app, start your CAP project: and navigate to the following location in your browser:
http://localhost:4004/incidents/webapp/index.html
#### Pre-requisites:
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)

View File

@@ -0,0 +1,87 @@
using ProcessorService as service from '../../srv/services';
annotate service.Incidents with @(
UI.FieldGroup #GeneratedGroup : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Label : 'customer_ID',
Value : customer_ID,
},
{
$Type : 'UI.DataField',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'urgency_code',
Value : urgency_code,
},
{
$Type : 'UI.DataField',
Label : 'status_code',
Value : status_code,
},
],
},
UI.Facets : [
{
$Type : 'UI.ReferenceFacet',
ID : 'GeneratedFacet1',
Label : 'General Information',
Target : '@UI.FieldGroup#GeneratedGroup',
},
],
UI.LineItem : [
{
$Type : 'UI.DataField',
Label : 'customer_ID',
Value : customer_ID,
},
{
$Type : 'UI.DataField',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'urgency_code',
Value : urgency_code,
},
{
$Type : 'UI.DataField',
Label : 'status_code',
Value : status_code,
},
],
);
annotate service.Incidents with {
customer @Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'Customers',
Parameters : [
{
$Type : 'Common.ValueListParameterInOut',
LocalDataProperty : customer_ID,
ValueListProperty : 'ID',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'firstName',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'lastName',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'name',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'email',
},
],
}
};

View File

@@ -0,0 +1,5 @@
import fioriTools from '@sap-ux/eslint-plugin-fiori-tools';
export default [
...fioriTools.configs.recommended
];

View File

@@ -0,0 +1,21 @@
{
"name": "incidents",
"version": "0.0.1",
"description": "An SAP Fiori application.",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"dependencies": {},
"devDependencies": {
"@ui5/cli": "^4.0.33",
"@sap/ux-ui5-tooling": "1",
"@sap-ux/eslint-plugin-fiori-tools": "^10.0.0",
"eslint": "^10"
},
"scripts": {
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf"
}
}

33
app/incidents/ui5.yaml Normal file
View File

@@ -0,0 +1,33 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: "4.0"
metadata:
name: ns.incidents
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertErrors: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
ui5:
path:
- /resources
- /test-resources
url: https://sapui5.hana.ondemand.com
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
flp:
theme: sap_horizon
builder:
resources:
excludes:
- /test/**
- /localService/**

View File

@@ -0,0 +1,12 @@
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.incidents.Component", {
metadata: {
manifest: "json"
}
});
}
);

View File

@@ -0,0 +1,9 @@
# This is the resource bundle for ns.incidents
#Texts for manifest.json
#XTIT: Application name
appTitle=Incidents-Management
#YDES: Application description
appDescription=An SAP Fiori application.

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Incidents-Management</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.150.0/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resource-roots='{
"ns.incidents": "./"
}'
data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"
data-sap-ui-compat-version="edge"
data-sap-ui-async="true"
data-sap-ui-frame-options="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.incidents"
data-id="container"
data-settings='{"id" : "ns.incidents"}'
data-handle-validation="true"
></div>
</body>
</html>

View File

@@ -0,0 +1,146 @@
{
"_version": "1.86.0",
"sap.app": {
"id": "ns.incidents",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "0.0.1"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"resources": "resources.json",
"sourceTemplate": {
"id": "@sap/generator-fiori:lrop",
"version": "1.29.0",
"toolsId": "d69300f8-995f-4063-9130-f16037ee2ff5"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/processor/",
"type": "OData",
"settings": {
"annotations": [],
"odataVersion": "4.0"
}
}
}
},
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone@2": "",
"tablet": "",
"tablet@2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
}
},
"sap.ui5": {
"flexEnabled": true,
"dependencies": {
"minUI5Version": "1.150.0",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.incidents.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"operationMode": "Server",
"autoExpandSelect": true,
"earlyRequests": true
}
},
"@i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"uri": "i18n/i18n.properties"
}
},
"resources": {
"css": []
},
"routing": {
"config": {},
"routes": [
{
"pattern": ":?query:",
"name": "IncidentsList",
"target": "IncidentsList"
},
{
"pattern": "Incidents({key}):?query:",
"name": "IncidentsObjectPage",
"target": "IncidentsObjectPage"
}
],
"targets": {
"IncidentsList": {
"type": "Component",
"id": "IncidentsList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Incidents",
"variantManagement": "Page",
"navigation": {
"Incidents": {
"detail": {
"route": "IncidentsObjectPage"
}
}
},
"controlConfiguration": {
"@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"type": "ResponsiveTable"
}
}
}
}
}
},
"IncidentsObjectPage": {
"type": "Component",
"id": "IncidentsObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Incidents"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
},
"sap.fe": {
"app": {
"enableLazyLoading": true
}
}
}

View File

@@ -0,0 +1,63 @@
/******************************************************************************
* ╔═══════════════════════════════════════════════════════════════════════╗ *
* ║ ║ *
* ║ WARNING: AUTO-GENERATED FILE ║ *
* ║ ║ *
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
* ║ overwritten when you run the OPA test generator again. ║ *
* ║ ║ *
* ║ To add your own custom tests: ║ *
* ║ - Create a new journey test file in this directory. ║ *
* ║ - Follow the same pattern as this file. ║ *
* ║ - Add the new file to the opaTests.qunit.js config file. ║ *
* ║ - Custom journey files are not overwritten. ║ *
* ║ ║ *
* ╚═══════════════════════════════════════════════════════════════════════╝ *
******************************************************************************/
sap.ui.define([
"sap/ui/test/opaQunit",
"./pages/JourneyRunner"
], function (opaTest, runner) {
"use strict";
function journey() {
QUnit.module("IncidentsListListReport journey");
opaTest("Start application", function (Given, When, Then) {
Given.iStartMyApp();
Then.onTheIncidentsListGenerated.iSeeThisPage();
});
// Note: this test will only work if the ListReport page has a search field and shows data that matches the search term. Please ensure that the test data and search term are set up accordingly.
// opaTest("Perform a global search and check the result", function (Given, When, Then) {
// When.onTheIncidentsListGenerated.onFilterBar().iChangeSearchField("Search Term");
// When.onTheIncidentsListGenerated.onFilterBar().iExecuteSearch();
// Then.onTheIncidentsListGenerated.onTable().iCheckRows();
// });
opaTest("Navigate to ObjectPage", function (Given, When, Then) {
// Note: this test will fail if the ListReport page doesn't show any data
When.onTheIncidentsListGenerated.onFilterBar().iExecuteSearch();
Then.onTheIncidentsListGenerated.onTable().iCheckRows();
When.onTheIncidentsListGenerated.onTable().iPressRow(0);
Then.onTheIncidentsObjectPageGenerated.iSeeThisPage();
});
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
runner.run([journey]);
});

View File

@@ -0,0 +1,46 @@
/******************************************************************************
* ╔═══════════════════════════════════════════════════════════════════════╗ *
* ║ ║ *
* ║ WARNING: AUTO-GENERATED FILE ║ *
* ║ ║ *
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
* ║ overwritten when you run the OPA test generator again. ║ *
* ║ ║ *
* ║ To add your own custom tests: ║ *
* ║ - Create a new journey test file in this directory. ║ *
* ║ - Follow the same pattern as this file. ║ *
* ║ - Add the new file to the opaTests.qunit.js config file. ║ *
* ║ - Custom journey files are not overwritten. ║ *
* ║ ║ *
* ╚═══════════════════════════════════════════════════════════════════════╝ *
******************************************************************************/
sap.ui.define([
"sap/ui/test/opaQunit",
"./pages/JourneyRunner"
], function (opaTest, runner) {
"use strict";
function journey() {
QUnit.module("IncidentsObjectPageObjectPage journey");
opaTest("Navigate to IncidentsObjectPageObjectPage", function (Given, When, Then) {
Given.iStartMyApp();
When.onTheIncidentsListGenerated.onFilterBar().iExecuteSearch();
Then.onTheIncidentsListGenerated.onTable().iCheckRows();
When.onTheIncidentsListGenerated.onTable().iPressRow(0);
Then.onTheIncidentsObjectPageGenerated.iSeeThisPage();
});
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
runner.run([journey]);
});

View File

@@ -0,0 +1,34 @@
/******************************************************************************
* ╔═══════════════════════════════════════════════════════════════════════╗ *
* ║ ║ *
* ║ WARNING: AUTO-GENERATED FILE ║ *
* ║ ║ *
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
* ║ overwritten when you run the OPA test generator again. ║ *
* ║ ║ *
* ║ To add your own custom pages: ║ *
* ║ - Create a new page file in this directory. ║ *
* ║ - Follow the same pattern as this file. ║ *
* ║ - Add the new file to the JourneyRunner. ║ *
* ║ - Custom page files are not overwritten. ║ *
* ║ ║ *
* ╚═══════════════════════════════════════════════════════════════════════╝ *
******************************************************************************/
sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
'use strict';
const CustomPageDefinitions = {
actions: {},
assertions: {}
};
return new ListReport(
{
appId: 'ns.incidents',
componentId: 'IncidentsList',
contextPath: '/Incidents'
},
CustomPageDefinitions
);
});

View File

@@ -0,0 +1,41 @@
/******************************************************************************
* ╔═══════════════════════════════════════════════════════════════════════╗ *
* ║ ║ *
* ║ WARNING: AUTO-GENERATED FILE ║ *
* ║ ║ *
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
* ║ overwritten when you run the OPA test generator again. ║ *
* ║ ║ *
* ║ To add your own custom pages: ║ *
* ║ - Create a new page file in this directory. ║ *
* ║ - Follow the same pattern as this file. ║ *
* ║ - Add the new file to the JourneyRunner. ║ *
* ║ - Custom page files are not overwritten. ║ *
* ║ ║ *
* ╚═══════════════════════════════════════════════════════════════════════╝ *
******************************************************************************/
sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) {
'use strict';
const CustomPageDefinitions = {
actions: {
iPressSectionIconTabFilterButton: function (section) {
return this.waitFor({
id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`),
actions: new Press()
});
}
},
assertions: {}
};
return new ObjectPage(
{
appId: 'ns.incidents',
componentId: 'IncidentsObjectPage',
contextPath: '/Incidents'
},
CustomPageDefinitions
);
});

View File

@@ -0,0 +1,19 @@
sap.ui.define([
"sap/fe/test/JourneyRunner",
"ns/incidents/test/integration/pages/IncidentsList.gen",
"ns/incidents/test/integration/pages/IncidentsObjectPage.gen"
], function (JourneyRunner, IncidentsListGenerated, IncidentsObjectPageGenerated) {
'use strict';
const runner = new JourneyRunner({
launchUrl: sap.ui.require.toUrl('ns/incidents') + '/test/flp.html#app-preview',
pages: {
onTheIncidentsListGenerated: IncidentsListGenerated,
onTheIncidentsObjectPageGenerated: IncidentsObjectPageGenerated
},
async: true
});
return runner;
});

2
app/services.cds Normal file
View File

@@ -0,0 +1,2 @@
using from './incidents/annotations';

12858
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,10 +5,18 @@
"@sap/cds": "^9" "@sap/cds": "^9"
}, },
"devDependencies": { "devDependencies": {
"@cap-js/sqlite": "^2.4" "@cap-js/sqlite": "^2.4",
"cds-plugin-ui5": "^0.17.0"
}, },
"scripts": { "scripts": {
"start": "cds-serve" "start": "cds-serve",
"watch-incidents": "cds watch --open ns.incidents/index.html?sap-ui-xx-viewCache=false --livereload false"
}, },
"private": true "private": true,
"workspaces": [
"app/*"
],
"sapux": [
"app/incidents"
]
} }