Skip to content

Commit

Permalink
pushing joule integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Davo00 committed Jun 10, 2024
1 parent 50ce799 commit bc73422
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 38 deletions.
24 changes: 12 additions & 12 deletions docs/3rd-party-licenses/backend-full.csv
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"braces@3.0.2","MIT","https://github.com/micromatch/braces"
"browser-process-hrtime@1.0.0","BSD-2-Clause","https://github.com/kumavis/browser-process-hrtime"
"browser-resolve@1.11.3","MIT","https://github.com/shtylman/node-browser-resolve"
"browserslist@4.15.0","MIT","https://github.com/browserslist/browserslist"
"browserslist@4.16.6","MIT","https://github.com/browserslist/browserslist"
"bs-logger@0.2.6","MIT","https://github.com/huafu/bs-logger"
"bser@2.1.1","Apache-2.0","https://github.com/facebook/watchman"
"buffer-from@1.1.1","MIT","https://github.com/LinusU/buffer-from"
Expand All @@ -194,7 +194,7 @@
"call-bind@1.0.0","MIT","https://github.com/ljharb/call-bind"
"callsites@3.1.0","MIT","https://github.com/sindresorhus/callsites"
"camelcase@5.3.1","MIT","https://github.com/sindresorhus/camelcase"
"caniuse-lite@1.0.30001165","CC-BY-4.0","https://github.com/ben-eb/caniuse-lite"
"caniuse-lite@1.0.30001230","CC-BY-4.0","https://github.com/browserslist/caniuse-lite"
"capture-exit@2.0.0","ISC","https://github.com/stefanpenner/capture-exit"
"caseless@0.12.0","Apache-2.0","https://github.com/mikeal/caseless"
"chalk@2.4.2","MIT","https://github.com/chalk/chalk"
Expand All @@ -220,7 +220,7 @@
"color-convert@2.0.1","MIT","https://github.com/Qix-/color-convert"
"color-name@1.1.3","MIT","https://github.com/dfcreative/color-name"
"color-name@1.1.4","MIT","https://github.com/colorjs/color-name"
"colorette@1.2.1","MIT","https://github.com/jorgebucaran/colorette"
"colorette@1.2.2","MIT","https://github.com/jorgebucaran/colorette"
"colors@1.4.0","MIT","https://github.com/Marak/colors.js"
"combined-stream@1.0.8","MIT","https://github.com/felixge/node-combined-stream"
"commander@2.20.3","MIT","https://github.com/tj/commander.js"
Expand Down Expand Up @@ -276,7 +276,7 @@
"dotenv@8.2.0","BSD-2-Clause","https://github.com/motdotla/dotenv"
"ecc-jsbn@0.1.2","MIT","https://github.com/quartzjer/ecc-jsbn"
"ee-first@1.1.1","MIT","https://github.com/jonathanong/ee-first"
"electron-to-chromium@1.3.621","ISC","https://github.com/kilian/electron-to-chromium"
"electron-to-chromium@1.3.739","ISC","https://github.com/kilian/electron-to-chromium"
"emoji-regex@7.0.3","MIT","https://github.com/mathiasbynens/emoji-regex"
"emoji-regex@8.0.0","MIT","https://github.com/mathiasbynens/emoji-regex"
"emojis-list@3.0.0","MIT","https://github.com/kikobeats/emojis-list"
Expand Down Expand Up @@ -367,7 +367,7 @@
"get-stream@5.2.0","MIT","https://github.com/sindresorhus/get-stream"
"get-value@2.0.6","MIT","https://github.com/jonschlinkert/get-value"
"getpass@0.1.7","MIT","https://github.com/arekinath/node-getpass"
"glob-parent@5.1.1","ISC","https://github.com/gulpjs/glob-parent"
"glob-parent@5.1.2","ISC","https://github.com/gulpjs/glob-parent"
"glob-to-regexp@0.4.1","BSD-2-Clause","https://github.com/fitzgen/glob-to-regexp"
"glob@7.1.6","ISC","https://github.com/isaacs/node-glob"
"globals@11.12.0","MIT","https://github.com/sindresorhus/globals"
Expand All @@ -384,7 +384,7 @@
"has-values@0.1.4","MIT","https://github.com/jonschlinkert/has-values"
"has-values@1.0.0","MIT","https://github.com/jonschlinkert/has-values"
"has@1.0.3","MIT","https://github.com/tarruda/has"
"hosted-git-info@2.8.8","ISC","https://github.com/npm/hosted-git-info"
"hosted-git-info@2.8.9","ISC","https://github.com/npm/hosted-git-info"
"html-encoding-sniffer@1.0.2","MIT","https://github.com/jsdom/html-encoding-sniffer"
"html-escaper@2.0.2","MIT","https://github.com/WebReflection/html-escaper"
"http-errors@1.7.2","MIT","https://github.com/jshttp/http-errors"
Expand Down Expand Up @@ -517,7 +517,7 @@
"lodash.memoize@4.1.2","MIT","https://github.com/lodash/lodash"
"lodash.sortby@4.7.0","MIT","https://github.com/lodash/lodash"
"lodash.toarray@4.4.0","MIT","https://github.com/lodash/lodash"
"lodash@4.17.20","MIT","https://github.com/lodash/lodash"
"lodash@4.17.21","MIT","https://github.com/lodash/lodash"
"log-symbols@4.0.0","MIT","https://github.com/sindresorhus/log-symbols"
"lolex@5.1.2","BSD-3-Clause","https://github.com/sinonjs/lolex"
"lru-cache@6.0.0","ISC","https://github.com/isaacs/node-lru-cache"
Expand Down Expand Up @@ -564,7 +564,7 @@
"node-int64@0.4.0","MIT","https://github.com/broofa/node-int64"
"node-modules-regexp@1.0.0","MIT","https://github.com/jamestalmage/node-modules-regexp"
"node-notifier@6.0.0","MIT","https://github.com/mikaelbr/node-notifier"
"node-releases@1.1.67","MIT","https://github.com/chicoxyzzy/node-releases"
"node-releases@1.1.72","MIT","https://github.com/chicoxyzzy/node-releases"
"nopt@4.0.3","ISC","https://github.com/npm/nopt"
"normalize-package-data@2.5.0","BSD-2-Clause","https://github.com/npm/normalize-package-data"
"normalize-path@2.1.1","MIT","https://github.com/jonschlinkert/normalize-path"
Expand Down Expand Up @@ -619,7 +619,7 @@
"path-is-absolute@1.0.1","MIT","https://github.com/sindresorhus/path-is-absolute"
"path-key@2.0.1","MIT","https://github.com/sindresorhus/path-key"
"path-key@3.1.1","MIT","https://github.com/sindresorhus/path-key"
"path-parse@1.0.6","MIT","https://github.com/jbgutierrez/path-parse"
"path-parse@1.0.7","MIT","https://github.com/jbgutierrez/path-parse"
"path-to-regexp@0.1.7","MIT","https://github.com/component/path-to-regexp"
"path-to-regexp@3.2.0","MIT","https://github.com/pillarjs/path-to-regexp"
"path-type@2.0.0","MIT","https://github.com/sindresorhus/path-type"
Expand Down Expand Up @@ -841,7 +841,7 @@
"webpack-sources@2.2.0","MIT","https://github.com/webpack/webpack-sources"
"webpack@5.4.0","MIT","https://github.com/webpack/webpack"
"whatwg-encoding@1.0.5","MIT","https://github.com/jsdom/whatwg-encoding"
"whatwg-fetch@3.6.2","MIT","https://github.com/github/fetch"
"whatwg-fetch@3.6.19","MIT","https://github.com/github/fetch"
"whatwg-mimetype@2.3.0","MIT","https://github.com/jsdom/whatwg-mimetype"
"whatwg-url@7.1.0","MIT","https://github.com/jsdom/whatwg-url"
"which-module@2.0.0","ISC","https://github.com/nexdrew/which-module"
Expand All @@ -854,7 +854,7 @@
"wrappy@1.0.2","ISC","https://github.com/npm/wrappy"
"write-file-atomic@3.0.3","ISC","https://github.com/npm/write-file-atomic"
"write@1.0.3","MIT","https://github.com/jonschlinkert/write"
"ws@7.4.1","MIT","https://github.com/websockets/ws"
"ws@7.5.4","MIT","https://github.com/websockets/ws"
"xml-name-validator@3.0.0","Apache-2.0","https://github.com/jsdom/xml-name-validator"
"xmlchars@2.2.0","MIT","https://github.com/lddubeau/xmlchars"
"xtend@4.0.2","MIT","https://github.com/Raynos/xtend"
Expand All @@ -867,4 +867,4 @@
"yargs@12.0.5","MIT","https://github.com/yargs/yargs"
"yargs@15.4.1","MIT","https://github.com/yargs/yargs"
"yn@3.1.1","MIT","https://github.com/sindresorhus/yn"
"yocto-queue@0.1.0","MIT","https://github.com/sindresorhus/yocto-queue"
"yocto-queue@0.1.0","MIT","https://github.com/sindresorhus/yocto-queue"
10 changes: 5 additions & 5 deletions docs/3rd-party-licenses/frontend-full.csv
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
"color-convert@2.0.1","MIT","https://github.com/Qix-/color-convert"
"color-name@1.1.3","MIT","https://github.com/dfcreative/color-name"
"color-name@1.1.4","MIT","https://github.com/colorjs/color-name"
"color-string@1.5.4","MIT","https://github.com/Qix-/color-string"
"color-string@1.6.0","MIT","https://github.com/Qix-/color-string"
"color@3.1.3","MIT","https://github.com/Qix-/color"
"colorette@1.2.1","MIT","https://github.com/jorgebucaran/colorette"
"colors@1.4.0","MIT","https://github.com/Marak/colors.js"
Expand Down Expand Up @@ -854,7 +854,7 @@
"path-is-absolute@1.0.1","MIT","https://github.com/sindresorhus/path-is-absolute"
"path-is-inside@1.0.2","(WTFPL OR MIT)","https://github.com/domenic/path-is-inside"
"path-key@2.0.1","MIT","https://github.com/sindresorhus/path-key"
"path-parse@1.0.6","MIT","https://github.com/jbgutierrez/path-parse"
"path-parse@1.0.7","MIT","https://github.com/jbgutierrez/path-parse"
"path-to-regexp@0.1.7","MIT","https://github.com/component/path-to-regexp"
"path-type@4.0.0","MIT","https://github.com/sindresorhus/path-type"
"pbf@3.2.1","BSD-3-Clause","https://github.com/mapbox/pbf"
Expand Down Expand Up @@ -1105,8 +1105,8 @@
"svgo@1.3.2","MIT","https://github.com/svg/svgo"
"symbol-observable@1.2.0","MIT","https://github.com/blesh/symbol-observable"
"tapable@1.1.3","MIT","https://github.com/webpack/tapable"
"tar@4.4.13","ISC","https://github.com/npm/node-tar"
"tar@6.0.5","ISC","https://github.com/npm/node-tar"
"tar@4.4.19","ISC","https://github.com/npm/node-tar"
"tar@6.1.11","ISC","https://github.com/npm/node-tar"
"terser-webpack-plugin@1.4.5","MIT","https://github.com/webpack-contrib/terser-webpack-plugin"
"terser-webpack-plugin@4.1.0","MIT","https://github.com/webpack-contrib/terser-webpack-plugin"
"terser@4.8.0","BSD-2-Clause","https://github.com/terser/terser"
Expand Down Expand Up @@ -1230,4 +1230,4 @@
"yeast@0.1.2","MIT","https://github.com/unshiftio/yeast"
"yn@3.1.1","MIT","https://github.com/sindresorhus/yn"
"yocto-queue@0.1.0","MIT","https://github.com/sindresorhus/yocto-queue"
"zone.js@0.10.3","MIT","https://github.com/angular/angular"
"zone.js@0.10.3","MIT","https://github.com/angular/angular"
1 change: 1 addition & 0 deletions workbench/backend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.18
9 changes: 9 additions & 0 deletions workbench/backend/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
applications:
- name: scheduling-backend
path: .
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack#v1.7.55
memory: 512M
command: npm run start:prod
random-route: false
stack: cflinuxfs3
11 changes: 7 additions & 4 deletions workbench/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "backend",
"license": "see LICENSES-folder in repository",
"version": "0.0.0",
"scripts": {
"prebuild": "rimraf dist && npm run license-checker",
"prebuild": "rimraf dist",
"build": "nest build",
"postbuild": "npm run build:copy:static",
"build:copy:static": "cp-cli src/static dist/static",
Expand All @@ -17,9 +16,12 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"postinstall": "npm run license-checker",
"license-checker": "license-checker --csv --out ../../docs/3rd-party-licenses/backend-full.csv"
},
"engines": {
"node": "14.x",
"npm": "6.x"
},
"dependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
Expand All @@ -29,7 +31,8 @@
"moment": "^2.29.1",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.5.4"
"rxjs": "^6.5.4",
"license-checker": "^25.0.1"
},
"devDependencies": {
"@nestjs/cli": "^7.0.0",
Expand Down
10 changes: 10 additions & 0 deletions workbench/frontend/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
applications:
- name: scheduling
path: ./dist/frontend
memory: 64M
buildpack: staticfile_buildpack
routes:
- route: scheduling.cfapps.eu12.hana.ondemand.com
- route: scheduling.cfapps.eu12.hana.ondemand.com/api
destination: scheduling-backend.cfapps.eu12.hana.ondemand.com/api

27 changes: 20 additions & 7 deletions workbench/frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Renderer2, Inject, AfterViewInit } from '@angular/core';
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { map, shareReplay } from 'rxjs/operators';
import { GlobalContext, AuthService } from './common/services/auth.service';
import { DOCUMENT } from '@angular/common';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
export class AppComponent implements OnInit, AfterViewInit {
title = 'FSM AI';

ctx$: Observable<GlobalContext>;
Expand All @@ -23,22 +24,34 @@ export class AppComponent implements OnInit {

constructor(
private breakpointObserver: BreakpointObserver,
private auth: AuthService
private auth: AuthService,
private _renderer2: Renderer2,
@Inject(DOCUMENT) private _document: Document
) {
}

public ngOnInit() {
public ngOnInit(): void {
this.ctx$ = this.auth.globalContext$;
this.isLoggedIn$ = this.auth.isLoggedIn$;
this.auth.tryRestoreSession();
}

public async logout() {
public ngAfterViewInit(): void {
const script = this._renderer2.createElement('script');
script.src = 'https://main-11lv1sn8.eu12.sapdas-staging.cloud.sap/resources/public/webclient/bootstrap.js';
script.setAttribute('data-bot-name', 'plugins');
script.setAttribute('data-expander-type', 'DEFAULT');
script.setAttribute('data-expander-preferences', 'JTdCJTIyYWNjZW50Q29sb3IlMjIlM0ElMjIlMjNFMDVBNDclMjIlMkMlMjJiYWNrZ3JvdW5kQ29sb3IlMjIlM0ElMjIlMjNGRkZGRkYlMjIlMkMlMjJjb21wbGVtZW50YXJ5Q29sb3IlMjIlM0ElMjIlMjNGRkZGRkYlMjIlMkMlMjJvbmJvYXJkaW5nTWVzc2FnZSUyMiUzQSUyMkNvbWUlMjBzcGVhayUyMHRvJTIwbWUhJTIyJTJDJTIyZXhwYW5kZXJUaXRsZSUyMiUzQSUyMiUyMiUyQyUyMmV4cGFuZGVyTG9nbyUyMiUzQSUyMkNVWF9BdmF0YXIuc3ZnJTIyJTJDJTIydGhlbWUlMjIlM0ElMjJzYXBfaG9yaXpvbiUyMiU3RA==');

this._renderer2.appendChild(this._document.head, script);
}

public async logout(): Promise<void> {
this.auth.logout();
}

public async login() {
public async login(): Promise<void> {
this.auth.openLoginDialog();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export class LoginDialogComponent implements OnInit {
public loginForm: FormGroup;

public cloudHosts = [
{ text: 'production', value: 'ds.coresuite.com' },
{ text: 'sandbox', value: 'sb.dev.coresuite.com' },
{ text: 'ET development', value: 'et.dev.coresuite.com' },
{ text: 'QT development', value: 'qt.dev.coresuite.com' },
{ text: 'DT development', value: 'dt.dev.coresuite.com' },
].map(({ text, value }) => ({ value, text: `${text}` }))
{ text: 'production', value: 'ds.fsm-dev.cloud.sap' },
{ text: 'sandbox', value: 'sb.fsm-dev.cloud.sap' },
{ text: 'ET development', value: 'et.fsm-dev.cloud.sap' },
{ text: 'QT development', value: 'qt.fsm-dev.cloud.sap' },
{ text: 'DT development', value: 'dt.fsm-dev.cloud.sap' },
].map(({ text, value }) => ({ value, text: `${text}` }));

constructor(
private http: HttpClient,
Expand Down Expand Up @@ -159,4 +159,4 @@ export class LoginDialogComponent implements OnInit {
);
}

}
}
4 changes: 2 additions & 2 deletions workbench/frontend/src/app/common/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Injectable } from '@angular/core';
export class ConfigService {
constructor() { }

private getHost(): 'http://localhost:8000' | '' {
private getHost(): string {
return location.origin === 'http://localhost:4200'
? 'http://localhost:8000'
: '';
: 'https://scheduling-backend.cfapps.eu12.hana.ondemand.com';
}

public getApiUri(): string {
Expand Down
13 changes: 12 additions & 1 deletion workbench/frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
<title>SAP FSM AI</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' https://*.sap.corp https://*.tools.sap https://*.ondemand.com https://*.sapsf.eu https://*.sapsf.com https://*.successfactors.com https://*.successfactors.eu https://*.sapdemocloud.com https://*.cloud.sap https://*.int.sap https://*.sap.com https://*.net.sap https://*.sapanalytics.cloud https://*.sapbydesign.com https://*.for.sap https://*.enter.sap https://*.only.sap https://*.dev.sap http://localhost:8000;
script-src 'self' 'unsafe-inline' https://*.sap.corp https://*.tools.sap https://*.ondemand.com https://*.sapsf.eu https://*.sapsf.com https://*.successfactors.com https://*.successfactors.eu https://*.sapdemocloud.com https://*.cloud.sap https://*.int.sap https://*.sap.com https://*.net.sap https://*.sapanalytics.cloud https://*.sapbydesign.com https://*.for.sap https://*.enter.sap https://*.only.sap https://*.dev.sap http://localhost:8000;
style-src 'self' 'unsafe-inline' *;
img-src 'self' 'unsafe-inline' * data:;
font-src 'self' *;
connect-src 'self' https://*.sap.corp https://*.tools.sap https://*.ondemand.com https://*.sapsf.eu https://*.sapsf.com https://*.successfactors.com https://*.successfactors.eu https://*.sapdemocloud.com https://*.cloud.sap https://*.int.sap https://*.sap.com https://*.net.sap https://*.sapanalytics.cloud https://*.sapbydesign.com https://*.for.sap https://*.enter.sap https://*.only.sap https://*.dev.sap http://localhost:8000;
frame-ancestors 'self' https://*.sap.corp https://*.tools.sap https://*.ondemand.com https://*.sapsf.eu https://*.sapsf.com https://*.successfactors.com https://*.successfactors.eu https://*.sapdemocloud.com https://*.cloud.sap https://*.int.sap https://*.sap.com https://*.net.sap https://*.sapanalytics.cloud https://*.sapbydesign.com https://*.for.sap https://*.enter.sap https://*.only.sap https://*.dev.sap;
frame-src 'self' https://*.sap.corp https://*.ondemand.com https://*.sapsf.eu https://*.sapsf.com https://*.successfactors.com https://*.successfactors.eu https://*.sapdemocloud.com https://*.cloud.sap https://*.int.sap https://*.sap.com https://*.net.sap https://*.sapanalytics.cloud https://*.sapbydesign.com https://*.only.sap https://*.dev.sap;"
>
<meta http-equiv="X-Frame-Options" content="ALLOW-FROM https://*.ondemand.com">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Expand All @@ -16,4 +27,4 @@
<app-root></app-root>
</body>

</html>
</html>

0 comments on commit bc73422

Please sign in to comment.