Giter Club home page Giter Club logo

sap-samples / multi-cloud-html5-apps-samples Goto Github PK

View Code? Open in Web Editor NEW
113.0 19.0 103.0 14.26 MB

Examples of HTML5 applications for multiple SAP BTP environments. The examples show how you can use standalone application routers or managed application routers to achieve different goals, and they demonstrate the capabilities of the SAP HTML5 Application Repository service for SAP BTP.

License: Apache License 2.0

HTML 66.81% JavaScript 26.06% Dockerfile 3.00% CAP CDS 4.12%
sample sample-code html5 html5-application router approuter sap-btp owner-nicoschoenteich

multi-cloud-html5-apps-samples's People

Contributors

a-thaler avatar arilulu avatar btbernard avatar ddonchev avatar gregorwolf avatar iobert avatar js1972 avatar kdass avatar nicoschoenteich avatar raphaelreply avatar robbymanis avatar saraherdmann avatar sbarzaghialteaup avatar stesap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-cloud-html5-apps-samples's Issues

501 Bad Gateway on the Northwind Service

Hi. I have used this sample (the fiori one) a few weeks ago and it was working fine. I am testing it again and have pulled the lastest master branch but it is unable to reach the OData service. the app fails with 502 Bad Gateway when it tries to read the $metadata. Any ideas?

I have created another test application using fiori-tools and connected it to the Northwind OData service. I notice that this does not work anymore either and gives certificate errors in the browser console unless I make this setting in the fiori-tools-proxy:

configuration:
        ignoreCertError: true

...in which case its starts working.

I'm wondering if something is wrong with the https://services.odata.org certificate. Are you able to run this app and fetch data ok today?

Correct warning in managed-html5-runtime-fiori-mta example makes app unavailable in Launchpad Content Manager

Hi Marius,

with the current configuration of the managed-html5-runtime-fiori-mta example I get the following warning during deployment:

[WARNING] Destinations content in module managed-fiori-destination-content is defined in a deprecated location (in a parameter of a requires element). Move the content parameter from the requires parameters to the modules parameters.

but when I correct that by moving the content section as I did in the pull request, the error is gone, but the app isn't available in Launchpad Content Manager anymore. Can you clarify this issue internaly?

Best regards
Gregor

logout functionality

Hi,

Does the logout functionality really work. To make a user fully logout, is there something extra needed ?

Thanks
Aman

Multitenant version using central portal?

Hi,

Do you have a multitenant version using the central portal?
I mean a sample to provide an app as "content provider" and how to consume the app in the subscriber subaccount.

Thanks
Sam

cf deploy fails in standalone-portal-mta

On executing cf deploy mta_archives/standalone-portal-mta_1.0.0.mtar fails with following error
Screenshot 2021-09-14 at 12 46 31 PM

Service operation failed: Controller operation failed: 404 Updating service "standaloneportalmta_portal" failed: Not Found: Error creating service "standaloneportalmta_portal" from offering "portal" and plan "standard": Service plan standard not found.

Issues with HTML5 Destination URL in Feature Set B Account

While trying to setup the "managed-html5-runtime-basic-mta" example I am not able to retrieve the URL like described in step 5.

The App is visible within the CF HTML5-LIST command but when trying to run cf html5-list -di hello-world_ui_deployer -u I get the following error:

Could not find service instance of 'destination' service 'lite' plan with name 'hello-world_ui_deployer'

The request for authorization was invalid

Dear colleagues,

I'm trying to deploy basic HTML5 app following the tutorial https://github.com/SAP-samples/multi-cloud-html5-apps-samples/tree/main/managed-html5-runtime-basic-mta

I use commands to deploy the app:

mbt build -t ./
cf deploy ./mta_archives/hello-world_1.0.0.mtar

The complete w/o error (see the full output below).

I'm trying to access the URL I get from commands

cf html5-list -di hello-world-destination-service -u --runtime cpp
or 
cf html5-list -di hello-world-destination-service -u --runtime launchpad

Those are:

https://test-tdo.cpp.cfapps.sap.hana.ondemand.com/b3b4baed-66e6-4dcc-b538-61b3e030b02b.basicservice.helloworld-1.0.0/

https://test-tdo.launchpad.cfapps.sap.hana.ondemand.com/b3b4baed-66e6-4dcc-b538-61b3e030b02b.basicservice.helloworld-1.0.0/

