Skip to content

Commit

Permalink
Merge pull request #324 from virtualidentityag/develop
Browse files Browse the repository at this point in the history
admin console
  • Loading branch information
tkuzynow authored Nov 9, 2023
2 parents c975ec1 + de284fc commit 0e78c13
Show file tree
Hide file tree
Showing 74 changed files with 1,752 additions and 31,170 deletions.
11 changes: 7 additions & 4 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
PORT=9000
VITE_PORT=9000
BROWSER=none

REACT_APP_CSRF_WHITELIST_HEADER_FOR_LOCAL_DEVELOPMENT=TOKEN
REACT_APP_API_URL=develop.myDomain.net
VITE_CSRF_WHITELIST_HEADER_FOR_LOCAL_DEVELOPMENT=TOKEN
VITE_API_URL=develop.myDomain.net

# OPTIONAL

# forces the usage of the api url for all api calls # e.g. useful for local development
# REACT_APP_USE_API_URL=true
# VITE_USE_API_URL=true

# Keep cookies on logout (comma seperated list)
VITE_COOKIES_ALLOWEDLIST=devProxy
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ stories
.storybook
*.config.js
.eslintrc.js
vite.config.ts
src/vite-env.d.ts
build
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.18.3
- run: npm i
- run: yarn install --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Run linters
Expand All @@ -34,16 +34,16 @@ jobs:
run: |
echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
# need to change tests to mocked data: npm run test:integration:cli
npm run build
# need to change tests to mocked data: yarn run test:integration:cli
yarn run build
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Bump version
if: startsWith(env.BRANCH,'release') == true
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
npm run release
yarn run release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Push changes
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/dockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- run: npm i
cache: 'yarn'
- run: yarn install --frozen-lockfile
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: build
run: npm run build
run: yarn run build
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
BASE: /admin
- uses: actions/upload-artifact@v2
with:
name: buildfiles
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
uses: actions/download-artifact@v2
with:
name: buildfiles
path: build
- name: Get current time
id: time
uses: nanzm/[email protected]
Expand Down Expand Up @@ -119,14 +121,14 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Hint about the Docker Image Tag if successfull
- name: Hint about the Docker Image Tag if successful
if: ${{ success() }}
run: |
echo "### Publish Docker image :white_check_mark:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- Image name: ${{ env.DOCKER_IMAGE }}" >> $GITHUB_STEP_SUMMARY
echo "- Version: ${{ env.DOCKER_IMAGE_TAG }}" >> $GITHUB_STEP_SUMMARY
- name: Hint about the Docker Image Tag if not successfull
- name: Hint about the Docker Image Tag if not successful
if: ${{ failure() || cancelled() }}
run: |
echo "### Publish Docker image :x:" >> $GITHUB_STEP_SUMMARY
Expand Down
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
ARG DOCKER_MATRIX=ghcr.io
FROM $DOCKER_MATRIX/onlineberatung/onlineberatung-nginx/onlineberatung-nginx:dockerimage.v.004-main
COPY favicon.ico /usr/share/nginx/html/admin/
COPY index.html /usr/share/nginx/html/admin/
COPY robots.txt /usr/share/nginx/html/admin/
COPY src /usr/share/nginx/html/admin/src
COPY static /usr/share/nginx/html/admin/static
COPY fonts /usr/share/nginx/html/admin/fonts
COPY build /usr/share/nginx/html/admin
COPY nginx.conf /etc/nginx/conf.d/default.conf
35 changes: 0 additions & 35 deletions craco.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions cypress/integration/post-login.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable cypress/no-unnecessary-waiting */
/* eslint-disable func-names */

const USERONEEMAIL = Cypress.env('userOne');
const USERONEPASSWORD = Cypress.env('passwordOne');

describe('Basic Test', function () {
it('Checks the Title', function () {
cy.visit('/');
Expand Down
60 changes: 60 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Admin-Panel" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->

<!--
Notice the use of in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->

<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png" />
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />

<title>Online-Beratung Admin</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div class="app" id="root"></div>
<div id="overlay"></div>
<!-- Add entry point 👇 -->
<script type="module" src="/src/index.tsx"></script>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Loading

0 comments on commit 0e78c13

Please sign in to comment.