diff --git a/src/views/jobs/builder/GroupConfirm.jsx b/src/views/jobs/builder/GroupConfirm.jsx
new file mode 100644
index 0000000..7a3514b
--- /dev/null
+++ b/src/views/jobs/builder/GroupConfirm.jsx
@@ -0,0 +1,25 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function GroupConfirm(props) {
+ const { cache, setCache, back, start } = props;
+
+ return (
+
+
+ Confirm group?
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+ );
+}
+
+export default GroupConfirm;
diff --git a/src/views/jobs/builder/GroupSelector.jsx b/src/views/jobs/builder/GroupSelector.jsx
new file mode 100644
index 0000000..98d5fbe
--- /dev/null
+++ b/src/views/jobs/builder/GroupSelector.jsx
@@ -0,0 +1,30 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function GroupSelector(props) {
+ const { cache, setCache, cancel, next } = props;
+ function makeReq() {
+ setCache({
+ testNames: ["single"],
+ });
+ }
+
+ return (
+
+
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+
+ );
+}
+
+export default GroupSelector;
diff --git a/src/views/jobs/builder/IndividualConfirm.jsx b/src/views/jobs/builder/IndividualConfirm.jsx
new file mode 100644
index 0000000..3f91839
--- /dev/null
+++ b/src/views/jobs/builder/IndividualConfirm.jsx
@@ -0,0 +1,25 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function IndividualConfirm(props) {
+ const { cache, setCache, back, start } = props;
+
+ return (
+
+
+ Individual Confirm?
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+ );
+}
+
+export default IndividualConfirm;
diff --git a/src/views/jobs/builder/IndividualSelector.jsx b/src/views/jobs/builder/IndividualSelector.jsx
new file mode 100644
index 0000000..2bdaacd
--- /dev/null
+++ b/src/views/jobs/builder/IndividualSelector.jsx
@@ -0,0 +1,31 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function IndividualSelector(props) {
+ const { cache, setCache, cancel, next } = props;
+ function makeReq() {
+ setCache({
+ testNames: ["failing"],
+ });
+
+ }
+
+ return (
+
+
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+
+ );
+}
+
+export default IndividualSelector;
diff --git a/src/views/jobs/builder/JobBuilder.jsx b/src/views/jobs/builder/JobBuilder.jsx
index 36191e4..bc90607 100644
--- a/src/views/jobs/builder/JobBuilder.jsx
+++ b/src/views/jobs/builder/JobBuilder.jsx
@@ -1,11 +1,9 @@
import React, { useContext, useState, useEffect } from "react";
-
+import {useNavigate} from "react-router-dom";
import StoreContext from "../../../ctx/StoreContext.jsx";
+import JobContext from "../../../ctx/JobContext.jsx";
-import Button from "@mui/material/Button";
import Dialog from "@mui/material/Dialog";
-import DialogActions from "@mui/material/DialogActions";
-import DialogContent from "@mui/material/DialogContent";
import Toolbar from "@mui/material/Toolbar";
import DialogTitle from "@mui/material/DialogTitle";
@@ -18,9 +16,22 @@ import PageviewIcon from "@mui/icons-material/Pageview";
import ViewColumnIcon from "@mui/icons-material/ViewColumn";
import ViewCarouselIcon from "@mui/icons-material/ViewCarousel";
-export default function JobBuilder(props) {
- const { state: store, updateStore } = useContext(StoreContext);
+import IndividualSelector from "./IndividualSelector.jsx";
+import IndividualConfirm from "./IndividualConfirm.jsx";
+import GroupSelector from "./GroupSelector.jsx";
+import GroupConfirm from "./GroupConfirm.jsx";
+
+import PipelineSelector from "./PipelineSelector.jsx";
+import PipelineTrackSelector from "./PipelineTrackSelector.jsx";
+import PipelineConfirm from "./PipelineConfirm.jsx";
+
+
+
+export default function JobBuilder() {
+ const navigate = useNavigate();
+ const { state: store } = useContext(StoreContext);
+ const { jobFactory } = useContext(JobContext);
const [quickOpen, setQuickOpen] = useState(false);
const [jobDialogOpen, setJobDialogOpen] = useState(false);
@@ -28,39 +39,51 @@ export default function JobBuilder(props) {
e.preventDefault();
e.stopPropagation();
if (!store.simplifiedControls) return setQuickOpen(!quickOpen);
+ setBuilderPage("individualSelect");
setJobDialogOpen(true);
};
const quickOpenClose = () => setQuickOpen(false);
- const handleClickOpen = () => setJobDialogOpen(true);
-
+ const handleClickOpen = (page)=> () =>{
+ setBuilderPage(page);
+ setJobDialogOpen(true);
+ }
+ const [builderPage, setBuilderPage] = useState();
const [cache, setCache] = useState({});
const handleClose = (confirmed) => () => {
setJobDialogOpen(false);
if (!confirmed) return;
- jobBuilder(cache);
+ const jobId = jobFactory(cache);
+ if(store.focusJob)
+ navigate(`/qualiteer/jobs#${jobId}`);
};
// Pull info from url if possible?
const actions = [
- { name: "Suite", icon:
},
- { name: "Compound", icon:
},
- { name: "Manual", icon:
},
+ { name: "Suite", icon:
, page: "groupSelect" },
+ { name: "Compound", icon:
, page: "pipelineSelect" },
+ { name: "Manual", icon:
, page: "individualSelect" },
];
+ const changePage = (page) => () => setBuilderPage(page);
+
+ const pages = {
+ individualSelect:
,
+ individualConfirm: ,
+ groupSelect: ,
+ groupConfirm: ,
+ pipelineSelect: ,
+ pipelineTrackSelect: ,
+ pipelineConfirm:
+ }
+
return (
@@ -76,7 +99,7 @@ export default function JobBuilder(props) {
key={action.name}
icon={action.icon}
tooltipTitle={action.name}
- onClick={handleClickOpen}
+ onClick={handleClickOpen(action.page)}
/>
))}
diff --git a/src/views/jobs/builder/PipelineConfirm.jsx b/src/views/jobs/builder/PipelineConfirm.jsx
new file mode 100644
index 0000000..aeb0a53
--- /dev/null
+++ b/src/views/jobs/builder/PipelineConfirm.jsx
@@ -0,0 +1,26 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function PipelineConfirm(props) {
+ const { cache, back, start } = props;
+
+ return (
+
+
+ Pipeline Confirm
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+
+ );
+}
+
+export default PipelineConfirm;
diff --git a/src/views/jobs/builder/PipelineSelector.jsx b/src/views/jobs/builder/PipelineSelector.jsx
new file mode 100644
index 0000000..5fc2ec6
--- /dev/null
+++ b/src/views/jobs/builder/PipelineSelector.jsx
@@ -0,0 +1,91 @@
+import React, {useContext} from "react";
+import StoreContext from "../../../ctx/StoreContext.jsx";
+
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+import Accordion from "@mui/material/Accordion";
+import AccordionDetails from "@mui/material/AccordionDetails";
+import AccordionSummary from "@mui/material/AccordionSummary";
+import Typography from "@mui/material/Typography";
+import Stack from "@mui/material/Stack";
+
+function PipelineSelector(props){
+ const {cache, setCache, cancel, next} = props;
+ const {state: store} = useContext(StoreContext);
+ const { pipelineMappings } = store;
+ const primaryMappings = {};
+ for(var pm of pipelineMappings){
+ if(!(pm[0] in primaryMappings)) primaryMappings[pm[0]] = [];
+ primaryMappings[pm[0]].push(pm);
+ }
+
+ const selectPrimary = (primarySelectedMappings) => ()=>{
+ setCache({primarySelectedMappings});
+ };
+
+ return(
+
+ {Object.keys(primaryMappings).map((k, i)=>(
+
+
+ {k}
+
+
+ {primaryMappings[k].length}
+
+
+ ))}
+
+
+
+
+
+ )
+
+
+}
+export default PipelineSelector;
+
+/*
+ Server -> pipeMappings
+ [["primary", "secondary1", "tertiary1"], ["primary", "secondary2", "tertiary3"]]
+ */
+ /*
+ const primaryMappings = pipeMappings.filter((m)=>m[0] === "primary"); // Select Page
+
+ const displayTracks = [];
+ // Track Select Page
+ for(var pm of primaryMappings){
+ for(var i=0;i{
+
+ })
+ */
+ /* Cache:
+ {
+ testTree: [["primary"],["secondary1", "secondary2"], ["tertiary1", "tertiary3"]]
+ }
+ */
+ /*
+ tracks: [["primary", "secondary1", "tertiary1"], ["primary", "secondary2", "tertiary3"]]
+ */
+ /**/
\ No newline at end of file
diff --git a/src/views/jobs/builder/PipelineTrackSelector.jsx b/src/views/jobs/builder/PipelineTrackSelector.jsx
new file mode 100644
index 0000000..083ae2a
--- /dev/null
+++ b/src/views/jobs/builder/PipelineTrackSelector.jsx
@@ -0,0 +1,25 @@
+import React from "react";
+import Button from "@mui/material/Button";
+import DialogActions from "@mui/material/DialogActions";
+import DialogContent from "@mui/material/DialogContent";
+
+function PipelineTrackSelector(props) {
+ const { cache, setCache, back, next } = props;
+
+ return (
+
+
+ Select Track
+ {JSON.stringify(cache)}
+
+
+
+
+
+
+ );
+}
+
+export default PipelineTrackSelector;
diff --git a/src/views/settings/Settings.jsx b/src/views/settings/Settings.jsx
index 9713af6..1c16182 100644
--- a/src/views/settings/Settings.jsx
+++ b/src/views/settings/Settings.jsx
@@ -107,29 +107,17 @@ export default function Settings(props) {
-
+
-
+
-
+
{
};
axios.post(reportingUrl, { testResult }).catch((e) => {
console.log(e.response.status);
+ }).then(()=>{
+ if(status.status === 1) process.exit(1);
});
}, endLiveCount * 1000);
diff --git a/vite.config.js b/vite.config.js
index 904b0fb..2a03780 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -9,6 +9,13 @@ export default () => {
hmr: {
port: 443,
},
+ proxy: {
+ '/api': 'http://localhost:52000',
+ '/socket.io': {
+ target: 'ws://localhost:52000',
+ ws: true
+ }
+ }
},
build: {
outDir: "./build",