Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Commit

Permalink
Legger inn URL for ny dekoratør
Browse files Browse the repository at this point in the history
  • Loading branch information
kulsveen committed May 12, 2020
1 parent 7e09388 commit e200960
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APPRES_CMS_URL=https://appres.nav.no
DECORATOR_URL=https://nav.no/dekoratoren
PORT=8080
REACT_APP_CONTEXT_ROOT=/sykepengesoknad
REACT_APP_SYKEFRAVAER_CONTEXT_ROOT=/sykefravaer
Expand Down
11 changes: 3 additions & 8 deletions decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ const request = require('request');
const { JSDOM } = jsdom;

const requestDecorator = (callback) =>
request(
`${
process.env.APPRES_CMS_URL
}/common-html/v4/navno?header-withmenu=true&styles=true&scripts=true&footer=true`,
callback
);
request(`${process.env.DECORATOR_URL}/?simple=true`, callback);

const getDecorator = () =>
new Promise((resolve, reject) => {
Expand All @@ -27,8 +22,8 @@ const getDecorator = () =>
NAV_SCRIPTS: document.getElementById('scripts')[prop],
NAV_STYLES: document.getElementById('styles')[prop],
NAV_HEADING: document.getElementById('header-withmenu')[prop],
NAV_FOOTER: document.getElementById('footer')[prop],
NAV_MEGAMENU_RESOURCES: document.getElementById('megamenu-resources')[prop]
NAV_FOOTER: document.getElementById('footer-withmenu')[prop],
NAV_MEGAMENU_RESOURCES: document.getElementById('megamenu-resources')[prop],
};
resolve(data);
} else {
Expand Down
4 changes: 2 additions & 2 deletions nais-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ spec:
enabled: true
path: /actuator/metrics
env:
- name: APPRES_CMS_URL
value: "https://appres-q1.nav.no"
- name: DECORATOR_URL
value: "https://www-q1.nav.no/dekoratoren"
- name: LOGINSERVICE_URL
value: "https://loginservice-q.nav.no/login"
- name: SYFOAPI_SYFOTEKSTERAPI_URL
Expand Down
4 changes: 2 additions & 2 deletions nais-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ spec:
enabled: true
path: /actuator/metrics
env:
- name: APPRES_CMS_URL
value: "https://appres.nav.no"
- name: DECORATOR_URL
value: "https://nav.no/dekoratoren"
- name: LOGINSERVICE_URL
value: "https://loginservice.nav.no/login"
- name: SYFOAPI_SYFOTEKSTERAPI_URL
Expand Down
81 changes: 22 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e200960

Please sign in to comment.