Skip to content

Commit 7fbacb7

Browse files
author
Benjamin Perez
committed
Updated project dependencies
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 0398c69 commit 7fbacb7

File tree

5 files changed

+577
-478
lines changed

5 files changed

+577
-478
lines changed

web-app/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"kbar": "^0.1.0-beta.46",
1212
"local-storage-fallback": "^4.1.3",
1313
"lodash": "^4.17.21",
14-
"luxon": "^3.5.0",
15-
"mds": "https://github.com/minio/mds.git#v1.1.2",
14+
"luxon": "^3.6.1",
15+
"mds": "https://github.com/minio/mds.git#v1.1.3",
1616
"react": "^18.3.1",
1717
"react-copy-to-clipboard": "^5.1.0",
1818
"react-dom": "^18.3.1",
19-
"react-dropzone": "^14.3.5",
19+
"react-dropzone": "^14.3.8",
2020
"react-markdown": "8.0.7",
2121
"react-pdf": "^9.2.1",
2222
"react-redux": "^8.1.3",
23-
"react-router-dom": "6.29.0",
23+
"react-router-dom": "6.30.0",
2424
"react-virtualized": "^9.22.6",
2525
"react-window": "^1.8.11",
2626
"react-window-infinite-loader": "^1.0.10",
@@ -59,15 +59,15 @@
5959
"proxy": "http://localhost:9090/",
6060
"devDependencies": {
6161
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
62-
"@babel/runtime": "^7.26.10",
63-
"@playwright/test": "^1.50.1",
62+
"@babel/runtime": "^7.27.1",
63+
"@playwright/test": "^1.52.0",
6464
"@types/jest": "^29.5.14",
65-
"@types/lodash": "^4.17.15",
66-
"@types/luxon": "^3.4.2",
67-
"@types/node": "20.17.19",
68-
"@types/react": "18.3.18",
65+
"@types/lodash": "^4.17.16",
66+
"@types/luxon": "^3.6.2",
67+
"@types/node": "20.17.47",
68+
"@types/react": "18.3.21",
6969
"@types/react-copy-to-clipboard": "^5.0.7",
70-
"@types/react-dom": "18.3.5",
70+
"@types/react-dom": "18.3.7",
7171
"@types/react-redux": "^7.1.34",
7272
"@types/react-virtualized": "^9.22.2",
7373
"@types/react-window": "^1.8.8",
@@ -77,16 +77,16 @@
7777
"@types/webpack-env": "^1.18.8",
7878
"babel-plugin-istanbul": "^6.1.1",
7979
"customize-cra": "^1.0.0",
80-
"knip": "^5.44.4",
81-
"minio": "^8.0.4",
80+
"knip": "^5.56.0",
81+
"minio": "^8.0.5",
8282
"nyc": "^15.1.0",
83-
"prettier": "3.5.1",
83+
"prettier": "3.5.3",
8484
"react-app-rewire-hot-loader": "^2.0.1",
8585
"react-app-rewired": "^2.2.1",
8686
"react-scripts": "5.0.1",
87-
"swagger-typescript-api": "13.0.23",
87+
"swagger-typescript-api": "13.1.3",
8888
"testcafe": "3.7.2",
89-
"typescript": "^5.5.3"
89+
"typescript": "^5.8.3"
9090
},
9191
"resolutions": {
9292
"nth-check": "^2.0.1",

web-app/src/common/__tests__/utils.test.ts

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

web-app/src/common/utils.ts

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const clearSession = () => {
5555
};
5656

5757
//getBytes, converts from a value and a unit from units array to bytes as a string
58-
export const getBytes = (
58+
const getBytes = (
5959
value: string,
6060
unit: string,
6161
fromk8s: boolean = false,
@@ -84,7 +84,7 @@ const getBytesNumber = (
8484
return total;
8585
};
8686

87-
export const setMemoryResource = (
87+
const setMemoryResource = (
8888
memorySize: number,
8989
capacitySize: string,
9090
maxMemorySize: number,
@@ -157,67 +157,6 @@ export const setMemoryResource = (
157157
};
158158
};
159159

160-
// Erasure Code Parity Calc
161-
export const erasureCodeCalc = (
162-
parityValidValues: string[],
163-
totalDisks: number,
164-
pvSize: number,
165-
totalNodes: number,
166-
): IErasureCodeCalc => {
167-
// Parity Values is empty
168-
if (parityValidValues.length < 1) {
169-
return {
170-
error: 1,
171-
defaultEC: "",
172-
erasureCodeSet: 0,
173-
maxEC: "",
174-
rawCapacity: "0",
175-
storageFactors: [],
176-
};
177-
}
178-
179-
const totalStorage = totalDisks * pvSize;
180-
const maxEC = parityValidValues[0];
181-
const maxParityNumber = parseInt(maxEC.split(":")[1], 10);
182-
183-
const erasureStripeSet = maxParityNumber * 2; // ESS is calculated by multiplying maximum parity by two.
184-
185-
const storageFactors: IStorageFactors[] = parityValidValues.map(
186-
(currentParity) => {
187-
const parityNumber = parseInt(currentParity.split(":")[1], 10);
188-
const storageFactor =
189-
erasureStripeSet / (erasureStripeSet - parityNumber);
190-
191-
const maxCapacity = Math.floor(totalStorage / storageFactor);
192-
const maxTolerations =
193-
totalDisks - Math.floor(totalDisks / storageFactor);
194-
return {
195-
erasureCode: currentParity,
196-
storageFactor,
197-
maxCapacity: maxCapacity.toString(10),
198-
maxFailureTolerations: maxTolerations,
199-
};
200-
},
201-
);
202-
203-
let defaultEC = maxEC;
204-
205-
const fourVar = parityValidValues.find((element) => element === "EC:4");
206-
207-
if (fourVar) {
208-
defaultEC = "EC:4";
209-
}
210-
211-
return {
212-
error: 0,
213-
storageFactors,
214-
maxEC,
215-
rawCapacity: totalStorage.toString(10),
216-
erasureCodeSet: erasureStripeSet,
217-
defaultEC,
218-
};
219-
};
220-
221160
// 92400 seconds -> 1 day, 1 hour, 40 minutes.
222161
export const niceTimeFromSeconds = (seconds: number): string => {
223162
const days = Math.floor(seconds / (3600 * 24));

web-app/src/utils/stylesUtils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export const generateOverrideTheme = (overrideVars: IEmbeddedCustomStyles) => {
4040
logoColor: "#C51B3F",
4141
logoLabelColor: overrideVars.fontColor,
4242
logoLabelInverse: "#FFF",
43+
logoContrast: "#000",
44+
logoContrastInverse: overrideVars.fontColor,
4345
loaderColor: overrideVars.loaderColor,
4446
boxBackground: overrideVars.boxBackground,
4547
mutedText: "#9c9c9c",

0 commit comments

Comments
 (0)