Skip to content

Commit

Permalink
Merge branch 'master' into TAG-2154_tokenx_pam
Browse files Browse the repository at this point in the history
  • Loading branch information
kenglxn committed Sep 1, 2023
2 parents c3defa8 + e7c1d24 commit 121b5e4
Show file tree
Hide file tree
Showing 31 changed files with 1,174 additions and 914 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:

jobs:
analyze:
permissions:
actions: read
contents: read
security-events: write

name: Analyze
runs-on: ubuntu-latest

Expand All @@ -35,11 +40,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +69,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
6 changes: 0 additions & 6 deletions nais/dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.intern.dev.nav.no/min-side-arbeidsgiver/oauth2/login
- name: PROXY_LOG_LEVEL
value: debug
- name: BRUKER_API_URL
value: http://notifikasjon-bruker-api.fager.svc.cluster.local
- name: GIT_COMMIT
value: {{commit}}
- name: MILJO
Expand Down
6 changes: 0 additions & 6 deletions nais/experimental-labs-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://demo-min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.ekstern.dev.nav.no/fake-login/login?issuer=selvbetjening&sub=123456789&domain=ekstern.dev.nav.no&redirect=https://arbeidsgiver-dev-lik.ekstern.dev.nav.no/min-side-arbeidsgiver/
- name: PROXY_LOG_LEVEL
value: debug
- name: BRUKER_API_URL
value: http://localhost:8081
- name: GIT_COMMIT
value: {{commit}}
- name: MILJO
Expand Down
6 changes: 0 additions & 6 deletions nais/labs-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://demo-min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.ekstern.dev.nav.no/fake-login/login?issuer=selvbetjening&sub=123456789&domain=arbeidsgiver.ekstern.dev.nav.no&redirect=https://arbeidsgiver.ekstern.dev.nav.no/min-side-arbeidsgiver/
- name: PROXY_LOG_LEVEL
value: debug
- name: BRUKER_API_URL
value: http://localhost:8081
- name: GIT_COMMIT
value: {{commit}}
- name: MILJO
Expand Down
6 changes: 0 additions & 6 deletions nais/prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.nav.no/min-side-arbeidsgiver/oauth2/login
- name: PROXY_LOG_LEVEL
value: debug
- name: BRUKER_API_URL
value: http://notifikasjon-bruker-api.fager.svc.cluster.local
- name: GIT_COMMIT
value: {{commit}}
- name: MILJO
Expand Down
80 changes: 63 additions & 17 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage": "/min-side-arbeidsgiver",
"dependencies": {
"@navikt/aksel-icons": "^4.9.0",
"@navikt/arbeidsgiver-notifikasjon-widget": "6.3.8",
"@navikt/bedriftsmeny": "6.10.0",
"@navikt/arbeidsgiver-notifikasjon-widget": "6.3.9",
"@navikt/bedriftsmeny": "6.10.2",
"@navikt/ds-css": "^4.9.0",
"@navikt/ds-icons": "3.4.3",
"@navikt/ds-react": "^4.9.0",
Expand Down Expand Up @@ -46,6 +46,7 @@
"react-tooltip": "^4.2.13",
"regenerator-runtime": "^0.13.7",
"smoothscroll-polyfill": "^0.4.4",
"swr": "^2.2.2",
"typescript": "4.5.4",
"uuid": "^9.0.0",
"whatwg-fetch": "^3.6.2",
Expand Down
25 changes: 12 additions & 13 deletions server/mock/altinnMeldingsboksMock.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {OrganisasjonerResponse} from './altinnMock.js';
import { OrganisasjonerResponse } from './userInfoMock.js';

const reportees = {
_links: {},
_embedded: {
reportees: OrganisasjonerResponse.map(org => ({
reportees: OrganisasjonerResponse.map((org) => ({
...org,
_links: {
self: {
Expand All @@ -25,7 +25,7 @@ let getRandomInt = (min, max) => {

let randomStatus = () => (Math.random() < 0.5 ? 'Ulest' : 'Lest');

const uniqueMessageId = (id => () => {
const uniqueMessageId = ((id) => () => {
id += 1;
return `r${id}`;
})(0);
Expand Down Expand Up @@ -59,8 +59,7 @@ const randomMessage = (org) => {
href: '/min-side-arbeidsgiver/mock/tt02.altinn.no/api/r50179335/messages/a9069768',
},
portalview: {
href:
'/min-side-arbeidsgiver/mock/tt02.altinn.no/Pages/ServiceEngine/Correspondence/Correspondences.aspx?ReporteeElementID=9069768&ESC=5562&ESEC=1',
href: '/min-side-arbeidsgiver/mock/tt02.altinn.no/Pages/ServiceEngine/Correspondence/Correspondences.aspx?ReporteeElementID=9069768&ESC=5562&ESEC=1',
},
metadata: {
href: '/min-side-arbeidsgiver/mock/tt02.altinn.no/api/metadata/correspondence/5562/1',
Expand All @@ -79,7 +78,7 @@ const randomMessages = (org) => {
};

let allMessages = {};
OrganisasjonerResponse.forEach(org => {
OrganisasjonerResponse.forEach((org) => {
allMessages[`reportee${org.OrganizationNumber}`] = {
_links: {
portalview: {
Expand All @@ -100,10 +99,10 @@ const getMessagesForReportee = (reporteeId) => {
};

export const mock = (app) => {
app.use('/min-side-arbeidsgiver/mock/tt02.altinn.no/api/reportees', (req, res) => {
res.send(reportees);
});
app.use(`/min-side-arbeidsgiver/mock/tt02.altinn.no/api/:id/messages`, (req, res) => {
res.send(getMessagesForReportee(req.params.id));
});
}
app.use('/min-side-arbeidsgiver/mock/tt02.altinn.no/api/reportees', (req, res) => {
res.send(reportees);
});
app.use(`/min-side-arbeidsgiver/mock/tt02.altinn.no/api/:id/messages`, (req, res) => {
res.send(getMessagesForReportee(req.params.id));
});
};
17 changes: 10 additions & 7 deletions server/mock/antallArbeidsforholdMock.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
export const mock = (app) => {
app.use('/min-side-arbeidsgiver/antall-arbeidsforhold', (req, res) => {
const antall = 502;
const missing = Math.floor(Math.random() * 10) === 0;
setTimeout(() => {
res.send({ first: '131488434', second: missing ? -1 : antall });
}, 1000);
});
app.use(
'/min-side-arbeidsgiver/arbeidsgiver-arbeidsforhold-api/antall-arbeidsforhold',
(req, res) => {
const antall = 502;
const missing = Math.floor(Math.random() * 10) === 0;
setTimeout(() => {
res.send({ first: '131488434', second: missing ? -1 : antall });
}, 1000);
}
);
};
Loading

0 comments on commit 121b5e4

Please sign in to comment.