Skip to content

Commit f044f16

Browse files
committed
Merge branch 'master' into splitt-alternative-audience
2 parents bdc5d8a + ef2a706 commit f044f16

File tree

224 files changed

+19081
-12299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+19081
-12299
lines changed

.env.development

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ADMIN_ORIGIN=http://localhost:8080
77
APP_ORIGIN=http://localhost:3000
88
DECORATOR_URL=http://localhost:8100/dekoratoren
99
FAILOVER_ORIGIN=http://localhost:3003
10-
INNLOGGINGSSTATUS_URL=http://localhost:8095/nav-dekoratoren-api/auth
10+
INNLOGGINGSSTATUS_URL=http://localhost:8100/api/auth
1111
REVALIDATOR_PROXY_ORIGIN=http://localhost:3002
1212
XP_ORIGIN=http://localhost:8080
1313
IS_FAILOVER_INSTANCE='false'

.env.prod-local

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ ADMIN_ORIGIN=http://localhost:8080
77
APP_ORIGIN=http://localhost:3000
88
DECORATOR_URL=http://localhost:8100/dekoratoren
99
FAILOVER_ORIGIN=http://localhost:3003
10-
INNLOGGINGSSTATUS_URL=http://localhost:8095/nav-dekoratoren-api/auth
10+
INNLOGGINGSSTATUS_URL=http://localhost:8100/api/auth
1111
REVALIDATOR_PROXY_ORIGIN=http://localhost:3002
1212
XP_ORIGIN=http://localhost:8080
1313
IS_FAILOVER_INSTANCE='false'
1414
RELEASE_TAG=prodLocal
1515
ASSET_PREFIX=http://localhost:3000
1616
TELEMETRY_URL=http://localhost:12347/collect
1717
NAVNO_API_URL=https://www.nav.no/person/navno-api
18-
NAVNO_SEARCH_API_URL=https://navno-search-api.nav.no/content/search-url
18+
NAVNO_SEARCH_API_URL=https://navno-search-api.ekstern.dev.nav.no/content/search-url
1919
NEXT_TELEMETRY_DISABLED=1

