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