Both URLs show the error

No client with requested id: sb-launchpad-dt-approuter!t119
Authorization Request Error
There was an error. The request for authorization was invalid.

I added the CPP entitlement to my project.

Deployment script:

cf deploy ./mta_archives/hello-world_1.0.0.mtar
Deploying multi-target app archive ./mta_archives/hello-world_1.0.0.mtar in org test-tdo / space test-tdo as [email protected]...

Uploading 1 files...
  /home/d057039/multi-cloud-html5-apps-samples/managed-html5-runtime-basic-mta/mta_archives/hello-world_1.0.0.mtar
OK
Operation ID: 31a98740-766d-11ed-8440-eeee0a9b1cd5
Deploying in org "test-tdo" and space "test-tdo"
Detected MTA schema version: "3"
Detected deployed MTA with ID "hello-world" and version "1.0.0"
Detected new MTA version: "1.0.0"
Deployed MTA version: "1.0.0"
Processing service "hello-world_html_repo_host"...
Service key "hello-world_ui_deployer-hello-world_html_repo_host-credentials" for service "hello-world_html_repo_host" will not be deleted, as the option for deleting discontinued service keys is not specified!
Service key "hello-world-destination-content-hello-world_html_repo_host-credentials" for service "hello-world_html_repo_host" will not be deleted, as the option for deleting discontinued service keys is not specified!
Service key "hello-world_html_repo_host-key" for service "hello-world_html_repo_host" will not be updated, as the option for deleting discontinued service keys is not specified!
Processing service "hello-world_uaa"...
Setting service "hello-world_uaa" parameters from "xs-security.json"
Updating service "hello-world_uaa"...
Processing service "hello-world-destination-service"...
1 of 1 done
Service key "hello-world-destination-content-hello-world_uaa-credentials" for service "hello-world_uaa" will not be deleted, as the option for deleting discontinued service keys is not specified!
Service key "hello-world_uaa-key" for service "hello-world_uaa" will not be updated, as the option for deleting discontinued service keys is not specified!
cf s
Getting services in org test-tdo / space test-tdo as [email protected]...

name                              service           plan          bound apps   last operation     broker
           upgrade available
hello-world-destination-service   destination       lite                       update succeeded   sm-destination-service-broker-52b0057d-bd1f-469b-9dfe-87da314888bc
hello-world_html_repo_host        html5-apps-repo   app-host                   create succeeded   sm-html5-apps-repo-sb-783f875c-90ed-488a-9dcb-01d834a1e8ac

Would you please help me to understand and fix the problem?

Kind regards,
Anton
[email protected]

How can I redirect requests to /appconfig/fioriSandboxConfig.json to my HTML5 repo

Hi @IObert,

in my CAP sample project bookshop-demo I'm using the file appconfig/fioriSandboxConfig.json. When I pass the path to that file via the URL parameter "sap-ushell-sandbox-config" i.e.:

/bookshopdemoapp/fiori-latest.html?sap-ushell-sandbox-config=./appconfig/fioriSandboxConfig.json#Shell-home

everything is fine. But I want to avoid that parameter and rely on the default behaviour. There, the file is searched at "/appconfig/fioriSandboxConfig.json":

Screenshot 2020-10-20 at 08 39 48

is there a way that I can configure the xs-app.json in either the approuter or my HTML5 repository to resolve /appconfig/ to the correct folder in my HTML5 repository?

Best regards
Gregor

Destination configuration issue

Following the example, creating the destination service for managed html5 runtime fails due to the destination configuration:
config:
HTML5Runtime_enabled: true
version: 1.0.0
This config fails on creation

Destination to service module

Dear @IObert Marius!
[feature request]
Could we have an additional / extended example that shows how to define a destination in the mta.yaml to a service module - say CAPM service module - for a managed app router? (assuming the service module is part of the same MTA as the destination content for the managed app router)
Thank you in advance.
Best regards,
Laszlo Kajan

How to include a ui5-tooling fiori apps within this mta?

I am trying to copy an app built with fiori-tools in vscode (fiori elements app) -- or any custom built sapui5 app that is typically structured with a project folder containing config files and a webapp folder containing the ui5 sources for controllers and views and importantly the component and manifest.json.
Typically the ui5-tools will deploy minimized versions of this into a /dist directory.

