Prettier
This commit is contained in:
parent
766610d14c
commit
fd71714fc0
11 changed files with 56 additions and 50 deletions
|
@ -2,10 +2,7 @@ import { useContext, useState } from "react";
|
|||
import StoreContext from "../ctx/StoreContext.jsx";
|
||||
import JobContext from "../ctx/JobContext.jsx";
|
||||
|
||||
import {
|
||||
Link,
|
||||
useLocation,
|
||||
} from "react-router-dom";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import AppBar from "@mui/material/AppBar";
|
||||
import Badge from "@mui/material/Badge";
|
||||
import { styled } from "@mui/material/styles";
|
||||
|
@ -101,7 +98,10 @@ export default function Navbar(props) {
|
|||
sx={{ zIndex: drawerIndex(true) }}
|
||||
>
|
||||
<Toolbar />
|
||||
<Box sx={{ width: drawerWidth, overflow: "auto" }} role="presentation">
|
||||
<Box
|
||||
sx={{ width: drawerWidth, overflow: "auto" }}
|
||||
role="presentation"
|
||||
>
|
||||
<List>
|
||||
{pages.map((text, index) => (
|
||||
<ListItemButton
|
||||
|
|
|
@ -13,7 +13,6 @@ import Settings from "./settings/Settings.jsx";
|
|||
import About from "./about/About.jsx";
|
||||
|
||||
export default function Views() {
|
||||
|
||||
return (
|
||||
<div className="view">
|
||||
<Navbar />
|
||||
|
|
|
@ -6,8 +6,6 @@ import CatalogSearch from "./CatalogSearch.jsx";
|
|||
|
||||
import TextField from "@mui/material/TextField";
|
||||
|
||||
|
||||
|
||||
export default function Catalog() {
|
||||
const {
|
||||
state: jobState,
|
||||
|
|
|
@ -17,7 +17,6 @@ import DialogTitle from "@mui/material/DialogTitle";
|
|||
|
||||
import ReplayIcon from "@mui/icons-material/Replay";
|
||||
|
||||
|
||||
export default function Failing() {
|
||||
const { state: jobState, retryAll, activeJobStates } = useContext(JobContext);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default function failingTest(){
|
||||
export default function failingTest() {
|
||||
console.log("This came from a failing test!");
|
||||
return {status:1};
|
||||
return { status: 1 };
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
export default function primaryTest(){
|
||||
export default function primaryTest() {
|
||||
console.log("This came from a primary test!");
|
||||
return {status:0, pipelineData:"SomeData"};
|
||||
return { status: 0, pipelineData: "SomeData" };
|
||||
}
|
|
@ -9,21 +9,29 @@ const endLiveCount = 5;
|
|||
const reportingUrl = `${process.env.QUALITEER_URL}/api/dev/rabbit/TestResults`;
|
||||
// Pull args
|
||||
const args = process.argv.slice(2);
|
||||
const test = (args.find((v)=>v.includes("test=")) ?? "").replace("test=","");
|
||||
const pipelineData = (args.find((v)=>v.includes("pipelineData=")) ?? "").replace("pipelineData=","");
|
||||
const pipelineTriggers = (args.find((v)=>v.includes("pipelineTriggers=")) ?? "").replace("pipelineTriggers=","");
|
||||
const pipelineDashboardSocket = (args.find((v)=>v.includes("pipelineDashboardSocket=")) ?? "").replace("pipelineDashboardSocket=","") || undefined;
|
||||
const test = (args.find((v) => v.includes("test=")) ?? "").replace("test=", "");
|
||||
const pipelineData = (
|
||||
args.find((v) => v.includes("pipelineData=")) ?? ""
|
||||
).replace("pipelineData=", "");
|
||||
const pipelineTriggers = (
|
||||
args.find((v) => v.includes("pipelineTriggers=")) ?? ""
|
||||
).replace("pipelineTriggers=", "");
|
||||
const pipelineDashboardSocket =
|
||||
(args.find((v) => v.includes("pipelineDashboardSocket=")) ?? "").replace(
|
||||
"pipelineDashboardSocket=",
|
||||
""
|
||||
) || undefined;
|
||||
|
||||
const logNow = () => console.log(Date.now());
|
||||
const liveIndicator = () => {
|
||||
for (var i = 0; i < endLiveCount; i++) setTimeout(logNow, i * 1000);
|
||||
}
|
||||
};
|
||||
|
||||
const runTests = () => {
|
||||
switch (test) {
|
||||
case "primary":
|
||||
return primary();
|
||||
case "secondary":
|
||||
case "secondary":
|
||||
return secondary(pipelineData);
|
||||
case "single":
|
||||
return single();
|
||||
|
@ -32,16 +40,19 @@ const runTests = () => {
|
|||
default:
|
||||
return single();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Run
|
||||
liveIndicator();
|
||||
setTimeout(()=>{
|
||||
const status = runTests();
|
||||
const testResult = {...status, name:test, pipelineTriggers: pipelineTriggers ? pipelineTriggers : undefined, pipelineDashboardSocket}
|
||||
axios.post(reportingUrl, {testResult}).catch((e)=>{console.log(e.response.status)});
|
||||
},endLiveCount * 1000);
|
||||
|
||||
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
const status = runTests();
|
||||
const testResult = {
|
||||
...status,
|
||||
name: test,
|
||||
pipelineTriggers: pipelineTriggers ? pipelineTriggers : undefined,
|
||||
pipelineDashboardSocket,
|
||||
};
|
||||
axios.post(reportingUrl, { testResult }).catch((e) => {
|
||||
console.log(e.response.status);
|
||||
});
|
||||
}, endLiveCount * 1000);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default function secondaryTest(pipelineData){
|
||||
export default function secondaryTest(pipelineData) {
|
||||
console.log("This came from a secondary test!");
|
||||
return {status: + (pipelineData !== "SomeData")};
|
||||
return { status: +(pipelineData !== "SomeData") };
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
export default function singleTest(){
|
||||
export default function singleTest() {
|
||||
console.log("This came from a single test!");
|
||||
return {status:0};
|
||||
return { status: 0 };
|
||||
}
|
|
@ -19,7 +19,6 @@ const job = {
|
|||
image: "node",
|
||||
};
|
||||
|
||||
const launchJob = () => primary.newPipelineJob(job, null, () =>
|
||||
console.log("Primary Job Concluded")
|
||||
);
|
||||
const launchJob = () =>
|
||||
primary.newPipelineJob(job, null, () => console.log("Primary Job Concluded"));
|
||||
launchJob();
|
||||
|
|
|
@ -2,13 +2,13 @@ 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,
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
hmr: {
|
||||
port: 443,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue