Basic MultiJobs

This commit is contained in:
Dunemask 2022-08-05 13:03:48 +00:00
parent 91027e79af
commit 8ad5b7876c
25 changed files with 539 additions and 142 deletions

View file

@ -1,4 +1,5 @@
import React, { useState, useContext } from "react";
import {useNavigate} from "react-router-dom";
import StoreContext from "../../ctx/StoreContext.jsx";
import JobContext from "../../ctx/JobContext.jsx";
@ -15,7 +16,7 @@ import Stack from "@mui/material/Stack";
export default function CatalogBox(props) {
const { catalogTest } = props;
const {
name: testName,
class: testClass,
@ -24,6 +25,8 @@ export default function CatalogBox(props) {
type: testType,
} = catalogTest;
const navigate = useNavigate();
const { state: store, updateStore } = useContext(StoreContext);
const { state: jobState, jobBuilder } = useContext(JobContext);
@ -35,7 +38,8 @@ export default function CatalogBox(props) {
const runTest = (e) => {
e.preventDefault();
e.stopPropagation();
jobBuilder([catalogTest]);
const jobId = jobBuilder([catalogTest]);
if(store.focusJob) navigate(`/qualiteer/jobs#${jobId}`);
};
function Actions() {