I can copy the webapp folder inside the HTML5Module folder like this:
image

Deploying this fails with this error : "[ERROR] Upload application content failed { CODE: '1001' } validation error: manifest.json not found."

It seems that the deployer wants the manifest.json in the HTML5Module root. But doing this breaks the layout of the fiori app.

How are we supposed to proceed and use a real fiori app with this multi-cloud html5 sample project structures?
A lot of fiori apps have been built in the WebIDE for example and we went to move them to be an mta project and as a sap-managed fiori app.

It would be awesome to have some documentation on how to embed sapui5 apps that follow the "standard" project layout into these MTA projects.

Fails to 'make'

➜  html5-app-repo-router (master) ✔ make -f Makefile.mta p=cf   
[2019-10-27 13:53:26]  INFO validating the MTA project
[2019-10-27 13:53:26] ERROR could not validate the "/Users/pieter/Projects/html5-app-repo-router/paths" file: failed to read the "/Users/pieter/Projects/html5-app-repo-router/paths" file: open /Users/pieter/Projects/html5-app-repo-router/paths: no such file or directory
make: *** [pre_validate] Error 1

Has to do something with this line
https://github.com/SAP-samples/html5-app-repo-router/blob/d248fcccf50ddc1d4b729411147124e529a1834b/Makefile.mta#L28

➜  html5-app-repo-router (master) ✔ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

The redirect_uri has an invalid domain

Hi @nicoschoenteich,

just created a fresh BTP Trial Account, followed the instructions and successfully deployed this sample.
But when opening the URL from the approuter I just get an error: The redirect_uri has an invalid domain.

Approuter: https://4ec1cd90trial-dev-html5-app-router.cfapps.us10-001.hana.ondemand.com/

Error: https://4ec1cd90trial.authentication.us10.hana.ondemand.com/oauth/authorize?response_type=code&client_id=sb-html5_app_repo_router!t115636&redirect_uri=https%3A%2F%2F4ec1cd90trial-dev-html5-app-router.cfapps.us10-001.hana.ondemand.com%2Flogin%2Fcallback

grafik

Seems like the login process is working, but then the approuter can't forward to the actual frontend app.

I tried to fix this error by setting manually a redirect uri in the xs-security.json (like it is done when testing a CAP app from BAS)

  "oauth2-configuration": {
    "redirect-uris": [
      "https://*.us10-001.hana.ondemand.com"
    ]
  }

But still no success...
grafik

Can you confirm that this sample is still working? I saw in another issue you confirmed it working in March this year.
And I also remember using this sample at the beginning of 2022.

best regards
Nico

HTML5 apps used as UserTask in a Workflow

Hello,
First of all, thanks for the examples provided, they are immensely helpful.
Regarding my request, we are currently trying to deploy a Workflow on Cloud Foundry that is using Custom HTML5 apps as User Task.
Even if we succeed to deploy the HTML5 app in a repo, we now have issues with the Inbox app to retrieve the HTML5 app out of that repo and to display it.
To give a small insight of our project, it's structured as follow:

my-project
 |__ workflow
      |__ forms
      |__ workflows
      |__ scripts
      |__ ...
 |__ workflowApprouter
 |__ com.usertask
       |__ webapp
 |__ html5Deployer
 |__ FioriLaunchpad

Could this scenario be a future sample of that github repository ?
Thanks,
Best regards,
Jérémy.

managed-html5-runtime-basic-mta not showing up in BTP cockpit under HTML5 apps

Hi Nico,

I am trying to deploy the sample application managed-html5-runtime-basic-mta.

the deployment is successful
but if i go to BTP > HTML5 application.

the app doesn't show up.
it says that there is 1 configuration issue.
Issue:-

  • Destination fa11a312-f4c9-4ac7-a81d-d91d71780622 points to the html5-apps-repo instance 5e45383a-10fb-40b3-909a-ec37c4650b4f, which does not contain any HTML5 applications.
    It could be that the HTML5 applications for the html5-apps-repo instance 5e45383a-10fb-40b3-909a-ec37c4650b4f were not uploaded correctly.
    You can try to redeploy the HTML5 applications.

I have tried but i am not able to resolve the issue.

a quick help on this would be really appriciated :)

Thanks :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.