Skip to content

Commit 26fcc52

Browse files
authored
refresh dependencies (#134)
* refresh dependencies - upgrade to react@19 - add and compatibility package for react@19 * fix bar chart; run formatter * refresh /app dependencies * combine duplicate example env files
1 parent 4342f8e commit 26fcc52

File tree

11 files changed

+1045
-1313
lines changed

11 files changed

+1045
-1313
lines changed

app/poetry.lock

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

app/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88

99
[tool.poetry.dependencies]
1010
flask = "^3.1.1"
11-
flask-Cors = "^4.0.1"
11+
flask-Cors = "^6.0.0"
1212
flask-migrate = "^4.0.7"
1313
flask-sqlalchemy = "3.0.5"
1414
grpcio = "^1.53.2"
@@ -24,7 +24,7 @@ python-dateutil = "^2.9.0-post.0"
2424
python-dotenv = "^1.0.1"
2525
python-magic = "^0.4.27"
2626
rarfile = "^4.2"
27-
requests = "^2.32.3"
27+
requests = "^2.32.4"
2828
sqlalchemy = "^1.4.54"
2929
waitress = "^3.0.2"
3030
jinja2 = "^3.1.6"

app/strelka_ui/.env.example

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

app/strelka_ui/example.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export DATABASE_PORT=5432
2121
export DATABASE_DBNAME=strelka_ui
2222

2323
# Root Certificates
24+
# /certs is mapped in the docker compose file to the certs directory at the root of this project
2425
export CA_CERT_PATH=
26+
# export REQUESTS_CA_BUNDLE=
2527

2628
# VirusTotal Support
2729
export VIRUSTOTAL_API_KEY=

ui/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"type": "module",
66
"homepage": "/",
77
"dependencies": {
8-
"@ant-design/icons": "^5.5.1",
8+
"@ant-design/icons": "^6.0.0",
99
"@ant-design/pro-form": "^2.25.1",
1010
"@ant-design/pro-layout": "^7.19.0",
11+
"@ant-design/v5-patch-for-react-19": "^1.0.3",
1112
"@microlink/react-json-view": "^1.24.0",
1213
"@tanstack/react-query": "^5.64.1",
1314
"@tanstack/react-query-devtools": "^5.64.1",
14-
"@types/chroma-js": "^2.4.5",
15+
"@types/chroma-js": "^3.1.1",
1516
"@types/react": "^19.0.2",
1617
"@types/react-dom": "^19.0.2",
1718
"@xyflow/react": "^12.4.0",
@@ -20,18 +21,18 @@
2021
"chroma-js": "^3.1.2",
2122
"dagre": "^0.8.5",
2223
"html-to-image": "^1.11.11",
23-
"react": "^18",
24-
"react-dom": "^18",
24+
"react": "^19.1.1",
25+
"react-dom": "^19.1.1",
2526
"react-router": "^7.5.2",
26-
"recharts": "^2.15.0",
27+
"recharts": "^3.1.2",
2728
"styled-components": "^6.1.1",
2829
"typescript": "^5.7.2",
29-
"vite-plugin-checker": "^0.8.0"
30+
"vite-plugin-checker": "^0.10.2"
3031
},
3132
"devDependencies": {
3233
"@biomejs/biome": "1.9.4",
3334
"@vitejs/plugin-react": "^4.3.4",
34-
"vite": "^6.2.7",
35+
"vite": "^7.0.6",
3536
"vitest": "^3.1.2"
3637
},
3738
"scripts": {

ui/src/components/Visualizations/MimeTypeBarChart.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,23 @@ const MimeTypeBarChart = ({ height }: MimeTypeBarChartProps) => {
6262
const otherKeys = allBarKeys.slice(20)
6363

6464
let otherTotal = 0
65-
for (const item of data) {
66-
item.other = otherKeys.reduce(
65+
const dataWithOther = data.map((item) => {
66+
const otherValue = otherKeys.reduce(
6767
(acc, key) => acc + ((item[key] as number) || 0),
6868
0,
6969
)
70-
otherTotal += item.other
71-
}
70+
otherTotal += otherValue
71+
return { ...item, other: otherValue }
72+
})
7273

7374
const barKeys = topKeys
7475

7576
return (
7677
<ResponsiveContainer width="100%" height={height}>
77-
<BarChart data={data} margin={{ top: 5, right: 30, left: 20, bottom: 5 }}>
78+
<BarChart
79+
data={dataWithOther}
80+
margin={{ top: 5, right: 30, left: 20, bottom: 5 }}
81+
>
7882
<CartesianGrid strokeDasharray="3 3" />
7983
<XAxis dataKey="month" tick={{ fontSize: 10 }} />
8084
<YAxis tick={{ fontSize: 10 }} />

ui/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import '@ant-design/v5-patch-for-react-19'
12
import { createRoot } from 'react-dom/client'
23
import App from './App'
34
import { QueryProvider } from './providers/QueryProvider'

ui/src/layouts/AppLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { Layout, Menu, Switch } from 'antd'
88
import { useState } from 'react'
99

10-
import { lazy, Suspense } from 'react'
10+
import { Suspense, lazy } from 'react'
1111
import { Link } from 'react-router'
1212
import { DatabaseStatus } from '../components/DatabaseStatus'
1313
import SystemStatus from '../components/SystemStatus'

ui/src/pages/SubmissionView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Button, Col, Row, Spin, Tag } from 'antd'
21
import { ReloadOutlined } from '@ant-design/icons'
2+
import { Button, Col, Row, Spin, Tag } from 'antd'
33
import { useEffect, useState } from 'react'
4-
import { useParams, useNavigate } from 'react-router'
4+
import { useNavigate, useParams } from 'react-router'
55

66
import PageWrapper from '../components/PageWrapper'
77

@@ -25,9 +25,9 @@ import { useFetchScanById } from '../hooks/useFetchScanById'
2525
import { NodeDetailsDrawer } from '../components/NodeDetailsDrawer'
2626

2727
import { CollapseCard } from '../components/CollapseCard'
28-
import type { StrelkaResponse } from '../services/api.types'
29-
import { resubmitFile } from '../services/api'
3028
import { useMessageApi } from '../providers/MessageProvider'
29+
import { resubmitFile } from '../services/api'
30+
import type { StrelkaResponse } from '../services/api.types'
3131

3232
/**
3333
* SubmissionsPage component to display strelka scan results

ui/src/tests/colors.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from 'vitest'
2-
import { getColorForString, antdColors } from '../utils/colors'
2+
import { antdColors, getColorForString } from '../utils/colors'
33

44
test('should return a color for a given string', () => {
55
const input = 'test'

0 commit comments

Comments
 (0)