+ {jobState.jobs.map((v, i) => (
+
+ ))}
+
+
+
))}
diff --git a/src/views/Settings.jsx b/src/views/Settings.jsx
index 4861ee6..d11cc52 100644
--- a/src/views/Settings.jsx
+++ b/src/views/Settings.jsx
@@ -29,7 +29,7 @@ export default function Settings(props) {
const optionSettings = {
region: {
title: "Region",
- options: [],
+ options: regions,
current: store.defaultRegion,
onSelect: (r) => updateStore({ defaultRegion: r }),
},
@@ -106,7 +106,7 @@ export default function Settings(props) {
/>
-
+
-
+
+
+
+
+
+
+
+
+ ))}
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/views/alt-comps/JobTestSelector.jsx b/src/views/alt-comps/JobTestSelector.jsx
new file mode 100644
index 0000000..58009b8
--- /dev/null
+++ b/src/views/alt-comps/JobTestSelector.jsx
@@ -0,0 +1,25 @@
+import { useState, useEffect } from "react";
+
+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 DialogTitle from "@mui/material/DialogTitle";
+
+export default function JobTestSelector(props){
+ const {jobDialogOpen, handleClose, dialogTitle, testSelector} = props;
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/src/views/components/CatalogBox.jsx b/src/views/components/CatalogBox.jsx
index 483d953..a308609 100644
--- a/src/views/components/CatalogBox.jsx
+++ b/src/views/components/CatalogBox.jsx
@@ -9,7 +9,7 @@ import Typography from "@mui/material/Typography";
import IconButton from "@mui/material/IconButton";
import DeleteIcon from "@mui/icons-material/Delete";
-import NotificationsIcon from "@mui/icons-material/Notifications";
+import PlayArrowIcon from "@mui/icons-material/PlayArrow";
import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack";
@@ -21,41 +21,45 @@ export default function CatalogBox(props) {
name: testName,
class: testClass,
repo: testRepo,
- isCompound,
- type: testType
+ isCompound,
+ type: testType,
} = catalogTest;
const { state: store, updateStore } = useContext(StoreContext);
-
- const { state: jobState, jobBuilder} = useContext(JobContext);
+
+ const { state: jobState, jobBuilder } = useContext(JobContext);
const [open, setOpen] = useState(false);
const toggleOpen = () => setOpen(!open);
-
+
function Actions() {
return (
-
-
-
-
-
+
+
);
}
return (
-
+
-
+
{`${testClass}#`}
{testName}
@@ -77,10 +81,12 @@ export default function CatalogBox(props) {
>
-
- {JSON.stringify(catalogTest)}
-
+
+
+ {JSON.stringify(catalogTest)}
+
+
);
}
diff --git a/src/views/components/CatalogSearch.jsx b/src/views/components/CatalogSearch.jsx
index d0e9c26..58b4115 100644
--- a/src/views/components/CatalogSearch.jsx
+++ b/src/views/components/CatalogSearch.jsx
@@ -27,10 +27,8 @@ export default function CatalogSearch(props) {
placeholder="Search Catalog"
inputProps={{ "aria-label": `search catalog` }}
onChange={onChange}
+ fullWidth
/>
-
-
-
e.stopPropagation() && e.preventDefault();
export default function FailingBox(props) {
- const { failingTest } = props;
+ const { failingTest, silenceClick } = props;
const {
class: testClass,
@@ -92,6 +92,7 @@ export default function FailingBox(props) {
aria-label="silence"
component="span"
color={silencedUntil ? "primary" : "default"}
+ onClick={silenceClick}
>
@@ -152,14 +153,18 @@ export default function FailingBox(props) {
direction="row"
sx={{
ml: "auto",
- display: { xs: "none", sm: "none", md: "flex", lg: "flex" },
+ mb: "auto",
+ mt: "auto",
+ display: { xs: "none", sm: "none", md: "block", lg: "block" },
}}
>
- {failedMessage}
+
+ {failedMessage}
+
);
diff --git a/src/views/components/JobBox.jsx b/src/views/components/JobBox.jsx
new file mode 100644
index 0000000..bb97db4
--- /dev/null
+++ b/src/views/components/JobBox.jsx
@@ -0,0 +1,67 @@
+import React, { useState, useContext } from "react";
+import StoreContext from "../../ctx/StoreContext.jsx";
+import JobContext, { jobStatus } from "../../ctx/JobContext.jsx";
+
+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 IconButton from "@mui/material/IconButton";
+import CheckIcon from "@mui/icons-material/Check";
+import ClearIcon from "@mui/icons-material/Clear";
+import ViewColumnIcon from "@mui/icons-material/ViewColumn";
+import PendingIcon from "@mui/icons-material/Pending";
+import VisibilityIcon from "@mui/icons-material/Visibility";
+import DoNotDisturbIcon from "@mui/icons-material/DoNotDisturb";
+
+import Box from "@mui/material/Box";
+import Stack from "@mui/material/Stack";
+
+export default function JobBox(props) {
+ const { job } = props;
+
+ const { name, status } = job;
+
+ function jobIcon() {
+ switch (status) {
+ case jobStatus.OK:
+ return ;
+ case jobStatus.ERROR:
+ return ;
+ case jobStatus.PENDING:
+ return ;
+ case jobStatus.ACTIVE:
+ return ;
+ case jobStatus.CANCELED:
+ return ;
+ case jobStatus.QUEUED:
+ return ;
+ default:
+ return ;
+ }
+ }
+
+ return (
+
+
+
+ {name}
+
+
+
+ {jobIcon()}
+
+
+
+
+ );
+}
diff --git a/src/views/components/JobTestSelector.jsx b/src/views/components/JobTestSelector.jsx
new file mode 100644
index 0000000..715f62a
--- /dev/null
+++ b/src/views/components/JobTestSelector.jsx
@@ -0,0 +1,47 @@
+import { useState, useEffect } from "react";
+import Box from "@mui/material/Box";
+import List from "@mui/material/List";
+import ListItem from "@mui/material/ListItem";
+import ListItemButton from "@mui/material/ListItemButton";
+import ListItemText from "@mui/material/ListItemText";
+import Checkbox from "@mui/material/Checkbox";
+
+export default function JobTestSelector(props){
+ const {availableTests, queued, setQueued} = props;
+
+ useEffect(()=>{},[availableTests]);
+
+ const queueTest = (test) => () => {
+ const q = [...queued];
+ const testIndex = q.indexOf(test);
+ if(testIndex === -1) q.push(test);
+ else q.splice(testIndex, 1);
+ setQueued(q);
+ };
+
+ return (
+
+
+ {availableTests.map((v, i) => (
+ }
+ disablePadding
+ onClick={queueTest(v)}
+ >
+
+
+ {v.class}#{v.name}
+
+ }
+ style={{ wordBreak: "break-word" }}
+ />
+
+
+ ))}
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/views/components/SilenceDialog.jsx b/src/views/components/SilenceDialog.jsx
index cae9a5e..c2353a8 100644
--- a/src/views/components/SilenceDialog.jsx
+++ b/src/views/components/SilenceDialog.jsx
@@ -1,4 +1,4 @@
-import { useState, useContext } from "react";
+import { useState, useContext, useEffect } from "react";
import StoreContext from "../../ctx/StoreContext.jsx";
import Button from "@mui/material/Button";
@@ -6,6 +6,7 @@ import DialogTitle from "@mui/material/DialogTitle";
import DialogContent from "@mui/material/DialogContent";
import DialogActions from "@mui/material/DialogActions";
import Dialog from "@mui/material/Dialog";
+import TextField from "@mui/material/TextField";
export default function SilenceDialog(props) {
const { silence, open, onClose } = props;
@@ -18,14 +19,15 @@ export default function SilenceDialog(props) {
const { state: store, updateStore } = useContext(StoreContext);
- const upsertSilence = () => {
- console.log("Would upsert silence", silenceEntry);
- };
-
const handleCancel = () => onClose();
const handleOk = () => onClose(silenceEntry);
+ const updateSilence = (silenceType) => (e) => {
+ silenceEntry[silenceType] = e.target.value;
+ setSilenceEntry({ ...silenceEntry });
+ };
+
return (