Statistics
@@ -143,7 +145,7 @@ function DetailsModal({ data }) {
diff --git a/website/src/pages/MicroPage/MicroPage.tsx b/website/src/pages/MicroPage/MicroPage.tsx
index 6cf96c444..3366110b9 100644
--- a/website/src/pages/MicroPage/MicroPage.tsx
+++ b/website/src/pages/MicroPage/MicroPage.tsx
@@ -32,10 +32,10 @@ import Microbench from "./components/Microbench/Microbench";
export default function MicroPage() {
const urlParams = new URLSearchParams(window.location.search);
const [gitRefLeft, setGitRefLeft] = useState(
- urlParams.get("ltag") == null ? "Left" : urlParams.get("ltag")
+ urlParams.get("ltag") == null ? "Left" : urlParams.get("ltag"),
);
const [gitRefRight, setGitRefRight] = useState(
- urlParams.get("rtag") == null ? "Right" : urlParams.get("rtag")
+ urlParams.get("rtag") == null ? "Right" : urlParams.get("rtag"),
);
const [openDropDownLeft, setOpenDropDownLeft] = useState(closeDropDownValue);
const [openDropDownRight, setOpenDropDownRight] =
@@ -52,7 +52,7 @@ export default function MicroPage() {
const fetchData = async () => {
try {
const responseRefs = await fetch(
- `${import.meta.env.VITE_API_URL}vitess/refs`
+ `${import.meta.env.VITE_API_URL}vitess/refs`,
);
const jsonDataRefs = await responseRefs.json();
@@ -81,7 +81,7 @@ export default function MicroPage() {
const responseMicrobench = await fetch(
`${
import.meta.env.VITE_API_URL
- }microbench/compare?rtag=${commitHashRight}<ag=${commitHashLeft}`
+ }microbench/compare?rtag=${commitHashRight}<ag=${commitHashLeft}`,
);
const jsonDataMicrobench = await responseMicrobench.json();
setDataMicrobench(jsonDataMicrobench);
@@ -130,7 +130,7 @@ export default function MicroPage() {
ref,
setGitRefLeft,
setCommitHashLeft,
- setOpenDropDownLeft
+ setOpenDropDownLeft,
);
}}
>
@@ -164,7 +164,7 @@ export default function MicroPage() {
ref,
setGitRefRight,
setCommitHashRight,
- setOpenDropDownRight
+ setOpenDropDownRight,
)
}
>
diff --git a/website/src/pages/MicroPage/components/Microbench/Microbench.tsx b/website/src/pages/MicroPage/components/Microbench/Microbench.tsx
index 1e3a6db62..91d6d2a22 100644
--- a/website/src/pages/MicroPage/components/Microbench/Microbench.tsx
+++ b/website/src/pages/MicroPage/components/Microbench/Microbench.tsx
@@ -48,8 +48,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -5
? "negatif--Micro"
: data.Diff.Ops >= 5
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.Ops.toFixed(2)}
@@ -63,8 +63,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -10
? "negatif--Micro"
: data.Diff.Ops >= 10
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.NSPerOp.toFixed(2)}
@@ -91,8 +91,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -5
? "negatif--Micro"
: data.Diff.Ops >= 5
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.Ops.toFixed(2)}
@@ -107,8 +107,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -10
? "negatif--Micro"
: data.Diff.Ops >= 10
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.NSPerOp.toFixed(2)}
@@ -123,8 +123,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -10
? "negatif--Micro"
: data.Diff.Ops >= 10
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.BytesPerOp.toFixed(2)}
@@ -139,8 +139,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -10
? "negatif--Micro"
: data.Diff.Ops >= 10
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.MBPerSec.toFixed(2)}
@@ -155,8 +155,8 @@ const Microbench = ({ data, className, gitRefLeft, gitRefRight }) => {
data.Diff.Ops <= -10
? "negatif--Micro"
: data.Diff.Ops >= 10
- ? "positif--Micro"
- : ""
+ ? "positif--Micro"
+ : ""
}`}
>
{data.Diff.AllocsPerOp.toFixed(2)}
diff --git a/website/src/pages/MicroPage/components/Microbench/microbench.css b/website/src/pages/MicroPage/components/Microbench/microbench.css
index c2868f567..ffb457d2a 100644
--- a/website/src/pages/MicroPage/components/Microbench/microbench.css
+++ b/website/src/pages/MicroPage/components/Microbench/microbench.css
@@ -14,60 +14,59 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-.microbench{
- display: flex;
- flex-direction: column;
- padding: 20px 0px;
- text-align: center;
- border-top: 1px solid #B5ADAD;
- overflow: hidden;
- transition: 0.8s;
- font-weight: 200;
+.microbench {
+ display: flex;
+ flex-direction: column;
+ padding: 20px 0px;
+ text-align: center;
+ border-top: 1px solid #b5adad;
+ overflow: hidden;
+ transition: 0.8s;
+ font-weight: 200;
}
-.name{
- word-wrap: break-word;
- width: 30%;
+.name {
+ word-wrap: break-word;
+ width: 30%;
}
-.microbench__bottom{
- border: #B5ADAD 1px solid;
- width: 75%;
- max-width: 800px;
- margin: auto;
- padding: 15px;
- margin-top: 30px;
-
+.microbench__bottom {
+ border: #b5adad 1px solid;
+ width: 75%;
+ max-width: 800px;
+ margin: auto;
+ padding: 15px;
+ margin-top: 30px;
}
-.microbench__bottom__line{
- border-bottom:#B5ADAD solid 2px;
- margin: 10px 0px;
+.microbench__bottom__line {
+ border-bottom: #b5adad solid 2px;
+ margin: 10px 0px;
}
-.microbenchMore{
- padding: 10px 0px;
- font-weight: 200;
+.microbenchMore {
+ padding: 10px 0px;
+ font-weight: 200;
}
-.positif--Micro{
- background-color: green;
- border-radius: 20px;
- padding: 5px 0px;
+.positif--Micro {
+ background-color: green;
+ border-radius: 20px;
+ padding: 5px 0px;
}
-.negatif--Micro{
- background-color: red;
- border-radius: 20px;
- padding: 5px 0px;
+.negatif--Micro {
+ background-color: red;
+ border-radius: 20px;
+ padding: 5px 0px;
}
/* MEDIA QUERIES FOR TABLETS */
@media only screen and (max-width: 767px) {
- .microbench__bottom{
- width: 98%;
- }
- .name{
- width: 50%;
- }
+ .microbench__bottom {
+ width: 98%;
+ }
+ .name {
+ width: 50%;
+ }
}
diff --git a/website/src/pages/MicroPage/micro.css b/website/src/pages/MicroPage/micro.css
index 5d91ef6b9..27bf062d1 100644
--- a/website/src/pages/MicroPage/micro.css
+++ b/website/src/pages/MicroPage/micro.css
@@ -44,7 +44,7 @@ limitations under the License.
position: relative;
}
-.micro__bottom__DropDownCointainer{
+.micro__bottom__DropDownCointainer {
position: relative;
width: 100%;
height: 200px;
@@ -125,7 +125,7 @@ limitations under the License.
display: none;
}
-.benchmarkName{
+.benchmarkName {
width: 30%;
}
@@ -151,10 +151,10 @@ limitations under the License.
height: 300px;
margin-top: 100px;
}
- .micro__bottom__DropDownLeft{
+ .micro__bottom__DropDownLeft {
width: 170px;
}
- .micro__bottom__DropDownRight{
+ .micro__bottom__DropDownRight {
width: 170px;
}
}
@@ -206,10 +206,10 @@ limitations under the License.
font-size: 0.7rem;
width: 150px;
}
- .micro__bottom__DropDownCointainer{
+ .micro__bottom__DropDownCointainer {
margin: auto;
}
- .benchmarkName{
+ .benchmarkName {
width: 50%;
}
}
diff --git a/website/src/pages/PRPage/PRPage.tsx b/website/src/pages/PRPage/PRPage.tsx
index 1dcf5a80f..3c2c0b2be 100644
--- a/website/src/pages/PRPage/PRPage.tsx
+++ b/website/src/pages/PRPage/PRPage.tsx
@@ -51,7 +51,9 @@ export default function PRPage() {
)}
- {singlePrError &&
{errorApi}
}
+ {singlePrError && (
+
{errorApi}
+ )}
{!singlePrLoading && dataSinglePr && (
diff --git a/website/src/pages/PRsPage/PRsPage.tsx b/website/src/pages/PRsPage/PRsPage.tsx
index 6590ff362..d3d41811b 100644
--- a/website/src/pages/PRsPage/PRsPage.tsx
+++ b/website/src/pages/PRsPage/PRsPage.tsx
@@ -39,7 +39,9 @@ export default function PRsPage() {
)}
- {PRListError ?
{PRListError}
: null}
+ {PRListError ? (
+
{PRListError}
+ ) : null}
{!isPRListLoading && dataPRList &&
}
>
diff --git a/website/src/pages/PublicRoute.tsx b/website/src/pages/PublicRoute.tsx
index 069d5aee6..9b999cf20 100644
--- a/website/src/pages/PublicRoute.tsx
+++ b/website/src/pages/PublicRoute.tsx
@@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import { Routes, Route } from "react-router-dom";
-import Error from "../utils/Error/Error";
+import Error from "../utils/Error";
import Layout from "../pages/Layout";
import MacroPage from "./MacroPage/MacroPage";
import ComparePage from "./ComparePage/ComparePage";
@@ -43,7 +43,10 @@ const PublicRoute = () => {
} />
} />
} />
-
} />
+
}
+ />
} />
} />
} />
diff --git a/website/src/pages/SearchPage/SearchPage.tsx b/website/src/pages/SearchPage/SearchPage.tsx
index 492f53e52..3e41c56b2 100644
--- a/website/src/pages/SearchPage/SearchPage.tsx
+++ b/website/src/pages/SearchPage/SearchPage.tsx
@@ -42,7 +42,9 @@ export default function SearchPage() {
<>
- {searchError &&
{searchError}
}
+ {searchError && (
+
{searchError}
+ )}
{isSearchLoading && (
@@ -55,14 +57,17 @@ export default function SearchPage() {
{dataSearch.Macros &&
typeof dataSearch.Macros === "object" &&
- Object.entries(dataSearch.Macros).map(function (
- searchMacro,
- index
- ) {
- return (
-
- );
- })}
+ Object.entries(dataSearch.Macros).map(
+ function (searchMacro, index) {
+ return (
+
+ );
+ },
+ )}
)}
diff --git a/website/src/pages/SearchPage/components/Hero.tsx b/website/src/pages/SearchPage/components/Hero.tsx
index 713611a4a..5d6af7727 100644
--- a/website/src/pages/SearchPage/components/Hero.tsx
+++ b/website/src/pages/SearchPage/components/Hero.tsx
@@ -15,7 +15,11 @@ limitations under the License.
*/
import React from "react";
-export default function Hero({ setGitRef }) {
+interface HeroProps {
+ setGitRef: (value: string) => void;
+}
+
+export default function Hero({ setGitRef }: HeroProps) {
return (
diff --git a/website/src/pages/SearchPage/components/SearchMacro.tsx b/website/src/pages/SearchPage/components/SearchMacro.tsx
index 685b21a1c..3e0c9e791 100644
--- a/website/src/pages/SearchPage/components/SearchMacro.tsx
+++ b/website/src/pages/SearchPage/components/SearchMacro.tsx
@@ -18,10 +18,28 @@ import React from "react";
import { formatByte, secondToMicrosecond } from "../../../utils/Utils";
import { Link } from "react-router-dom";
-import {getRange} from "@/common/Macrobench";
+import { getRange } from "@/common/Macrobench";
import PropTypes from "prop-types";
-export default function SearchMacro({ data, gitRef }) {
+interface SearchMacroProps {
+ gitRef: string;
+ data: Array
;
+}
+
+interface RowProps {
+ title: string;
+ value: {
+ center: string | number;
+ range: {
+ infinite: boolean;
+ unknown: boolean;
+ value: number;
+ };
+ };
+ fmt?: string;
+}
+
+export default function SearchMacro({ data, gitRef }: SearchMacroProps) {
return (
@@ -36,40 +54,19 @@ export default function SearchMacro({ data, gitRef }) {
-
+
-
+
-
+
-
+
-
+
-
+
-
+
{title}
|
- {valFmt} ({getRange(value.range)})
+
+ {valFmt} ({getRange(value.range)})
+
|
- );
+ );
}
Row.propTypes = {
- title: PropTypes.string.isRequired,
- value: PropTypes.shape({
- center: PropTypes.number.isRequired,
- range: PropTypes.shape({
- infinite: PropTypes.bool.isRequired,
- unknown: PropTypes.bool.isRequired,
- value: PropTypes.number.isRequired,
- }),
- }).isRequired,
- fmt: PropTypes.oneOf(['time', 'memory']),
-};
\ No newline at end of file
+ title: PropTypes.string.isRequired,
+ value: PropTypes.shape({
+ center: PropTypes.number.isRequired,
+ range: PropTypes.shape({
+ infinite: PropTypes.bool.isRequired,
+ unknown: PropTypes.bool.isRequired,
+ value: PropTypes.number.isRequired,
+ }),
+ }).isRequired,
+ fmt: PropTypes.oneOf(["time", "memory"]),
+};
diff --git a/website/src/pages/StatusPage/StatusPage.tsx b/website/src/pages/StatusPage/StatusPage.tsx
index 35842831a..f23a3a59b 100644
--- a/website/src/pages/StatusPage/StatusPage.tsx
+++ b/website/src/pages/StatusPage/StatusPage.tsx
@@ -29,7 +29,7 @@ export default function StatusPage() {
error: errorQueue,
} = useApiCall(`${import.meta.env.VITE_API_URL}queue`);
const { data: dataPreviousExe, isLoading: isLoadingPreviousExe } = useApiCall(
- `${import.meta.env.VITE_API_URL}recent`
+ `${import.meta.env.VITE_API_URL}recent`,
);
return (
diff --git a/website/src/pages/StatusPage/components/Hero.tsx b/website/src/pages/StatusPage/components/Hero.tsx
index 286b5ad31..4bb436edb 100644
--- a/website/src/pages/StatusPage/components/Hero.tsx
+++ b/website/src/pages/StatusPage/components/Hero.tsx
@@ -24,7 +24,7 @@ const info = [
export default function Hero() {
const { data: dataStatusStats } = useApiCall(
- `${import.meta.env.VITE_API_URL}status/stats`
+ `${import.meta.env.VITE_API_URL}status/stats`,
);
return (
diff --git a/website/src/pages/StatusPage/components/PreviousExecutions.tsx b/website/src/pages/StatusPage/components/PreviousExecutions.tsx
index 7ab9d19bb..099698a14 100644
--- a/website/src/pages/StatusPage/components/PreviousExecutions.tsx
+++ b/website/src/pages/StatusPage/components/PreviousExecutions.tsx
@@ -72,7 +72,7 @@ export default function PreviousExecutions(props) {
"text-lg text-white px-4 rounded-full",
entry.status === "failed" && "bg-[#dd1a2a]",
entry.status === "finished" && "bg-[#00aa00]",
- entry.status === "started" && "bg-[#3a3aed]"
+ entry.status === "started" && "bg-[#3a3aed]",
)}
>
{entry.status}
diff --git a/website/src/utils/Error.tsx b/website/src/utils/Error.tsx
new file mode 100644
index 000000000..dab2d76d1
--- /dev/null
+++ b/website/src/utils/Error.tsx
@@ -0,0 +1,47 @@
+/*
+Copyright 2024 The Vitess Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import React from "react";
+import { Link } from "react-router-dom";
+import ErrorImage from "../assets/error.png";
+import { Button } from "@/components/ui/button";
+
+const Error = () => {
+ return (
+
+
+
404
+
+
+
+
+
+
OOPS! Something went wrong
+
+
+
+
+
+ );
+};
+
+export default Error;
diff --git a/website/src/utils/Error/Error.tsx b/website/src/utils/Error/Error.tsx
deleted file mode 100644
index 0a07a4553..000000000
--- a/website/src/utils/Error/Error.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2023 The Vitess Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-import React from 'react';
-import { Link } from 'react-router-dom';
-import ErrorImage from '../../assets/error.png';
-
-import '../Error/error.css'
-
-
-const Error = () => {
- return (
-
-
-
404
-
-
-
-
-
-
OOPS! Something went wrong
-
-
-
- );
-};
-
-export default Error;
\ No newline at end of file
diff --git a/website/src/utils/Error/error.css b/website/src/utils/Error/error.css
deleted file mode 100644
index 3c11cb790..000000000
--- a/website/src/utils/Error/error.css
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-Copyright 2023 The Vitess Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-.error {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-top: 3rem;
-}
-
-.error div {
- margin: 1rem;
- display: flex;
- align-items: center;
- flex-direction: column;
-}
-
-.goHome {
- padding: 10px 22px 10px 22px;
- margin: 20px;
- font-size: 1rem;
- border-radius: 1rem;
- background-color: #e77002;
- color: white;
- border: none;
- cursor: pointer;
- transition: 300ms ease-in;
- display: flex;
- flex-direction: row;
- align-items: center;
- column-gap: 10px;
-}
-
-.errorImg{
- padding-left: 30px;
-}
-.error div img {
- padding: 10px;
- width: 260px;
- height: 225px;
- animation: translateUpDown 2s infinite alternate;
-}
-
-.error h1 {
- font-size: 3rem;
- font-weight: 700;
-}
-
-.error h2 {
- font-weight: 500;
- text-align: center;
-}
-
-@keyframes translateUpDown {
-
- 0%,
- 100% {
- transform: translateY(0);
- }
-
- 50% {
- transform: translateY(-0.7cm);
- }
-}
\ No newline at end of file
diff --git a/website/src/utils/Utils.tsx b/website/src/utils/Utils.tsx
index 4a01fb410..3fb7d3036 100644
--- a/website/src/utils/Utils.tsx
+++ b/website/src/utils/Utils.tsx
@@ -83,7 +83,7 @@ export const valueDropDown = (
setDropDown,
setCommitHash,
setOpenDropDown,
- setChangeUrl
+ setChangeUrl,
) => {
setDropDown(ref.Name);
setCommitHash(ref.CommitHash);
diff --git a/website/tailwind.config.ts b/website/tailwind.config.ts
index b8bd85a84..4199df9dc 100644
--- a/website/tailwind.config.ts
+++ b/website/tailwind.config.ts
@@ -1,13 +1,13 @@
-import type { Config } from "tailwindcss"
+import type { Config } from "tailwindcss";
const config = {
darkMode: ["class"],
content: [
- './pages/**/*.{ts,tsx}',
- './components/**/*.{ts,tsx}',
- './app/**/*.{ts,tsx}',
- './src/**/*.{ts,tsx}',
- ],
+ "./pages/**/*.{ts,tsx}",
+ "./components/**/*.{ts,tsx}",
+ "./app/**/*.{ts,tsx}",
+ "./src/**/*.{ts,tsx}",
+ ],
prefix: "",
theme: {
container: {
@@ -81,7 +81,8 @@ const config = {
},
screens: {
mobile: { max: "780px" },
- widescreen: { min: "780px" },
+ midscreen: { max: "1536px" },
+ widescreen: { min: "1536px" },
},
transitionDuration: {
inherit: "inherit",
@@ -92,6 +93,6 @@ const config = {
},
},
plugins: [require("tailwindcss-animate")],
-} satisfies Config
+} satisfies Config;
-export default config
\ No newline at end of file
+export default config;