Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #909 from dedica-team/develop
Browse files Browse the repository at this point in the history
Release 0.5.2
  • Loading branch information
MarvinSchoening authored May 12, 2022
2 parents 5164d47 + 5ba43af commit 4e1d3e0
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 77 deletions.
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.bonndan</groupId>
<artifactId>nivio</artifactId>
<version>0.5.1</version>
<version>0.5.2</version>

<parent>
<groupId>org.springframework.boot</groupId>
Expand All @@ -19,7 +19,7 @@
<java.version>17</java.version>
<maven.compiler.release>11</maven.compiler.release>
<junit-jupiter.version>5.4.0</junit-jupiter.version>
<mockito.version>4.3.1</mockito.version>
<mockito.version>4.5.1</mockito.version>
<archunit.version>0.23.1</archunit.version>
<jacoco.version>0.8.7</jacoco.version>
<frontend-src-dir>${project.basedir}/src/main/app</frontend-src-dir>
Expand Down Expand Up @@ -125,6 +125,11 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency><!-- https://github.com/mockito/mockito/issues/2629 -->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.12.10</version>
</dependency>

<dependency>
<groupId>com.tngtech.archunit</groupId>
Expand Down Expand Up @@ -288,7 +293,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<version>1.303</version>
<version>1.306</version>
</dependency>

<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nivio",
"version": "0.5.1",
"version": "0.5.2",
"private": true,
"homepage": "./",
"dependencies": {
Expand All @@ -12,7 +12,7 @@
"@stomp/stompjs": "^5.4.4",
"@types/dateformat": "^3.0.1",
"@types/jest": "^26.0.24",
"@types/node": "^14.18.12",
"@types/node": "^14.18.13",
"@types/react": "^17.0.41",
"@types/react-dom": "^16.9.14",
"@types/react-html-parser": "^2.0.2",
Expand All @@ -26,8 +26,8 @@
"html-react-parser": "^0.14.3",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-router-dom": "^5.3.0",
"react-scripts": "^5.0.0",
"react-router-dom": "^5.3.1",
"react-scripts": "^5.0.1",
"react-social-login-buttons": "^3.6.0",
"react-svg-pan-zoom-loader": "^1.4.1",
"react-transition-group": "^4.4.2",
Expand Down
10 changes: 6 additions & 4 deletions src/main/app/src/Components/Landscape/Modals/Group/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,28 @@ const Group: React.FC<Props> = ({ group, sticky }) => {
</div>
</div>

{assessment && assessment.status ? (
{assessment && assessment.status && assessment.status !== 'UNKNOWN' ? (
<div>
<div>
<br />
<Typography variant={'h6'}>Status</Typography>
<StatusChip name={assessment.field} status={assessment?.status} />
<ul>
{assessment.message.split(';').map((message) => {
return (
return message && message.length ? (
<li style={{ textAlign: 'left' }} key={message}>
{message}
</li>
);
) : null;
})}
</ul>
</div>
<br />
<br />
</div>
) : null}
) : (
<br />
)}

<div className='labels'>{labels}</div>

Expand Down
20 changes: 17 additions & 3 deletions src/main/app/src/Components/Landscape/Overview/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ILandscape, ILandscapeLinks } from '../../../interfaces';
import OverviewLayout from './OverviewLayout';
import { get } from '../../../utils/API/APIClient';
import { createStyles, darken, Theme } from '@material-ui/core';
import { Redirect } from 'react-router-dom';
import { Link, Redirect } from 'react-router-dom';
import makeStyles from '@material-ui/core/styles/makeStyles';
import { withBasePath } from '../../../utils/API/BasePath';
import Avatar from '@material-ui/core/Avatar';
Expand Down Expand Up @@ -32,6 +32,9 @@ const useStyles = makeStyles((theme: Theme) =>
width: theme.spacing(25),
height: theme.spacing(25),
},
help: {
color: theme.palette.primary.contrastText,
},
})
);