.eslintrc.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"plugins": ["css-modules", "no-relative-import-paths"],
3-
"extends": ["next/core-web-vitals", "plugin:css-modules/recommended"],
3+
"extends": [
4+
"next/core-web-vitals",
5+
"plugin:css-modules/recommended",
6+
"plugin:storybook/recommended"
7+
],
48
"ignorePatterns": ["next.config.js"],
59
"rules": {
610
"@next/next/no-img-element": 0,

.github/workflows/deploy.dev2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
ADMIN_ORIGIN: https://portal-admin-q6.oera.no
2525
APP_ORIGIN: https://www-2.ansatt.dev.nav.no
2626
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy-dev2
27-
DECORATOR_URL: https://dekoratoren.ekstern.dev.nav.no
27+
DECORATOR_URL: https://dekoratoren-beta.intern.dev.nav.no
2828
XP_ORIGIN: https://www-q6.nav.no
2929
TELEMETRY_URL: https://telemetry.ekstern.dev.nav.no/collect
3030
INNLOGGINGSSTATUS_URL: https://www.ekstern.dev.nav.no/person/nav-dekoratoren-api/auth

.github/workflows/deploy.prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
ADMIN_ORIGIN: https://portal-admin.oera.no
1818
APP_ORIGIN: https://www.nav.no
1919
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy
20-
DECORATOR_URL: https://www.nav.no/dekoratoren
20+
DECORATOR_URL: https://www.nav.no/nav-dekoratoren
2121
XP_ORIGIN: https://www.nav.no
2222
TELEMETRY_URL: https://telemetry.nav.no/collect
2323
INNLOGGINGSSTATUS_URL: https://www.nav.no/person/nav-dekoratoren-api/auth

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
# testing
1010
/coverage
11+
*storybook.log
12+
/storybook-static
1113

1214
# next.js
1315
/.next/

.nais/vars/vars-dev2.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dekoratorenApp: nav-dekoratoren-beta
44
externalHosts:
55
- www-q6.nav.no
66
- www-2-failover.intern.dev.nav.no
7+
- dekoratoren-beta.intern.dev.nav.no
78
secret: nav-enonicxp-dev2
89
ingresses:
910
- https://www-2.ansatt.dev.nav.no

.storybook/main.ts

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import path, { dirname, join } from 'path';
2+
import type { StorybookConfig } from '@storybook/nextjs';
3+
4+
const config: StorybookConfig = {
5+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
6+
7+
addons: [
8+
getAbsolutePath('@storybook/addon-onboarding'),
9+
getAbsolutePath('@storybook/addon-links'),
10+
getAbsolutePath('@storybook/addon-essentials'),
11+
getAbsolutePath('@chromatic-com/storybook'),
12+
getAbsolutePath('@storybook/addon-interactions'),
13+
getAbsolutePath('@storybook/addon-mdx-gfm'),
14+
getAbsolutePath('@storybook/addon-storysource'),
15+
],
16+
17+
framework: {
18+
name: getAbsolutePath('@storybook/nextjs'),
19+
options: {},
20+
},
21+
22+
webpackFinal: async (config) => {
23+
const updatedConfig = {
24+
...config,
25+
resolve: {
26+
...config.resolve,
27+
alias: {
28+
...config.resolve?.alias,
29+
common: path.resolve(__dirname, '../src/common.scss'),
30+
},
31+
},
32+
};
33+
34+
return updatedConfig;
35+
},
36+
37+
staticDirs: ['../public'],
38+
39+
docs: {},
40+
41+
typescript: {
42+
reactDocgen: 'react-docgen-typescript',
43+
},
44+
};
45+
export default config;
46+
47+
function getAbsolutePath(value: string): any {
48+
return dirname(require.resolve(join(value, 'package.json')));
49+
}

.storybook/preview.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { Preview } from '@storybook/react';
2+
import '../src/global.scss';
3+
4+
const preview: Preview = {
5+
parameters: {
6+
layout: 'centered',
7+
},
8+
tags: ['autodocs'],
9+
};
10+
11+
export default preview;

README.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ Som default kreves en lokal instans av Enonic XP med [nav-enonicxp](https://gith
2525

2626
Kjør `npm run start-clean`
2727

28-
### Docker compose
28+
### Andre lokale avhengigheter
2929

30-
[Dekoratøren](https://github.com/navikt/nav-dekoratoren), [revalidator-proxy](https://github.com/navikt/nav-enonicxp-frontend-revalidator-proxy) og mocks for innlogging
31-
kan kjøres lokalt med `docker compose up`. Du må først autentisere til relevante image registries:
32-
33-
#### GAR
30+
[Dekoratøren](https://github.com/navikt/decorator-next) og [revalidator-proxy](https://github.com/navikt/nav-enonicxp-frontend-revalidator-proxy) kan kjøres lokalt med `docker compose up`. Du må først autentisere til GAR image registry'et:
3431

3532
```
3633
gcloud auth login
@@ -39,14 +36,6 @@ gcloud auth configure-docker europe-north1-docker.pkg.dev
3936

4037
Se også https://cloud.google.com/artifact-registry/docs/docker/authentication#gcloud-helper
4138

42-
#### Github packages:
43-
44-
Generer en token på Github med `read:packages` access og SSO auth for navikt. Bruk denne som passord ved login:
45-
46-
```
47-
docker login ghcr.io
48-
```
49-
5039
## Deploy til test-miljø
5140

5241
[Actions](https://github.com/navikt/nav-enonicxp-frontend/actions) -> Velg workflow -> Run workflow -> Velg branch -> Run workflow

docker-compose.yml

+24-50
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,35 @@ services:
99
SERVICE_SECRET: 'dummyToken'
1010
NO_REDIS: true
1111

12-
oidc-provider:
13-
container_name: oidc-provider-xpfrontend
14-
image: 'ghcr.io/navikt/stub-oidc-provider/stub-oidc-provider:latest'
15-
ports:
16-
- '9000:9000'
17-
environment:
18-
PORT: '9000'
19-
CALLBACK_URL: 'http://localhost:50000/callback'
20-
ISSUER: 'https://localhost:9000'
21-
22-
oidc-provider-gui:
23-
container_name: oidc-provider-gui-xpfrontend
24-
image: 'ghcr.io/navikt/pb-oidc-provider-gui/pb-oidc-provider-gui:latest'
25-
ports:
26-
- '50000:50000'
27-
environment:
28-
REDIRECT_URL: 'http://localhost:3000'
29-
AUTO_REDIRECT_TO_FRONTEND: 'true'
30-
OIDC_PROVIDER_GUI_URL: 'http://localhost:50000/callback'
31-
depends_on:
32-
- oidc-provider
33-
34-
mocks:
35-
container_name: mocks-xpfrontend
36-
image: 'ghcr.io/navikt/pb-nav-mocked/pb-nav-mocked:latest'
37-
ports:
38-
- '8095:8080'
39-
environment:
40-
CORS_ALLOWED_ORIGINS: 'localhost:3000'
41-
CORS_ALLOWED_SCHEMES: 'http'
42-
OIDC_ISSUER: 'https://localhost:9000'
43-
OIDC_ACCEPTED_AUDIENCE: 'stubOidcClient'
44-
OIDC_JWKS_URI: 'http://oidc-provider:9000/certs'
45-
depends_on:
46-
- oidc-provider
47-
4812
dekoratoren:
4913
container_name: dekoratoren-xpfrontend
50-
image: 'ghcr.io/navikt/nav-dekoratoren:latest'
14+
image: 'europe-north1-docker.pkg.dev/nais-management-233d/personbruker/decorator-next-prod:latest'
5115
ports:
52-
- '8100:8088'
16+
- '8100:8089'
5317
environment:
54-
ENV: 'localhost'
5518
XP_BASE_URL: 'http://localhost:3000'
56-
APP_BASE_URL: 'http://localhost:8100'
57-
APP_BASE_PATH: '/dekoratoren'
58-
API_XP_SERVICES_URL: 'https://www.nav.no/_/service'
59-
API_DEKORATOREN_URL: 'http://localhost:8095/nav-dekoratoren-api'
60-
MINSIDE_ARBEIDSGIVER_URL: 'https://arbeidsgiver.nav.no/min-side-arbeidsgiver/'
61-
MIN_SIDE_URL: 'https://www.nav.no/minside/'
62-
LOGIN_URL: 'http://localhost:50000'
63-
LOGOUT_URL: 'http://localhost:50000/?logout'
64-
VARSEL_API_URL: 'http://localhost:8095/tms-varsel-api'
65-
depends_on:
66-
- mocks
19+
MIN_SIDE_URL: 'https://www.nav.no/minside'
20+
MIN_SIDE_ARBEIDSGIVER_URL: 'https://arbeidsgiver.nav.no/min-side-arbeidsgiver'
21+
ENONICXP_SERVICES: 'http://localhost:8080/_/service/'
22+
SEARCH_API_URL: 'https://navno-search-api.ekstern.dev.nav.no/content/decorator-search'
23+
PORT: '8089'
24+
NODE_ENV: 'production'
25+
CDN_URL: 'http://localhost:8100/public'
26+
APP_URL: 'http://localhost:8100'
27+
LOGIN_URL: 'http://localhost:8100/oauth2/login'
28+
LOGOUT_URL: 'http://localhost:8100/oauth2/logout'
29+
PERSONOPPLYSNINGER_URL: 'https://www.nav.no/person/personopplysninger'
30+
VARSEL_API_URL: 'http://localhost:8100/api'
31+
LOGIN_SESSION_API_URL: 'http://localhost:8100/api/oauth2/session'
32+
DEKORATOREN_API_URL: 'http://localhost:8100/api'
33+
UNLEASH_SERVER_API_URL: 'http://localhost:8095/unleash'
34+
UNLEASH_SERVER_API_TOKEN: 'dummy_token'
35+
BOOST_ENV: 'navtest'
36+
PUZZEL_CUSTOMER_ID: 'C1302192-8BEC-4EA2-84AB-F4EDE8AC6230'
37+
VERSION_ID: 'asdf'
38+
APP_NAME: 'nav-dekoratoren'
39+
# Set this to '3' or '4' to mock logged in state
40+
MOCK_AUTH_LEVEL:
6741

6842
volumes:
6943
event-cache-data:

next.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,6 @@ const config = {
279279
{
280280
source: '/:path*',
281281
headers: [
282-
{
283-
key: 'app-name',
284-
value: 'nav-enonicxp-frontend',
285-
},
286282
{
287283
key: 'Content-Security-Policy',
288284
value: await csp(),

0 commit comments

Comments
 (0)