8 Commits

Author SHA1 Message Date
3ae92c020c disable menu when not logged in 2021-09-11 23:34:29 +02:00
d098317331 disable ui 2021-09-11 19:19:16 +02:00
641565d8ff config 2021-09-11 19:02:00 +02:00
25d016c154 cors 2021-09-11 18:50:54 +02:00
39703dca22 cors 2021-09-11 18:44:43 +02:00
c06184d1b1 fix in ci 2021-09-11 18:13:02 +02:00
1450c8fdd7 fix in ci 2021-09-11 18:12:09 +02:00
72a3241286 fix in ci 2021-09-11 18:09:10 +02:00
3 changed files with 12 additions and 3 deletions

View File

@ -56,6 +56,7 @@ build-ui:
- cd ui/hv2-ui
- if [ "$CI_COMMIT_TAG" != "" ]; then
sed -i -e 's/GITTAGVERSION/'"$CI_COMMIT_TAG"':'"$CI_COMMIT_SHORT_SHA"'/' ./src/app/navigation/navigation.component.html;
sed -i -e 's,http://localhost:8080,https://api.hv.nober.de,' ./src/app/config.ts;
fi
- npm install
- ./node_modules/.bin/ng build --prod
@ -97,6 +98,7 @@ dockerize-ui:
- docker rm $CONTAINER_NAME || echo "container not existing, never mind"
- docker run -d --network docker-server
--ip $CONTAINER_IP
$VOLUMEOPT
--name $CONTAINER_NAME
--restart always
$IMAGE_NAME:$CI_COMMIT_TAG
@ -108,6 +110,7 @@ deploy-api:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/api
CONTAINER_NAME: hv2-api
CONTAINER_IP: 172.16.10.38
VOLUMEOPT: -v hv2-api-conf:/opt/app/config
deploy-ui:
extends:

View File

@ -3,10 +3,16 @@ from flask_cors import CORS
# instantiate the webservice
app = connexion.App(__name__)
app.add_api('openapi.yaml')
app.add_api('openapi.yaml', options = {"swagger_ui": False})
# CORSify it - otherwise Angular won't accept it
CORS(app.app)
CORS(app.app,
origins=[
"http://localhost:4200",
"https://base.hv.nober.de"
],
supports_credentials=True
)
# provide the webservice application to uwsgi
application = app.app

View File

@ -3,7 +3,7 @@
[attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'"
[mode]="(isHandset$ | async) ? 'over' : 'side'"
[opened]="(isHandset$ | async) === false">
<mat-toolbar>Menu</mat-toolbar>
<mat-toolbar *ngIf="authenticated">Menu</mat-toolbar>
<mat-nav-list>
<a mat-list-item href="/tenants">Meine Mieter/innen</a>
</mat-nav-list><mat-divider></mat-divider><mat-nav-list>