Skip to content

Commit

Permalink
Merge branch 'main' into ups-main
Browse files Browse the repository at this point in the history
  • Loading branch information
mdiener21 committed Nov 30, 2024
2 parents c4e0459 + db32c6c commit 36439bb
Show file tree
Hide file tree
Showing 306 changed files with 484 additions and 1,335 deletions.
52 changes: 0 additions & 52 deletions .env-sample

This file was deleted.

28 changes: 28 additions & 0 deletions devops/docker/local/client_app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use Node.js LTS (Long Term Support) image
FROM node:18.20.5-alpine AS base

# Create app directory
WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm install
RUN npm install --save-dev @babel/plugin-proposal-private-property-in-object

# Run
FROM base

COPY --from=base /app/node_modules /app/node_modules

# Expose the development port
EXPOSE 3000

# Set host to allow external connections
ENV HOST=0.0.0.0
ENV PORT=3000
ENV NODE_OPTIONS="--openssl-legacy-provider"

# Start development server
CMD ["npm", "run", "dev"]
42 changes: 0 additions & 42 deletions devops/docker/local/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,8 @@
FROM node:18.12.1-alpine as build

# Set the working directory inside the container
WORKDIR /app

# Copy the package.json and package-lock.json files to the container
COPY package*.json ./

# Install the dependencies
RUN npm install

RUN npm install --save-dev @babel/plugin-proposal-private-property-in-object

# Set the NODE_OPTIONS environment variable
ENV NODE_OPTIONS="--openssl-legacy-provider"


# Copy the entire app directory to the container
COPY . .

# Generate the Nuxt.js static files
RUN npm version patch --git-tag-version false && npx nuxt generate

# Use the official Nginx image as the base image
FROM nginx:1.22.1

ARG ENV_TYPE
ARG WEB_FOLDER

# WORKDIR /var/www/indrz
WORKDIR /usr/share/nginx/html

# COPY devops/docker/local/nginx/conf/allowed.conf /etc/nginx/allowed.conf
# COPY devops/docker/local/nginx/conf/locations.conf /etc/nginx/locations.conf


# Copy the NGINX configuration file to the container
COPY devops/docker/local/nginx/conf/default-dev.conf /etc/nginx/conf.d/default.conf

# RUN mkdir -p /var/www/indrz

# Copy the built static site from the previous stage to the container
#COPY --from=build ./app/dist/ /var/www/indrz
COPY --from=build ./app/dist /usr/share/nginx/html

# Expose port 80
# EXPOSE 80

# Start Nginx when the container starts
# CMD ["nginx", "-g", "daemon off;"]
4 changes: 0 additions & 4 deletions devops/docker/local/nginx/conf/allowed.conf

This file was deleted.

