Upgraded to vite
This commit is contained in:
parent
d46be86f68
commit
70d8644ead
8 changed files with 541 additions and 24739 deletions
|
@ -9,5 +9,6 @@
|
|||
<body>
|
||||
<noscript>You need to enable JavaScript to run Qualiteer</noscript>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/App.jsx"></script>
|
||||
</body>
|
||||
</html>
|
25225
package-lock.json
generated
25225
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -16,14 +16,14 @@
|
|||
"scripts": {
|
||||
"build:all": "npm run build:react && npm run export:executor",
|
||||
"build:bin:executor": "caxa -m \"Unpacking, please wait...\" -i dist/bundles/ -o bin/executor -- \"{{caxa}}/node_modules/.bin/node\" \"{{caxa}}/qualiteer-executor.js\"",
|
||||
"build:react": "react-scripts build",
|
||||
"build:react": "vite build",
|
||||
"export:executor": "npm run pack:executor && npm run build:bin:executor",
|
||||
"pack:executor": "rollup -c",
|
||||
"start": "node dist/app.js",
|
||||
"start:dev": "nodemon dist/app.js",
|
||||
"start:dev:replit": "npm run start:dev & npm run start:react:replit",
|
||||
"start:react": "react-scripts start",
|
||||
"start:react:replit": "CHOKIDAR_USEPOLLING=true CHOKIDAR_INTERVAL=8000 DANGEROUSLY_DISABLE_HOST_CHECK=true node node_modules/.bin/react-scripts start",
|
||||
"start:react": "vite preview",
|
||||
"start:react:replit": "vite --host",
|
||||
"test": "node tests/index.js",
|
||||
"test:api": "node tests/api.js",
|
||||
"test:dev": "nodemon tests/index.js"
|
||||
|
@ -68,7 +68,8 @@
|
|||
"nodemon": "^2.0.15",
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-scripts": "^5.0.1",
|
||||
"@vitejs/plugin-react": "1.1.1",
|
||||
"vite": "2.7.0",
|
||||
"readline-sync": "^1.4.10",
|
||||
"rollup": "^2.72.0",
|
||||
"rollup-plugin-terser": "^7.0.2"
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
useLocation,
|
||||
} from "react-router-dom";
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Badge, { BadgeProps } from "@mui/material/Badge";
|
||||
import Badge from "@mui/material/Badge";
|
||||
import { styled } from "@mui/material/styles";
|
||||
import Box from "@mui/material/Box";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
useLocation,
|
||||
} from "react-router-dom";
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Badge, { BadgeProps } from "@mui/material/Badge";
|
||||
import Badge from "@mui/material/Badge";
|
||||
import { styled } from "@mui/material/styles";
|
||||
import Box from "@mui/material/Box";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
|
|
|
@ -74,6 +74,27 @@ export default function FailingBox(props) {
|
|||
return "error";
|
||||
}
|
||||
|
||||
const retryTest = () => retrySingle(failingTest);
|
||||
|
||||
const jobOnClick = () => {
|
||||
switch (testJobStatus) {
|
||||
case jobStatus.OK:
|
||||
return null;
|
||||
case jobStatus.ERROR:
|
||||
return retryTest;
|
||||
case jobStatus.PENDING:
|
||||
return null;
|
||||
case jobStatus.ACTIVE:
|
||||
return null;
|
||||
case jobStatus.CANCELED:
|
||||
return retryTest;
|
||||
case jobStatus.QUEUED:
|
||||
return null;
|
||||
default:
|
||||
return retryTest;
|
||||
}
|
||||
}
|
||||
|
||||
function jobIcon() {
|
||||
switch (testJobStatus) {
|
||||
case jobStatus.OK:
|
||||
|
@ -83,9 +104,9 @@ export default function FailingBox(props) {
|
|||
case jobStatus.PENDING:
|
||||
return <PendingIcon color="info" />;
|
||||
case jobStatus.ACTIVE:
|
||||
return <VisibilityIcon color="primary" />;
|
||||
return <VisibilityIcon color="primary"/>;
|
||||
case jobStatus.CANCELED:
|
||||
return <DoNotDisturbIcon color="warning" />;
|
||||
return <DoNotDisturbIcon color="warning"/>;
|
||||
case jobStatus.QUEUED:
|
||||
return <ViewColumnIcon color="secondary" />;
|
||||
default:
|
||||
|
@ -102,7 +123,7 @@ export default function FailingBox(props) {
|
|||
</IconButton>
|
||||
</a>
|
||||
|
||||
<IconButton aria-label="retry" component="span">
|
||||
<IconButton aria-label="retry" component="span" onClick={jobOnClick()}>
|
||||
{jobIcon()}
|
||||
</IconButton>
|
||||
|
||||
|
|
14
vite.config.js
Normal file
14
vite.config.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default () => {
|
||||
return defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
hmr: {
|
||||
port: 443,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue