Skip to content

Commit a59f08b

Browse files
authored
Merge pull request #1224 from flatcar/dependabot/npm_and_yarn/frontend/npm-dependencies-c9cce97946
build(deps): bump the npm-dependencies group in /frontend with 14 updates
2 parents d196114 + 5c120a0 commit a59f08b

10 files changed

Lines changed: 194 additions & 236 deletions

File tree

frontend/package-lock.json

Lines changed: 139 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@mui/system": "^7.1.0",
4545
"@mui/utils": "^7.1.0",
4646
"@reduxjs/toolkit": "^2.9.0",
47-
"@types/node": "^24.6.2",
47+
"@types/node": "^24.7.2",
4848
"@types/react-color": "^3.0.13",
4949
"@types/semver": "^7.7.1",
5050
"cross-env": "^10.1.0",
@@ -53,7 +53,7 @@
5353
"eventemitter3": "^5.0.1",
5454
"formik": "^2.4.6",
5555
"formik-mui": "^4.0.0",
56-
"i18next": "^25.5.3",
56+
"i18next": "^25.6.0",
5757
"i18next-browser-languagedetector": "^8.0.4",
5858
"jwt-decode": "^4.0.0",
5959
"moment-timezone": "^0.6.0",
@@ -63,10 +63,10 @@
6363
"react-dom": "19.2.0",
6464
"react-i18next": "^16.0.0",
6565
"react-redux": "^9.2.0",
66-
"react-router": "^7.9.3",
67-
"react-window": "^2.2.0",
66+
"react-router": "^7.9.4",
67+
"react-window": "^2.2.1",
6868
"recharts": "^3.2.1",
69-
"semver": "^7.7.1",
69+
"semver": "^7.7.3",
7070
"underscore": "^1.13.7",
7171
"yup": "^1.7.1"
7272
},
@@ -75,26 +75,26 @@
7575
"@iconify/icons-mdi": "^1.2.48",
7676
"@iconify/react": "^6.0.2",
7777
"@iconify/tools": "^4.1.4",
78-
"@playwright/test": "1.55.1",
78+
"@playwright/test": "1.56.0",
7979
"@storybook/addon-docs": "^9.1.10",
8080
"@storybook/addon-links": "^9.1.10",
8181
"@storybook/react-vite": "^9.1.10",
8282
"@storybook/test-runner": "^0.24.0-next.2",
8383
"@testing-library/react": "^16.3.0",
8484
"@types/pg": "^8.15.5",
85-
"@types/react": "19.2.0",
86-
"@types/react-dom": "19.2.0",
85+
"@types/react": "19.2.2",
86+
"@types/react-dom": "19.2.1",
8787
"@types/react-router-dom": "^5.3.3",
8888
"@types/underscore": "^1.13.0",
89-
"@typescript-eslint/eslint-plugin": "^8.45.0",
90-
"@typescript-eslint/parser": "^8.45.0",
89+
"@typescript-eslint/eslint-plugin": "^8.46.0",
90+
"@typescript-eslint/parser": "^8.46.0",
9191
"@vitejs/plugin-react": "^5.0.4",
9292
"@vitest/coverage-istanbul": "^3.1.4",
9393
"eslint": "^9.37.0",
9494
"eslint-config-prettier": "^10.1.8",
9595
"eslint-plugin-import": "^2.31.0",
9696
"eslint-plugin-jsx-a11y": "^6.10.2",
97-
"eslint-plugin-react-hooks": "^6.1.1",
97+
"eslint-plugin-react-hooks": "^7.0.0",
9898
"eslint-plugin-react-refresh": "^0.4.23",
9999
"eslint-plugin-simple-import-sort": "^12.1.1",
100100
"eslint-plugin-storybook": "^9.1.10",
@@ -104,13 +104,13 @@
104104
"husky": "^9.1.7",
105105
"i18next-parser": "^9.3.0",
106106
"jsdom": "^27.0.0",
107-
"lint-staged": "^16.2.3",
107+
"lint-staged": "^16.2.4",
108108
"pg": "^8.14.1",
109-
"playwright": "1.55.1",
109+
"playwright": "1.56.0",
110110
"prettier": "^3.6.2",
111111
"storybook": "^9.0.14",
112112
"typescript": "~5.9.3",
113-
"typescript-eslint": "^8.45.0",
113+
"typescript-eslint": "^8.46.0",
114114
"vite": "^7.1.9",
115115
"vitest": "^3.2.3"
116116
},

