Upgrade dependancies (#2290)
* Bump vite * bump eslint-import-resolver-typescript * Cleanup * Bump datepicker
This commit is contained in:
parent
7d4e42c860
commit
eb26883949
9 changed files with 683 additions and 209 deletions
|
@ -31,4 +31,5 @@ export default {
|
||||||
'jest-watch-typeahead/testname',
|
'jest-watch-typeahead/testname',
|
||||||
],
|
],
|
||||||
resetMocks: true,
|
resetMocks: true,
|
||||||
|
reporters: ['default', 'github-actions'],
|
||||||
} as Config.InitialOptions;
|
} as Config.InitialOptions;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"@testing-library/react": "^13.2.0",
|
"@testing-library/react": "^13.2.0",
|
||||||
"@types/testing-library__jest-dom": "^5.14.5",
|
"@types/testing-library__jest-dom": "^5.14.5",
|
||||||
"@types/yup": "^0.29.13",
|
"@types/yup": "^0.29.13",
|
||||||
"@vitejs/plugin-react": "^1.3.2",
|
"@vitejs/plugin-react": "^2.0.0",
|
||||||
"ace-builds": "^1.4.12",
|
"ace-builds": "^1.4.12",
|
||||||
"ajv": "^8.6.3",
|
"ajv": "^8.6.3",
|
||||||
"babel-jest": "^28.1.1",
|
"babel-jest": "^28.1.1",
|
||||||
|
@ -24,14 +24,14 @@
|
||||||
"dayjs": "^1.11.2",
|
"dayjs": "^1.11.2",
|
||||||
"fetch-mock": "^9.11.0",
|
"fetch-mock": "^9.11.0",
|
||||||
"jest": "^28.1.1",
|
"jest": "^28.1.1",
|
||||||
"jest-watch-typeahead": "^1.1.0",
|
"jest-watch-typeahead": "^2.0.0",
|
||||||
"json-schema-faker": "^0.5.0-rcv.39",
|
"json-schema-faker": "^0.5.0-rcv.39",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"pretty-ms": "^7.0.1",
|
"pretty-ms": "7.0.1",
|
||||||
"react": "^18.1.0",
|
"react": "^18.1.0",
|
||||||
"react-ace": "^9.4.3",
|
"react-ace": "^10.1.0",
|
||||||
"react-datepicker": "^4.2.0",
|
"react-datepicker": "^4.8.0",
|
||||||
"react-dom": "^18.1.0",
|
"react-dom": "^18.1.0",
|
||||||
"react-hook-form": "7.6.9",
|
"react-hook-form": "7.6.9",
|
||||||
"react-is": "^18.2.0",
|
"react-is": "^18.2.0",
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
"sass": "^1.52.3",
|
"sass": "^1.52.3",
|
||||||
"styled-components": "^5.3.1",
|
"styled-components": "^5.3.1",
|
||||||
"use-debounce": "^8.0.1",
|
"use-debounce": "^8.0.1",
|
||||||
"vite": "^2.9.11",
|
"vite": "^3.0.2",
|
||||||
"vite-tsconfig-paths": "^3.5.0",
|
"vite-tsconfig-paths": "^3.5.0",
|
||||||
"whatwg-fetch": "^3.6.2",
|
"whatwg-fetch": "^3.6.2",
|
||||||
"yup": "^0.32.9"
|
"yup": "^0.32.9"
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx}": [
|
"*.{ts,tsx}": [
|
||||||
"eslint --fix",
|
"eslint --fix",
|
||||||
"pnpm test -- --bail --findRelatedTests --watchAll=false"
|
"pnpm test -- --bail --findRelatedTests --watchAll=false --passWithNoTests"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
"@types/lodash": "^4.14.172",
|
"@types/lodash": "^4.14.172",
|
||||||
"@types/node": "^16.4.13",
|
"@types/node": "^16.4.13",
|
||||||
"@types/react": "^18.0.9",
|
"@types/react": "^18.0.9",
|
||||||
"@types/react-datepicker": "^4.1.4",
|
"@types/react-datepicker": "^4.4.2",
|
||||||
"@types/react-dom": "^18.0.3",
|
"@types/react-dom": "^18.0.3",
|
||||||
"@types/react-redux": "^7.1.18",
|
"@types/react-redux": "^7.1.18",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-config-react-app": "^7.0.1",
|
"eslint-config-react-app": "^7.0.1",
|
||||||
"eslint-import-resolver-node": "^0.3.6",
|
"eslint-import-resolver-node": "^0.3.6",
|
||||||
"eslint-import-resolver-typescript": "^2.7.1",
|
"eslint-import-resolver-typescript": "^3.2.7",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jest-dom": "^4.0.2",
|
"eslint-plugin-jest-dom": "^4.0.2",
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||||
|
|
832
kafka-ui-react-app/pnpm-lock.yaml
generated
832
kafka-ui-react-app/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react';
|
import React, { Suspense } from 'react';
|
||||||
import PageHeading from 'components/common/PageHeading/PageHeading';
|
import PageHeading from 'components/common/PageHeading/PageHeading';
|
||||||
import * as Metrics from 'components/common/Metrics';
|
import * as Metrics from 'components/common/Metrics';
|
||||||
import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
|
import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
|
||||||
|
@ -15,6 +15,7 @@ import { NavLink, Route, Routes } from 'react-router-dom';
|
||||||
import BrokerLogdir from 'components/Brokers/Broker/BrokerLogdir/BrokerLogdir';
|
import BrokerLogdir from 'components/Brokers/Broker/BrokerLogdir/BrokerLogdir';
|
||||||
import BrokerMetrics from 'components/Brokers/Broker/BrokerMetrics/BrokerMetrics';
|
import BrokerMetrics from 'components/Brokers/Broker/BrokerMetrics/BrokerMetrics';
|
||||||
import Navbar from 'components/common/Navigation/Navbar.styled';
|
import Navbar from 'components/common/Navigation/Navbar.styled';
|
||||||
|
import PageLoader from 'components/common/PageLoader/PageLoader';
|
||||||
|
|
||||||
export interface BrokerLogdirState {
|
export interface BrokerLogdirState {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -67,13 +68,15 @@ const Broker: React.FC = () => {
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</Navbar>
|
</Navbar>
|
||||||
|
|
||||||
<Routes>
|
<Suspense fallback={<PageLoader />}>
|
||||||
<Route index element={<BrokerLogdir />} />
|
<Routes>
|
||||||
<Route
|
<Route index element={<BrokerLogdir />} />
|
||||||
path={clusterBrokerMetricsRelativePath}
|
<Route
|
||||||
element={<BrokerMetrics />}
|
path={clusterBrokerMetricsRelativePath}
|
||||||
/>
|
element={<BrokerMetrics />}
|
||||||
</Routes>
|
/>
|
||||||
|
</Routes>
|
||||||
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { SchemaType } from 'generated-sources';
|
||||||
|
|
||||||
import * as S from './EditorViewer.styled';
|
import * as S from './EditorViewer.styled';
|
||||||
|
|
||||||
export interface FullMessageProps {
|
export interface EditorViewerProps {
|
||||||
data: string;
|
data: string;
|
||||||
schemaType?: string;
|
schemaType?: string;
|
||||||
maxLines?: number;
|
maxLines?: number;
|
||||||
|
@ -16,7 +16,7 @@ const getSchemaValue = (data: string, schemaType?: string) => {
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
const EditorViewer: React.FC<FullMessageProps> = ({
|
const EditorViewer: React.FC<EditorViewerProps> = ({
|
||||||
data,
|
data,
|
||||||
schemaType,
|
schemaType,
|
||||||
maxLines,
|
maxLines,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import EditorViewer, {
|
import EditorViewer, {
|
||||||
FullMessageProps,
|
EditorViewerProps,
|
||||||
} from 'components/common/EditorViewer/EditorViewer';
|
} from 'components/common/EditorViewer/EditorViewer';
|
||||||
import { render } from 'lib/testHelpers';
|
import { render } from 'lib/testHelpers';
|
||||||
import { screen } from '@testing-library/react';
|
import { screen } from '@testing-library/react';
|
||||||
|
@ -10,7 +10,7 @@ const maxLines = 28;
|
||||||
const schemaType = 'JSON';
|
const schemaType = 'JSON';
|
||||||
|
|
||||||
describe('EditorViewer component', () => {
|
describe('EditorViewer component', () => {
|
||||||
const setupComponent = (props: FullMessageProps) =>
|
const setupComponent = (props: EditorViewerProps) =>
|
||||||
render(<EditorViewer {...props} />);
|
render(<EditorViewer {...props} />);
|
||||||
|
|
||||||
it('renders JSONTree', () => {
|
it('renders JSONTree', () => {
|
||||||
|
|
|
@ -5,12 +5,14 @@ const Navbar = styled.nav`
|
||||||
border-bottom: 1px ${({ theme }) => theme.primaryTab.borderColor.nav} solid;
|
border-bottom: 1px ${({ theme }) => theme.primaryTab.borderColor.nav} solid;
|
||||||
& a {
|
& a {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 96px;
|
min-width: 96px;
|
||||||
|
padding: 0 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
white-space: nowrap;
|
||||||
color: ${(props) => props.theme.primaryTab.color.normal};
|
color: ${(props) => props.theme.primaryTab.color.normal};
|
||||||
border-bottom: 1px ${(props) => props.theme.primaryTab.borderColor.normal}
|
border-bottom: 1px ${(props) => props.theme.primaryTab.borderColor.normal}
|
||||||
solid;
|
solid;
|
||||||
|
|
|
@ -17,8 +17,7 @@ export function useBrokerMetrics(clusterName: ClusterName, brokerId: number) {
|
||||||
api.getBrokersMetrics({
|
api.getBrokersMetrics({
|
||||||
clusterName,
|
clusterName,
|
||||||
id: brokerId,
|
id: brokerId,
|
||||||
}),
|
})
|
||||||
{ refetchInterval: 5000 }
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +28,6 @@ export function useBrokerLogDirs(clusterName: ClusterName, brokerId: number) {
|
||||||
api.getAllBrokersLogdirs({
|
api.getAllBrokersLogdirs({
|
||||||
clusterName,
|
clusterName,
|
||||||
broker: [brokerId],
|
broker: [brokerId],
|
||||||
}),
|
})
|
||||||
{ refetchInterval: 5000 }
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@ export default defineConfig(({ mode }) => {
|
||||||
|
|
||||||
const defaultConfig: UserConfigExport = {
|
const defaultConfig: UserConfigExport = {
|
||||||
plugins: [react(), tsconfigPaths()],
|
plugins: [react(), tsconfigPaths()],
|
||||||
|
server: {
|
||||||
|
port: 3000,
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: 'build',
|
outDir: 'build',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
@ -38,6 +41,7 @@ export default defineConfig(({ mode }) => {
|
||||||
return {
|
return {
|
||||||
...defaultConfig,
|
...defaultConfig,
|
||||||
server: {
|
server: {
|
||||||
|
...defaultConfig.server,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
|
|
Loading…
Add table
Reference in a new issue