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, { jobStatus } from "../../ctx/JobContext.jsx";
@ -35,7 +36,6 @@ const stopPropagation = (e) => e.stopPropagation() && e.preventDefault();
export default function FailingBox(props) {
const { failingTest, silenceClick } = props;
const {
class: testClass,
name: testName,
@ -50,6 +50,8 @@ export default function FailingBox(props) {
jobStatus: testJobStatus,
} = failingTest;
const navigate = useNavigate();
const { state: jobState, retrySingle } = useContext(JobContext);
const { state: store, updateStore, removeFailure } = useContext(StoreContext);
@ -74,7 +76,10 @@ export default function FailingBox(props) {
return "error";
}
const retryTest = () => retrySingle(failingTest);
const retryTest = () => {
const jobId = retrySingle(failingTest);
if(store.focusJob) navigate(`/qualiteer/jobs#${jobId}`);
}
const jobOnClick = () => {
switch (testJobStatus) {