frontend/src/components/Applications/ApplicationItem.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ export default {
1212
},
1313
} as Meta;
1414

15+
class APIMock extends API {
16+
static getInstancesCount(): Promise<number> {
17+
return new Promise(resolve => resolve(20));
18+
}
19+
}
20+
1521
const Template: StoryFn<ApplicationItemProps> = (
1622
args: JSX.IntrinsicAttributes & ApplicationItemProps
1723
) => {
18-
class APIMock extends API {
19-
static getInstancesCount(): Promise<number> {
20-
return new Promise(resolve => resolve(20));
21-
}
22-
}
23-
2424
return (
2525
<APIContext.Provider value={APIMock}>
2626
<MemoryRouter>

frontend/src/components/Applications/ApplicationList.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export default {
99
title: 'applications/ApplicationList',
1010
} as Meta;
1111

12+
class APIMock extends API {
13+
static getInstancesCount(): Promise<number> {
14+
return new Promise(resolve => resolve(20));
15+
}
16+
}
17+
1218
const Template: StoryFn<ApplicationListPureProps> = (
1319
args: JSX.IntrinsicAttributes & ApplicationListPureProps
1420
) => {
15-
class APIMock extends API {
16-
static getInstancesCount(): Promise<number> {
17-
return new Promise(resolve => resolve(20));
18-
}
19-
}
20-
2121
return (
2222
<APIContext.Provider value={APIMock}>
2323
<MemoryRouter>

frontend/src/components/Groups/GroupCharts/StatusCountTimeline.stories.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ const statusTimelineData = {
4444
'2021-11-08T10:35:28.823161+01:00': { '1': {}, '2': {}, '3': {}, '6': {}, '7': {} },
4545
};
4646

47+
class GroupChartsStoreMock extends GroupChartsStore {
48+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
49+
async getGroupStatusCountTimeline(_appID: string, _groupID: string, _duration: string) {
50+
return statusTimelineData;
51+
}
52+
}
53+
4754
const Template: StoryFn<StatusCountTimelineProps> = (
4855
args: JSX.IntrinsicAttributes & StatusCountTimelineProps
4956
) => {
50-
class GroupChartsStoreMock extends GroupChartsStore {
51-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
52-
async getGroupStatusCountTimeline(_appID: string, _groupID: string, _duration: string) {
53-
return statusTimelineData;
54-
}
55-
}
56-
5757
const ChartStoreContext = groupChartStoreContext();
5858

5959
return (

frontend/src/components/Groups/GroupCharts/TimelineChart.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ export interface TimelineChartProps {
3737

3838
export default function TimelineChart(props: TimelineChartProps) {
3939
const { width = 500, height = 400, interpolation = 'monotone' } = props;
40-
let ticks: {
41-
[key: string]: string;
42-
} = {};
4340

4441
function getTickValues() {
4542
const DAY = 24 * 60;
@@ -55,8 +52,7 @@ export default function TimelineChart(props: TimelineChartProps) {
5552
// We remove 1 element since that's "0 hours"
5653
const dimension = props.data.length - 1;
5754

58-
// Reset the ticks for the chart
59-
ticks = {};
55+
const ticks: Record<string, string> = {};
6056

6157
if (lengthMinutes === 7 * DAY) {
6258
tickCount = 7;
@@ -118,6 +114,8 @@ export default function TimelineChart(props: TimelineChartProps) {
118114
return ticks;
119115
}
120116

117+
const ticks = getTickValues();
118+
121119
return (
122120
<AreaChart
123121
width={width}
@@ -138,7 +136,7 @@ export default function TimelineChart(props: TimelineChartProps) {
138136
type="number"
139137
interval={0}
140138
domain={[0, 'dataMax']}
141-
ticks={Object.keys(getTickValues())}
139+
ticks={Object.keys(ticks)}
142140
tickFormatter={(index: string) => {
143141
return ticks[index];
144142
}}

frontend/src/components/Groups/GroupCharts/VersionCountTimeline.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ const versionCountTimeline = {
3737
'2021-11-08T10:35:28.827204+01:00': { '0.0.0': 61, '2191.5.0': 152 },
3838
};
3939

40-
const Template: StoryFn<VersionCountTimelineProps> = args => {
41-
class GroupChartsStoreMock extends GroupChartsStore {
42-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
43-
async getGroupVersionCountTimeline(_appID: string, _groupID: string, _duration: string) {
44-
return versionCountTimeline;
45-
}
40+
class GroupChartsStoreMock extends GroupChartsStore {
41+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
42+
async getGroupVersionCountTimeline(_appID: string, _groupID: string, _duration: string) {
43+
return versionCountTimeline;
4644
}
45+
}
4746

47+
const Template: StoryFn<VersionCountTimelineProps> = args => {
4848
const ChartStoreContext = groupChartStoreContext();
4949

5050
return (

frontend/src/components/Instances/Charts.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,17 @@ function ProgressDoughnut(props: ProgressDoughnutProps) {
4141
const pieSize = width > height ? height : width;
4242
const radius = pieSize * 0.45;
4343

44-
let totalFilled = 0;
45-
let valuesSum = 0;
46-
const dataSet: RechartsPieData[] = data.map(({ value, color, description }, i) => {
47-
// Ensure that the minimum value displayed is 0.5 if the original value
48-
// is 0, or 1.5 otherwise. This ensures the user is able to see the bits
49-
// related to this value in the charts.
50-
const percentageValue = Math.max(value * 100, value === 0 ? 0.5 : 1.5);
51-
52-
totalFilled += percentageValue;
53-
valuesSum += value * 100;
44+
// Ensure that the minimum value displayed is 0.5 if the original value
45+
// is 0, or 1.5 otherwise. This ensures the user is able to see the bits
46+
// related to this value in the charts.
47+
const percentageValue = (value: number) => Math.max(value * 100, value === 0 ? 0.5 : 1.5);
5448

49+
const totalFilled = data.reduce((acc, { value }) => acc + percentageValue(value), 0);
50+
const valuesSum = data.reduce((acc, { value }) => acc + value * 100, 0);
51+
const dataSet: RechartsPieData[] = data.map(({ value, color, description }, i) => {
5552
return {
5653
x: i,
57-
y: percentageValue,
54+
y: percentageValue(value),
5855
color: color,
5956
description: description,
6057
};

frontend/src/components/layouts/GroupLayout/GroupLayout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ function GroupLayout() {
1717
const [updateGroupModalVisible, setUpdateGroupModalVisible] = React.useState(false);
1818
const { t } = useTranslation();
1919

20+
function onChange() {
21+
setApplications(applicationsStore().getCachedApplications() || []);
22+
}
23+
2024
React.useEffect(() => {
2125
if (!appID) {
2226
return;
@@ -28,10 +32,6 @@ function GroupLayout() {
2832
};
2933
}, [appID]);
3034

31-
function onChange() {
32-
setApplications(applicationsStore().getCachedApplications() || []);
33-
}
34-
3535
function openUpdateGroupModal() {
3636
setUpdateGroupModalVisible(true);
3737
}

frontend/src/i18n/LocaleSelect/LocaleSelect.tsx

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)