From be4a00a28b7334137a1373cfa6275f95775bb866 Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Fri, 4 Oct 2024 23:37:25 +0200 Subject: [PATCH] Revert "Rename Analytics -> ALP (#1223)" (#1230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 46d2f3ac3e3492c5e4cb7f574efcc49ce73e7588. @stewsk I had to revert that as that broke tests based on sflight → let's revisit on Monday --- .github/dependabot.yml | 2 +- .github/workflows/maven.yml | 2 +- .github/workflows/node.js.yml | 2 +- README.md | 2 +- _i18n/i18n.properties | 4 +--- _i18n/i18n_de.properties | 4 +--- _i18n/i18n_en.properties | 4 +--- _i18n/i18n_fr.properties | 6 ++---- app/labels.cds | 12 ------------ app/services.cds | 2 +- app/{travel_alp => travel_analytics}/annotations.cds | 4 ++-- app/{travel_alp => travel_analytics}/karma.conf.js | 0 .../package-lock.json | 4 ++-- app/{travel_alp => travel_analytics}/package.json | 2 +- app/{travel_alp => travel_analytics}/ui5.yaml | 8 ++++---- .../webapp/Component.js | 2 +- .../webapp/i18n/i18n.properties | 0 .../webapp/i18n/i18n_de.properties | 0 .../webapp/i18n/i18n_en.properties | 0 .../webapp/i18n/i18n_fr.properties | 0 .../webapp/index.html | 6 +++--- .../webapp/manifest.json | 8 ++++---- .../webapp/test/flpSandbox.html | 8 ++++---- .../webapp/test/integration/Opa.qunit.html | 2 +- .../webapp/test/integration/Opa.qunit.js | 8 ++++---- .../webapp/test/integration/OpaJourney.js | 2 +- .../webapp/test/integration/pages/BookingsList.js | 2 +- .../test/integration/pages/BookingsObjectPage.js | 2 +- .../webapp/test/testsuite.qunit.html | 0 .../webapp/test/testsuite.qunit.js | 0 app/{travel_alp => travel_analytics}/xs-app.json | 4 ++-- .../xs-security.json | 0 mta-java.yaml | 12 ++++++------ mta.yaml | 10 +++++----- package.json | 4 ++-- srv/{alp-service.cds => analytics-service.cds} | 5 +++-- .../java/com/sap/cap/sflight/ui/RedirectFilter.java | 2 +- 37 files changed, 58 insertions(+), 77 deletions(-) rename app/{travel_alp => travel_analytics}/annotations.cds (98%) rename app/{travel_alp => travel_analytics}/karma.conf.js (100%) rename app/{travel_alp => travel_analytics}/package-lock.json (99%) rename app/{travel_alp => travel_analytics}/package.json (96%) rename app/{travel_alp => travel_analytics}/ui5.yaml (82%) rename app/{travel_alp => travel_analytics}/webapp/Component.js (65%) rename app/{travel_alp => travel_analytics}/webapp/i18n/i18n.properties (100%) rename app/{travel_alp => travel_analytics}/webapp/i18n/i18n_de.properties (100%) rename app/{travel_alp => travel_analytics}/webapp/i18n/i18n_en.properties (100%) rename app/{travel_alp => travel_analytics}/webapp/i18n/i18n_fr.properties (100%) rename app/{travel_alp => travel_analytics}/webapp/index.html (85%) rename app/{travel_alp => travel_analytics}/webapp/manifest.json (97%) rename app/{travel_alp => travel_analytics}/webapp/test/flpSandbox.html (92%) rename app/{travel_alp => travel_analytics}/webapp/test/integration/Opa.qunit.html (95%) rename app/{travel_alp => travel_analytics}/webapp/test/integration/Opa.qunit.js (61%) rename app/{travel_alp => travel_analytics}/webapp/test/integration/OpaJourney.js (90%) rename app/{travel_alp => travel_analytics}/webapp/test/integration/pages/BookingsList.js (87%) rename app/{travel_alp => travel_analytics}/webapp/test/integration/pages/BookingsObjectPage.js (87%) rename app/{travel_alp => travel_analytics}/webapp/test/testsuite.qunit.html (100%) rename app/{travel_alp => travel_analytics}/webapp/test/testsuite.qunit.js (100%) rename app/{travel_alp => travel_analytics}/xs-app.json (82%) rename app/{travel_alp => travel_analytics}/xs-security.json (100%) rename srv/{alp-service.cds => analytics-service.cds} (93%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ecda5d2b..650fa673 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,7 +15,7 @@ updates: interval: weekly - package-ecosystem: npm - directory: /app/travel_alp + directory: /app/travel_analytics versioning-strategy: increase-if-necessary schedule: interval: weekly diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 01d1e689..26bd4c12 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -37,7 +37,7 @@ jobs: npm run test:java -- --ci - name: Run integration tests - Analyze Bookings - working-directory: ./app/travel_alp + working-directory: ./app/travel_analytics run: | npm ci npm run test:java -- --ci diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 95823af0..7da202b4 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,7 @@ jobs: npm run test:node -- --ci - name: Run integration tests - Analyze Bookings - working-directory: ./app/travel_alp + working-directory: ./app/travel_analytics run: | npm ci npm run test:node -- --ci diff --git a/README.md b/README.md index 4d82334e..a8168630 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ mvn spring-boot:run Open these links in your browser: * http://localhost:4004/travel_processor/webapp/index.html for processing the travel data -* http://localhost:4004/travel_alp/webapp/index.html for the [Analytical List Page](https://ui5.sap.com/#/topic/3d33684b08ca4490b26a844b6ce19b83) (ALP) +* http://localhost:4004/travel_analytics/webapp/index.html for the [Analytical List Page](https://ui5.sap.com/#/topic/3d33684b08ca4490b26a844b6ce19b83) (ALP) Log in with user `amy` and empty password. diff --git a/_i18n/i18n.properties b/_i18n/i18n.properties index eb910ad1..69eb85b6 100644 --- a/_i18n/i18n.properties +++ b/_i18n/i18n.properties @@ -39,10 +39,8 @@ Name=Name AirlineNumber=Airline Number Status=Status DepartureAirport=Departure Airport -DestinationAirport=Destination Airport +ArrivalAirport=Arrival Airport Distance=Distance -Airport=Airport -AirportID=Airport BookingSupplement=Booking Supplement BookingSupplements=Booking Supplements diff --git a/_i18n/i18n_de.properties b/_i18n/i18n_de.properties index 8d2dee03..0f93f6ea 100644 --- a/_i18n/i18n_de.properties +++ b/_i18n/i18n_de.properties @@ -39,10 +39,8 @@ Name=Name AirlineNumber=Fluggesellschaftsnummer Status=Status DepartureAirport=Abflughafen -DestinationAirport=Zielflughafen +ArrivalAirport=Zielflughafen Distance=Distanz -Airport=Flughafen -AirportID=Flughafen BookingSupplement=Buchungszusatz BookingSupplements=Buchungszusätze diff --git a/_i18n/i18n_en.properties b/_i18n/i18n_en.properties index 20d8ffba..05120651 100644 --- a/_i18n/i18n_en.properties +++ b/_i18n/i18n_en.properties @@ -39,10 +39,8 @@ Name=Name AirlineNumber=Airline Number Status=Status DepartureAirport=Departure Airport -DestinationAirport=Destination Airport +ArrivalAirport=Arrival Airport Distance=Distance -Airport=Airport -AirportID=Airport BookingSupplement=Booking Supplement BookingSupplements=Booking Supplements diff --git a/_i18n/i18n_fr.properties b/_i18n/i18n_fr.properties index 11ccb581..0d422eec 100644 --- a/_i18n/i18n_fr.properties +++ b/_i18n/i18n_fr.properties @@ -39,10 +39,8 @@ Name=Nom AirlineNumber=Numéro de compagnie aérienne Status=Statut DepartureAirport=Aéroport de départ -DestinationAirport=Aéroport de destination +ArrivalAirport=Aéroport de destination Distance=Distance -Airport=Aéroport -AirportID=Aéroport BookingSupplement=Supplément de réservation BookingSupplements=Réservation de suppléments @@ -54,7 +52,7 @@ SupplementType=Type de supplément Passenger=Passager LastName=Last Name -PlaneType=Type D'avion +PlaneType=Type d'avion MaximumSeats=Nombre maximal de places OccupiedSeats=Places occup. diff --git a/app/labels.cds b/app/labels.cds index 2eb1ab96..887e94d2 100644 --- a/app/labels.cds +++ b/app/labels.cds @@ -80,11 +80,6 @@ annotate schema.Airline with @title: '{i18n>Airline}' { CurrencyCode @title: '{i18n>CurrencyCode}'; } -annotate schema.Airport with @title: '{i18n>Airport}' { - AirportID @title: '{i18n>AirportID}' @Common.Text: Name; - Name @title: '{i18n>Name}'; -} - annotate schema.Flight with @title: '{i18n>Flight}' { AirlineID @title: '{i18n>AirlineID}'; FlightDate @title: '{i18n>FlightDate}'; @@ -96,13 +91,6 @@ annotate schema.Flight with @title: '{i18n>Flight}' { OccupiedSeats @title: '{i18n>OccupiedSeats}'; } -annotate schema.FlightConnection with { - @Common.Label: '{i18n>DepartureAirport}' - DepartureAirport; - @Common.Label: '{i18n>DestinationAirport}' - DestinationAirport; -} - annotate schema.Supplement with @title: '{i18n>Supplement}' { SupplementID @title: '{i18n>SupplementID}' @Common.Text: Description; Price @title: '{i18n>Price}' @Measures.ISOCurrency: CurrencyCode_code; diff --git a/app/services.cds b/app/services.cds index 7e7d6d57..1ac75d69 100644 --- a/app/services.cds +++ b/app/services.cds @@ -2,4 +2,4 @@ using from './travel_processor/capabilities'; using from './travel_processor/field-control'; using from './travel_processor/layouts'; -using from './travel_alp/annotations'; +using from './travel_analytics/annotations'; diff --git a/app/travel_alp/annotations.cds b/app/travel_analytics/annotations.cds similarity index 98% rename from app/travel_alp/annotations.cds rename to app/travel_analytics/annotations.cds index 36bf89c1..c98ad3c9 100644 --- a/app/travel_alp/annotations.cds +++ b/app/travel_analytics/annotations.cds @@ -1,4 +1,4 @@ -using ALPService as service from '../../srv/alp-service'; +using AnalyticsService as service from '../../srv/analytics-service'; annotate service.Bookings with @( Aggregation.CustomAggregate #FlightPrice : 'Edm.Decimal', @@ -385,7 +385,7 @@ annotate service.Bookings with @UI : { // { Value : to_Flight.to_Connection.DepartureAirport.AirportID, // Label: '{i18n>DepartureAirport}' }, // { Value : to_Flight.to_Connection.DestinationAirport.AirportID, - // Label: '{i18n>DestinationAirport}' }, + // Label: '{i18n>ArrivalAirport}' }, // { Value : to_Flight.to_Connection.Distance, }, // Workaround: diff --git a/app/travel_alp/karma.conf.js b/app/travel_analytics/karma.conf.js similarity index 100% rename from app/travel_alp/karma.conf.js rename to app/travel_analytics/karma.conf.js diff --git a/app/travel_alp/package-lock.json b/app/travel_analytics/package-lock.json similarity index 99% rename from app/travel_alp/package-lock.json rename to app/travel_analytics/package-lock.json index bbf32630..c99966be 100644 --- a/app/travel_alp/package-lock.json +++ b/app/travel_analytics/package-lock.json @@ -1,11 +1,11 @@ { - "name": "travel-alp", + "name": "travel-analytics", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "travel-alp", + "name": "travel-analytics", "version": "1.0.0", "devDependencies": { "@ui5/cli": "^4.0.0", diff --git a/app/travel_alp/package.json b/app/travel_analytics/package.json similarity index 96% rename from app/travel_alp/package.json rename to app/travel_analytics/package.json index cdead207..ba82025d 100644 --- a/app/travel_alp/package.json +++ b/app/travel_analytics/package.json @@ -1,5 +1,5 @@ { - "name": "travel-alp", + "name": "travel-analytics", "version": "1.0.0", "private": true, "description": "SFlight ALP", diff --git a/app/travel_alp/ui5.yaml b/app/travel_analytics/ui5.yaml similarity index 82% rename from app/travel_alp/ui5.yaml rename to app/travel_analytics/ui5.yaml index 8fe417d2..854a2e57 100644 --- a/app/travel_alp/ui5.yaml +++ b/app/travel_analytics/ui5.yaml @@ -1,7 +1,7 @@ # yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json specVersion: "3.0" metadata: - name: sap.fe.cap.travel_alp + name: sap.fe.cap.travel_analytics type: application resources: @@ -17,16 +17,16 @@ builder: - name: ui5-task-zipper afterTask: generateCachebusterInfo configuration: - archiveName: travel-alp + archiveName: travel-analytics additionalFiles: - xs-app.json server: customMiddleware: - name: ui5-middleware-simpleproxy - mountPath: /alp + mountPath: /analytics afterMiddleware: compression configuration: - baseUri: http://localhost:4004/alp + baseUri: http://localhost:4004/analytics username: admin # dummy credentials for local testing password: admin # dummy credentials for local testing diff --git a/app/travel_alp/webapp/Component.js b/app/travel_analytics/webapp/Component.js similarity index 65% rename from app/travel_alp/webapp/Component.js rename to app/travel_analytics/webapp/Component.js index 08decfc6..50db4d4e 100644 --- a/app/travel_alp/webapp/Component.js +++ b/app/travel_analytics/webapp/Component.js @@ -1,6 +1,6 @@ sap.ui.define(["sap/fe/core/AppComponent"], function (Component) { "use strict"; - return Component.extend("sap.fe.cap.travel_alp.Component", { + return Component.extend("sap.fe.cap.travel_analytics.Component", { metadata: { manifest: "json" }, }); }); diff --git a/app/travel_alp/webapp/i18n/i18n.properties b/app/travel_analytics/webapp/i18n/i18n.properties similarity index 100% rename from app/travel_alp/webapp/i18n/i18n.properties rename to app/travel_analytics/webapp/i18n/i18n.properties diff --git a/app/travel_alp/webapp/i18n/i18n_de.properties b/app/travel_analytics/webapp/i18n/i18n_de.properties similarity index 100% rename from app/travel_alp/webapp/i18n/i18n_de.properties rename to app/travel_analytics/webapp/i18n/i18n_de.properties diff --git a/app/travel_alp/webapp/i18n/i18n_en.properties b/app/travel_analytics/webapp/i18n/i18n_en.properties similarity index 100% rename from app/travel_alp/webapp/i18n/i18n_en.properties rename to app/travel_analytics/webapp/i18n/i18n_en.properties diff --git a/app/travel_alp/webapp/i18n/i18n_fr.properties b/app/travel_analytics/webapp/i18n/i18n_fr.properties similarity index 100% rename from app/travel_alp/webapp/i18n/i18n_fr.properties rename to app/travel_analytics/webapp/i18n/i18n_fr.properties diff --git a/app/travel_alp/webapp/index.html b/app/travel_analytics/webapp/index.html similarity index 85% rename from app/travel_alp/webapp/index.html rename to app/travel_analytics/webapp/index.html index e4cbc6e7..75f55b8d 100644 --- a/app/travel_alp/webapp/index.html +++ b/app/travel_analytics/webapp/index.html @@ -19,7 +19,7 @@ src="https://ui5.sap.com/1.128.0/resources/sap-ui-core.js" data-sap-ui-theme="sap_horizon" data-sap-ui-oninit="module:sap/ui/core/ComponentSupport" - data-sap-ui-resourceroots='{ "sap.fe.cap.travel_alp": "./" }' + data-sap-ui-resourceroots='{ "sap.fe.cap.travel_analytics": "./" }' data-sap-ui-compatVersion="edge" data-sap-ui-async="true" data-sap-ui-preload="async" @@ -31,9 +31,9 @@
diff --git a/app/travel_alp/webapp/manifest.json b/app/travel_analytics/webapp/manifest.json similarity index 97% rename from app/travel_alp/webapp/manifest.json rename to app/travel_analytics/webapp/manifest.json index 567e8fc8..91a893c1 100644 --- a/app/travel_alp/webapp/manifest.json +++ b/app/travel_analytics/webapp/manifest.json @@ -1,12 +1,12 @@ { "_version": "1.42.0", "sap.app": { - "id": "sap.fe.cap.travel_alp", + "id": "sap.fe.cap.travel_analytics", "type": "application", "title": "{{title}}", "description": "{{description}}", "i18n": { - "bundleName": "sap.fe.cap.travel_alp.i18n.i18n", + "bundleName": "sap.fe.cap.travel_analytics.i18n.i18n", "supportedLocales": [ "en", "de", @@ -19,7 +19,7 @@ }, "dataSources": { "mainService": { - "uri": "alp/", + "uri": "analytics/", "type": "OData", "settings": { "odataVersion": "4.0" @@ -83,7 +83,7 @@ "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { - "bundleName": "sap.fe.cap.travel_alp.i18n.i18n", + "bundleName": "sap.fe.cap.travel_analytics.i18n.i18n", "supportedLocales": [ "en", "de", diff --git a/app/travel_alp/webapp/test/flpSandbox.html b/app/travel_analytics/webapp/test/flpSandbox.html similarity index 92% rename from app/travel_alp/webapp/test/flpSandbox.html rename to app/travel_analytics/webapp/test/flpSandbox.html index e572fbb1..a0bc62ab 100644 --- a/app/travel_alp/webapp/test/flpSandbox.html +++ b/app/travel_analytics/webapp/test/flpSandbox.html @@ -43,11 +43,11 @@ }, }, applications: { - "sapfecapsflightsflightalp-tile": { - title: "SFlight ALP", + "sapfecapsflightsflightanalytics-tile": { + title: "SFlight Analytics", description: "SFlight ALP", additionalInformation: - "SAPUI5.Component=sap.fe.cap.travel_alp", + "SAPUI5.Component=sap.fe.cap.travel_analytics", applicationType: "URL", url: "../", }, @@ -69,7 +69,7 @@ data-sap-ui-theme="sap_horizon" data-sap-ui-compatVersion="edge" data-sap-ui-language="en" - data-sap-ui-resourceroots='{"sap.fe.cap.travel_alp": "../"}' + data-sap-ui-resourceroots='{"sap.fe.cap.travel_analytics": "../"}' data-sap-ui-frameOptions="allow" > // NON-SECURE setting for testing environment diff --git a/app/travel_alp/webapp/test/integration/Opa.qunit.html b/app/travel_analytics/webapp/test/integration/Opa.qunit.html similarity index 95% rename from app/travel_alp/webapp/test/integration/Opa.qunit.html rename to app/travel_analytics/webapp/test/integration/Opa.qunit.html index aaf3e2f1..85ff3f93 100644 --- a/app/travel_alp/webapp/test/integration/Opa.qunit.html +++ b/app/travel_analytics/webapp/test/integration/Opa.qunit.html @@ -12,7 +12,7 @@ data-sap-ui-animation="false" data-sap-ui-compatVersion="edge" data-sap-ui-resourceroots='{ - "sap.fe.cap.travel_alp": "../../" + "sap.fe.cap.travel_analytics": "../../" }' data-sap-ui-theme="sap_horizon" data-sap-ui-libs="sap.m, sap.fe.core" diff --git a/app/travel_alp/webapp/test/integration/Opa.qunit.js b/app/travel_analytics/webapp/test/integration/Opa.qunit.js similarity index 61% rename from app/travel_alp/webapp/test/integration/Opa.qunit.js rename to app/travel_analytics/webapp/test/integration/Opa.qunit.js index 493e7772..c0cbafc1 100644 --- a/app/travel_alp/webapp/test/integration/Opa.qunit.js +++ b/app/travel_analytics/webapp/test/integration/Opa.qunit.js @@ -1,9 +1,9 @@ sap.ui.require( [ "sap/fe/test/JourneyRunner", - "sap/fe/cap/travel_alp/test/integration/OpaJourney", - "sap/fe/cap/travel_alp/test/integration/pages/BookingsList", - "sap/fe/cap/travel_alp/test/integration/pages/BookingsObjectPage", + "sap/fe/cap/travel_analytics/test/integration/OpaJourney", + "sap/fe/cap/travel_analytics/test/integration/pages/BookingsList", + "sap/fe/cap/travel_analytics/test/integration/pages/BookingsObjectPage", ], function (JourneyRunner, opaJourney, BookingsList, BookingsObjectPage) { "use strict"; @@ -11,7 +11,7 @@ sap.ui.require( const runner = new JourneyRunner({ // start index.html in web folder launchUrl: - sap.ui.require.toUrl("sap/fe/cap/travel_alp") + "/index.html", + sap.ui.require.toUrl("sap/fe/cap/travel_analytics") + "/index.html", }); runner.run( diff --git a/app/travel_alp/webapp/test/integration/OpaJourney.js b/app/travel_analytics/webapp/test/integration/OpaJourney.js similarity index 90% rename from app/travel_alp/webapp/test/integration/OpaJourney.js rename to app/travel_analytics/webapp/test/integration/OpaJourney.js index 1a465878..b0ec08df 100644 --- a/app/travel_alp/webapp/test/integration/OpaJourney.js +++ b/app/travel_analytics/webapp/test/integration/OpaJourney.js @@ -4,7 +4,7 @@ sap.ui.define(["sap/ui/test/opaQunit"], function (opaTest) { return { run: function () { - QUnit.module("Travel ALP Tests"); + QUnit.module("Travel Analytics Tests"); opaTest("Start application", function (Given, When, Then) { Given.iStartMyApp(); diff --git a/app/travel_alp/webapp/test/integration/pages/BookingsList.js b/app/travel_analytics/webapp/test/integration/pages/BookingsList.js similarity index 87% rename from app/travel_alp/webapp/test/integration/pages/BookingsList.js rename to app/travel_analytics/webapp/test/integration/pages/BookingsList.js index ccf90907..8f641481 100644 --- a/app/travel_alp/webapp/test/integration/pages/BookingsList.js +++ b/app/travel_analytics/webapp/test/integration/pages/BookingsList.js @@ -8,7 +8,7 @@ sap.ui.define(["sap/fe/test/ListReport"], function (ListReport) { return new ListReport( { - appId: "sap.fe.cap.travel_alp", + appId: "sap.fe.cap.travel_analytics", componentId: "BookingsList", entitySet: "Bookings", }, diff --git a/app/travel_alp/webapp/test/integration/pages/BookingsObjectPage.js b/app/travel_analytics/webapp/test/integration/pages/BookingsObjectPage.js similarity index 87% rename from app/travel_alp/webapp/test/integration/pages/BookingsObjectPage.js rename to app/travel_analytics/webapp/test/integration/pages/BookingsObjectPage.js index 4d493d1d..1d5782ff 100644 --- a/app/travel_alp/webapp/test/integration/pages/BookingsObjectPage.js +++ b/app/travel_analytics/webapp/test/integration/pages/BookingsObjectPage.js @@ -8,7 +8,7 @@ sap.ui.define(["sap/fe/test/ObjectPage"], function (ObjectPage) { return new ObjectPage( { - appId: "sap.fe.cap.travel_alp", + appId: "sap.fe.cap.travel_analytics", componentId: "BookingsObjectPage", entitySet: "Bookings", }, diff --git a/app/travel_alp/webapp/test/testsuite.qunit.html b/app/travel_analytics/webapp/test/testsuite.qunit.html similarity index 100% rename from app/travel_alp/webapp/test/testsuite.qunit.html rename to app/travel_analytics/webapp/test/testsuite.qunit.html diff --git a/app/travel_alp/webapp/test/testsuite.qunit.js b/app/travel_analytics/webapp/test/testsuite.qunit.js similarity index 100% rename from app/travel_alp/webapp/test/testsuite.qunit.js rename to app/travel_analytics/webapp/test/testsuite.qunit.js diff --git a/app/travel_alp/xs-app.json b/app/travel_analytics/xs-app.json similarity index 82% rename from app/travel_alp/xs-app.json rename to app/travel_analytics/xs-app.json index 8025ca10..a3b8676a 100644 --- a/app/travel_alp/xs-app.json +++ b/app/travel_analytics/xs-app.json @@ -3,8 +3,8 @@ "authenticationMethod": "route", "routes": [ { - "source": "^/alp/(.*)$", - "target": "/alp/$1", + "source": "^/analytics/(.*)$", + "target": "/analytics/$1", "destination": "sflight-srv", "authenticationType": "xsuaa", "csrfProtection": false diff --git a/app/travel_alp/xs-security.json b/app/travel_analytics/xs-security.json similarity index 100% rename from app/travel_alp/xs-security.json rename to app/travel_analytics/xs-security.json diff --git a/mta-java.yaml b/mta-java.yaml index 44929d0a..825d7861 100644 --- a/mta-java.yaml +++ b/mta-java.yaml @@ -22,7 +22,7 @@ modules: properties: SPRING_PROFILES_ACTIVE: cloud JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']" - JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.+ }' + JBP_CONFIG_SAP_MACHINE_JRE: '{ use_offline_repository: false, version: 17.+ }' requires: - name: sflight-db - name: sflight-uaa @@ -67,9 +67,9 @@ modules: artifacts: - travel-processor.zip target-path: resources/ - - name: sflight-app-travel-alp + - name: sflight-app-travel-analytics artifacts: - - travel-alp.zip + - travel-analytics.zip target-path: resources/ # ------------- APPLICATION: TRAVEL PROCESSOR ---------------- @@ -85,11 +85,11 @@ modules: - npm run build supported-platforms: [] - # ------------- APPLICATION: TRAVEL ALP ---------------------- - - name: sflight-app-travel-alp + # ------------- APPLICATION: TRAVEL ANALYTICS ---------------- + - name: sflight-app-travel-analytics # ------------------------------------------------------------ type: html5 - path: app/travel_alp + path: app/travel_analytics build-parameters: build-result: dist builder: custom diff --git a/mta.yaml b/mta.yaml index 09b1369b..e661cd91 100644 --- a/mta.yaml +++ b/mta.yaml @@ -60,9 +60,9 @@ modules: artifacts: - travel-processor.zip target-path: resources/ - - name: sflight-app-travel-alp + - name: sflight-app-travel-analytics artifacts: - - travel-alp.zip + - travel-analytics.zip target-path: resources/ # ------------- APPLICATION: TRAVEL PROCESSOR ---------------- @@ -78,11 +78,11 @@ modules: - npm run build supported-platforms: [] - # ------------- APPLICATION: TRAVEL ALP ---------------------- - - name: sflight-app-travel-alp + # ------------- APPLICATION: TRAVEL ANALYTICS ---------------- + - name: sflight-app-travel-analytics # ------------------------------------------------------------ type: html5 - path: app/travel_alp + path: app/travel_analytics build-parameters: build-result: dist builder: custom diff --git a/package.json b/package.json index 5a4c6657..d97b887c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test": "jest", "test:mocha": "npx mocha --timeout 20000", "travel-processor": "cds watch --open travel_processor/webapp/index.html?sap-ui-xx-viewCache=false", - "travel-alp": "cds watch --open travel_alp/webapp/index.html?sap-ui-xx-viewCache=false" + "travel-analytics": "cds watch --open travel_analytics/webapp/index.html?sap-ui-xx-viewCache=false" }, "dependencies": { "@cap-js/hana": "^1", @@ -120,6 +120,6 @@ }, "sapux": [ "app/travel_processor", - "app/travel_alp" + "app/travel_analytics" ] } \ No newline at end of file diff --git a/srv/alp-service.cds b/srv/analytics-service.cds similarity index 93% rename from srv/alp-service.cds rename to srv/analytics-service.cds index 1f2f4195..4a2ab1d0 100644 --- a/srv/alp-service.cds +++ b/srv/analytics-service.cds @@ -1,6 +1,6 @@ using { sap.fe.cap.travel as my } from '../db/schema'; -service ALPService @(path:'/alp') { +service AnalyticsService @(path:'/analytics') { // @(restrict: [ // { grant: 'READ', to: 'authenticated-user'}, @@ -51,7 +51,7 @@ service ALPService @(path:'/alp') { @Common.Text: DepCity to_Flight.to_Connection.DepartureAirport.AirportID as DepAirport, to_Flight.to_Connection.DepartureAirport.City as DepCity, - @Common.Label: '{i18n>DestinationAirport}' + @Common.Label: '{i18n>ArrivalAirport}' @Common.Text: DestCity to_Flight.to_Connection.DestinationAirport.AirportID as DestAirport, to_Flight.to_Connection.DestinationAirport.City as DestCity, @@ -73,6 +73,7 @@ service ALPService @(path:'/alp') { annotate Travels:TravelID with @Common.Text: null; + annotate my.Airport:AirportID @Common.Text: City; annotate my.FlightConnection:Distance @( Common.Label: '{i18n>Distance}', Measures.Unit : DistanceUnit diff --git a/srv/src/main/java/com/sap/cap/sflight/ui/RedirectFilter.java b/srv/src/main/java/com/sap/cap/sflight/ui/RedirectFilter.java index 2209d97a..735dd750 100644 --- a/srv/src/main/java/com/sap/cap/sflight/ui/RedirectFilter.java +++ b/srv/src/main/java/com/sap/cap/sflight/ui/RedirectFilter.java @@ -28,7 +28,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha String[] uiServicePaths = { "/travel_processor/webapp/processor", - "/travel_alp/webapp/alp" + "/travel_analytics/webapp/analytics" }; String path = req.getRequestURI();