Expand All @@ -56,7 +59,7 @@ const Overview: React.FC<Props> = ({ setPageTitle, welcomeMessage }) => {
if (landscapeLinks) {
setLandscapesCount(Object.keys(landscapeLinks._links).length);
for (const landscapeLink in landscapeLinks._links) {
if(landscapeLinks._links[landscapeLink].rel !== "landscape") return;
if (landscapeLinks._links[landscapeLink].rel !== 'landscape') return;
const landscapeDescription: ILandscape | null = await get(
landscapeLinks._links[landscapeLink].href
);
Expand All @@ -82,7 +85,18 @@ const Overview: React.FC<Props> = ({ setPageTitle, welcomeMessage }) => {
src={withBasePath('icons/svg/nivio.svg')}
className={classes.large}
/>
<h2>Loading landscapes ...</h2>
{loadLandscapes ? (
<h2>Loading landscapes ...</h2>
) : (
<>
<h2>That went wrong.</h2>
No landscapes configured or found. Please see the{' '}
<Link to={`/man/install.html`} className={classes.help}>
manual
</Link>{' '}
how to provide an initial configuration.
</>
)}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactElement } from 'react';

import { Link } from 'react-router-dom';
import Grid from '@material-ui/core/Grid';
import { Box, Button, Card, CardHeader, CardMedia, darken, Theme } from '@material-ui/core';
import { Box, Button, Card, CardHeader, darken, Theme } from '@material-ui/core';
import { ILandscape } from '../../../interfaces';
import dateFormat from 'dateformat';
import { withBasePath } from '../../../utils/API/BasePath';
Expand Down Expand Up @@ -31,8 +31,9 @@ const useStyles = makeStyles((theme: Theme) =>
display: 'block',
borderRadius: 5,
backgroundColor: 'black',
textAlign: 'center',
},
cardMedia: {
preview: {
height: 200,
maxWidth: '100%',
backgroundSize: 'contain',
Expand Down Expand Up @@ -104,9 +105,10 @@ const OverviewLayout: React.FC<Props> = ({ landscapes }) => {
className={classes.link}
title={'Landscape map'}
>
<CardMedia
className={classes.cardMedia}
image={withBasePath(`/render/${landscape.identifier}/map.svg`)}
<img
src={withBasePath(`/render/${landscape.identifier}/map.svg`)}
alt={landscape.identifier}
className={classes.preview}
/>
</Button>
<br />
Expand Down
70 changes: 35 additions & 35 deletions src/main/app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1934,10 +1934,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.9.tgz#0e5944eefe2b287391279a19b407aa98bd14436d"
integrity sha512-j11XSuRuAlft6vLDEX4RvhqC0KxNxx6QIyMXNb0vHHSNPXTPeiy3algESWmOOIzEtiEL0qiowPU3ewW9hHVa7Q==

"@types/node@^14.18.12":
version "14.18.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24"
integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==
"@types/node@^14.18.13":
version "14.18.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.16.tgz#878f670ba3f00482bf859b6550b6010610fc54b5"
integrity sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==

"@types/parse-json@^4.0.0":
version "4.0.0"
Expand Down Expand Up @@ -2642,9 +2642,9 @@ astral-regex@^2.0.0:
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==

async@^2.6.2:
version "2.6.3"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
version "2.6.4"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221"
integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==
dependencies:
lodash "^4.17.14"

Expand Down Expand Up @@ -4242,10 +4242,10 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"

eslint-config-react-app@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-7.0.0.tgz#0fa96d5ec1dfb99c029b1554362ab3fa1c3757df"
integrity sha512-xyymoxtIt1EOsSaGag+/jmcywRuieQoA2JbPCjnw9HukFj9/97aGPoZVFioaotzk1K5Qt9sHO5EutZbkrAXS0g==
eslint-config-react-app@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-7.0.1.tgz#73ba3929978001c5c86274c017ea57eb5fa644b4"
integrity sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==
dependencies:
"@babel/core" "^7.16.0"
"@babel/eslint-parser" "^7.16.3"
Expand Down Expand Up @@ -7930,10 +7930,10 @@ react-app-polyfill@^3.0.0:
regenerator-runtime "^0.13.9"
whatwg-fetch "^3.6.2"

react-dev-utils@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.0.tgz#4eab12cdb95692a077616770b5988f0adf806526"
integrity sha512-xBQkitdxozPxt1YZ9O1097EJiVpwHr9FoAuEVURCKV0Av8NBERovJauzP7bo1ThvuhZ4shsQ1AJiu4vQpoT1AQ==
react-dev-utils@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73"
integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==
dependencies:
"@babel/code-frame" "^7.16.0"
address "^1.1.2"
Expand All @@ -7954,7 +7954,7 @@ react-dev-utils@^12.0.0:
open "^8.4.0"
pkg-up "^3.1.0"
prompts "^2.4.2"
react-error-overlay "^6.0.10"
react-error-overlay "^6.0.11"
recursive-readdir "^2.2.2"
shell-quote "^1.7.3"
strip-ansi "^6.0.1"
Expand All @@ -7970,10 +7970,10 @@ react-dom@^16.14.0:
prop-types "^15.6.2"
scheduler "^0.19.1"

react-error-overlay@^6.0.10:
version "6.0.10"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6"
integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==
react-error-overlay@^6.0.11:
version "6.0.11"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb"
integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==

react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
version "16.13.1"
Expand Down Expand Up @@ -8020,23 +8020,23 @@ react-refresh@^0.11.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==

react-router-dom@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.0.tgz#da1bfb535a0e89a712a93b97dd76f47ad1f32363"
integrity sha512-ObVBLjUZsphUUMVycibxgMdh5jJ1e3o+KpAZBVeHcNQZ4W+uUGGWsokurzlF4YOldQYRQL4y6yFRWM4m3svmuQ==
react-router-dom@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.1.tgz#0151baf2365c5fcd8493f6ec9b9b31f34d0f8ae1"
integrity sha512-f0pj/gMAbv9e8gahTmCEY20oFhxhrmHwYeIwH5EO5xu0qme+wXtsdB8YfUOAZzUz4VaXmb58m3ceiLtjMhqYmQ==
dependencies:
"@babel/runtime" "^7.12.13"
history "^4.9.0"
loose-envify "^1.3.1"
prop-types "^15.6.2"
react-router "5.2.1"
react-router "5.3.1"
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"

react-router@5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.1.tgz#4d2e4e9d5ae9425091845b8dbc6d9d276239774d"
integrity sha512-lIboRiOtDLFdg1VTemMwud9vRVuOCZmUIT/7lUoZiSpPODiiH1UQlfXy+vPLC/7IWdFYnhRwAyNqA/+I7wnvKQ==
react-router@5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.1.tgz#b13e84a016c79b9e80dde123ca4112c4f117e3cf"
integrity sha512-v+zwjqb7bakqgF+wMVKlAPTca/cEmPOvQ9zt7gpSNyPXau1+0qvuYZ5BWzzNDP1y6s15zDwgb9rPN63+SIniRQ==
dependencies:
"@babel/runtime" "^7.12.13"
history "^4.9.0"
Expand All @@ -8049,10 +8049,10 @@ [email protected]:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"

react-scripts@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.0.tgz#6547a6d7f8b64364ef95273767466cc577cb4b60"
integrity sha512-3i0L2CyIlROz7mxETEdfif6Sfhh9Lfpzi10CtcGs1emDQStmZfWjJbAIMtRD0opVUjQuFWqHZyRZ9PPzKCFxWg==
react-scripts@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003"
integrity sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==
dependencies:
"@babel/core" "^7.16.0"
"@pmmmwh/react-refresh-webpack-plugin" "^0.5.3"
Expand All @@ -8070,7 +8070,7 @@ react-scripts@^5.0.0:
dotenv "^10.0.0"
dotenv-expand "^5.1.0"
eslint "^8.3.0"
eslint-config-react-app "^7.0.0"
eslint-config-react-app "^7.0.1"
eslint-webpack-plugin "^3.1.1"
file-loader "^6.2.0"
fs-extra "^10.0.0"
Expand All @@ -8087,7 +8087,7 @@ react-scripts@^5.0.0:
postcss-preset-env "^7.0.1"
prompts "^2.4.2"
react-app-polyfill "^3.0.0"
react-dev-utils "^12.0.0"
react-dev-utils "^12.0.1"
react-refresh "^0.11.0"
resolve "^1.20.0"
resolve-url-loader "^4.0.0"
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/de/bonndan/nivio/security/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
public static final String LOGIN_MODE_REQUIRED = "required";
public static final String LOGIN_MODE_OPTIONAL = "optional";
public static final String LOGIN_MODE_NONE = "none";
public static final String LOGIN_PATH = "/login";
public static final String LOGOUT_PATH = "/logout";
public static final String LOGIN_PATH = "/login"; //NOSONAR
public static final String LOGOUT_PATH = "/logout"; //NOSONAR
public static final String ALL_ORIGINS_HTTP = "http://*";
public static final String ALL_ORIGINS_HTTPS = "https://*";

Expand Down Expand Up @@ -57,11 +57,13 @@ protected void configure(HttpSecurity http) throws Exception {

private void configureForNone(HttpSecurity http) throws Exception {
http
.csrf().disable()
.cors().configurationSource(corsConfigurationSource());
}

private void configureForOptional(HttpSecurity http) throws Exception {
http
.csrf().disable()
.cors().configurationSource(corsConfigurationSource())
.and()
.headers(configurer -> {
Expand All @@ -83,6 +85,7 @@ private void configureForOptional(HttpSecurity http) throws Exception {
private void configureForRequired(HttpSecurity http) throws Exception {

http
.csrf().disable()
.cors().configurationSource(corsConfigurationSource())
.and()
.headers(configurer -> {
Expand All @@ -102,7 +105,6 @@ private void configureForRequired(HttpSecurity http) throws Exception {
.invalidateHttpSession(true)
.deleteCookies("JSESSIONID")
.logoutSuccessUrl(LOGIN_PATH).permitAll();

}

private CorsConfigurationSource corsConfigurationSource() {
Expand Down
Loading

0 comments on commit 4e1d3e0

Please sign in to comment.