Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update nodejs to 20 and use new keycloak lib #1317

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 16.14.0
nodejs 20.17.0
yarn 1.22.4
python 3.11.0
postgres 11.4
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@fortawesome/react-fontawesome": "0.2.0",
"@giscus/react": "^2.2.6",
"@rjsf/core": "4.2.0",
"axios": "0.27.2",
"axios": "1.7.7",
"backslash": "0.2.0",
"bootstrap": "5.2.1",
"clsx": "1.2.1",
Expand Down Expand Up @@ -78,9 +78,9 @@
"@babel/preset-env": "7.19.1",
"@babel/preset-typescript": "7.18.6",
"@peculiar/webcrypto": "1.4.0",
"@types/cypress": "^1.1.3",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@types/cypress": "^1.1.3",
"@types/jest-axe": "3.5.4",
"@types/jsrsasign": "10.5.3",
"@types/lodash.camelcase": "^4.3.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import InfoOverlay from 'components/InfoOverlay';
import { subtractDaysFromDate } from '@app/utils/helpers';
import CenteredModal from '@app/components/CenteredModal';
import { SurveyContext } from '@app/pages/_app';
import { Axios, AxiosProgressEvent } from 'axios';

const ModalContent = styled.div`
display: flex;
Expand Down Expand Up @@ -172,8 +173,8 @@ const LogsPanel = ({ integration, alert }: Props) => {
setToDate(val);
};

const handleFileProgress = (progressEvent: ProgressEvent) => {
const percentComplete = Math.floor((progressEvent.loaded / progressEvent.total) * 100);
const handleFileProgress = (progressEvent: AxiosProgressEvent) => {
const percentComplete = Math.floor((progressEvent.loaded / Number(progressEvent.total)) * 100);
if (percentComplete !== fileProgress) {
setFileProgress(percentComplete);
}
Expand Down
5 changes: 4 additions & 1 deletion app/services/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ instance.interceptors.request.use(
return config;
}
const authHeader = await getAuthHeader();
return { ...config, headers: { ...headers, Authorization: authHeader } };
if (authHeader) {
config.headers.set('Authorization', authHeader);
}
return config;
},
function (error) {
return Promise.reject(error);
Expand Down
4 changes: 2 additions & 2 deletions app/services/grafana.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AxiosProgressEvent } from 'axios';
import { instance } from './axios';

export const getMetrics = async (id: number, env: string, fromDate?: string, toDate?: string) => {
Expand All @@ -18,13 +19,12 @@ export const getLogs = async (
env: string,
fromDate: Date,
toDate: Date,
onProgress: (progressEvent: ProgressEvent) => void,
onProgress: (progressEvent: AxiosProgressEvent) => void,
controller?: AbortController,
) => {
try {
const result = await instance({
url: `requests/${id}/logs?env=${env}&start=${fromDate}&end=${toDate}`,
method: 'GET',
responseType: 'blob',
onDownloadProgress: onProgress,
signal: controller?.signal,
Expand Down
24 changes: 15 additions & 9 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3513,13 +3513,14 @@ axe-core@^4.2.0, axe-core@^4.4.3:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.3.tgz#11c74d23d5013c0fa5d183796729bc3482bd2f6f"
integrity sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==

axios@0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
axios@1.7.7:
version "1.7.7"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f"
integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==
dependencies:
follow-redirects "^1.14.9"
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axobject-query@^2.2.0:
version "2.2.0"
Expand Down Expand Up @@ -5431,10 +5432,10 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2"
integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==

follow-redirects@^1.14.9:
version "1.15.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5"
integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==
follow-redirects@^1.15.6:
version "1.15.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==

forever-agent@~0.6.1:
version "0.6.1"
Expand Down Expand Up @@ -8121,6 +8122,11 @@ proxy-from-env@1.0.0:
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ We now have a cypress test suite built out. These can be run against a local ver

#### Step 0) Requirements

- nodejs version 18
- nodejs version 20
- docker-compose 2.24.6

#### Step 1) Run app locally
Expand Down
Loading
Loading