14 changes: 9 additions & 5 deletions devops/docker/local/nginx/conf/default-dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ server {
# set client max upload body size to#
client_max_body_size 50M;

location / {
proxy_pass http://frontend:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# root /usr/share/nginx/html;
# index index.html index.htm;
}

# API Django backend
location /api {
proxy_pass http://indrz_api:8000;
Expand Down Expand Up @@ -42,11 +51,6 @@ server {
proxy_set_header X-Script-Name /geoserver;
}

location / {
# root /var/www/indrz;
root /usr/share/nginx/html;
index index.html index.htm;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
Expand Down
Empty file.
32 changes: 9 additions & 23 deletions devops/docker/production/nginx/conf/default-prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ server {
# set client max upload body size to#
client_max_body_size 50M;

# API Django backend
# client static pwa app files
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

# API Django backend
location /api {
proxy_pass http://indrz_api:8000;
proxy_set_header Host $host;
Expand All @@ -27,15 +33,15 @@ server {

}

# STATIC files
# STATIC files for Django
location /static {
alias /opt/data/static/;
expires 30d;
access_log off;
add_header Cache-Control "public";
}

# MEDIA backend uploads
# MEDIA backend uploads for Django
location /media {
alias /opt/data/media/;
access_log off;
Expand All @@ -52,25 +58,6 @@ server {
proxy_set_header X-Script-Name /geoserver;
}

location / {
# root /var/www/indrz;
root /usr/share/nginx/html;
index index.html index.htm;

allow 78.142.65.164; # michael home
allow 143.205.172.22; # michael office

allow 143.205.99.66;
allow 143.205.98.160;
allow 143.205.99.146;
allow 143.205.98.174;
allow 143.205.99.139;
allow 143.205.196.24;

allow 143.205.70.223; # stefan bibliothek
allow 143.205.70.68; # georg bibliothek
deny all;
}

ssl_certificate /etc/ssl/yourCertHere.crt;
ssl_certificate_key /etc/ssl/yourKeyHere.key;
Expand All @@ -92,7 +79,6 @@ server {
# ssl_stapling on;
# ssl_stapling_verify on;


error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions assets/css/ol.scss → src/assets/css/ol.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@
pointer-events:none !important;
cursor:none !important;
}
.ol-selectable{
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
-moz-user-select: none !important;
user-select: none !important;
}
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion assets/locale/de.json → src/assets/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
"label_building_plz": "Plz",
"label_building_adress": "Adresse",
"pdf_title": "Universität Plan",
"poi_pictures": "Bilder"
"poi_pictures": "Bilder",
"label_external_id": "ID"
}
3 changes: 2 additions & 1 deletion assets/locale/en.json → src/assets/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
"label_building_plz": "Postal Code",
"label_building_adress": "Adress",
"pdf_title": "University Plan",
"poi_pictures": "Pictures"
"poi_pictures": "Pictures",
"label_external_id": "ID"
}
File renamed without changes.
6 changes: 4 additions & 2 deletions components/BaseMap.vue → src/components/BaseMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
data () {
return {
map: null,
center: [1822279.3104, 6139940.224],
center: [1822139.88, 6139957.53],
zoom: 18,
layers: {},
activeLayers: [],
Expand Down Expand Up @@ -69,6 +69,7 @@ export default {
controls: defaultControls().extend([mousePositionControl]),
target: 'map',
layers: [
// greyBmapat, myMapLayer
greyBmapat
],
view: new View({
Expand Down Expand Up @@ -109,7 +110,8 @@ export default {
if (selected) {
this.featureProperties = [
{ key: 'OrgCode', value: selected.get('orgcode') },
{ key: 'Code', value: selected.get('orgcode') },
{ key: 'Organization', value: selected.get('name') },
{ key: 'Main Use', value: selected.get('mainuse') },
{ key: 'Room Code', value: selected.get('room_code') }
];
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@
<template v-slot:item="{ item }">
<v-list-item-icon style="margin-right: 16px">
<v-img
v-if="item.icon"
:src="item.icon"
contain
max-height="24"
max-width="24"
/>
<v-img
v-else
:src="getIconUrl(item.src_icon)"
contain
max-height="24"
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 16 additions & 5 deletions components/Help.vue → src/components/Help.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<v-dialog
v-model="dialog"
scrollable
max-width="700"
>
<v-card>
<v-card-title class="headline" />
<v-card-title class="text-h4">
Hilfe
</v-card-title>
<v-divider />
<v-card-text>
<h1>Hilfe</h1>
<p />

<div>
<p>
INDRZ bietet eine
Expand Down Expand Up @@ -320,14 +321,24 @@
</p>
</div>
</v-card-text>
<v-divider />
<v-card-actions>
<v-spacer />
<v-btn
color="blue darken-1"
text
@click="dialog = false"
>
Close
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>

<script>
export default {
name: 'Help',
props: {
show: {
type: Boolean,
Expand Down
25 changes: 5 additions & 20 deletions components/IndrzMap.vue → src/components/IndrzMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import RouteHandler from '../util/RouteHandler';
import POIHandler from '../util/POIHandler';
import InfoOverlay from '../components/infoOverlay';
import 'ol/ol.css';
import config from '../util/indrzConfig';
import menuHandler from '../util/menuHandler';
import config from '../util/indrzConfig';
import ShareOverlay from './share-overlay/shareOverlay';
import Terms from './Terms';
import Help from './Help';
Expand Down Expand Up @@ -220,28 +220,12 @@ export default {
this.$emit('open-poi-drawer', {
feature: properties
})
const coordinate = this.objCenterCoords;
const featureCenter = !this.routeDrawer
? { data: { type: 'Feature', id: properties.id, properties: properties, geometry: { coordinates: this.objCenterCoords, type: 'MultiPolygon' } } }
: { type: 'Feature', id: properties.id, ...{ properties, geometry: { coordinates: this.coordinates, type: 'MultiPolygon' } } }
if (!this.routeDrawer) {
if (this.isMobile) {
const elm = document.querySelector('.v-navigation-drawer--open');
const drawerHeight = elm.offsetHeight;
const pixel = this.map.getPixelFromCoordinate(coordinate);
pixel[1] += drawerHeight / 6;
const mobileCoordinate = this.map.getCoordinateFromPixel(pixel);
this.map.getView().animate({
duration: 2000,
center: mobileCoordinate
});
} else {
this.map.getView().animate({
center: coordinate,
duration: 2000
});
}
} else { this.$nextTick(() => { this.$bus.$emit('goTo', featureCenter) }) }
if (this.routeDrawer) {
this.$nextTick(() => { this.$bus.$emit('goTo', featureCenter) })
}
},
async loadMapWithParams (searchString) {
const query = queryString.parse(searchString || location.search);
Expand Down Expand Up @@ -295,6 +279,7 @@ export default {
this.$emit('clearSearch');
}
this.$emit('open-poi-drawer', {})
this.$emit('open-poi-drawer', {})
},
onShareButtonClick (isRouteShare) {
const shareOverlay = this.$refs.shareOverlay;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 36439bb

Please sign in to comment.