Commit ab00a61f authored by guozhipeng's avatar guozhipeng

前后端可以正常部署了

parent fcc7fefb
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Mon Jan 13 2025 10:36:47 GMT+0800 (中国标准时间)|
|**App Generator**<br>@sap/generator-fiori-elements|
|**App Generator Version**<br>1.11.3|
|**Generation Platform**<br>Visual Studio Code|
|**Template Used**<br>List Report Page V4|
|**Service Type**<br>Local Cap|
|**Service URL**<br>http://localhost:4004/odata/v4/BooksService/
|**Module Name**<br>books|
|**Application Title**<br>Books|
|**Namespace**<br>ns|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.131.1|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>Books|
|**Navigation Entity**<br>None|
## books
Books
### Starting the generated app
- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply start your CAP project (```mvn spring-boot:run```) and navigate to the following location in your browser:
http://localhost:8080/books/webapp/index.html
#### Pre-requisites:
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)
using BooksService as service from '../../srv/services';
annotate service.Books with @(
UI.LineItem : [
{
$Type : 'UI.DataField',
Label : 'title',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'descr',
Value : descr,
},
{
$Type : 'UI.DataField',
Label : 'stock',
Value : stock,
},
{
$Type : 'UI.DataField',
Label : 'price',
Value : price,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
]
);
annotate service.Books with @(
UI.FieldGroup #GeneratedGroup1 : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Label : 'title',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'descr',
Value : descr,
},
{
$Type : 'UI.DataField',
Label : 'stock',
Value : stock,
},
{
$Type : 'UI.DataField',
Label : 'price',
Value : price,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
{
$Type : 'UI.DataField',
Label : 'genre_ID',
Value : genre_ID,
},
],
},
UI.Facets : [
{
$Type : 'UI.ReferenceFacet',
ID : 'GeneratedFacet1',
Label : 'General Information',
Target : '@UI.FieldGroup#GeneratedGroup1',
},
]
);
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.books.Component", {
metadata: {
manifest: "json"
}
});
}
);
\ No newline at end of file
//@ui5-bundle ns/books/Component-preload.js
sap.ui.require.preload({
"ns/books/Component.js":function(){
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.books.Component",{metadata:{manifest:"json"}})});
},
"ns/books/i18n/i18n.properties":'# This is the resource bundle for ns.books\n\n#Texts for manifest.json\n\n#XTIT: Application name\nappTitle=Books\n\n#YDES: Application description\nappDescription=Books',
"ns/books/manifest.json":'{"_version":"1.58.0","sap.app":{"id":"ns.books","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.11.3","toolsId":"8364e744-b9b7-4b11-b418-e2803245d72a"},"dataSources":{"mainService":{"uri":"/odata/v4/BooksService/","type":"OData","settings":{"annotations":[],"localUri":"localService/metadata.xml","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.131.1","libs":{"sap.m":{},"sap.ui.core":{},"sap.ushell":{},"sap.fe.templates":{}}},"contentDensities":{"compact":true,"cozy":true},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","settings":{"bundleName":"ns.books.i18n.i18n"}},"":{"dataSource":"mainService","preload":true,"settings":{"synchronizationMode":"None","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":"BooksList","target":"BooksList"},{"pattern":"Books({key}):?query:","name":"BooksObjectPage","target":"BooksObjectPage"}],"targets":{"BooksList":{"type":"Component","id":"BooksList","name":"sap.fe.templates.ListReport","options":{"settings":{"contextPath":"/Books","variantManagement":"Page","navigation":{"Books":{"detail":{"route":"BooksObjectPage"}}}}}},"BooksObjectPage":{"type":"Component","id":"BooksObjectPage","name":"sap.fe.templates.ObjectPage","options":{"settings":{"editableHeaderContent":false,"contextPath":"/Books"}}}}}},"sap.fiori":{"registrationIds":[],"archeType":"transactional"}}'
});
//# sourceMappingURL=Component-preload.js.map
{"version":3,"file":"Component-preload.js","sections":[{"offset":{"line":1,"column":0},"map":{"version":3,"names":[],"sources":["Component-preload.js?bundle-code-0"],"mappings":"AAAA;AACA","sourcesContent":["sap.ui.require.preload({\n"],"sourceRoot":""}},{"offset":{"line":3,"column":0},"map":{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,qBAAsB,CAC1CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[],"sourceRoot":""}}]}
\ No newline at end of file
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.books.Component",{metadata:{manifest:"json"}})});
//# sourceMappingURL=Component.js.map
\ No newline at end of file
{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,qBAAsB,CAC1CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[]}
\ No newline at end of file
# This is the resource bundle for ns.books
#Texts for manifest.json
#XTIT: Application name
appTitle=Books
#YDES: Application description
appDescription=Books
\ No newline at end of file
<!DOCTYPE html>
<html>
<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>Books</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"ns.books": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.books"
data-id="container"
data-settings='{"id" : "ns.books"}'
data-handle-validation="true"
></div>
</body>
</html>
\ No newline at end of file
{
"_version": "1.58.0",
"sap.app": {
"id": "ns.books",
"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.11.3",
"toolsId": "8364e744-b9b7-4b11-b418-e2803245d72a"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/BooksService/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"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.131.1",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.books.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"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": "BooksList",
"target": "BooksList"
},
{
"pattern": "Books({key}):?query:",
"name": "BooksObjectPage",
"target": "BooksObjectPage"
}
],
"targets": {
"BooksList": {
"type": "Component",
"id": "BooksList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Books",
"variantManagement": "Page",
"navigation": {
"Books": {
"detail": {
"route": "BooksObjectPage"
}
}
}
}
}
},
"BooksObjectPage": {
"type": "Component",
"id": "BooksObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Books"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "books",
"version": "0.0.1",
"description": "Books",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"dependencies": {},
"devDependencies": {
"@sap/ux-ui5-tooling": "1",
"@ui5/cli": "^3.0.0",
"ui5-task-zipper": "^3"
},
"scripts": {
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf",
"build": "ui5 build preload --clean-dest --config ui5-deploy.yaml",
"build-local": "ui5 build preload --clean-dest",
"start": "ui5 serve"
},
"ui5": {
"dependencies": [
"ui5-task-zipper"
]
}
}
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: '3.1'
metadata:
name: books
type: application
resources:
configuration:
propertiesFileSourceEncoding: UTF-8
builder:
resources:
excludes:
- "/test/**"
- "/localService/**"
customTasks:
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: books
additionalFiles:
- xs-app.json
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: "3.1"
metadata:
name: ns.books
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: 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
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.books.Component", {
metadata: {
manifest: "json"
}
});
}
);
\ No newline at end of file
# This is the resource bundle for ns.books
#Texts for manifest.json
#XTIT: Application name
appTitle=Books
#YDES: Application description
appDescription=Books
\ No newline at end of file
<!DOCTYPE html>
<html>
<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>Books</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"ns.books": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.books"
data-id="container"
data-settings='{"id" : "ns.books"}'
data-handle-validation="true"
></div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="BooksService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityContainer Name="EntityContainer">
<EntitySet Name="Books" EntityType="BooksService.Books">
<NavigationPropertyBinding Path="currency" Target="Currencies"/>
<NavigationPropertyBinding Path="author" Target="Authors"/>
<NavigationPropertyBinding Path="texts" Target="Books_texts"/>
<NavigationPropertyBinding Path="localized" Target="Books_texts"/>
<NavigationPropertyBinding Path="genre" Target="Categories"/>
</EntitySet>
<EntitySet Name="Authors" EntityType="BooksService.Authors">
<NavigationPropertyBinding Path="books" Target="Books"/>
</EntitySet>
<EntitySet Name="Currencies" EntityType="BooksService.Currencies">
<NavigationPropertyBinding Path="texts" Target="Currencies_texts"/>
<NavigationPropertyBinding Path="localized" Target="Currencies_texts"/>
</EntitySet>
<EntitySet Name="Categories" EntityType="BooksService.Categories">
<NavigationPropertyBinding Path="parent" Target="Categories"/>
<NavigationPropertyBinding Path="children" Target="Categories"/>
<NavigationPropertyBinding Path="texts" Target="Categories_texts"/>
<NavigationPropertyBinding Path="localized" Target="Categories_texts"/>
</EntitySet>
<EntitySet Name="Books_texts" EntityType="BooksService.Books_texts"/>
<EntitySet Name="Currencies_texts" EntityType="BooksService.Currencies_texts"/>
<EntitySet Name="Categories_texts" EntityType="BooksService.Categories_texts"/>
</EntityContainer>
<EntityType Name="Books">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="title" Type="Edm.String" MaxLength="111"/>
<Property Name="descr" Type="Edm.String" MaxLength="1111"/>
<Property Name="stock" Type="Edm.Int32"/>
<Property Name="price" Type="Edm.Decimal" Scale="2" Precision="9"/>
<NavigationProperty Name="currency" Type="BooksService.Currencies">
<ReferentialConstraint Property="currency_code" ReferencedProperty="code"/>
</NavigationProperty>
<Property Name="currency_code" Type="Edm.String" MaxLength="3"/>
<NavigationProperty Name="author" Type="BooksService.Authors" Partner="books">
<ReferentialConstraint Property="author_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="author_ID" Type="Edm.Guid"/>
<NavigationProperty Name="texts" Type="Collection(BooksService.Books_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Books_texts">
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
</NavigationProperty>
<NavigationProperty Name="genre" Type="BooksService.Categories">
<ReferentialConstraint Property="genre_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="genre_ID" Type="Edm.Int32"/>
</EntityType>
<EntityType Name="Authors">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="firstname" Type="Edm.String" MaxLength="111"/>
<Property Name="lastname" Type="Edm.String" MaxLength="111"/>
<NavigationProperty Name="books" Type="Collection(BooksService.Books)" Partner="author"/>
</EntityType>
<EntityType Name="Currencies">
<Key>
<PropertyRef Name="code"/>
</Key>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
<Property Name="symbol" Type="Edm.String" MaxLength="5"/>
<Property Name="minorUnit" Type="Edm.Int16"/>
<NavigationProperty Name="texts" Type="Collection(BooksService.Currencies_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Currencies_texts">
<ReferentialConstraint Property="code" ReferencedProperty="code"/>
</NavigationProperty>
</EntityType>
<EntityType Name="Categories">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<NavigationProperty Name="parent" Type="BooksService.Categories" Partner="children">
<ReferentialConstraint Property="parent_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="parent_ID" Type="Edm.Int32"/>
<NavigationProperty Name="children" Type="Collection(BooksService.Categories)" Partner="parent">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="texts" Type="Collection(BooksService.Categories_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Categories_texts">
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
</NavigationProperty>
</EntityType>
<EntityType Name="Books_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="ID"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="title" Type="Edm.String" MaxLength="111"/>
<Property Name="descr" Type="Edm.String" MaxLength="1111"/>
</EntityType>
<EntityType Name="Currencies_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="code"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
</EntityType>
<EntityType Name="Categories_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="ID"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
</EntityType>
<Annotations Target="BooksService.EntityContainer/Books">
<Annotation Term="Capabilities.DeleteRestrictions">
<Record Type="Capabilities.DeleteRestrictionsType">
<PropertyValue Property="Deletable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.InsertRestrictions">
<Record Type="Capabilities.InsertRestrictionsType">
<PropertyValue Property="Insertable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record Type="Capabilities.UpdateRestrictionsType">
<PropertyValue Property="Updatable" Bool="false"/>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Books/currency">
<Annotation Term="Common.Label" String="{i18n>Currency}"/>
<Annotation Term="Core.Description" String="{i18n>CurrencyCode.Description}"/>
</Annotations>
<Annotations Target="BooksService.Books/currency_code">
<Annotation Term="Common.Label" String="{i18n>Currency}"/>
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="{i18n>Currency}"/>
<PropertyValue Property="CollectionPath" String="Currencies"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
<PropertyValue Property="ValueListProperty" String="code"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="Core.Description" String="{i18n>CurrencyCode.Description}"/>
</Annotations>
<Annotations Target="BooksService.Books/genre_ID">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="Categories"/>
<PropertyValue Property="CollectionPath" String="Categories"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="genre_ID"/>
<PropertyValue Property="ValueListProperty" String="ID"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.EntityContainer/Authors">
<Annotation Term="Capabilities.DeleteRestrictions">
<Record Type="Capabilities.DeleteRestrictionsType">
<PropertyValue Property="Deletable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.InsertRestrictions">
<Record Type="Capabilities.InsertRestrictionsType">
<PropertyValue Property="Insertable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record Type="Capabilities.UpdateRestrictionsType">
<PropertyValue Property="Updatable" Bool="false"/>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Currencies">
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="name"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Currencies/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/code">
<Annotation Term="Common.Text" Path="name"/>
<Annotation Term="Common.Label" String="{i18n>CurrencyCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/symbol">
<Annotation Term="Common.Label" String="{i18n>CurrencySymbol}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/minorUnit">
<Annotation Term="Common.Label" String="{i18n>CurrencyMinorUnit}"/>
</Annotations>
<Annotations Target="BooksService.Categories">
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="name"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Categories/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Categories/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Categories/parent_ID">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="Categories"/>
<PropertyValue Property="CollectionPath" String="Categories"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="parent_ID"/>
<PropertyValue Property="ValueListProperty" String="ID"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Books_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/code">
<Annotation Term="Common.Text" Path="name"/>
<Annotation Term="Common.Label" String="{i18n>CurrencyCode}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
\ No newline at end of file
{
"_version": "1.58.0",
"sap.app": {
"id": "ns.books",
"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.11.3",
"toolsId": "8364e744-b9b7-4b11-b418-e2803245d72a"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/BooksService/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"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.131.1",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.books.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"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": "BooksList",
"target": "BooksList"
},
{
"pattern": "Books({key}):?query:",
"name": "BooksObjectPage",
"target": "BooksObjectPage"
}
],
"targets": {
"BooksList": {
"type": "Component",
"id": "BooksList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Books",
"variantManagement": "Page",
"navigation": {
"Books": {
"detail": {
"route": "BooksObjectPage"
}
}
}
}
}
},
"BooksObjectPage": {
"type": "Component",
"id": "BooksObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Books"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
}
}
<!DOCTYPE HTML>
<html>
<!-- Copyright (c) 2015 SAP AG, All Rights Reserved -->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{appTitle}}</title>
<!-- Bootstrap the unified shell in sandbox mode for standalone usage.
The renderer is specified in the global Unified Shell configuration object "sap-ushell-config".
The fiori2 renderer will render the shell header allowing, for instance,
testing of additional application setting buttons.
The navigation target resolution service is configured in a way that the empty URL hash is
resolved to our own application.
This example uses relative path references for the SAPUI5 resources and test-resources;
it might be necessary to adapt them depending on the target runtime platform.
The sandbox platform is restricted to development or demo use cases and must NOT be used
for productive scenarios.
-->
<script type="text/javascript">
window["sap-ushell-config"] = {
defaultRenderer: "fiori2",
bootstrapPlugins: {
"RuntimeAuthoringPlugin": {
component: "sap.ushell.plugins.rta",
config: {
validateAppVersion: false
}
}
},
renderers: {
fiori2: {
componentData: {
config: {
search: "hidden"
}
}
}
},
applications: {
"nsbooks-tile": {
title: "Books",
description: "Books",
additionalInformation: "SAPUI5.Component=ns.books",
applicationType: "URL",
url: "../"
}
}
};
</script>
<script src="https://sapui5.hana.ondemand.com/1.131.1/test-resources/sap/ushell/bootstrap/sandbox.js" id="sap-ushell-bootstrap"></script>
<!-- Bootstrap the UI5 core library -->
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-libs=""
data-sap-ui-async="true"
data-sap-ui-preload="async"
data-sap-ui-theme="sap_horizon"
data-sap-ui-compatVersion="edge"
data-sap-ui-language="en"
data-sap-ui-resourceroots='{"ns.books": "../"}'
data-sap-ui-frameOptions="allow"> // NON-SECURE setting for testing environment
</script>
</head>
<!-- UI Content -->
<body class="sapUiBody" id="content">
</body>
</html>
sap.ui.define([
"sap/ui/test/opaQunit"
], function (opaTest) {
"use strict";
var Journey = {
run: function() {
QUnit.module("First journey");
opaTest("Start application", function (Given, When, Then) {
Given.iStartMyApp();
Then.onTheBooksList.iSeeThisPage();
});
opaTest("Navigate to ObjectPage", function (Given, When, Then) {
// Note: this test will fail if the ListReport page doesn't show any data
When.onTheBooksList.onFilterBar().iExecuteSearch();
Then.onTheBooksList.onTable().iCheckRows();
When.onTheBooksList.onTable().iPressRow(0);
Then.onTheBooksObjectPage.iSeeThisPage();
});
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
}
return Journey;
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Integration tests</title>
<meta charset="utf-8">
<script id="sap-ui-bootstrap"
src="/resources/sap-ui-core.js"
data-sap-ui-theme='sap_fiori_3'
data-sap-ui-resourceroots='{
"ns.books": "../../"
}'
data-sap-ui-animation="false"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
</script>
<link rel="stylesheet" type="text/css" href="/resources/sap/ui/thirdparty/qunit-2.css">
<script src="/resources/sap/ui/thirdparty/qunit-2.js"></script>
<script src="/resources/sap/ui/qunit/qunit-junit.js"></script>
<script src="opaTests.qunit.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>
\ No newline at end of file
sap.ui.require(
[
'sap/fe/test/JourneyRunner',
'ns/books/test/integration/FirstJourney',
'ns/books/test/integration/pages/BooksList',
'ns/books/test/integration/pages/BooksObjectPage'
],
function(JourneyRunner, opaJourney, BooksList, BooksObjectPage) {
'use strict';
var JourneyRunner = new JourneyRunner({
// start index.html in web folder
launchUrl: sap.ui.require.toUrl('ns/books') + '/index.html'
});
JourneyRunner.run(
{
pages: {
onTheBooksList: BooksList,
onTheBooksObjectPage: BooksObjectPage
}
},
opaJourney.run
);
}
);
\ No newline at end of file
sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
'use strict';
var CustomPageDefinitions = {
actions: {},
assertions: {}
};
return new ListReport(
{
appId: 'ns.books',
componentId: 'BooksList',
contextPath: '/Books'
},
CustomPageDefinitions
);
});
\ No newline at end of file
sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) {
'use strict';
var CustomPageDefinitions = {
actions: {},
assertions: {}
};
return new ObjectPage(
{
appId: 'ns.books',
componentId: 'BooksObjectPage',
contextPath: '/Books'
},
CustomPageDefinitions
);
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>QUnit test suite</title>
<script src="../resources/sap/ui/qunit/qunit-redirect.js"></script>
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script>
</head>
<body></body>
</html>
\ No newline at end of file
window.suite = function() {
'use strict';
// eslint-disable-next-line
var oSuite = new parent.jsUnitTestSuite(),
sContextPath = location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1);
oSuite.addTestPage(sContextPath + 'integration/opaTests.qunit.html');
return oSuite;
};
\ No newline at end of file
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"routes": [
{
"source": "^/?odata/(.*)$",
"target": "/odata/$1",
"destination": "srv-api",
"authenticationType": "xsuaa",
"csrfProtection": true
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Mon Jan 13 2025 10:36:47 GMT+0800 (中国标准时间)|
|**App Generator**<br>@sap/generator-fiori-elements|
|**App Generator Version**<br>1.11.3|
|**Generation Platform**<br>Visual Studio Code|
|**Template Used**<br>List Report Page V4|
|**Service Type**<br>Local Cap|
|**Service URL**<br>http://localhost:4004/odata/v4/BooksService/
|**Module Name**<br>books|
|**Application Title**<br>Books|
|**Namespace**<br>ns|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.131.1|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>Books|
|**Navigation Entity**<br>None|
## books
Books
### Starting the generated app
- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply start your CAP project (```mvn spring-boot:run```) and navigate to the following location in your browser:
http://localhost:8080/books/webapp/index.html
#### Pre-requisites:
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)
using BooksService as service from '../../srv/services';
annotate service.Books with @(
UI.LineItem : [
{
$Type : 'UI.DataField',
Label : 'title',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'descr',
Value : descr,
},
{
$Type : 'UI.DataField',
Label : 'stock',
Value : stock,
},
{
$Type : 'UI.DataField',
Label : 'price',
Value : price,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
]
);
annotate service.Books with @(
UI.FieldGroup #GeneratedGroup1 : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Label : 'title',
Value : title,
},
{
$Type : 'UI.DataField',
Label : 'descr',
Value : descr,
},
{
$Type : 'UI.DataField',
Label : 'stock',
Value : stock,
},
{
$Type : 'UI.DataField',
Label : 'price',
Value : price,
},
{
$Type : 'UI.DataField',
Label : 'currency_code',
Value : currency_code,
},
{
$Type : 'UI.DataField',
Label : 'genre_ID',
Value : genre_ID,
},
],
},
UI.Facets : [
{
$Type : 'UI.ReferenceFacet',
ID : 'GeneratedFacet1',
Label : 'General Information',
Target : '@UI.FieldGroup#GeneratedGroup1',
},
]
);
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.books.Component", {
metadata: {
manifest: "json"
}
});
}
);
\ No newline at end of file
//@ui5-bundle ns/books/Component-preload.js
sap.ui.require.preload({
"ns/books/Component.js":function(){
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.books.Component",{metadata:{manifest:"json"}})});
},
"ns/books/i18n/i18n.properties":'# This is the resource bundle for ns.books\n\n#Texts for manifest.json\n\n#XTIT: Application name\nappTitle=Books\n\n#YDES: Application description\nappDescription=Books',
"ns/books/manifest.json":'{"_version":"1.58.0","sap.app":{"id":"ns.books","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.11.3","toolsId":"8364e744-b9b7-4b11-b418-e2803245d72a"},"dataSources":{"mainService":{"uri":"/odata/v4/BooksService/","type":"OData","settings":{"annotations":[],"localUri":"localService/metadata.xml","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.131.1","libs":{"sap.m":{},"sap.ui.core":{},"sap.ushell":{},"sap.fe.templates":{}}},"contentDensities":{"compact":true,"cozy":true},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","settings":{"bundleName":"ns.books.i18n.i18n"}},"":{"dataSource":"mainService","preload":true,"settings":{"synchronizationMode":"None","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":"BooksList","target":"BooksList"},{"pattern":"Books({key}):?query:","name":"BooksObjectPage","target":"BooksObjectPage"}],"targets":{"BooksList":{"type":"Component","id":"BooksList","name":"sap.fe.templates.ListReport","options":{"settings":{"contextPath":"/Books","variantManagement":"Page","navigation":{"Books":{"detail":{"route":"BooksObjectPage"}}}}}},"BooksObjectPage":{"type":"Component","id":"BooksObjectPage","name":"sap.fe.templates.ObjectPage","options":{"settings":{"editableHeaderContent":false,"contextPath":"/Books"}}}}}},"sap.fiori":{"registrationIds":[],"archeType":"transactional"}}'
});
//# sourceMappingURL=Component-preload.js.map
{"version":3,"file":"Component-preload.js","sections":[{"offset":{"line":1,"column":0},"map":{"version":3,"names":[],"sources":["Component-preload.js?bundle-code-0"],"mappings":"AAAA;AACA","sourcesContent":["sap.ui.require.preload({\n"],"sourceRoot":""}},{"offset":{"line":3,"column":0},"map":{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,qBAAsB,CAC1CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[],"sourceRoot":""}}]}
\ No newline at end of file
sap.ui.define(["sap/fe/core/AppComponent"],function(e){"use strict";return e.extend("ns.books.Component",{metadata:{manifest:"json"}})});
//# sourceMappingURL=Component.js.map
\ No newline at end of file
{"version":3,"file":"Component.js","names":["sap","ui","define","Component","extend","metadata","manifest"],"sources":["Component-dbg.js"],"mappings":"AAAAA,IAAIC,GAAGC,OACH,CAAC,4BACD,SAAUC,GACN,aAEA,OAAOA,EAAUC,OAAO,qBAAsB,CAC1CC,SAAU,CACNC,SAAU,SAGtB","ignoreList":[]}
\ No newline at end of file
# This is the resource bundle for ns.books
#Texts for manifest.json
#XTIT: Application name
appTitle=Books
#YDES: Application description
appDescription=Books
\ No newline at end of file
<!DOCTYPE html>
<html>
<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>Books</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"ns.books": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.books"
data-id="container"
data-settings='{"id" : "ns.books"}'
data-handle-validation="true"
></div>
</body>
</html>
\ No newline at end of file
{
"_version": "1.58.0",
"sap.app": {
"id": "ns.books",
"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.11.3",
"toolsId": "8364e744-b9b7-4b11-b418-e2803245d72a"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/BooksService/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"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.131.1",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.books.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"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": "BooksList",
"target": "BooksList"
},
{
"pattern": "Books({key}):?query:",
"name": "BooksObjectPage",
"target": "BooksObjectPage"
}
],
"targets": {
"BooksList": {
"type": "Component",
"id": "BooksList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Books",
"variantManagement": "Page",
"navigation": {
"Books": {
"detail": {
"route": "BooksObjectPage"
}
}
}
}
}
},
"BooksObjectPage": {
"type": "Component",
"id": "BooksObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Books"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "books",
"version": "0.0.1",
"description": "Books",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"dependencies": {},
"devDependencies": {
"@sap/ux-ui5-tooling": "1",
"@ui5/cli": "^3.0.0",
"ui5-task-zipper": "^3"
},
"scripts": {
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf",
"build": "ui5 build preload --clean-dest --config ui5-deploy.yaml",
"build-local": "ui5 build preload --clean-dest",
"start": "ui5 serve"
},
"ui5": {
"dependencies": [
"ui5-task-zipper"
]
}
}
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: '3.1'
metadata:
name: books
type: application
resources:
configuration:
propertiesFileSourceEncoding: UTF-8
builder:
resources:
excludes:
- "/test/**"
- "/localService/**"
customTasks:
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: books
additionalFiles:
- xs-app.json
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
specVersion: "3.1"
metadata:
name: ns.books
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: 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
sap.ui.define(
["sap/fe/core/AppComponent"],
function (Component) {
"use strict";
return Component.extend("ns.books.Component", {
metadata: {
manifest: "json"
}
});
}
);
\ No newline at end of file
# This is the resource bundle for ns.books
#Texts for manifest.json
#XTIT: Application name
appTitle=Books
#YDES: Application description
appDescription=Books
\ No newline at end of file
<!DOCTYPE html>
<html>
<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>Books</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"ns.books": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="ns.books"
data-id="container"
data-settings='{"id" : "ns.books"}'
data-handle-validation="true"
></div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="BooksService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityContainer Name="EntityContainer">
<EntitySet Name="Books" EntityType="BooksService.Books">
<NavigationPropertyBinding Path="currency" Target="Currencies"/>
<NavigationPropertyBinding Path="author" Target="Authors"/>
<NavigationPropertyBinding Path="texts" Target="Books_texts"/>
<NavigationPropertyBinding Path="localized" Target="Books_texts"/>
<NavigationPropertyBinding Path="genre" Target="Categories"/>
</EntitySet>
<EntitySet Name="Authors" EntityType="BooksService.Authors">
<NavigationPropertyBinding Path="books" Target="Books"/>
</EntitySet>
<EntitySet Name="Currencies" EntityType="BooksService.Currencies">
<NavigationPropertyBinding Path="texts" Target="Currencies_texts"/>
<NavigationPropertyBinding Path="localized" Target="Currencies_texts"/>
</EntitySet>
<EntitySet Name="Categories" EntityType="BooksService.Categories">
<NavigationPropertyBinding Path="parent" Target="Categories"/>
<NavigationPropertyBinding Path="children" Target="Categories"/>
<NavigationPropertyBinding Path="texts" Target="Categories_texts"/>
<NavigationPropertyBinding Path="localized" Target="Categories_texts"/>
</EntitySet>
<EntitySet Name="Books_texts" EntityType="BooksService.Books_texts"/>
<EntitySet Name="Currencies_texts" EntityType="BooksService.Currencies_texts"/>
<EntitySet Name="Categories_texts" EntityType="BooksService.Categories_texts"/>
</EntityContainer>
<EntityType Name="Books">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="title" Type="Edm.String" MaxLength="111"/>
<Property Name="descr" Type="Edm.String" MaxLength="1111"/>
<Property Name="stock" Type="Edm.Int32"/>
<Property Name="price" Type="Edm.Decimal" Scale="2" Precision="9"/>
<NavigationProperty Name="currency" Type="BooksService.Currencies">
<ReferentialConstraint Property="currency_code" ReferencedProperty="code"/>
</NavigationProperty>
<Property Name="currency_code" Type="Edm.String" MaxLength="3"/>
<NavigationProperty Name="author" Type="BooksService.Authors" Partner="books">
<ReferentialConstraint Property="author_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="author_ID" Type="Edm.Guid"/>
<NavigationProperty Name="texts" Type="Collection(BooksService.Books_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Books_texts">
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
</NavigationProperty>
<NavigationProperty Name="genre" Type="BooksService.Categories">
<ReferentialConstraint Property="genre_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="genre_ID" Type="Edm.Int32"/>
</EntityType>
<EntityType Name="Authors">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="firstname" Type="Edm.String" MaxLength="111"/>
<Property Name="lastname" Type="Edm.String" MaxLength="111"/>
<NavigationProperty Name="books" Type="Collection(BooksService.Books)" Partner="author"/>
</EntityType>
<EntityType Name="Currencies">
<Key>
<PropertyRef Name="code"/>
</Key>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
<Property Name="symbol" Type="Edm.String" MaxLength="5"/>
<Property Name="minorUnit" Type="Edm.Int16"/>
<NavigationProperty Name="texts" Type="Collection(BooksService.Currencies_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Currencies_texts">
<ReferentialConstraint Property="code" ReferencedProperty="code"/>
</NavigationProperty>
</EntityType>
<EntityType Name="Categories">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<NavigationProperty Name="parent" Type="BooksService.Categories" Partner="children">
<ReferentialConstraint Property="parent_ID" ReferencedProperty="ID"/>
</NavigationProperty>
<Property Name="parent_ID" Type="Edm.Int32"/>
<NavigationProperty Name="children" Type="Collection(BooksService.Categories)" Partner="parent">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="texts" Type="Collection(BooksService.Categories_texts)">
<OnDelete Action="Cascade"/>
</NavigationProperty>
<NavigationProperty Name="localized" Type="BooksService.Categories_texts">
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
</NavigationProperty>
</EntityType>
<EntityType Name="Books_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="ID"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
<Property Name="title" Type="Edm.String" MaxLength="111"/>
<Property Name="descr" Type="Edm.String" MaxLength="1111"/>
</EntityType>
<EntityType Name="Currencies_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="code"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
</EntityType>
<EntityType Name="Categories_texts">
<Key>
<PropertyRef Name="locale"/>
<PropertyRef Name="ID"/>
</Key>
<Property Name="locale" Type="Edm.String" MaxLength="14" Nullable="false"/>
<Property Name="name" Type="Edm.String" MaxLength="255"/>
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
</EntityType>
<Annotations Target="BooksService.EntityContainer/Books">
<Annotation Term="Capabilities.DeleteRestrictions">
<Record Type="Capabilities.DeleteRestrictionsType">
<PropertyValue Property="Deletable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.InsertRestrictions">
<Record Type="Capabilities.InsertRestrictionsType">
<PropertyValue Property="Insertable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record Type="Capabilities.UpdateRestrictionsType">
<PropertyValue Property="Updatable" Bool="false"/>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Books/currency">
<Annotation Term="Common.Label" String="{i18n>Currency}"/>
<Annotation Term="Core.Description" String="{i18n>CurrencyCode.Description}"/>
</Annotations>
<Annotations Target="BooksService.Books/currency_code">
<Annotation Term="Common.Label" String="{i18n>Currency}"/>
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="{i18n>Currency}"/>
<PropertyValue Property="CollectionPath" String="Currencies"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
<PropertyValue Property="ValueListProperty" String="code"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="Core.Description" String="{i18n>CurrencyCode.Description}"/>
</Annotations>
<Annotations Target="BooksService.Books/genre_ID">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="Categories"/>
<PropertyValue Property="CollectionPath" String="Categories"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="genre_ID"/>
<PropertyValue Property="ValueListProperty" String="ID"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.EntityContainer/Authors">
<Annotation Term="Capabilities.DeleteRestrictions">
<Record Type="Capabilities.DeleteRestrictionsType">
<PropertyValue Property="Deletable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.InsertRestrictions">
<Record Type="Capabilities.InsertRestrictionsType">
<PropertyValue Property="Insertable" Bool="false"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record Type="Capabilities.UpdateRestrictionsType">
<PropertyValue Property="Updatable" Bool="false"/>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Currencies">
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="name"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Currencies/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/code">
<Annotation Term="Common.Text" Path="name"/>
<Annotation Term="Common.Label" String="{i18n>CurrencyCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/symbol">
<Annotation Term="Common.Label" String="{i18n>CurrencySymbol}"/>
</Annotations>
<Annotations Target="BooksService.Currencies/minorUnit">
<Annotation Term="Common.Label" String="{i18n>CurrencyMinorUnit}"/>
</Annotations>
<Annotations Target="BooksService.Categories">
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="name"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Categories/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Categories/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Categories/parent_ID">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="Label" String="Categories"/>
<PropertyValue Property="CollectionPath" String="Categories"/>
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterInOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="parent_ID"/>
<PropertyValue Property="ValueListProperty" String="ID"/>
</Record>
<Record Type="Common.ValueListParameterDisplayOnly">
<PropertyValue Property="ValueListProperty" String="name"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<Annotations Target="BooksService.Books_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
<Annotations Target="BooksService.Currencies_texts/code">
<Annotation Term="Common.Text" Path="name"/>
<Annotation Term="Common.Label" String="{i18n>CurrencyCode}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/locale">
<Annotation Term="Common.Label" String="{i18n>LanguageCode}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/name">
<Annotation Term="Common.Label" String="{i18n>Name}"/>
</Annotations>
<Annotations Target="BooksService.Categories_texts/descr">
<Annotation Term="Common.Label" String="{i18n>Description}"/>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
\ No newline at end of file
{
"_version": "1.58.0",
"sap.app": {
"id": "ns.books",
"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.11.3",
"toolsId": "8364e744-b9b7-4b11-b418-e2803245d72a"
},
"dataSources": {
"mainService": {
"uri": "/odata/v4/BooksService/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"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.131.1",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ushell": {},
"sap.fe.templates": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "ns.books.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"synchronizationMode": "None",
"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": "BooksList",
"target": "BooksList"
},
{
"pattern": "Books({key}):?query:",
"name": "BooksObjectPage",
"target": "BooksObjectPage"
}
],
"targets": {
"BooksList": {
"type": "Component",
"id": "BooksList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Books",
"variantManagement": "Page",
"navigation": {
"Books": {
"detail": {
"route": "BooksObjectPage"
}
}
}
}
}
},
"BooksObjectPage": {
"type": "Component",
"id": "BooksObjectPage",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"editableHeaderContent": false,
"contextPath": "/Books"
}
}
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
}
}
<!DOCTYPE HTML>
<html>
<!-- Copyright (c) 2015 SAP AG, All Rights Reserved -->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{appTitle}}</title>
<!-- Bootstrap the unified shell in sandbox mode for standalone usage.
The renderer is specified in the global Unified Shell configuration object "sap-ushell-config".
The fiori2 renderer will render the shell header allowing, for instance,
testing of additional application setting buttons.
The navigation target resolution service is configured in a way that the empty URL hash is
resolved to our own application.
This example uses relative path references for the SAPUI5 resources and test-resources;
it might be necessary to adapt them depending on the target runtime platform.
The sandbox platform is restricted to development or demo use cases and must NOT be used
for productive scenarios.
-->
<script type="text/javascript">
window["sap-ushell-config"] = {
defaultRenderer: "fiori2",
bootstrapPlugins: {
"RuntimeAuthoringPlugin": {
component: "sap.ushell.plugins.rta",
config: {
validateAppVersion: false
}
}
},
renderers: {
fiori2: {
componentData: {
config: {
search: "hidden"
}
}
}
},
applications: {
"nsbooks-tile": {
title: "Books",
description: "Books",
additionalInformation: "SAPUI5.Component=ns.books",
applicationType: "URL",
url: "../"
}
}
};
</script>
<script src="https://sapui5.hana.ondemand.com/1.131.1/test-resources/sap/ushell/bootstrap/sandbox.js" id="sap-ushell-bootstrap"></script>
<!-- Bootstrap the UI5 core library -->
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.131.1/resources/sap-ui-core.js"
data-sap-ui-libs=""
data-sap-ui-async="true"
data-sap-ui-preload="async"
data-sap-ui-theme="sap_horizon"
data-sap-ui-compatVersion="edge"
data-sap-ui-language="en"
data-sap-ui-resourceroots='{"ns.books": "../"}'
data-sap-ui-frameOptions="allow"> // NON-SECURE setting for testing environment
</script>
</head>
<!-- UI Content -->
<body class="sapUiBody" id="content">
</body>
</html>
sap.ui.define([
"sap/ui/test/opaQunit"
], function (opaTest) {
"use strict";
var Journey = {
run: function() {
QUnit.module("First journey");
opaTest("Start application", function (Given, When, Then) {
Given.iStartMyApp();
Then.onTheBooksList.iSeeThisPage();
});
opaTest("Navigate to ObjectPage", function (Given, When, Then) {
// Note: this test will fail if the ListReport page doesn't show any data
When.onTheBooksList.onFilterBar().iExecuteSearch();
Then.onTheBooksList.onTable().iCheckRows();
When.onTheBooksList.onTable().iPressRow(0);
Then.onTheBooksObjectPage.iSeeThisPage();
});
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
}
return Journey;
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Integration tests</title>
<meta charset="utf-8">
<script id="sap-ui-bootstrap"
src="/resources/sap-ui-core.js"
data-sap-ui-theme='sap_fiori_3'
data-sap-ui-resourceroots='{
"ns.books": "../../"
}'
data-sap-ui-animation="false"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
</script>
<link rel="stylesheet" type="text/css" href="/resources/sap/ui/thirdparty/qunit-2.css">
<script src="/resources/sap/ui/thirdparty/qunit-2.js"></script>
<script src="/resources/sap/ui/qunit/qunit-junit.js"></script>
<script src="opaTests.qunit.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>
\ No newline at end of file
sap.ui.require(
[
'sap/fe/test/JourneyRunner',
'ns/books/test/integration/FirstJourney',
'ns/books/test/integration/pages/BooksList',
'ns/books/test/integration/pages/BooksObjectPage'
],
function(JourneyRunner, opaJourney, BooksList, BooksObjectPage) {
'use strict';
var JourneyRunner = new JourneyRunner({
// start index.html in web folder
launchUrl: sap.ui.require.toUrl('ns/books') + '/index.html'
});
JourneyRunner.run(
{
pages: {
onTheBooksList: BooksList,
onTheBooksObjectPage: BooksObjectPage
}
},
opaJourney.run
);
}
);
\ No newline at end of file
sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
'use strict';
var CustomPageDefinitions = {
actions: {},
assertions: {}
};
return new ListReport(
{
appId: 'ns.books',
componentId: 'BooksList',
contextPath: '/Books'
},
CustomPageDefinitions
);
});
\ No newline at end of file
sap.ui.define(['sap/fe/test/ObjectPage'], function(ObjectPage) {
'use strict';
var CustomPageDefinitions = {
actions: {},
assertions: {}
};
return new ObjectPage(
{
appId: 'ns.books',
componentId: 'BooksObjectPage',
contextPath: '/Books'
},
CustomPageDefinitions
);
});
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>QUnit test suite</title>
<script src="../resources/sap/ui/qunit/qunit-redirect.js"></script>
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script>
</head>
<body></body>
</html>
\ No newline at end of file
window.suite = function() {
'use strict';
// eslint-disable-next-line
var oSuite = new parent.jsUnitTestSuite(),
sContextPath = location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1);
oSuite.addTestPage(sContextPath + 'integration/opaTests.qunit.html');
return oSuite;
};
\ No newline at end of file
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"routes": [
{
"source": "^/?odata/(.*)$",
"target": "/odata/$1",
"destination": "srv-api",
"authenticationType": "xsuaa",
"csrfProtection": true
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
{
"welcomeFile": "/app/webapp/index.html",
"routes": [
{
"source": "^/app/(.*)$",
"target": "$1",
"localDir": ".",
"cacheControl": "no-cache, no-store, must-revalidate"
"source": "^/odata/(.*)",
"target": "/odata/$1",
"destination": "srv-api"
},
{
"source": "^/appconfig/",
"localDir": ".",
"source": "^/app/(.*)",
"target": "/$1",
"localDir": "./books",
"cacheControl": "no-cache, no-store, must-revalidate"
},
{
"source": "^/(.*)$",
"target": "$1",
"destination": "srv-api",
"csrfProtection": true
}
]
}
using from './books/annotations';
\ No newline at end of file
......@@ -4,6 +4,14 @@ version: 1.0.0-SNAPSHOT
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm ci
- npx cds build --production
- mkdir -p resources
modules:
- name: bookstore-srv
type: java
......@@ -44,13 +52,24 @@ modules:
requires:
- name: bookstore-db
- name: books
type: html5
path: app/books
build-parameters:
builder: custom
commands:
- npm run build
supported-platforms:
[]
build-result: .
- name: bookstore
type: approuter.nodejs
path: app\router
parameters:
keep-existing-routes: true
disk-quota: 256M
memory: 256M
disk-quota: 512M
memory: 512M
requires:
- name: srv-api
group: destinations
......@@ -59,6 +78,12 @@ modules:
url: ~{srv-url}
forwardAuthToken: true
- name: bookstore-auth
build-parameters:
requires:
- name: books
artifacts:
- './*'
target-path: books
provides:
- name: app-api
properties:
......
......@@ -13,7 +13,7 @@
},
"devDependencies": {
"@sap/cds-dk": "^8",
"@sap/ux-specification": "^1.124.5"
"@sap/ux-specification": "^1.124.7"
}
},
"node_modules/@babel/runtime": {
......
......@@ -9,6 +9,9 @@
},
"devDependencies": {
"@sap/cds-dk": "^8",
"@sap/ux-specification": "^1.124.5"
}
"@sap/ux-specification": "^1.124.7"
},
"sapux": [
"app/books"
]
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>customer</groupId>
<artifactId>bookstore-parent</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>bookstore parent</name>
<properties>
<!-- OUR VERSION -->
<revision>1.0.0-SNAPSHOT</revision>
<!-- DEPENDENCIES VERSION -->
<revision>1.0.0-SNAPSHOT</revision>
<jdk.version>21</jdk.version>
<cds.services.version>3.4.0</cds.services.version>
<spring.boot.version>3.3.5</spring.boot.version>
<cds.install-cdsdk.version>8.4.0-2024101010155372-SNAPSHOT</cds.install-cdsdk.version>
<cds.install-node.downloadUrl>https://nodejs.org/dist/</cds.install-node.downloadUrl>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>srv</module>
</modules>
<dependencyManagement>
<dependencies>
<!-- CDS SERVICES -->
<dependency>
<groupId>com.sap.cds</groupId>
<artifactId>cds-services-bom</artifactId>
......@@ -39,8 +31,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SPRING BOOT -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
......@@ -50,10 +40,13 @@
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- JAVA VERSION -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
......@@ -62,24 +55,19 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- MAKE SPRING BOOT PLUGIN RUNNABLE FROM ROOT -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<skip>true</skip>
<workingDirectory>..</workingDirectory>
</configuration>
</plugin>
<!-- SUREFIRE VERSION -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<!-- POM FLATTENING FOR CI FRIENDLY VERSIONS -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
......@@ -105,8 +93,6 @@
</execution>
</executions>
</plugin>
<!-- PROJECT STRUCTURE CHECKS -->
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
......@@ -124,7 +110,7 @@
<requireJavaVersion>
<version>${jdk.version}</version>
</requireJavaVersion>
<reactorModuleConvergence />
<reactorModuleConvergence/>
</rules>
<fail>true</fail>
</configuration>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment