Compare commits
9 Commits
Reuse-Migr
...
test-exten
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5c45d0326 | ||
|
|
390bd82502 | ||
|
|
5429617e0b | ||
|
|
211c7e43ae | ||
|
|
08ec0c7d0d | ||
|
|
0b8e7cece9 | ||
|
|
c33613fa57 | ||
|
|
c841765791 | ||
|
|
aeee07cbcd |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,3 +17,4 @@ reviews/msg-box
|
|||||||
reviews/db/test.db
|
reviews/db/test.db
|
||||||
|
|
||||||
*.openapi3.json
|
*.openapi3.json
|
||||||
|
sqlite.db
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using { Currency, managed, sap } from '@sap/cds/common';
|
using { Currency, managed, sap, extensible } from '@sap/cds/common';
|
||||||
namespace sap.capire.bookshop;
|
namespace sap.capire.bookshop;
|
||||||
|
|
||||||
entity Books : managed {
|
entity Books : managed, extensible {
|
||||||
key ID : Integer;
|
key ID : Integer;
|
||||||
title : localized String(111);
|
title : localized String(111);
|
||||||
descr : localized String(1111);
|
descr : localized String(1111);
|
||||||
@@ -13,7 +13,7 @@ entity Books : managed {
|
|||||||
image : LargeBinary @Core.MediaType : 'image/png';
|
image : LargeBinary @Core.MediaType : 'image/png';
|
||||||
}
|
}
|
||||||
|
|
||||||
entity Authors : managed {
|
entity Authors : managed, extensible {
|
||||||
key ID : Integer;
|
key ID : Integer;
|
||||||
name : String(111);
|
name : String(111);
|
||||||
dateOfBirth : Date;
|
dateOfBirth : Date;
|
||||||
|
|||||||
@@ -1,55 +1,81 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Bookshop</title>
|
||||||
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<script>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
window["sap-ushell-config"] = {
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
defaultRenderer: "fiori2",
|
||||||
<title>Bookshop</title>
|
applications: {
|
||||||
|
"browse-books": {
|
||||||
|
title: "Browse Books",
|
||||||
|
description: "w/ SAP Fiori Elements",
|
||||||
|
additionalInformation: "SAPUI5.Component=bookshop",
|
||||||
|
applicationType: "URL",
|
||||||
|
url: "/browse/webapp",
|
||||||
|
navigationMode: "embedded",
|
||||||
|
},
|
||||||
|
"manage-books": {
|
||||||
|
title: "Manage Books",
|
||||||
|
description: "w/ SAP Fiori Elements",
|
||||||
|
additionalInformation: "SAPUI5.Component=admin",
|
||||||
|
applicationType: "URL",
|
||||||
|
url: "/admin/webapp",
|
||||||
|
navigationMode: "embedded",
|
||||||
|
},
|
||||||
|
"manage-orders": {
|
||||||
|
title: "Manage Orders",
|
||||||
|
description: "w/ SAP Fiori Elements",
|
||||||
|
additionalInformation: "SAPUI5.Component=orders",
|
||||||
|
applicationType: "URL",
|
||||||
|
url: "/orders/webapp",
|
||||||
|
navigationMode: "embedded",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bootstrapPlugins: {
|
||||||
|
RuntimeAuthoringPlugin: {
|
||||||
|
component: "sap.ushell.plugins.rta",
|
||||||
|
config: {
|
||||||
|
validateAppVersion: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
PersonalizePlugin: {
|
||||||
|
component: "sap.ushell.plugins.rta-personalize",
|
||||||
|
config: {
|
||||||
|
validateAppVersion: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script
|
||||||
window["sap-ushell-config"] = {
|
id="sap-ushell-bootstrap"
|
||||||
defaultRenderer: "fiori2",
|
src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"
|
||||||
applications: {
|
></script>
|
||||||
"browse-books": {
|
<script
|
||||||
title: "Browse Books",
|
id="sap-ui-bootstrap"
|
||||||
description: "w/ SAP Fiori Elements",
|
src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
|
||||||
additionalInformation: "SAPUI5.Component=bookshop",
|
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||||
applicationType : "URL",
|
data-sap-ui-compatVersion="edge"
|
||||||
url: "/browse/webapp",
|
data-sap-ui-theme="sap_fiori_3"
|
||||||
navigationMode: "embedded"
|
data-sap-ui-frameOptions="allow"
|
||||||
},
|
data-sap-ui-bindingSyntax="complex"
|
||||||
"manage-books": {
|
></script>
|
||||||
title: "Manage Books",
|
<script>
|
||||||
description: "w/ SAP Fiori Elements",
|
sap.ui
|
||||||
additionalInformation: "SAPUI5.Component=admin",
|
.getCore()
|
||||||
applicationType : "URL",
|
.attachInit(() =>
|
||||||
url: "/admin/webapp",
|
sap.ushell.Container.createRenderer().placeAt("content")
|
||||||
navigationMode: "embedded"
|
);
|
||||||
},
|
sap.ui
|
||||||
"manage-orders": {
|
.getCore()
|
||||||
title: "Manage Orders",
|
.getConfiguration()
|
||||||
description: "w/ SAP Fiori Elements",
|
.setFlexibilityServices([{ connector: "SessionStorageConnector" }]);
|
||||||
additionalInformation: "SAPUI5.Component=orders",
|
</script>
|
||||||
applicationType : "URL",
|
</head>
|
||||||
url: "/orders/webapp",
|
<body class="sapUiBody" id="content"></body>
|
||||||
navigationMode: "embedded"
|
</html>
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
|
||||||
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
|
||||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
|
||||||
data-sap-ui-compatVersion="edge"
|
|
||||||
data-sap-ui-theme="sap_fiori_3"
|
|
||||||
data-sap-ui-frameOptions="allow"
|
|
||||||
></script>
|
|
||||||
<script>
|
|
||||||
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="sapUiBody" id="content"></body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sap.ui5": {
|
"sap.ui5": {
|
||||||
|
"flexEnabled": true,
|
||||||
|
"config": {
|
||||||
|
"experimentalCAPScenario": true
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"libs": {
|
"libs": {
|
||||||
"sap.fe.templates": {}
|
"sap.fe.templates": {}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sap.ui5": {
|
"sap.ui5": {
|
||||||
|
"flexEnabled": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"libs": {
|
"libs": {
|
||||||
"sap.fe.templates": {}
|
"sap.fe.templates": {}
|
||||||
|
|||||||
@@ -30,13 +30,13 @@
|
|||||||
"kind": "odata",
|
"kind": "odata",
|
||||||
"model": "@capire/orders"
|
"model": "@capire/orders"
|
||||||
},
|
},
|
||||||
|
"extensibility": {
|
||||||
|
"kind": "uiflex"
|
||||||
|
},
|
||||||
"db": {
|
"db": {
|
||||||
"kind": "sql",
|
"kind": "sqlite",
|
||||||
"[development]": {
|
"credentials": {
|
||||||
"model": "db/sqlite"
|
"database": "sqlite.db"
|
||||||
},
|
|
||||||
"[production]": {
|
|
||||||
"model": "db/hana"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"messaging": {
|
"messaging": {
|
||||||
@@ -46,4 +46,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
14
fiori/test.http
Normal file
14
fiori/test.http
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Add integer extension field to Books
|
||||||
|
POST http://localhost:4004/extensibility/addExtension
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"extensions": [
|
||||||
|
"{\"extend\":\"AdminService.Books\",\"elements\":{\"neuesFeld2\":{\"type\":\"cds.String\", \"default\":\"hallo\"}}}"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
# { "extend": "AdminService.Books", "elements":{
|
||||||
|
# "abc":{"type":"cds.Integer"}
|
||||||
|
# }},
|
||||||
@@ -19,19 +19,38 @@
|
|||||||
url: "/orders/webapp",
|
url: "/orders/webapp",
|
||||||
navigationMode: "embedded"
|
navigationMode: "embedded"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
bootstrapPlugins: {
|
||||||
|
RuntimeAuthoringPlugin: {
|
||||||
|
component: "sap.ushell.plugins.rta",
|
||||||
|
config: {
|
||||||
|
validateAppVersion: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
PersonalizePlugin: {
|
||||||
|
component: "sap.ushell.plugins.rta-personalize",
|
||||||
|
config: {
|
||||||
|
validateAppVersion: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
<script id="sap-ushell-bootstrap" src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||||
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
<script id="sap-ui-bootstrap" src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
|
||||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||||
data-sap-ui-compatVersion="edge"
|
data-sap-ui-compatVersion="edge"
|
||||||
data-sap-ui-theme="sap_fiori_3"
|
data-sap-ui-theme="sap_fiori_3"
|
||||||
data-sap-ui-frameOptions="allow"
|
data-sap-ui-frameOptions="allow"
|
||||||
></script>
|
data-sap-ui-bindingSyntax="complex"
|
||||||
|
></script>
|
||||||
<script>
|
<script>
|
||||||
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
|
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"));
|
||||||
|
sap.ui
|
||||||
|
.getCore()
|
||||||
|
.getConfiguration()
|
||||||
|
.setFlexibilityServices([{ connector: "SessionStorageConnector" }]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sap.ui5": {
|
"sap.ui5": {
|
||||||
|
"flexEnabled": true,
|
||||||
|
"config": {
|
||||||
|
"experimentalCAPScenario": true
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"libs": {
|
"libs": {
|
||||||
"sap.fe.templates": {}
|
"sap.fe.templates": {}
|
||||||
|
|||||||
3
package-lock.json
generated
3
package-lock.json
generated
@@ -1,3 +1,6 @@
|
|||||||
|
// 20211103133211
|
||||||
|
// https://raw.githubusercontent.com/SAP-samples/cloud-cap-samples/main/package-lock.json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "@capire/samples",
|
"name": "@capire/samples",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
"@capire/media": "./media",
|
"@capire/media": "./media",
|
||||||
"@capire/orders": "./orders",
|
"@capire/orders": "./orders",
|
||||||
"@capire/reviews": "./reviews",
|
"@capire/reviews": "./reviews",
|
||||||
"@sap/cds": "^5.5.3"
|
"@sap/cds": "git+https://github.tools.sap/cap/cds.git",
|
||||||
|
"@sap/cds-dk": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user