Skip to content

Commit d988b47

Browse files
authored
Merge branch 'master' into ibodrov-patch-1
2 parents 3a4e2b2 + ad4deba commit d988b47

File tree

33 files changed

+7781
-47057
lines changed

33 files changed

+7781
-47057
lines changed

console2/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
# production
1010
/build
11+
/dist
12+
13+
# Vite
14+
*.local
1115

1216
# misc
1317
.DS_Store

console2/README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Concord UI
22

3-
Uses https://github.com/facebook/create-react-app/ as the boilerplate.
4-
53
## Prerequisites
64

75
- Node 20 or greater, available in `$PATH`;
@@ -27,11 +25,10 @@ In the dev mode the UI is served by running `npm start`.
2725
First time:
2826
```bash
2927
$ npm ci
30-
$ npm start
28+
$ npm run dev
3129
```
3230

33-
The browser should automatically open on http://localhost:3000
34-
(the initial load might take a while, especially on slower machines).
31+
Open http://localhost:3000.
3532

3633
The `ci` step can be skipped for subsequent runs.
3734

@@ -69,9 +66,3 @@ concord-server {
6966
```
7067

7168
Use [./public/cfg.js](./public/cfg.js) as an example.
72-
73-
## Custom Server URL
74-
75-
The `proxy` property in the [package.json](./package.json) file is used to
76-
proxy API requests to the server. It can be used to point the UI in dev mode to
77-
another server.

console2/public/index.html renamed to console2/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
77

8+
<!-- Load config before app initialization -->
89
<script src="/api/service/console/cfg"></script>
910

10-
<link id="favicon" rel="shortcut icon" href="%PUBLIC_URL%/favicon.png">
11+
<link id="favicon" rel="shortcut icon" href="/favicon.png">
1112
<base href="/" />
1213
<title>Concord</title>
1314
</head>
@@ -17,6 +18,9 @@
1718
You need to enable JavaScript to run this app.
1819
</noscript>
1920
<div id="root"></div>
21+
22+
<!-- Vite entry point -->
23+
<script type="module" src="/src/index.tsx"></script>
2024
</body>
2125

2226
</html>

console2/package-lock.json

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

console2/package.json

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,34 @@
22
"name": "concord-console",
33
"version": "1.0.0",
44
"private": true,
5+
"type": "module",
56
"devDependencies": {
6-
"@babel/preset-react": "7.16.0",
77
"@datasert/cronjs-matcher": "^1.4.0",
88
"@testing-library/react": "12.1.2",
99
"@types/jest": "27.0.3",
1010
"@types/lodash": "4.14.178",
11-
"@types/node": "16.11.12",
12-
"@types/prop-types": "15.7.4",
13-
"@types/react": "17.0.37",
14-
"@types/react-dom": "17.0.11",
11+
"@types/react": "18.2.45",
12+
"@types/react-dom": "18.2.18",
1513
"@types/react-redux": "7.1.20",
1614
"@types/react-router": "5.1.17",
1715
"@types/react-router-dom": "5.3.2",
1816
"@types/redux-logger": "3.0.9",
1917
"@types/sinon": "10.0.6",
2018
"@types/styled-components": "5.1.17",
21-
"@types/webpack-env": "1.16.3",
2219
"@typescript-eslint/typescript-estree": "5.35.1",
23-
"babel-cli": "6.26.0",
24-
"babel-core": "7.0.0-bridge.0",
25-
"babel-preset-es2015": "6.24.1",
20+
"@vitejs/plugin-react": "^4.2.1",
2621
"eslint": "7.32.0",
27-
"express": "4.17.1",
28-
"express-http-proxy": "1.6.3",
2922
"prettier": "2.5.1",
3023
"react-hooks-testing-library": "0.6.0",
3124
"redux-devtools-extension": "2.13.9",
3225
"shx": "0.3.3",
3326
"ts-node": "10.4.0",
34-
"typescript": "4.8.2"
27+
"typescript": "5.3.3",
28+
"vite": "^7.1.12"
3529
},
3630
"dependencies": {
3731
"@monaco-editor/react": "4.3.1",
38-
"ansi_up": "4.0.4",
32+
"ansi_up": "6.0.6",
3933
"connected-react-router": "6.9.2",
4034
"constate": "3.3.0",
4135
"copy-to-clipboard": "3.3.1",
@@ -45,15 +39,14 @@
4539
"lodash": "4.17.21",
4640
"parse-domain": "4.1.0",
4741
"query-string": "7.0.1",
48-
"react": "17.0.2",
49-
"react-dom": "17.0.2",
42+
"react": "18.2.0",
43+
"react-dom": "18.2.0",
5044
"react-hook-form": "7.21.2",
5145
"react-idle-timer": "5.4.1",
5246
"react-json-view": "1.21.3",
5347
"react-redux": "7.2.6",
5448
"react-router": "5.2.0",
5549
"react-router-dom": "5.2.0",
56-
"react-scripts": "4.0.3",
5750
"react-spring": "9.3.2",
5851
"reakit": "1.3.11",
5952
"redux": "4.1.2",
@@ -68,12 +61,12 @@
6861
"url-search-params-polyfill": "8.1.1"
6962
},
7063
"scripts": {
71-
"start": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
72-
"build": "export SET NODE_OPTIONS=--openssl-legacy-provider && ./npm.sh run hack:remove-sui-css-dep && export SET BUILD_PATH='./target/classes/META-INF/console2' && react-scripts build",
73-
"hack:remove-sui-css-dep": "shx --silent sed -i @import /*import node_modules/semantic-ui-css/semantic.min.css > /dev/null 2>&1",
74-
"dev": "export SET NODE_OPTIONS=--openssl-legacy-provider && babel-node --presets es2015 scripts/devServer.js",
75-
"test": "react-scripts test",
76-
"test:watch": "./npm.sh test --watch",
64+
"start": "vite",
65+
"dev": "vite",
66+
"build": "vite build",
67+
"build:check": "tsc && vite build",
68+
"preview": "vite preview",
69+
"test": "vitest",
7770
"pretty": "prettier --tab-width 4 --print-width 100 --single-quote --jsx-bracket-same-line --arrow-parens 'always' parser 'typescript' --write 'src/**/*.{ts,tsx}'"
7871
},
7972
"eslintConfig": {

console2/scripts/devServer.js

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

console2/src/components/molecules/ProcessLogViewer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class ProcessLogViewer extends React.Component<Props, State> {
300300
<Button onClick={() => loadWholeLog(opts)}>Show the whole log</Button>
301301
)}
302302
<Button
303-
disabled={process === undefined}
303+
disabled={!instanceId}
304304
onClick={() => window.open(`/api/v1/process/${instanceId}/log`, '_blank')}>
305305
Raw
306306
</Button>

console2/src/components/organisms/CheckpointView/CheckpointPopup/RestoreProcess.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { AnyAction, Dispatch } from 'redux';
3030
import { ConcordKey } from '../../../../api/common';
3131
import { actions } from '../../../../state/data/processes';
3232
import { isFinal, ProcessStatus } from '../../../../api/process';
33-
import { isFunction } from 'util';
33+
import { isFunction } from 'lodash';
3434

3535
interface ExternalProps {
3636
children?: RenderCallback;

console2/src/components/organisms/ProcessLogActivityV2/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ const ProcessLogActivityV2 = ({
260260

261261
<Button.Group>
262262
<Button
263-
disabled={process === undefined}
263+
disabled={!instanceId}
264264
onClick={() => window.open(`/api/v1/process/${instanceId}/log`, '_blank')}>
265265
Raw
266266
</Button>

console2/src/components/pages/AboutPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AboutPage extends React.PureComponent {
3737
<p>
3838
Server version: <ServerVersion />
3939
</p>
40-
<p>Console version: {process.env.REACT_APP_CONCORD_VERSION || 'n/a'}</p>
40+
<p>Console version: {import.meta.env.VITE_CONCORD_VERSION || 'n/a'}</p>
4141
<p>Last updated: {window.concord.lastUpdated || 'n/a'}</p>
4242
</>
4343
);

0 commit comments

Comments
 (0)