Merge branch 'develop' of https://github.com/opengoofy/hippo4j into develop

pull/1470/head
MZR 2 years ago
commit 0b64569697

@ -7,15 +7,15 @@ const GithubInfo = ({ owner, repo }) => {
return (
<div className="github-info-container w-full md:justify-normal mb-4 justify-center gap-2 flex flex-wrap items-center">
<div className="flex items-center">
<div className="dark:bg-gray-600 bg-gray-100 px-2">
<div className="dark:bg-gray-600 bg-gray-100 px-6 py-1">
<span className="text-sm">star</span>
</div>
<div className="dark:bg-blue-600 bg-gray-200 font-medium px-2">
<div className="dark:bg-blue-600 bg-gray-200 font-medium px-6 py-1">
<span id="repo-stars-count">{favorites || 4621}</span>
</div>
</div>
<div className="flex items-center">
{/* <div className="flex items-center">
<div className="px-2 bg-gray-100 dark:bg-gray-600">
<span className="text-sm">language</span>
</div>
@ -24,18 +24,18 @@ const GithubInfo = ({ owner, repo }) => {
{language || "java"}
</span>
</div>
</div>
</div> */}
<div className="flex items-center">
<div className="dark:bg-gray-600 bg-gray-100 px-2">
<div className="dark:bg-gray-600 bg-gray-100 px-6 py-1">
<span className="text-sm">forks</span>
</div>
<div className="dark:bg-blue-600 bg-gray-200 px-2 font-medium">
<div className="dark:bg-blue-600 bg-gray-200 px-6 py-1 font-medium">
<span id="repo-forks-count">{forks || 1020}</span>
</div>
</div>
<div className="flex items-center">
{/* <div className="flex items-center">
<div className="px-2 bg-gray-100 dark:bg-gray-600">
<span className="text-sm">license</span>
</div>
@ -44,7 +44,7 @@ const GithubInfo = ({ owner, repo }) => {
Apache 2
</span>
</div>
</div>
</div> */}
</div>
);
};

@ -9,29 +9,31 @@ const Hero = () => {
const bgUrl = useBaseUrl("/img/bg.jpg");
return (
<div className="min-h-screen relative text-black dark:text-white">
<div className=" h-[100vh] lg:h-[65vh] relative text-black dark:text-white">
<div
// style={{ backgroundImage: `url(${bgUrl})` }}
className="hero-bg-img absolute inset-0 overflow-hidden bg-center bg-cover bg-no-repeat"
className="bg-svg absolute inset-0 overflow-hidden bg-repeat"
>
<div className=" container px-20 py-24 lg:py-24 md:py-8 lg:px-20 md:px-10 mx-auto flex flex-wrap flex-col lg:flex-row items-center">
<div className="absolute inset-0 bg-gray-400 opacity-5 dark:opacity-0"></div>
<div className=" container px-20 py-12 lg:py-16 md:py-8 lg:px-20 md:px-10 mx-auto flex flex-wrap flex-col lg:flex-row items-center">
{/* <!--Left Col--> */}
<div className="flex flex-col w-full lg:w-1/2 md:w-2/3 justify-center items-start text-center md:text-left">
{/* title and desc */}
<div>
<h1 className="my-4 lg:my-12 md:my-10 text-5xl font-bold leading-tight text-transparent bg-gradient-to-r from-orange-400 via-orange-400 to-orange-500 bg-clip-text">
Hippo4j
<h1 className="my-4 font-jakarta lg:my-4 md:my-4 text-5xl font-bold leading-tight ">
Hippo4j Thread Pool
</h1>
<p className="leading-normal dark:text-white font-bold text-gray-800 hero-image-url text-3xl md:text-3xl">
{/* <p className="leading-normal dark:text-white font-bold text-gray-800 hero-image-url text-3xl md:text-3xl">
<Translate
id="homepage.titleDescription1"
description="The homepage title description"
>
Thread Pool Framework For Java
</Translate>
</p>
<p className="leading-normal font-medium hero-image-url text-gray-600 dark:text-gray-100 text-2xl mb-2">
</p> */}
<p className="leading-normal hero-image-url text-gray-600 dark:text-gray-100 text-xl mb-0">
<Translate
id="homepage.titleDescription2"
description="The homepage title description"
@ -44,8 +46,8 @@ const Hero = () => {
{/* button group */}
<div className="flex my-4 lg:my-8 md:my-6 w-full justify-center md:justify-start">
<Link to="/docs/user_docs/intro" className="">
<button className="mr-2 lg:mr-4 text-base lg:text-lg w-32 lg:w-40 hover:bg-orange-500 bg-orange-400 font-medium py-2 px-4 rounded-md focus:outline-none shadow-none border-none cursor-pointer transition-all duration-300 ease-in-out">
{/* <Link to="/docs/user_docs/intro" className="">
<button className="mr-2 lg:mr-4 text-base lg:text-lg w-32 lg:w-40 hover:bg-blue-500 bg-blue-400 font-medium py-2 px-4 rounded-md focus:outline-none shadow-none border-none cursor-pointer transition-all duration-300 ease-in-out">
<Translate
className="cursor-pointer"
id="homepage.startButton"
@ -56,7 +58,7 @@ const Hero = () => {
</button>
</Link>
<a href="https://github.com/opengoofy/hippo4j">
<button className="ml-2 lg:mx-0 w-32 lg:w-40 border border-solid dark:border-gray-100 border-gray-200 bg-transparent hover:bg-gray-300 hover:bg-opacity-50 font-medium py-2 px-4 rounded-md focus:outline-none shadow-none cursor-pointer transition-all duration-300 ease-in-out">
<button className="ml-2 lg:mx-0 w-32 lg:w-40 border-1 border-solid dark:border-gray-500 border-gray-400 bg-transparent hover:bg-gray-400 hover:bg-opacity-50 font-medium py-2 px-4 rounded-md focus:outline-none shadow-none cursor-pointer transition-all duration-300 ease-in-out">
<div className="flex cursor-pointer items-center justify-center">
<Icon
className="w-6 h-6 mr-2 rounded-full flex-shrink-0 dark:bg-white"
@ -65,18 +67,91 @@ const Hero = () => {
<span className="text-base lg:text-lg">GitHub</span>
</div>
</button>
</a> */}
<Link
to="/docs/user_docs/intro"
class="relative mr-4 w-32 text-center lg:w-48 hover:no-underline inline-flex items-center justify-start py-3 overflow-hidden font-semibold text-white transition-all duration-150 ease-in-out rounded bg-blue-500 group"
>
<span class="absolute bottom-0 left-0 w-full h-1 transition-all duration-150 ease-in-out bg-blue-600 group-hover:h-full"></span>
{/* <span class="absolute right-0 pr-4 duration-200 ease-out group-hover:translate-x-12">
<svg
class="w-5 h-5 text-white"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M14 5l7 7m0 0l-7 7m7-7H3"
></path>
</svg>
</span> */}
{/* <span class="absolute left-0 pl-2.5 -translate-x-12 group-hover:translate-x-0 ease-out duration-200">
<svg
class="w-5 h-5 text-gray-200"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M14 5l7 7m0 0l-7 7m7-7H3"
></path>
</svg>
</span> */}
<span class="relative w-full text-center transition-colors duration-200 ease-in-out group-hover:text-white">
Start Learning
</span>
</Link>
<a
href="https://github.com/opengoofy/hippo4j"
class="relative w-32 hover:no-underline lg:w-48 inline-block text-lg group"
>
<span class="relative z-10 block px-5 py-3 overflow-hidden font-medium leading-tight text-gray-800 transition-colors duration-300 ease-out border-2 border-gray-900 rounded-lg group-hover:text-white">
<span class="absolute inset-0 w-full h-full px-5 py-3 rounded-lg bg-gray-50"></span>
<span class="absolute left-0 w-48 h-48 -ml-2 transition-all duration-300 origin-top-right -rotate-90 -translate-x-full translate-y-12 bg-gray-900 group-hover:-rotate-180 ease"></span>
<span class="relative flex items-center justify-center">
{" "}
<Icon
className="w-6 h-6 mr-2 rounded-full flex-shrink-0 bg-white text-white"
icon="devicon:github"
/>
Github
</span>
{/* <div className="flex cursor-pointer items-center justify-center">
<Icon
className="w-6 h-6 mr-2 rounded-full flex-shrink-0 dark:bg-white"
icon="devicon:github"
/>
<span className="text-base lg:text-lg">GitHub</span>
</div> */}
</span>
<span
class="absolute bottom-0 right-0 w-full h-12 -mb-1 -mr-1 transition-all duration-200 ease-linear bg-gray-900 rounded-lg group-hover:mb-0 group-hover:mr-0"
data-rounded="rounded-lg"
></span>
</a>
</div>
{/* github info */}
<div className="github-info w-full">
<GithubInfo owner="opengoofy" repo="hippo4j" />
</div>
{/* button test */}
<div className="flex"></div>
</div>
{/* <!--Right image--> */}
<div className="w-full lg:w-1/2 text-center hidden lg:block ">
<div className="w-full lg:w-1/2 text-center lg:block ">
<img
className="hero-img w-full h-auto object-cover md:shadow-sm lg:h-80 md:h-96 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
className="hero-img w-full h-auto object-cover lg:h-80 md:h-96 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
// src={useBaseUrl("/img/hero-removebg.png")}
alt="Hippo4j System"
/>

@ -3,18 +3,19 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
import Translate from "@docusaurus/Translate";
const Introduction = () => {
return (
<section className=" border-b mt-4 mb-28 dark:text-white">
<section className=" border-b mb-28 dark:text-white">
<div className=" ">
<div className="title-container w-full bg-gray-100 p-4 mb-4 flex flex-wrap dark:bg-gray-700">
<div className="left-image-container w-full md:w-1/2 sm:w-1/3">
<div className="title-container w-full bg-gray-50 p-4 mb-4 flex flex-wrap dark:bg-[#242526]">
<div className="left-image-container px-24 w-full md:w-1/2 sm:w-1/3">
<img
className="w-full h-64 object-cover md:shadow-sm lg:h-80 md:h-96 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
className="w-full -mt-8 h-64 object-cover lg:h-80 md:h-96 dark:rounded-lg "
alt="Hippo4j System"
src={useBaseUrl("/img/introduction/title-image.svg")}
src={useBaseUrl("/img/introduction/t2.svg")}
/>
{/* <div className="introduction-title-image h-64 w-full img-div"></div> */}
</div>
<div className="right-title-container py-4 px-16 md:px-4 md:pt-8 w-full md:w-1/2 sm:w-2/3 sm:px-8">
<h2 className="w-full my-2 text-3xl font-large leading-tight text-transparent bg-gradient-to-r from-orange-400 via-orange-500 to-orange-600 bg-clip-text">
<h2 className="w-full my-2 text-3xl font-medium leading-tight text-gray-800 dark:text-white ">
<Translate
id="homepage.secondTitle"
description="The title for the introduction part"
@ -43,7 +44,7 @@ const Introduction = () => {
</div>
</div>
<div class="container px-20 lg:px-20 md:px-10 three-part-container">
<div class="container px-20 lg:px-36 md:px-10 three-part-container">
<div class="flex flex-wrap pt-6">
<div class="w-full pr-4 sm:w-2/3 md:w-1/2 ">
<h3 class="text-2xl md:pb-6 text-gray-800 dark:text-white font-medium leading-none mb-3">
@ -90,21 +91,21 @@ const Introduction = () => {
<div class="w-full sm:w-1/3 md:w-1/2 ">
{/* <img class="mx-auto w-4/5 z-50" src="f1.png" /> */}
<img
className="w-full h-auto sm:h-64 object-cover md:shadow-sm lg:h-80 md:h-72 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
src={useBaseUrl("/img/introduction/p1.svg")}
className="w-full -mt-4 h-auto sm:h-64 object-contain lg:h-80 md:h-72 dark:rounded-lg "
src={useBaseUrl("/img/introduction/p11.svg")}
alt="Hippo4j System"
/>
</div>
</div>
<div class="flex flex-wrap pt-6 flex-col-reverse sm:flex-row">
<div class="w-full sm:w-1/3 md:w-1/2 mt-6">
<div class="w-full pr-16 sm:w-1/3 md:w-1/2 mt-6">
<img
className="w-full h-auto sm:h-64 object-cover md:shadow-sm lg:h-80 md:h-96 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
src={useBaseUrl("/img/introduction/p2.svg")}
className="w-full h-auto sm:h-64 object-contain lg:h-80 md:h-96 dark:rounded-lg "
src={useBaseUrl("/img/introduction/p22.svg")}
alt="Hippo4j System"
/>
</div>
<div class="w-full sm:w-2/3 md:w-1/2 md:pl-8 sm:pl-8 mt-6">
<div class="w-full sm:w-2/3 md:w-1/2 md:pl-16 sm:pl-8 mt-6 lg:pt-8">
<div class="align-middle">
<h3 class="text-2xl md:pb-6 text-gray-800 dark:text-white font-medium leading-none mb-3">
<Translate
@ -195,8 +196,8 @@ const Introduction = () => {
<div class="w-full sm:w-1/3 md:w-1/2 ">
{/* <img class="mx-auto w-4/5 z-50" src="f3_r.png" /> */}
<img
className="w-full h-auto sm:h-64 object-cover md:shadow-sm lg:h-80 md:h-96 dark:rounded-lg dark:shadow-lg dark:filter-brightness-75"
src={useBaseUrl("/img/introduction/p3.svg")}
className="w-full -mt-16 -ml-16 h-auto sm:h-64 object-contain lg:h-80 md:h-96 dark:rounded-lg "
src={useBaseUrl("/img/introduction/p33.svg")}
alt="Hippo4j System"
/>
</div>

@ -11,7 +11,7 @@
@tailwind utilities;
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700&display=swap");
:root {
/*
See css var + hsl color palette technique:
@ -47,6 +47,9 @@ html[data-theme="dark"] {
--ifm-color-primary-lightest: hsl(
var(--site-primary-hue-saturation-light) 58%
);
--ifm-breadcrumb-item-background-active: #0000000d;
--ifm-breadcrumb-color-active: #2160fd;
}
[data-theme="dark"] {
@ -62,6 +65,9 @@ html[data-theme="dark"] {
--ifm-color-primary-lightest: hsl(
var(--site-primary-hue-saturation-light) 73%
);
/* --ifm-breadcrumb-item-background-active: #333333; */
--ifm-breadcrumb-color-active: #ffffff;
}
.docusaurus-highlight-code-line {
@ -220,30 +226,36 @@ div[class^="announcementBar_"] {
}
}
/* Custom by youbo */
/* Custom */
.bg-cousom {
background-position: 50% 65%;
}
.bg-svg {
background-color: #ffffff;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192' viewBox='0 0 192 192'%3E%3Cpath fill='%23c2b9cf' fill-opacity='0.31' d='M192 15v2a11 11 0 0 0-11 11c0 1.94 1.16 4.75 2.53 6.11l2.36 2.36a6.93 6.93 0 0 1 1.22 7.56l-.43.84a8.08 8.08 0 0 1-6.66 4.13H145v35.02a6.1 6.1 0 0 0 3.03 4.87l.84.43c1.58.79 4 .4 5.24-.85l2.36-2.36a12.04 12.04 0 0 1 7.51-3.11 13 13 0 1 1 .02 26 12 12 0 0 1-7.53-3.11l-2.36-2.36a4.93 4.93 0 0 0-5.24-.85l-.84.43a6.1 6.1 0 0 0-3.03 4.87V143h35.02a8.08 8.08 0 0 1 6.66 4.13l.43.84a6.91 6.91 0 0 1-1.22 7.56l-2.36 2.36A10.06 10.06 0 0 0 181 164a11 11 0 0 0 11 11v2a13 13 0 0 1-13-13 12 12 0 0 1 3.11-7.53l2.36-2.36a4.93 4.93 0 0 0 .85-5.24l-.43-.84a6.1 6.1 0 0 0-4.87-3.03H145v35.02a8.08 8.08 0 0 1-4.13 6.66l-.84.43a6.91 6.91 0 0 1-7.56-1.22l-2.36-2.36A10.06 10.06 0 0 0 124 181a11 11 0 0 0-11 11h-2a13 13 0 0 1 13-13c2.47 0 5.79 1.37 7.53 3.11l2.36 2.36a4.94 4.94 0 0 0 5.24.85l.84-.43a6.1 6.1 0 0 0 3.03-4.87V145h-35.02a8.08 8.08 0 0 1-6.66-4.13l-.43-.84a6.91 6.91 0 0 1 1.22-7.56l2.36-2.36A10.06 10.06 0 0 0 107 124a11 11 0 0 0-22 0c0 1.94 1.16 4.75 2.53 6.11l2.36 2.36a6.93 6.93 0 0 1 1.22 7.56l-.43.84a8.08 8.08 0 0 1-6.66 4.13H49v35.02a6.1 6.1 0 0 0 3.03 4.87l.84.43c1.58.79 4 .4 5.24-.85l2.36-2.36a12.04 12.04 0 0 1 7.51-3.11A13 13 0 0 1 81 192h-2a11 11 0 0 0-11-11c-1.94 0-4.75 1.16-6.11 2.53l-2.36 2.36a6.93 6.93 0 0 1-7.56 1.22l-.84-.43a8.08 8.08 0 0 1-4.13-6.66V145H11.98a6.1 6.1 0 0 0-4.87 3.03l-.43.84c-.79 1.58-.4 4 .85 5.24l2.36 2.36a12.04 12.04 0 0 1 3.11 7.51A13 13 0 0 1 0 177v-2a11 11 0 0 0 11-11c0-1.94-1.16-4.75-2.53-6.11l-2.36-2.36a6.93 6.93 0 0 1-1.22-7.56l.43-.84a8.08 8.08 0 0 1 6.66-4.13H47v-35.02a6.1 6.1 0 0 0-3.03-4.87l-.84-.43c-1.59-.8-4-.4-5.24.85l-2.36 2.36A12 12 0 0 1 28 109a13 13 0 1 1 0-26c2.47 0 5.79 1.37 7.53 3.11l2.36 2.36a4.94 4.94 0 0 0 5.24.85l.84-.43A6.1 6.1 0 0 0 47 84.02V49H11.98a8.08 8.08 0 0 1-6.66-4.13l-.43-.84a6.91 6.91 0 0 1 1.22-7.56l2.36-2.36A10.06 10.06 0 0 0 11 28 11 11 0 0 0 0 17v-2a13 13 0 0 1 13 13c0 2.47-1.37 5.79-3.11 7.53l-2.36 2.36a4.94 4.94 0 0 0-.85 5.24l.43.84A6.1 6.1 0 0 0 11.98 47H47V11.98a8.08 8.08 0 0 1 4.13-6.66l.84-.43a6.91 6.91 0 0 1 7.56 1.22l2.36 2.36A10.06 10.06 0 0 0 68 11 11 11 0 0 0 79 0h2a13 13 0 0 1-13 13 12 12 0 0 1-7.53-3.11l-2.36-2.36a4.93 4.93 0 0 0-5.24-.85l-.84.43A6.1 6.1 0 0 0 49 11.98V47h35.02a8.08 8.08 0 0 1 6.66 4.13l.43.84a6.91 6.91 0 0 1-1.22 7.56l-2.36 2.36A10.06 10.06 0 0 0 85 68a11 11 0 0 0 22 0c0-1.94-1.16-4.75-2.53-6.11l-2.36-2.36a6.93 6.93 0 0 1-1.22-7.56l.43-.84a8.08 8.08 0 0 1 6.66-4.13H143V11.98a6.1 6.1 0 0 0-3.03-4.87l-.84-.43c-1.59-.8-4-.4-5.24.85l-2.36 2.36A12 12 0 0 1 124 13a13 13 0 0 1-13-13h2a11 11 0 0 0 11 11c1.94 0 4.75-1.16 6.11-2.53l2.36-2.36a6.93 6.93 0 0 1 7.56-1.22l.84.43a8.08 8.08 0 0 1 4.13 6.66V47h35.02a6.1 6.1 0 0 0 4.87-3.03l.43-.84c.8-1.59.4-4-.85-5.24l-2.36-2.36A12 12 0 0 1 179 28a13 13 0 0 1 13-13zM84.02 143a6.1 6.1 0 0 0 4.87-3.03l.43-.84c.8-1.59.4-4-.85-5.24l-2.36-2.36A12 12 0 0 1 83 124a13 13 0 1 1 26 0c0 2.47-1.37 5.79-3.11 7.53l-2.36 2.36a4.94 4.94 0 0 0-.85 5.24l.43.84a6.1 6.1 0 0 0 4.87 3.03H143v-35.02a8.08 8.08 0 0 1 4.13-6.66l.84-.43a6.91 6.91 0 0 1 7.56 1.22l2.36 2.36A10.06 10.06 0 0 0 164 107a11 11 0 0 0 0-22c-1.94 0-4.75 1.16-6.11 2.53l-2.36 2.36a6.93 6.93 0 0 1-7.56 1.22l-.84-.43a8.08 8.08 0 0 1-4.13-6.66V49h-35.02a6.1 6.1 0 0 0-4.87 3.03l-.43.84c-.79 1.58-.4 4 .85 5.24l2.36 2.36a12.04 12.04 0 0 1 3.11 7.51A13 13 0 1 1 83 68a12 12 0 0 1 3.11-7.53l2.36-2.36a4.93 4.93 0 0 0 .85-5.24l-.43-.84A6.1 6.1 0 0 0 84.02 49H49v35.02a8.08 8.08 0 0 1-4.13 6.66l-.84.43a6.91 6.91 0 0 1-7.56-1.22l-2.36-2.36A10.06 10.06 0 0 0 28 85a11 11 0 0 0 0 22c1.94 0 4.75-1.16 6.11-2.53l2.36-2.36a6.93 6.93 0 0 1 7.56-1.22l.84.43a8.08 8.08 0 0 1 4.13 6.66V143h35.02z'%3E%3C/path%3E%3C/svg%3E");
}
:root[data-theme="light"] {
--hero-image-url: url("../../static/img/hero/hero-removebg.png");
--hero-bg-url: url("../../static/img/hero/bg.jpg");
--bg-background-color: #f9fafb;
--bg-background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%23bfbfbf' fill-opacity='0.4'%3E%3Cpath fill-rule='evenodd' d='M5 3.59L1.46.05.05 1.46 3.59 5 .05 8.54l1.41 1.41L5 6.41l3.54 3.54 1.41-1.41L6.41 5l3.54-3.54L8.54.05 5 3.59zM17 2h24v2H17V2zm0 4h24v2H17V6zM2 17h2v24H2V17zm4 0h2v24H6V17z'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="dark"] {
--hero-image-url: url("../../static/img/hero/hero.jpg");
/* --hero-bg-url:url("../../static/img/bg.jpg"); */
--hero-image-url: url("../../static/img/hero/hero-removebg.png");
--bg-background-color: #1b1b1d;
--bg-background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%239C92AC' fill-opacity='0.4'%3E%3Cpath fill-rule='evenodd' d='M5 3.59L1.46.05.05 1.46 3.59 5 .05 8.54l1.41 1.41L5 6.41l3.54 3.54 1.41-1.41L6.41 5l3.54-3.54L8.54.05 5 3.59zM17 2h24v2H17V2zm0 4h24v2H17V6zM2 17h2v24H2V17zm4 0h2v24H6V17z'/%3E%3C/g%3E%3C/svg%3E");
}
.bg-svg {
background-color: var(--bg-background-color);
background-image: var(--bg-background-image);
}
.hero-img {
content: var(--hero-image-url);
}
.hero-bg-img {
background-image: var(--hero-bg-url);
.h-custom {
height: 65vh;
}
.font-jakarta {
font-family: "Plus Jakarta Sans", sans-serif;
}

@ -6,10 +6,14 @@ import Translate from "@docusaurus/Translate";
function CompanyCards({ companies }) {
return (
<div className="grid sm:grid-cols-2 grid-cols-1 md:px-16 md:grid-cols-3 lg:grid-cols-5 gap-4 mb-16 lg:px-2 px-10">
{companies.map((company) => (
{/* Filter out those without a logo. */}
{companies
.filter((comapny) => comapny.logo.length > 0)
.map((company) => (
<div
onClick={() => window.open(company.url)}
key={company.url}
// className="bg-white rounded-lg overflow-hidden shadow-sm transform cursor-pointer transition-all duration-500 hover:scale-110"
className="bg-white rounded-lg overflow-hidden shadow-sm transform cursor-pointer transition-all duration-500 hover:scale-110"
style={{ border: "1px solid #E5E7EB" }}
>
@ -22,19 +26,7 @@ function CompanyCards({ companies }) {
src={useBaseUrl(company.logo)}
alt={`${company.name}`}
className="h-24 w-24 object-contain"
onError={(e) => {
e.target.style.display = "none"; // Hide the image if it fails to load
e.target.nextSibling.style.display = "flex"; // Show the alt text
}}
/>
<div
className="flex items-center justify-center absolute inset-0 text-center"
style={{
display: "none", // Hide the alt text by default
}}
>
{company.name}
</div>
</div>
</div>
</div>
@ -81,7 +73,7 @@ export default function OurUsers() {
</Translate>{" "}
<a
href="https://github.com/opengoofy/hippo4j/issues/13"
className="text-blue-500 hover:text-blue-700 font-bold"
className="text-blue-400 hover:text-blue-500 font-medium"
>
<Translate
id="companyPage.linkText"

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@ -5,38 +5,38 @@
</defs>
<g transform="matrix(1 0 0 1 46.5 19)" >
<g style="" >
<g transform="matrix(1 0 0 1 1.81 6.25)" id="Fill-1" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-48.31, -25.25)" d="M 48.7217 20.9722 C 47.9585333 22.9672 46.5372278 26.6806444 45.64845 28.6851444 L 45.5497556 28.9083944 L 47.8160333 29.7296167 L 47.9020611 29.53645 C 49.0352 26.9994222 50.0443111 24.4639778 50.98745 21.78445 L 51.0629222 21.5707 L 48.8013944 20.7647833 L 48.7217 20.9722 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 2 6.5)" id="Fill-1" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-48.5, -25.5)" d="M 48.8766992 21.2082303 C 48.1845683 23.2110562 46.8955581 26.9390675 46.0895079 28.9514306 L 46 29.1755563 L 48.0553322 30 L 48.1333525 29.8060756 C 49.1610186 27.2590957 50.0762014 24.7137054 50.9315527 22.0236665 L 51 21.8090781 L 48.9489757 21 L 48.8766992 21.2082303 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 1.81 -7.31)" id="Fill-3" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-48.31, -11.69)" d="M 47.1649139 12.3122639 C 47.8679139 12.8548194 48.6648583 13.4702083 49.1651917 13.900875 L 49.3451639 14.0560417 L 50.8377194 12.1660694 L 50.6756917 12.0235694 C 49.988525 11.4197917 48.896025 10.556875 47.4272194 9.459625 L 47.2467194 9.32451389 L 45.7889972 11.2324306 L 45.9610528 11.3717639 C 46.2756083 11.625625 46.7068028 11.9586528 47.1649139 12.3122639" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 2 -7.5)" id="Fill-3" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-48.5, -11.5)" d="M 47.3626385 12.1572783 C 48.0588543 12.7306191 48.8481079 13.3809258 49.3436128 13.836029 L 49.5218482 14 L 51 12.0027886 L 50.8395359 11.852203 C 50.1590006 11.2141662 49.0770437 10.3022867 47.6224127 9.14277747 L 47.4436546 9 L 46 11.016174 L 46.1703951 11.1634133 C 46.4819151 11.4316788 46.9089484 11.7836029 47.3626385 12.1572783" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 1.57 -2.15)" id="Fill-5" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-48.07, -16.85)" d="M 49.3460611 19.4095556 L 50.8391444 17.5185278 L 50.6734222 17.3765556 C 49.4901444 16.36375 48.1627833 15.3161111 46.9346444 14.4262778 L 46.7546722 14.2953889 L 45.29695 16.2122778 L 45.4848389 16.3495 C 46.6823667 17.2224444 47.9891444 18.2547778 49.1660889 19.2565 L 49.3460611 19.4095556 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 1.5 -2.5)" id="Fill-5" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-48, -16.5)" d="M 49.3835825 19 L 51 17.1511868 L 50.8205885 17.0123839 C 49.5395677 16.0221878 48.1025617 14.997936 46.772974 14.127967 L 46.5781354 14 L 45 15.874097 L 45.2034092 16.0082559 C 46.4998572 16.8617131 47.9145796 17.871001 49.1887439 18.8503612 L 49.3835825 19 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 12.72 -0.08)" id="Fill-7" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-59.22, -18.92)" d="M 61.7289417 12.4118028 L 61.1299139 14.4353028 L 57.313025 14.4353028 L 56.7139972 12.4118028 L 61.7289417 12.4118028 Z M 61.1631639 23.673525 L 61.1631639 24.8393861 C 61.1631639 25.0135528 61.0211917 25.1549972 60.8475528 25.1549972 L 57.279775 25.1549972 L 57.279775 23.673525 L 61.1631639 23.673525 Z M 60.5324694 7.83069167 L 57.9109972 7.83069167 L 57.9109972 10.2194139 L 50.8561917 10.2194139 L 50.8561917 12.4118028 L 54.1136361 12.4144417 L 54.8256083 14.4379417 L 51.456275 14.434775 L 51.456275 30.0158306 L 53.8661083 30.0158306 L 53.8661083 16.6276917 L 58.0165528 16.6276917 L 58.0165528 17.9587472 L 54.5020806 17.9587472 L 54.5020806 20.1511361 L 58.0165528 20.1511361 L 58.0165528 21.4811361 L 55.0879139 21.4811361 L 55.0879139 27.3473861 L 61.7706361 27.3473861 C 62.6441083 27.3473861 63.355025 26.6364694 63.355025 25.7619417 L 63.355025 21.4811361 L 60.4263861 21.4811361 L 60.4263861 20.1511361 L 63.7170806 20.1511361 L 63.7170806 17.9587472 L 60.4263861 17.9587472 L 60.4263861 16.6276917 L 64.5773583 16.6276917 L 64.5773583 26.965275 C 64.5773583 27.4381639 64.1920806 27.8229139 63.7186639 27.8229139 L 61.1003583 27.8229139 L 61.7431917 30.0158306 L 64.0448306 30.0158306 C 65.6666917 30.0158306 66.9866639 28.6958583 66.9866639 27.0734694 L 66.9866639 14.4353028 L 63.6168028 14.4353028 L 64.3282472 12.4118028 L 67.5862194 12.4118028 L 67.5862194 10.2194139 L 60.5324694 10.2194139 L 60.5324694 7.83069167 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 12 0)" id="Fill-7" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-58.5, -19)" d="M 61.0482034 12.5428809 L 60.4395091 14.5494945 L 56.5610272 14.5494945 L 55.9523329 12.5428809 L 61.0482034 12.5428809 Z M 60.4732957 23.7106221 L 60.4732957 24.8667539 C 60.4732957 25.0394671 60.3290325 25.1797312 60.1525916 25.1797312 L 56.5272406 25.1797312 L 56.5272406 23.7106221 L 60.4732957 23.7106221 Z M 59.8324237 8 L 57.1686489 8 L 57.1686489 10.3687879 L 50 10.3687879 L 50 12.5428809 L 53.3100098 12.5454978 L 54.0334711 14.5521113 L 50.6097669 14.5489711 L 50.6097669 30 L 53.0584876 30 L 53.0584876 16.7235875 L 57.2759078 16.7235875 L 57.2759078 18.0435351 L 53.7047225 18.0435351 L 53.7047225 20.2176282 L 57.2759078 20.2176282 L 57.2759078 21.5365291 L 54.3000095 21.5365291 L 54.3000095 27.3538242 L 61.0905707 27.3538242 C 61.9781381 27.3538242 62.7005268 26.6488403 62.7005268 25.7816106 L 62.7005268 21.5365291 L 59.7246285 21.5365291 L 59.7246285 20.2176282 L 63.0684249 20.2176282 L 63.0684249 18.0435351 L 59.7246285 18.0435351 L 59.7246285 16.7235875 L 63.9425849 16.7235875 L 63.9425849 26.9749019 C 63.9425849 27.4438444 63.5510899 27.8253836 63.0700338 27.8253836 L 60.4094766 27.8253836 L 61.0626834 30 L 63.4014638 30 C 65.0494968 30 66.3907694 28.6910432 66.3907694 27.0821934 L 66.3907694 14.5494945 L 62.9665289 14.5494945 L 63.6894539 12.5428809 L 67 12.5428809 L 67 10.3687879 L 59.8324237 10.3687879 L 59.8324237 8 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 27.17 6.25)" id="Fill-9" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-73.67, -25.25)" d="M 74.0896028 20.9722 C 73.324325 22.9703667 71.9003806 26.6906722 71.0163528 28.6851444 L 70.9181861 28.9083944 L 73.1839361 29.7296167 L 73.2699639 29.53645 C 74.4009917 27.0025889 75.4101028 24.4666167 76.354825 21.78445 L 76.4302972 21.5707 L 74.1692972 20.7647833 L 74.0896028 20.9722 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 27 6.5)" id="Fill-9" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-73.5, -25.5)" d="M 73.8767714 21.2082303 C 73.1825929 23.2142353 71.8909422 26.9491346 71.0890463 28.9514306 L 71 29.1755563 L 73.055247 30 L 73.1332823 29.8060756 C 74.1592302 27.2622748 75.0745883 24.7163546 75.9315396 22.0236665 L 76 21.8090781 L 73.9490617 21 L 73.8767714 21.2082303 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 27.18 -7.31)" id="Fill-11" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-73.68, -11.69)" d="M 72.5371972 12.3159583 C 73.2386139 12.8574583 74.033975 13.4712639 74.5332528 13.900875 L 74.713225 14.0560417 L 76.2052528 12.1660694 L 76.043225 12.0235694 C 75.3581694 11.421375 74.2651417 10.5584583 72.7952806 9.459625 L 72.6147806 9.32451389 L 71.1570583 11.2324306 L 71.3291139 11.3717639 C 71.6441972 11.6266806 72.0775028 11.9607639 72.5371972 12.3159583" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 27 -7.5)" id="Fill-11" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-73.5, -11.5)" d="M 72.3669629 12.1611824 C 73.0616832 12.7334077 73.8494511 13.3820413 74.3439624 13.836029 L 74.5222164 14 L 76 12.0027886 L 75.8395191 11.852203 C 75.1610037 11.2158394 74.0784109 10.3039598 72.6225823 9.14277747 L 72.4438055 9 L 71 11.016174 L 71.170413 11.1634133 C 71.4824882 11.4327942 71.9116571 11.7858338 72.3669629 12.1611824" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 26.94 -2.15)" id="Fill-13" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-73.44, -16.85)" d="M 74.7140167 19.4095556 L 76.2071 17.5185278 L 76.0413778 17.3765556 C 74.8581 16.36375 73.5307389 15.3161111 72.3026 14.4262778 L 72.1226278 14.2953889 L 70.6654333 16.2122778 L 70.8527944 16.3495 C 72.0524333 17.2240278 73.3597389 18.2568889 74.5340444 19.2565 L 74.7140167 19.4095556 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 26.5 -2.5)" id="Fill-13" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-73, -16.5)" d="M 74.3834286 19 L 76 17.1511868 L 75.8205714 17.0123839 C 74.5394286 16.0221878 73.1022857 14.997936 71.7725714 14.127967 L 71.5777143 14 L 70 15.874097 L 70.2028571 16.0082559 C 71.5017143 16.8632611 72.9171429 17.873065 74.1885714 18.8503612 L 74.3834286 19 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 38.09 -0.08)" id="Fill-15" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-84.59, -18.92)" d="M 87.0968972 12.4118028 L 86.4973417 14.4353028 L 82.6809806 14.4353028 L 82.0819528 12.4118028 L 87.0968972 12.4118028 Z M 86.5305917 23.673525 L 86.5305917 24.8393861 C 86.5305917 25.0135528 86.3886194 25.1549972 86.2155083 25.1549972 L 82.6477306 25.1549972 L 82.6477306 23.673525 L 86.5305917 23.673525 Z M 85.8998972 7.83069167 L 83.278425 7.83069167 L 83.278425 10.2194139 L 76.224675 10.2194139 L 76.224675 12.4118028 L 79.4815917 12.4144417 L 80.1930361 14.4379417 L 76.8242306 14.434775 L 76.8242306 30.0158306 L 79.2335361 30.0158306 L 79.2335361 16.6276917 L 83.3839806 16.6276917 L 83.3839806 17.9587472 L 79.8700361 17.9587472 L 79.8700361 20.1511361 L 83.3839806 20.1511361 L 83.3839806 21.4811361 L 80.4558694 21.4811361 L 80.4558694 27.3473861 L 87.1380639 27.3473861 C 88.0120639 27.3473861 88.7224528 26.6364694 88.7224528 25.7619417 L 88.7224528 21.4811361 L 85.7943417 21.4811361 L 85.7943417 20.1511361 L 89.0845083 20.1511361 L 89.0845083 17.9587472 L 85.7943417 17.9587472 L 85.7943417 16.6276917 L 89.9447861 16.6276917 L 89.9447861 26.965275 C 89.9447861 27.4381639 89.5595083 27.8229139 89.0866194 27.8229139 L 86.4677861 27.8229139 L 87.1106194 30.0158306 L 89.4122583 30.0158306 C 91.0346472 30.0158306 92.3546194 28.6958583 92.3546194 27.0734694 L 92.3546194 14.4353028 L 88.9852861 14.4353028 L 89.6967306 12.4118028 L 92.9536472 12.4118028 L 92.9536472 10.2194139 L 85.8998972 10.2194139 L 85.8998972 7.83069167 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 38 0)" id="Fill-15" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(40,40,40); fill-rule: evenodd; opacity: 1;" transform=" translate(-84.5, -19)" d="M 87.0483642 12.5428809 L 86.4390952 14.5494945 L 82.5609048 14.5494945 L 81.9521721 12.5428809 L 87.0483642 12.5428809 Z M 86.4728839 23.7106221 L 86.4728839 24.8667539 C 86.4728839 25.0394671 86.3286115 25.1797312 86.1526958 25.1797312 L 82.5271161 25.1797312 L 82.5271161 23.7106221 L 86.4728839 23.7106221 Z M 85.8319715 8 L 83.1680285 8 L 83.1680285 10.3687879 L 76 10.3687879 L 76 12.5428809 L 79.3096823 12.5454978 L 80.0326529 14.5521113 L 76.609269 14.5489711 L 76.609269 30 L 79.057608 30 L 79.057608 16.7235875 L 83.2752942 16.7235875 L 83.2752942 18.0435351 L 79.70442 18.0435351 L 79.70442 20.2176282 L 83.2752942 20.2176282 L 83.2752942 21.5365291 L 80.2997445 21.5365291 L 80.2997445 27.3538242 L 87.0901978 27.3538242 C 87.9783576 27.3538242 88.7002555 26.6488403 88.7002555 25.7816106 L 88.7002555 21.5365291 L 85.7247058 21.5365291 L 85.7247058 20.2176282 L 89.0681768 20.2176282 L 89.0681768 18.0435351 L 85.7247058 18.0435351 L 85.7247058 16.7235875 L 89.942392 16.7235875 L 89.942392 26.9749019 C 89.942392 27.4438444 89.5508723 27.8253836 89.0703221 27.8253836 L 86.4090608 27.8253836 L 87.0623087 30 L 89.4012367 30 C 91.0499101 30 92.3912673 28.6910432 92.3912673 27.0821934 L 92.3912673 14.5494945 L 88.9673471 14.5494945 L 89.6903177 12.5428809 L 93 12.5428809 L 93 10.3687879 L 85.8319715 10.3687879 L 85.8319715 8 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 -27.57 -0.07)" id="Fill-17" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-18.93, -18.93)" d="M 30.0177306 37.7670389 L 7.83839722 37.7670389 C 3.55811944 37.7670389 0.0890361111 34.2974278 0.0890361111 30.0176778 L 0.0890361111 7.83834444 C 0.0890361111 3.55806667 3.55811944 0.0889833333 7.83839722 0.0889833333 L 30.0177306 0.0889833333 C 34.2974806 0.0889833333 37.7670917 3.55806667 37.7670917 7.83834444 L 37.7670917 30.0176778 C 37.7670917 34.2974278 34.2974806 37.7670389 30.0177306 37.7670389" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 -27.5 0)" id="Fill-17" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: evenodd; opacity: 1;" transform=" translate(-19, -19)" d="M 7.81557641 38 C 3.49872531 38 0 34.5007424 0 30.1844236 L 0 7.81557641 C 0 3.49872531 3.49872531 0 7.81557641 0 L 30.1844236 0 C 34.5007424 0 38 3.49872531 38 7.81557641 L 38 30.1844236 C 38 34.5007424 34.5007424 38 30.1844236 38 L 7.81557641 38 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 -27.57 -0.07)" id="Stroke-19" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: none; fill-rule: evenodd; opacity: 1;" transform=" translate(-18.93, -18.93)" d="M 30.0177306 37.7670389 L 7.83839722 37.7670389 C 3.55811944 37.7670389 0.0890361111 34.2974278 0.0890361111 30.0176778 L 0.0890361111 7.83834444 C 0.0890361111 3.55806667 3.55811944 0.0889833333 7.83839722 0.0889833333 L 30.0177306 0.0889833333 C 34.2974806 0.0889833333 37.7670917 3.55806667 37.7670917 7.83834444 L 37.7670917 30.0176778 C 37.7670917 34.2974278 34.2974806 37.7670389 30.0177306 37.7670389 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 -27.5 0)" id="Stroke-19" >
<path style="stroke: rgb(40,40,40); stroke-width: 0.5; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: none; fill-rule: evenodd; opacity: 1;" transform=" translate(-19, -19)" d="M 30.1844236 0.25 C 32.273614 0.25 34.165062 1.09675306 35.5341855 2.46587654 C 36.903224 3.8349151 37.75 5.72625825 37.75 7.81557641 L 37.75 7.81557641 L 37.75 30.1844236 C 37.75 32.2735491 36.9031671 34.1649422 35.5340547 35.5340547 C 34.1649422 36.9031671 32.2735491 37.75 30.1844236 37.75 L 30.1844236 37.75 L 7.81557641 37.75 C 5.72625825 37.75 3.8349151 36.903224 2.46587654 35.5341855 C 1.09675306 34.165062 0.25 32.273614 0.25 30.1844236 L 0.25 30.1844236 L 0.25 7.81557641 C 0.25 5.72619329 1.0966961 3.83479537 2.46574574 2.46574574 C 3.83479537 1.0966961 5.72619329 0.25 7.81557641 0.25 L 7.81557641 0.25 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1 0 0 1 -27.16 0.77)" id="Fill-21" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,100,0); fill-rule: evenodd; opacity: 1;" transform=" translate(-19.34, -19.77)" d="M 19.419425 25.8178333 C 23.9799528 25.6753333 27.5957583 22.0463333 27.6490639 17.5401667 L 27.6490639 13.6662778 L 32.6666472 13.6662778 L 32.6666472 17.9497222 C 32.5690083 24.9169167 26.5122306 30.41425 19.419425 30.5720556 L 19.419425 30.571 C 12.2105083 30.5261389 6.10675833 24.9902778 6.00736001 17.9486667 L 6.00736001 10.2483889 C 5.99645278 9.46094444 6.50945278 8.95005556 7.28423056 8.96113889 L 27.6469528 8.96008333 L 27.6469528 13.6641667 L 11.6790361 13.6683889 C 11.2694806 13.6683889 11.0230083 13.9180278 11.0230083 14.3238889 L 11.0230083 17.4620556 C 11.0773694 22.0278611 14.7554528 25.7708611 19.4183694 25.8178333 L 19.419425 25.8178333 Z" stroke-linecap="round" />
<g transform="matrix(1 0 0 1 -27 1)" id="Fill-21" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,100,0); fill-rule: evenodd; opacity: 1;" transform=" translate(-19.5, -20)" d="M 27.9182906 17.7341327 L 27.9182906 13.7906909 L 33 13.7906909 L 33 18.1510415 C 32.9011133 25.2433271 26.7669283 30.8393612 19.5834748 31 C 12.2824262 30.9532589 6.10066866 25.3180053 6 18.149967 L 6 10.3114362 C 5.98895337 9.50985372 6.50850965 8.98979218 7.29318929 9.00107451 L 27.9161525 9 L 27.9161525 13.7885418 L 11.7441616 13.7928399 C 11.3293718 13.7928399 11.0797496 14.0469609 11.0797496 14.4601089 L 11.0797496 17.6546192 C 11.1348055 22.3024005 14.8598957 26.1126035 19.5824057 26.1604191 C 24.2022873 26.0153606 27.8643038 22.3212044 27.9182906 17.7341327 Z" stroke-linecap="round" />
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 90.6 26.7" style="enable-background:new 0 0 90.6 26.7;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#DA0E2C;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#EFC018;}
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#231815;}
.st4{fill:#231815;}
.st5{fill:#040000;}
</style>
<g>
<g>
<path class="st0" d="M6.5,0.8h15.8c2.6,0,4.7,2.1,4.7,4.7v15.8c0,2.6-2.1,4.7-4.7,4.7H6.5c-2.6,0-4.7-2.1-4.7-4.7V5.5
C1.8,2.9,3.9,0.8,6.5,0.8z"/>
<g>
<path class="st1" d="M5,14.9c-0.1-0.2-0.1-0.3-0.1-0.5v-2.7c0-0.3-0.1-0.6-0.3-0.8c-0.2-0.2-0.5-0.3-0.8-0.3H3.7v0.1v3.7
c0,0.4,0.1,0.7,0.2,1c0.1,0.3,0.3,0.6,0.6,0.8c0.3,0.3,0.5,0.4,0.8,0.6c0.3,0.1,0.6,0.2,1,0.2h1.2h0.1v-0.1c0-0.1,0-0.3-0.1-0.4
c-0.1-0.1-0.1-0.2-0.2-0.4l0,0c-0.1-0.1-0.2-0.2-0.4-0.2c-0.1-0.1-0.3-0.1-0.4-0.1H6.3c-0.2,0-0.4,0-0.5-0.1
c-0.2-0.1-0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.3,0.5,0.3,0.8v0.1h-0.1h-1.6c-0.1,0-0.3,0-0.4-0.1
c-0.1-0.1-0.2-0.1-0.4-0.2c-0.1-0.1-0.2-0.2-0.2-0.4C13,14.1,13,14,13,13.8v-0.1h0.1h1.6C14.9,13.7,15.2,13.8,15.4,14.1z"/>
<path class="st1" d="M20.4,17.5c-1.1,2.3-3.4,3.9-6.1,3.9c-2.7,0-5-1.6-6.1-3.9c1.2,0,1.4,0.1,1.8,0.6c1,1.3,2.6,2.1,4.3,2.1
c1.7,0,3.3-0.8,4.3-2.1C19.1,17.6,19.2,17.5,20.4,17.5z"/>
<path class="st2" d="M13.2,5.6L9.5,7.8L5.7,10c0.6,0.3,1.1,0.4,1.7,0.4c0.6,0,1.1-0.2,1.8-0.5l0,0L10.6,9c1.1-0.7,2.3-1.3,3.4-2
c0.4-0.2,0.5-0.2,0.8,0l0,0c1.1,0.7,2.3,1.3,3.4,2l1.5,0.9l0,0l0,0l0,0l0,0c0.6,0.3,1.2,0.5,1.8,0.5c0.5,0,1.1-0.1,1.7-0.4
l-3.8-2.3l-3.7-2.2C14.6,5,14.1,5,13.2,5.6z"/>
</g>
</g>
<g>
<g>
<path class="st3" d="M43.4,4.9H32.8c-0.4,0-0.7,0.3-0.7,0.7v2.3c0,0.4,0.3,0.7,0.7,0.7h10.6c0.4,0,0.7-0.3,0.7-0.7V5.6
C44.1,5.2,43.8,4.9,43.4,4.9z M36.9,7.6h-2.6V7.1h2.6V7.6z M36.9,6.3L36.9,6.3l-2.6,0.1V6h2.6V6.3z M41.9,7.6h-2.7V7.1h2.7V7.6z
M41.9,6.3L41.9,6.3l-2.6,0.1h-0.1V6h0.1h1.9h0.7V6.3z"/>
<path class="st4" d="M44.2,10.2H32c-0.2,0-0.4-0.2-0.4-0.4V9.4C31.6,9.2,31.8,9,32,9h12.2c0.2,0,0.4,0.2,0.4,0.4v0.3
C44.7,10,44.5,10.2,44.2,10.2z"/>
<path class="st3" d="M43.3,3.3h-0.5h-2h-5.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-0.8-0.8L87.3,19.3z M84.6,21.5h3.6v2.4h-0.4v-0.3h-2.7v0.3h-0.4V21.5z M85.1,21.9v1.3h2.7v-1.3H85.1z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 52 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 52 KiB

@ -26,7 +26,7 @@
},
{
"name": "轻松到家",
"logo": "",
"logo": "/img/company_logos/uyess.jpg",
"url": "http://www.uyess.com/index.html"
},
{
@ -41,7 +41,7 @@
},
{
"name": "萨科(深圳)科技有限公司",
"logo": "/img/company_logos/lbdj.png",
"logo": "/img/company_logos/lbdj.svg",
"url": "https://www.lbdj.com/"
},
{
@ -66,8 +66,8 @@
},
{
"name": "众合云科51社保",
"logo": "",
"url": "https://home.101hr.com/"
"logo": "/img/company_logos/51shebao.png",
"url": "https://www.51shebao.com/?baidupz&guanfang/"
},
{
"name": "好货云店",
@ -96,7 +96,7 @@
},
{
"name": "浙江吉利控股集团有限公司",
"logo": "/img/company_logos/geely.png",
"logo": "/img/company_logos/geely.jpg",
"url": "https://www.geely.com/"
},
{
@ -111,7 +111,7 @@
},
{
"name": "郑州力通水务",
"logo": "/img/company_logos/zzltsw.png",
"logo": "/img/company_logos/zzltsw.jpg",
"url": "http://www.zzltsw.com/"
},
{
@ -126,7 +126,7 @@
},
{
"name": "中新软件(上海)有限公司",
"logo": "",
"logo": "/img/company_logos/5000m.jpg",
"url": "http://www.5000m.com"
},
{
@ -136,12 +136,12 @@
},
{
"name": "兰亭集势(成都)科技有限公司",
"logo": "/img/company_logos/lightinthebox.png",
"logo": "/img/company_logos/lightinthebox.avif",
"url": "https://www.lightinthebox.com/"
},
{
"name": "杭州数理大数据有限公司",
"logo": "",
"logo": "/img/company_logos/data4truth.jpg",
"url": "https://www.data4truth.com/#/"
},
{
@ -151,7 +151,7 @@
},
{
"name": "新华智云科技有限公司",
"logo": "/img/company_logos/xinhuazhiyun.png",
"logo": "/img/company_logos/xinhuazhiyun.svg",
"url": "https://www.xinhuazhiyun.com"
},
{
@ -161,7 +161,7 @@
},
{
"name": "深圳市帮客帮科技有限公司",
"logo": "/img/company_logos/bangkebang.png",
"logo": "/img/company_logos/bangkebang.jpg",
"url": "https://www.bangkebang.com"
},
{
@ -181,7 +181,7 @@
},
{
"name": "广联达科技股份有限公司",
"logo": "/img/company_logos/glodon.png",
"logo": "/img/company_logos/glodon.jpg",
"url": "https://www.glodon.com"
},
{
@ -201,12 +201,12 @@
},
{
"name": "成都全域智旅科技有限公司",
"logo": "/img/company_logos/qyzl.png",
"logo": "/img/company_logos/qyzl.jpg",
"url": "http://qyzl.com"
},
{
"name": "深圳市华云中盛科技股份有限公司",
"logo": "/img/company_logos/hua-cloud.png",
"logo": "/img/company_logos/hua-cloud.jpg",
"url": "http://www.hua-cloud.cn"
},
{

@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@ahooksjs/use-url-state": "^3.5.1",
"@ant-design/happy-work-theme": "^1.0.0",
"@ant-design/icons": "^5.2.6",
"@tanem/react-nprogress": "^5.0.51",
"@testing-library/jest-dom": "^5.16.5",
@ -13,6 +14,8 @@
"antd": "^5.4.7",
"classnames": "^2.3.2",
"dayjs": "^1.11.9",
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
"i18next": "^23.5.1",
"i18next-browser-languagedetector": "^7.1.0",
"lodash": "^4.17.21",

@ -1,3 +1,4 @@
// import { Suspense } from 'react';
import LayoutCom from './components/layout-com';
import { Routes, Route, Link } from 'react-router-dom';
import routeList from './route';
@ -5,6 +6,7 @@ import { MenuProps } from 'antd';
import { useTran } from './hooks';
import { STR_MAP } from './config/i18n/locales/constants';
import IconFont from './components/icon';
import { HappyProvider } from '@ant-design/happy-work-theme';
type MenuItem = Required<MenuProps>['items'][number];
@ -15,12 +17,36 @@ const App = () => {
key: STR_MAP.DYNAMIC_THREAD_POOL,
icon: <IconFont type="icon-hot-for-ux"></IconFont>,
children: [
{ label: <Link to={'/thread-poll/index'}>{useTran(STR_MAP.THREAD_POOL)}</Link>, key: '/thread-poll/index' },
{
label: <Link to={'/thread-poll/index'}>{useTran(STR_MAP.THREAD_POOL_MANAGE)}</Link>,
key: '/thread-poll/index',
},
],
},
{
label: <Link to={'/tenant'}>{useTran(STR_MAP.TENANT_MANAGE)}</Link>,
key: '/tenant',
icon: <IconFont type="icon-hot-for-ux"></IconFont>,
},
{
label: <Link to={'/item'}>{useTran(STR_MAP.PROJECT_MANAGE)}</Link>,
key: '/item',
icon: <IconFont type="icon-hot-for-ux"></IconFont>,
},
{
label: <Link to={'/user'}>{useTran(STR_MAP.USER_MANAGE)}</Link>,
key: '/user',
icon: <IconFont type="icon-hot-for-ux"></IconFont>,
},
{
label: <Link to={'/log'}>{useTran(STR_MAP.LOG_MANAGE)}</Link>,
key: '/log',
icon: <IconFont type="icon-hot-for-ux"></IconFont>,
},
];
return (
<HappyProvider>
<LayoutCom sideMenuList={sideMenuList}>
<Routes>
{routeList.map(item => (
@ -28,6 +54,7 @@ const App = () => {
))}
</Routes>
</LayoutCom>
</HappyProvider>
);
};

@ -39,7 +39,7 @@ const HeaderChild = () => {
return (
<div className={style['header-wrapper']}>
<div className={style['logo']} onClick={() => navigate('/home')}>
<img src="https://nageoffer.com/img/logo3.png" alt="" />
<img src="https://nageoffer.com/img/logo3.png" alt="" style={{ cursor: 'pointer' }} />
</div>
<div className={style['edit-container']}>
<Row gutter={[16, 16]}>

@ -0,0 +1,3 @@
// .custom-icon {
// color: red !important;
// }

@ -1,15 +1,15 @@
import { createFromIconfontCN } from '@ant-design/icons';
interface Props {
type: string;
}
import React from 'react';
import style from './index.module.less';
const MyIcon = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_4254722_3l4m6by7h34.js', // 在 iconfont.cn 上生成
scriptUrl: '//at.alicdn.com/t/c/font_4254722_vw34zn7su2.js', // 在 iconfont.cn 上生成
});
const IconFont = (props: Props) => {
return <MyIcon {...props}></MyIcon>;
type MyComponentProps = React.HTMLProps<HTMLDivElement> & { type: string };
const IconFont: React.FC<MyComponentProps> = props => {
return <MyIcon className={style['custom-icon']} {...props}></MyIcon>;
};
export default IconFont;

@ -0,0 +1,27 @@
import { Button, ButtonProps } from 'antd';
import React from 'react';
import { SearchOutlined, PlusOutlined, RedoOutlined } from '@ant-design/icons';
function withSearchIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) {
return function EnhancedComponent(props: P) {
return <WrappedComponent icon={<SearchOutlined></SearchOutlined>} {...props} />;
};
}
function withAddIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) {
return function EnhancedComponent(props: P) {
return <WrappedComponent icon={<PlusOutlined />} {...props}></WrappedComponent>;
};
}
function withResetIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) {
return function EnhancedComponent(props: P) {
return <WrappedComponent {...props} icon={<RedoOutlined />}></WrappedComponent>;
};
}
export const SearchButton = withSearchIconButton(Button);
export const AddButton = withAddIconButton(Button);
export const ResetButton = withResetIconButton(Button);

@ -1,4 +1,5 @@
export enum STR_MAP {
GLOBAL_TITLE = 'globalTitle',
DYNAMIC_THREAD_POOL = 'dynamicThreadPool',
THREAD_POOL_MANAGE = 'threadPoolManage',
PROJECT = 'project',
@ -15,6 +16,21 @@ export enum STR_MAP {
EXECUTION_TIMEOUT = 'executionTimeout',
ALARM_OR_NOT = 'alarmOrNot',
CREATION_TIME = 'creationTime',
UPDATE_TIME = 'update time',
UPDATE_TIME = 'updateTime',
EDIT = 'edit',
TENANT_MANAGE = 'tenantManage',
LOG_MANAGE = 'logManage',
PROJECT_MANAGE = 'projectManage',
USER_MANAGE = 'userManage',
LOGIN_SUCCESSFUL = 'loginSuccessful',
USER_INPUT_MESSAGE = 'userInputMessage',
USRE_NAME = 'username',
PASSWORD_INPUT_MESSAGE = 'passwordInputMessage',
REMERBER_PASSWORD = 'rememberPassWord',
FORGOT_PASSWORD = 'forgotPassword',
ACCOUNT_PASSWORD_LOGIN = 'accountPasswordLogin',
PASSWOR = 'password',
LOGIN = 'login',
PHONE_LOGIN = 'phoneLogin',
ALARM_EDITING_SUCCESS = 'alarmEditingSuccess',
}

@ -19,6 +19,22 @@ const enTranslationMap: { [key: string]: string } = {
[STR_MAP.CREATION_TIME]: 'creation time',
[STR_MAP.UPDATE_TIME]: 'update time',
[STR_MAP.EDIT]: 'edit',
[STR_MAP.TENANT_MANAGE]: 'tenant management',
[STR_MAP.PROJECT_MANAGE]: 'project management',
[STR_MAP.USER_MANAGE]: 'user management',
[STR_MAP.LOG_MANAGE]: 'log management',
[STR_MAP.LOGIN_SUCCESSFUL]: 'login successful',
[STR_MAP.USER_INPUT_MESSAGE]: 'please enter your username',
[STR_MAP.USRE_NAME]: 'username',
[STR_MAP.PASSWORD_INPUT_MESSAGE]: 'please enter password',
[STR_MAP.REMERBER_PASSWORD]: 'remember the password',
[STR_MAP.FORGOT_PASSWORD]: 'forgot password',
[STR_MAP.ACCOUNT_PASSWORD_LOGIN]: 'account password login',
[STR_MAP.GLOBAL_TITLE]: `The world's best thread pool management tool`,
[STR_MAP.PASSWOR]: 'password',
[STR_MAP.LOGIN]: 'login',
[STR_MAP.PHONE_LOGIN]: 'Mobile login',
[STR_MAP.ALARM_EDITING_SUCCESS]: 'alarm editing success',
};
export default enTranslationMap;

@ -19,6 +19,22 @@ const zhTranslationMap: { [key: string]: string } = {
[STR_MAP.CREATION_TIME]: '创建时间',
[STR_MAP.UPDATE_TIME]: '更新时间',
[STR_MAP.EDIT]: '操作',
[STR_MAP.TENANT_MANAGE]: '租户管理',
[STR_MAP.PROJECT_MANAGE]: '项目管理',
[STR_MAP.USER_MANAGE]: '用户权限',
[STR_MAP.LOG_MANAGE]: '日志管理',
[STR_MAP.LOGIN_SUCCESSFUL]: '登录成功',
[STR_MAP.USER_INPUT_MESSAGE]: '请输入用户名',
[STR_MAP.USRE_NAME]: '用户名',
[STR_MAP.PASSWORD_INPUT_MESSAGE]: '请输入密码',
[STR_MAP.REMERBER_PASSWORD]: '记住密码',
[STR_MAP.FORGOT_PASSWORD]: '忘记密码',
[STR_MAP.ACCOUNT_PASSWORD_LOGIN]: '账号密码登录',
[STR_MAP.GLOBAL_TITLE]: `全球最好用的线程池管理工具`,
[STR_MAP.PASSWOR]: '密码',
[STR_MAP.LOGIN]: '登录',
[STR_MAP.PHONE_LOGIN]: '手机号登录',
[STR_MAP.ALARM_EDITING_SUCCESS]: '报警编辑成功',
};
export default zhTranslationMap;

@ -22,7 +22,7 @@ export const darkAlgorithm = {
// padding: 10,
// paddingXS: 5,
// margin: 0,
// fontSize: 14,
// cellFontSize: 12,
// colorBorderSecondary: darkDefaultTheme.borderColor.bl1,
// paddingContentVerticalLG: 4,
},

@ -20,17 +20,17 @@ export const defaultAlgorithm = {
// padding: 10,
// paddingXS: 5,
// margin: 0,
// fontSize: 14,
// cellFontSize: 12,
// colorBorderSecondary: lightDefaultTheme.borderColor.bl1,
// paddingContentVerticalLG: 4,
},
Modal: {
borderRadiusLG: 2,
borderRadiusSM: 2,
colorText: lightDefaultTheme.fontColor.fc3,
borderRadius: 2,
paddingContentHorizontalLG: 0,
paddingMD: 0,
// borderRadiusLG: 2,
// borderRadiusSM: 2,
// colorText: lightDefaultTheme.fontColor.fc3,
// borderRadius: 2,
// paddingContentHorizontalLG: 0,
// paddingMD: 0,
},
Menu: {
itemBg: lightDefaultTheme.backgroundColor.bg1,

@ -1,10 +1,11 @@
import React from 'react';
import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
import { MyStore } from './context';
import './config/i18n';
import 'antd/dist/reset.css';
import { Spin } from 'antd';
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
@ -14,7 +15,9 @@ root.render(
{/* theme context */}
<MyStore>
{/* theme config context */}
<Suspense fallback={<Spin />}>
<App />
</Suspense>
</MyStore>
</BrowserRouter>
</React.StrictMode>

@ -0,0 +1,108 @@
import { useRequest } from 'ahooks';
import { Form, Modal, Input, Select, notification } from 'antd';
import React, { useEffect } from 'react';
import { fetchTenantOptions } from '../tenant/service';
import { fetchAddItem, fetchUpdateItem } from './service';
interface IProps {
type: string;
data: any;
visible: boolean;
onClose: () => void;
reset: () => void;
}
const ItemCreate: React.FC<IProps> = props => {
const { visible, onClose, data, type, reset } = props;
const [form] = Form.useForm();
const tenantRequest = useRequest(fetchTenantOptions, {
ready: !!type,
});
const updateRequest = useRequest(fetchUpdateItem, {
manual: true,
onSuccess: () => {
notification.success({ message: '更新成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
notification.error({ message: err.message });
},
});
const addRequest = useRequest(fetchAddItem, {
manual: true,
onSuccess: () => {
notification.success({ message: '创建成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
notification.error({ message: err.message });
},
});
const onSave = () => {
form
.validateFields()
.then(values => {
addRequest.run({ ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
const onUpdate = () => {
form
.validateFields()
.then(values => {
updateRequest.run({ id: data.id, ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
useEffect(() => {
if (type === 'edit') {
form.setFieldsValue({
...data,
});
}
}, [type, data, form]);
return (
<Modal
open={visible}
onCancel={onClose}
width={600}
title={type === 'edit' ? '编辑' : '创建'}
onOk={type === 'edit' ? onUpdate : onSave}
confirmLoading={addRequest.loading || updateRequest.loading}
>
<Form labelAlign="right" labelCol={{ span: 6 }} wrapperCol={{ span: 15 }} form={form}>
<Form.Item label="租户" name="tenantId" rules={[{ required: true }]}>
<Select
options={tenantRequest.data}
placeholder="请选择"
loading={tenantRequest.loading}
disabled={type === 'edit'}
/>
</Form.Item>
<Form.Item label="项目" name="itemId" rules={[{ required: true }]}>
<Input placeholder="请输入" disabled={type === 'edit'} />
</Form.Item>
<Form.Item label="项目名称" name="itemName" rules={[{ required: true }]}>
<Input placeholder="请输入" />
</Form.Item>
<Form.Item label="负责人" name="owner" rules={[{ required: true }]}>
<Input placeholder="请输入" />
</Form.Item>
<Form.Item label="项目简介" name="itemDesc" rules={[{ required: true }]}>
<Input.TextArea placeholder="请输入" />
</Form.Item>
</Form>
</Modal>
);
};
export default ItemCreate;

@ -1,27 +1,41 @@
import { useAntdTable } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col } from 'antd';
import { useAntdTable, useRequest } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col, Modal, notification, message } from 'antd';
import { SearchOutlined, EditOutlined } from '@ant-design/icons';
import React, { useState } from 'react';
import { fetchItemList } from './service';
import { fetchDeleteItem, fetchItemList } from './service';
import { useUrlSet } from '@/hooks/useUrlSet';
import style from './index.module.less';
import ItemCreate from './create';
const baseColumns = [
{
title: '序号',
dataIndex: 'index',
with: 200,
},
{
title: '租户',
dataIndex: 'tenantId',
with: 200,
},
{
title: '项目',
dataIndex: 'itemId',
with: 200,
},
{
title: '项目',
dataIndex: 'itemId',
},
{
title: '项目名称',
dataIndex: 'itemName',
with: 200,
},
{
title: '负责人',
dataIndex: 'owner',
with: 200,
},
{
title: '修改时间',
@ -32,37 +46,54 @@ const baseColumns = [
const Tenant: React.FC = () => {
const [editVisible, setEditVisible] = useState(false);
const [type, setType] = useState('add');
const [curItem, setCurItem] = useState({});
const [form] = Form.useForm();
const { setUrl } = useUrlSet({ form });
const { tableProps, search } = useAntdTable(fetchItemList, { form });
// const {run: delete} = useRequest(fetchDeleteTenant, { manual: true });
const deleteRequest = useRequest(fetchDeleteItem, { manual: true });
const handleSearch = () => {
setUrl();
search.submit();
};
const handleDelete = (item: any) => {
Modal.confirm({
title: '提示',
content: `此操作将删除 ${item.itemId}, 是否继续?`,
onOk: async () => {
try {
const res = await deleteRequest.runAsync(item.itemId);
if (res && res.success) {
notification.success({ message: '删除成功' });
search.reset();
}
} catch (e: any) {
message.error(e.message || '服务器开小差啦~');
}
},
});
};
const actions = (type: string, item?: any) => {
switch (type) {
case 'add':
setType('add');
setEditVisible(true);
break;
case 'edit':
setType('edit');
setCurItem(item);
setEditVisible(true);
break;
case 'delete':
// handleDelete();
handleDelete(item);
break;
default:
break;
}
};
const handleSearch = () => {
setUrl();
search.submit();
const handleClose = () => {
setEditVisible(false);
};
// const handleDelete = (item: any) => {
// Modal.confirm({
// title: `此操作将删除${item.tenantName}, 是否继续?`,
// onOk: () => {
// search.submit();
// },
// });
// };
return (
<div className={style.tenant_wrapper}>
@ -70,7 +101,7 @@ const Tenant: React.FC = () => {
<Row>
<Col span={6}>
<Form.Item name="note">
<Input placeholder="项目" />
<Input placeholder="项目" allowClear />
</Form.Item>
</Col>
<Col span={18}>
@ -78,7 +109,7 @@ const Tenant: React.FC = () => {
<Button onClick={() => handleSearch()} type="primary" icon={<SearchOutlined />}>
</Button>
<Button onClick={() => setEditVisible(true)} type="primary" icon={<EditOutlined />}>
<Button onClick={() => actions('add')} type="primary" icon={<EditOutlined />}>
</Button>
</Space>
@ -91,8 +122,8 @@ const Tenant: React.FC = () => {
</Form>
<Table
{...tableProps}
bordered
rowKey="index"
scroll={{ x: 1000 }}
columns={[
...baseColumns,
{
@ -104,7 +135,7 @@ const Tenant: React.FC = () => {
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
</Button>
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
<Button onClick={() => actions('delete', record)} type="link" className={style.opreate_btn}>
</Button>
</Space>
@ -113,6 +144,15 @@ const Tenant: React.FC = () => {
},
]}
/>
{editVisible && (
<ItemCreate
data={curItem}
onClose={handleClose}
visible={editVisible}
type={type}
reset={() => search.reset()}
/>
)}
</div>
);
};

@ -6,12 +6,6 @@ const fetchItemList = async (
): Promise<{ total: number; list: Array<any> }> => {
const res: any = await request('/hippo4j/v1/cs/item/query/page', {
method: 'POST',
headers: {
Authorization:
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ',
cookie:
'Admin-Token=Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ; userName=baoxinyi_admin',
},
body: {
...formData,
current: pageProps.current,
@ -25,10 +19,10 @@ const fetchItemList = async (
list: res.data.records.map((item: any, index: number) => ({ index: index + 1, ...item })),
};
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchAddTenant = async (params: {
const fetchAddItem = async (params: {
itemDesc: string; // 项目简介
itemId: string; // 项目
itemName: string; // 项目名称
@ -37,39 +31,47 @@ const fetchAddTenant = async (params: {
tenantDesc?: string;
tenantName?: string;
}) => {
const res = await request('/hippo4j/v1/cs/tenant/save', {
const res = await request('/hippo4j/v1/cs/item/save', {
method: 'POST',
body: { ...params },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchDeleteItem = async (id: string) => {
const url = 'hippo4j/v1/cs/item/delete/prescription/' + id;
const res = await request(url, {
method: 'DELETE',
const fetchUpdateItem = async (params: {
id: string;
itemDesc: string; // 项目简介
itemId: string; // 项目
itemName: string; // 项目名称
owner: string; // 负责人
tenantId: string; // 租户
tenantDesc?: string;
tenantName?: string;
}) => {
const res = await request('/hippo4j/v1/cs/item/update', {
method: 'POST',
body: { ...params },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchUpdateItem = async (id: string) => {
const res = await request('/hippo4j/v1/cs/item/update', {
method: 'POST',
params: { id },
const fetchDeleteItem = async (id: string) => {
const url = 'hippo4j/v1/cs/item/delete/prescription/' + id;
const res = await request(url, {
method: 'DELETE',
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
export { fetchItemList, fetchAddTenant, fetchDeleteItem, fetchUpdateItem };
export { fetchItemList, fetchAddItem, fetchDeleteItem, fetchUpdateItem };

@ -0,0 +1,33 @@
import { Descriptions, Modal } from 'antd';
import React from 'react';
const LogDetail: React.FC<{
data: any;
visible: boolean;
onClose: () => void;
}> = props => {
const { visible, onClose, data } = props;
return (
<Modal open={visible} onCancel={onClose} footer={null} width={600}>
<Descriptions title={'详情'} column={1}>
<Descriptions.Item span={1} label="业务类型">
{data.category}
</Descriptions.Item>
<Descriptions.Item span={1} label="业务标识">
{data.bizNo}
</Descriptions.Item>
<Descriptions.Item span={1} label="操作人">
{data.operator}
</Descriptions.Item>
<Descriptions.Item span={1} label="创建时间">
{data.createTime}
</Descriptions.Item>
<Descriptions.Item span={1} label="日志内容">
{data.action}
</Descriptions.Item>
</Descriptions>
</Modal>
);
};
export default LogDetail;

@ -1,85 +1,90 @@
import { useAntdTable } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col, Modal } from 'antd';
import { SearchOutlined, EditOutlined } from '@ant-design/icons';
import { Button, Form, Input, Row, Space, Table, Col } from 'antd';
import { SearchOutlined, RedoOutlined } from '@ant-design/icons';
import React, { useState } from 'react';
import { fetchTenantList } from './service';
import { fetchLogList } from './service';
import { useUrlSet } from '@/hooks/useUrlSet';
import style from './index.module.less';
import LogDetail from './detail';
const baseColumns = [
{
title: '序号',
dataIndex: 'id',
width: 100,
// fixed: 'left',
},
{
title: '租户',
dataIndex: 'tenantId',
title: '业务类型',
dataIndex: 'category',
width: 200,
},
{
title: '租户名称',
dataIndex: 'tenantName',
title: '业务标识',
dataIndex: 'bizNo',
width: 380,
},
{
title: '负责人',
dataIndex: 'owner',
title: '日志内容',
dataIndex: 'action',
width: 380,
},
{
title: '修改时间',
dataIndex: 'gmtModified',
title: '操作人',
dataIndex: 'operator',
width: 100,
},
{
title: '操作时间',
dataIndex: 'createTime',
width: 200,
},
];
const Tenant: React.FC = () => {
const [editVisible, setEditVisible] = useState(false);
const [type, setType] = useState('add');
const [visible, setVisible] = useState(false);
const [form] = Form.useForm();
const { setUrl } = useUrlSet({ form });
const { tableProps, search } = useAntdTable(fetchTenantList, { form });
// const {run: delete} = useRequest(fetchDeleteTenant, { manual: true });
const actions = (type: string, item?: any) => {
switch (type) {
case 'add':
setEditVisible(true);
break;
case 'edit':
setEditVisible(true);
break;
case 'delete':
// handleDelete();
break;
default:
break;
}
};
const { tableProps, search } = useAntdTable(fetchLogList, { form });
const [curItems, setCurItems] = useState({});
const handleSearch = () => {
setUrl();
search.submit();
};
// const handleDelete = (item: any) => {
// Modal.confirm({
// title: `此操作将删除${item.tenantName}, 是否继续?`,
// onOk: () => {
// search.submit();
// },
// });
// };
const handleDetail = (item: any) => {
setVisible(!visible);
setCurItems(item);
};
const handleClose = () => {
setVisible(false);
};
return (
<div className={style.tenant_wrapper}>
<Form form={form} wrapperCol={{ span: 23 }}>
<Row>
<Col span={6}>
<Form.Item name="note">
<Input placeholder="租户" />
<Col span={5}>
<Form.Item name="category">
<Input placeholder="业务类型" allowClear />
</Form.Item>
</Col>
<Col span={5}>
<Form.Item name="bizNo">
<Input placeholder="业务标识" allowClear />
</Form.Item>
</Col>
<Col span={5}>
<Form.Item name="operator">
<Input placeholder="操作人" allowClear />
</Form.Item>
</Col>
<Col span={18}>
<Col span={6}>
<Space>
<Button onClick={() => handleSearch()} type="primary" icon={<SearchOutlined />}>
</Button>
<Button onClick={() => setEditVisible(true)} type="primary" icon={<EditOutlined />}>
<Button onClick={() => search.reset()} type="primary" icon={<RedoOutlined />}>
</Button>
</Space>
</Col>
@ -91,28 +96,26 @@ const Tenant: React.FC = () => {
</Form>
<Table
{...tableProps}
bordered
rowKey="id"
scroll={{ x: 1000 }}
columns={[
...baseColumns,
{
fixed: 'right',
width: 100,
title: '操作',
key: 'action',
render: (text: string, record: any) => {
return (
<Space>
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
</Button>
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
<Button onClick={() => handleDetail(record)} type="link" className={style.opreate_btn}>
</Button>
</Space>
);
},
},
]}
/>
<LogDetail visible={visible} onClose={handleClose} data={curItems} />
</div>
);
};

@ -1,79 +1,24 @@
import request from '@/utils';
const fetchTenantList = async (
const fetchLogList = async (
pageProps: { current: number; pageSize: number },
formData: { tencent: string | number }
formData: { category: string | number; bizNo: string; operator: string }
): Promise<{ total: number; list: Array<any> }> => {
const res: any = await request('/hippo4j/v1/cs/tenant/query/page', {
const res: any = await request('/hippo4j/v1/cs/log/query/page', {
method: 'POST',
headers: {
Authorization:
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ',
cookie:
'Admin-Token=Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ; userName=baoxinyi_admin',
},
body: {
...formData,
current: pageProps.current,
size: pageProps.pageSize,
desc: true,
},
});
if (res && res.success) {
return {
total: res.data.total,
list: res.data.records,
list: res.data.records.map((item: any, index: number) => ({ id: index + 1, ...item })),
};
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchAddTenant = async (id: string) => {
const res = await request('/hippo4j/v1/cs/tenant/save', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchDeleteTenant = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchUpdateTenant = async (id: string) => {
const res = await request('hippo4j/v1/cs/tenant/update', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchTenantDetail = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
};
export { fetchTenantList, fetchAddTenant, fetchDeleteTenant, fetchUpdateTenant, fetchTenantDetail };
export { fetchLogList };

@ -6,6 +6,8 @@ import style from './index.module.less';
import { useRequest } from 'ahooks';
import { setToken } from '@/utils';
import { useNavigate } from 'react-router-dom';
import { STR_MAP } from '@/config/i18n/locales/constants';
import { useTranslation } from 'react-i18next';
const { Paragraph } = Typography;
@ -19,12 +21,13 @@ const Login = () => {
const navigate = useNavigate();
const { validateFields } = form;
const [remenberMe, setRemenberMe] = useState(0);
const { t } = useTranslation();
const { run, loading } = useRequest(service.fetchLogin, {
manual: true,
onSuccess: res => {
if (res) {
message.success('登陆成功');
message.success(t(STR_MAP.LOGIN_SUCCESSFUL));
navigate('/thread-poll/index');
setToken(res?.data);
}
@ -54,12 +57,12 @@ const Login = () => {
rules={[
{
required: true,
message: '请输入用户名!',
message: t(STR_MAP.USER_INPUT_MESSAGE),
},
]}
>
<Input
placeholder="用户名"
placeholder={t(STR_MAP.USER_INPUT_MESSAGE)}
prefix={<UserOutlined className={'prefixIcon'} />}
size="large"
allowClear
@ -71,12 +74,12 @@ const Login = () => {
rules={[
{
required: true,
message: '请输入密码!',
message: t(STR_MAP.PASSWORD_INPUT_MESSAGE),
},
]}
>
<Input.Password
placeholder="密码"
placeholder={t(STR_MAP.PASSWORD_INPUT_MESSAGE)}
prefix={<LockOutlined className={'prefixIcon'} />}
size="large"
allowClear
@ -91,9 +94,9 @@ const Login = () => {
setRemenberMe(e.target.checked ? 1 : 0);
}}
>
{t(STR_MAP.REMERBER_PASSWORD)}
</Checkbox>
<Button type="link"></Button>
<a>{t(STR_MAP.FORGOT_PASSWORD)}</a>
</div>
</Form.Item>
<Form.Item>
@ -105,23 +108,23 @@ const Login = () => {
onClick={handleLogin}
loading={loading}
>
{t(STR_MAP.LOGIN)}
</Button>
</Form.Item>
</Form>
),
[form, loading, handleLogin]
[form, loading, handleLogin, t]
);
const items: TabsProps['items'] = [
{
key: TABS_KEY.LOGIN,
label: '账号密码登陆',
label: t(STR_MAP.ACCOUNT_PASSWORD_LOGIN),
children: formNode,
},
{
key: TABS_KEY.PHONE,
label: '手机号登陆',
label: t(STR_MAP.PHONE_LOGIN),
children: formNode,
},
];
@ -132,7 +135,7 @@ const Login = () => {
<div className={style['img-wrapper']}>
<img src="https://nageoffer.com/img/logo3.png" alt="" />
</div>
<Paragraph className={style['tip']}>线</Paragraph>
<Paragraph className={style['tip']}>{t(STR_MAP.GLOBAL_TITLE)}</Paragraph>
<div className={style['form-content']}>
<Tabs centered defaultActiveKey={TABS_KEY.LOGIN} items={items} />
</div>

@ -0,0 +1,96 @@
import { useRequest } from 'ahooks';
import { Form, Modal, Input, notification } from 'antd';
import React, { useEffect } from 'react';
import { fetchAddTenant, fetchUpdateTenant } from './service';
interface IProps {
type: string;
data: any;
visible: boolean;
onClose: () => void;
reset: () => void;
}
const TenantCreate: React.FC<IProps> = props => {
const { visible, onClose, data, type, reset } = props;
const [form] = Form.useForm();
const updateRequest = useRequest(fetchUpdateTenant, {
manual: true,
onSuccess: () => {
notification.success({ message: '更新成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
notification.error({ message: err.message });
},
});
const addRequest = useRequest(fetchAddTenant, {
manual: true,
onSuccess: () => {
notification.success({ message: '创建成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
notification.error({ message: err.message });
},
});
const onSave = () => {
form
.validateFields()
.then(values => {
addRequest.run({ ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
const onUpdate = () => {
form
.validateFields()
.then(values => {
updateRequest.run({ id: data.id, ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
useEffect(() => {
if (type === 'edit') {
form.setFieldsValue({
...data,
});
}
}, [type, data, form]);
return (
<Modal
open={visible}
onCancel={onClose}
width={600}
title={type === 'edit' ? '编辑' : '创建'}
onOk={type === 'edit' ? onUpdate : onSave}
confirmLoading={addRequest.loading || updateRequest.loading}
>
<Form labelAlign="right" labelCol={{ span: 6 }} wrapperCol={{ span: 15 }} form={form}>
<Form.Item label="租户" name="tenantId" rules={[{ required: true }]}>
<Input placeholder="请输入" disabled={type === 'edit'} />
</Form.Item>
<Form.Item label="租户名称" name="tenantName" rules={[{ required: true }]}>
<Input placeholder="请输入" />
</Form.Item>
<Form.Item label="负责人" name="owner" rules={[{ required: true }]}>
<Input placeholder="请输入" />
</Form.Item>
<Form.Item label="租户简介" name="tenantDesc" rules={[{ required: true }]}>
<Input.TextArea placeholder="请输入" />
</Form.Item>
</Form>
</Modal>
);
};
export default TenantCreate;

@ -1,16 +1,16 @@
import React, { useState } from 'react';
import { useAntdTable } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col, Modal } from 'antd';
import { useAntdTable, useRequest } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col, Modal, notification, message } from 'antd';
import { SearchOutlined, EditOutlined } from '@ant-design/icons';
import { useUrlSet } from '@/hooks/useUrlSet';
import { fetchTenantList } from './service';
import { fetchDeleteTenant, fetchTenantList } from './service';
import style from './index.module.less';
import TenantCreate from './create';
const baseColumns = [
{
title: '序号',
dataIndex: 'id',
dataIndex: 'index',
},
{
title: '租户',
@ -32,38 +32,55 @@ const baseColumns = [
const Tenant: React.FC = () => {
const [editVisible, setEditVisible] = useState(false);
const [curItem, setCurItem] = useState({});
const [type, setType] = useState('add');
const [form] = Form.useForm();
const { setUrl } = useUrlSet({ form });
const { tableProps, search } = useAntdTable(fetchTenantList, { form });
// const {run: delete} = useRequest(fetchDeleteTenant, { manual: true });
const deleteRequest = useRequest(fetchDeleteTenant, { manual: true });
const handleSearch = () => {
setUrl();
search.submit();
};
const handleDelete = (item: any) => {
Modal.confirm({
title: '提示',
content: `此操作将删除 ${item.tenantId},是否继续?`,
onOk: async () => {
try {
const res = await deleteRequest.runAsync(item.tenantId);
if (res && res.success) {
notification.success({ message: '删除成功' });
search.reset();
}
} catch (e: any) {
message.error(e.message || '服务器开小差啦~');
}
},
});
};
const actions = (type: string, item?: any) => {
switch (type) {
case 'add':
setType('add');
setEditVisible(true);
break;
case 'edit':
setType('edit');
setCurItem(item);
setEditVisible(true);
break;
case 'delete':
// handleDelete();
handleDelete(item);
break;
default:
break;
}
};
const handleSearch = () => {
setUrl();
search.submit();
const handleClose = () => {
setEditVisible(false);
};
// const handleDelete = (item: any) => {
// Modal.confirm({
// title: `此操作将删除${item.tenantName}, 是否继续?`,
// onOk: () => {
// search.submit();
// },
// });
// };
return (
<div className={style.tenant_wrapper}>
@ -71,7 +88,7 @@ const Tenant: React.FC = () => {
<Row>
<Col span={6}>
<Form.Item name="note">
<Input placeholder="租户" />
<Input placeholder="租户" allowClear />
</Form.Item>
</Col>
<Col span={18}>
@ -79,7 +96,7 @@ const Tenant: React.FC = () => {
<Button onClick={() => handleSearch()} type="primary" icon={<SearchOutlined />}>
</Button>
<Button onClick={() => setEditVisible(true)} type="primary" icon={<EditOutlined />}>
<Button onClick={() => actions('add')} type="primary" icon={<EditOutlined />}>
</Button>
</Space>
@ -92,7 +109,6 @@ const Tenant: React.FC = () => {
</Form>
<Table
{...tableProps}
bordered
rowKey="id"
columns={[
...baseColumns,
@ -105,7 +121,7 @@ const Tenant: React.FC = () => {
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
</Button>
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
<Button onClick={() => actions('delete', record)} type="link" className={style.opreate_btn}>
</Button>
</Space>
@ -114,6 +130,15 @@ const Tenant: React.FC = () => {
},
]}
/>
{editVisible && (
<TenantCreate
data={curItem}
onClose={handleClose}
visible={editVisible}
type={type}
reset={() => search.reset()}
/>
)}
</div>
);
};

@ -1,17 +1,27 @@
import request from '@/utils';
const fetchTenantOptions = async (tencent: string) => {
const res: any = await request('/hippo4j/v1/cs/tenant/query/page', {
method: 'POST',
body: {
tencent,
current: 1,
size: 10,
desc: true,
},
});
if (res && res.success) {
return res.data && res.data.records.map((item: any) => ({ value: item.tenantId, label: item.tenantId }));
}
throw new Error(res.message || '服务器开小差啦~');
};
const fetchTenantList = async (
pageProps: { current: number; pageSize: number },
formData: { tencent: string | number }
): Promise<{ total: number; list: Array<any> }> => {
const res: any = await request('/hippo4j/v1/cs/tenant/query/page', {
method: 'POST',
headers: {
Authorization:
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ',
cookie:
'Admin-Token=Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ; userName=baoxinyi_admin',
},
body: {
...formData,
current: pageProps.current,
@ -22,58 +32,53 @@ const fetchTenantList = async (
if (res && res.success) {
return {
total: res.data.total,
list: res.data.records,
list: res.data.records.map((item: any, index: number) => ({ index: index + 1, ...item })),
};
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchAddTenant = async (id: string) => {
const fetchAddTenant = async (params: {
tenantDesc: string; // 项目简介
tenantId: string; // 项目
tenantName: string; // 项目名称
owner: string; // 负责人
}) => {
const res = await request('/hippo4j/v1/cs/tenant/save', {
method: 'POST',
params: { id },
body: { ...params },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchDeleteTenant = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchUpdateTenant = async (id: string) => {
const fetchUpdateTenant = async (params: {
tenantDesc: string; // 项目简介
tenantId: string; // 项目
tenantName: string; // 项目名称
owner: string; // 负责人
}) => {
const res = await request('hippo4j/v1/cs/tenant/update', {
method: 'POST',
params: { id },
body: { ...params },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchTenantDetail = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
const fetchDeleteTenant = async (id: string) => {
const url = 'hippo4j/v1/cs/item/delete/prescription/' + id;
const res = await request(url, {
method: 'DELETE',
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
export { fetchTenantList, fetchAddTenant, fetchDeleteTenant, fetchUpdateTenant, fetchTenantDetail };
export { fetchTenantOptions, fetchTenantList, fetchAddTenant, fetchDeleteTenant, fetchUpdateTenant };

@ -0,0 +1,34 @@
import * as echarts from 'echarts/core';
import { GridComponent } from 'echarts/components';
import { LineChart } from 'echarts/charts';
import { UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
import { useEffect } from 'react';
echarts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition]);
const ThreadPoolMonitor = () => {
useEffect(() => {
let chartDom = document.getElementById('main');
let myChart = echarts.init(chartDom);
let option;
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'value',
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
},
],
};
option && myChart.setOption(option);
});
return <div id="main" style={{ width: '400px', height: '400px' }}></div>;
};
export default ThreadPoolMonitor;

@ -0,0 +1,11 @@
import { IRouterList } from '@/typings';
import ThreadPoolMonitor from '.';
const routerList: IRouterList[] = [
{
path: '/echarts',
component: ThreadPoolMonitor,
},
];
export default routerList;

@ -0,0 +1,23 @@
export const QUEUE_TYPE_MAP: { [key: string]: string } = {
'1': 'ArrayBlockingQueue',
'2': 'LinkedBlockingQueue',
'3': 'LinkedBlockingDeque',
'4': 'SynchronousQueue',
'5': 'LinkedTransferQueue',
'6': 'PriorityBlockingQueue',
'9': 'ResizableLinkedBlockingQueue',
};
export const REJECT_TYPE_MAP: { [key: string]: string } = {
'1': 'CallerRunsPolicy',
'2': 'AbortPolicy',
'3': 'DiscardPolicy',
'4': 'DiscardOldestPolicy',
'5': 'RunsOldestTaskPolicy',
'6': 'SyncPutQueuePolicy',
};
export const paramsType = { project: 0, thpool: 0 };
export const eBtnStyle = {
padding: '0 6px',
};

@ -1,73 +1,162 @@
import { Button, Form, Select, Space, Table, Typography } from 'antd';
import { Button, Form, Select, Space, Switch, Table, Typography, message } from 'antd';
import { useFormStateToUrl, useTran } from '@/hooks';
import { STR_MAP } from '@/config/i18n/locales/constants';
import { ColumnProps } from 'antd/es/table';
import { SearchButton, AddButton } from '@/components/with-button';
import { useAntdTable } from 'ahooks';
import service from './service';
import { Result, Record } from './type';
import { QUEUE_TYPE_MAP, REJECT_TYPE_MAP, eBtnStyle, paramsType } from './constants';
import { useTranslation } from 'react-i18next';
import request from '@/utils';
const { Title } = Typography;
const { Item } = Form;
const params = { project: 0, thpool: 0 };
interface CustomTableParams {
pageSize: number;
current: number;
tpId: string;
itemId: string;
}
const ThreadPoll = () => {
const [form] = Form.useForm();
const { handleSetUrlState } = useFormStateToUrl<{ project: number; thpool: number }>(form, params);
const columns: ColumnProps<any>[] = [
const { handleSetUrlState } = useFormStateToUrl<{ project: number; thpool: number }>(form, paramsType);
const { t } = useTranslation();
const columns: ColumnProps<Record>[] = [
{
title: useTran(STR_MAP.SERIAL_NUMBER),
dataIndex: 'order',
dataIndex: '',
render: (col, num, index) => {
return index + 1;
},
fixed: 'left',
width: 80,
},
{
title: useTran(STR_MAP.PROJECT),
dataIndex: 'project',
dataIndex: 'tenantId',
width: 150,
},
{
title: useTran(STR_MAP.TENANTRY),
dataIndex: 'tenantry',
title: useTran(STR_MAP.THREAD_POOL),
dataIndex: 'tpId',
width: 150,
},
{
title: useTran(STR_MAP.THREAD_POOL),
dataIndex: 'thread_pool',
title: useTran(STR_MAP.CORE_THREAD),
dataIndex: 'coreSize',
render: col => <span style={{ color: 'green' }}>{col}</span>,
width: 100,
},
{
title: useTran(STR_MAP.MAXIMUM_THREAD),
dataIndex: 'maximum_thread',
dataIndex: 'maxSize',
render: col => <span style={{ color: 'red' }}>{col}</span>,
width: 100,
},
{
title: useTran(STR_MAP.QUEUE_TYPE),
dataIndex: 'queue_type',
dataIndex: 'queueType',
render: (col: number) => QUEUE_TYPE_MAP[String(col)],
width: 150,
},
{
title: useTran(STR_MAP.QUEUE_CAPACITY),
dataIndex: 'capacity',
width: 150,
},
{
title: useTran(STR_MAP.REJECTION_STRATEGY),
dataIndex: 'tenantry',
dataIndex: 'rejectedType',
render: (col: number) => REJECT_TYPE_MAP[String(col)] ?? 'CustomRejectedPolicy_' + col,
width: 150,
},
{
title: useTran(STR_MAP.EXECUTION_TIMEOUT),
dataIndex: 'tenantry',
dataIndex: 'executeTimeOut',
render: (col: number) => col ?? 0,
width: 100,
},
{
title: useTran(STR_MAP.ALARM_OR_NOT),
dataIndex: 'tenantry',
dataIndex: 'isAlarm',
render: (col: number, row) => (
<Switch checked={Boolean(col)} onChange={() => handleAlarm({ id: row?.id, alarm: Number(!col) })} />
),
width: 100,
},
{
title: useTran(STR_MAP.CREATION_TIME),
dataIndex: 'tenantry',
dataIndex: 'gmtCreate',
width: 150,
align: 'center',
},
{
title: useTran(STR_MAP.UPDATE_TIME),
dataIndex: 'tenantry',
dataIndex: 'gmtModified',
width: 150,
align: 'center',
},
{
title: useTran(STR_MAP.EDIT),
dataIndex: 'tenantry',
dataIndex: 'eidt',
fixed: 'right',
width: 150,
render: () => (
<>
<Button type="link" style={eBtnStyle}>
</Button>
<Button type="link" style={eBtnStyle}>
</Button>
</>
),
},
];
const handleSubmit = () => {
handleSetUrlState();
const getTableData = (params: CustomTableParams): Promise<Result> => {
const { pageSize, current } = params;
return service.fetchThreadPoolTable({
current,
size: pageSize,
tpId: '',
itemId: '',
});
};
const { tableProps, search } = useAntdTable(getTableData, {
defaultPageSize: 5,
form: form,
});
const { submit } = search;
const handleAlarm = async (params: { id: string; alarm: number }) => {
const { id, alarm } = params;
request(`/hippo4j/v1/cs/thread/pool/alarm/enable/${id}/${alarm}`, {
method: 'post',
})
.then(res => {
if (res.success) {
message.success(t(STR_MAP.ALARM_EDITING_SUCCESS));
submit();
}
})
.catch(err => {
console.log('err:::', err);
});
};
return (
<Space direction="vertical" style={{ width: '100%' }} size="large">
<Title>{useTran(STR_MAP.THREAD_POOL)}</Title>
<Space direction="vertical" size="large" style={{ display: 'flex' }}>
<Title>{useTran(STR_MAP.THREAD_POOL_MANAGE)}</Title>
<Form form={form} layout="inline">
<Item name="tenatIds" style={{ flex: 1 }}>
<Select options={[{ label: '哈哈哈', value: 1 }]} placeholder={useTran(STR_MAP.PROJECT)}></Select>
</Item>
<Item name="project" style={{ flex: 1 }}>
<Select options={[{ label: '哈哈哈', value: 1 }]} placeholder={useTran(STR_MAP.PROJECT)}></Select>
</Item>
@ -76,14 +165,21 @@ const ThreadPoll = () => {
</Item>
<Item style={{ flex: 4 }}>
<Space>
<Button type="primary" htmlType="submit" onClick={handleSubmit}>
<SearchButton
type="primary"
htmlType="submit"
onClick={() => {
submit();
handleSetUrlState();
}}
>
{useTran(STR_MAP.SEARCH)}
</Button>
<Button type="primary">{useTran(STR_MAP.ADD)}</Button>
</SearchButton>
<AddButton type="primary">{useTran(STR_MAP.ADD)}</AddButton>
</Space>
</Item>
</Form>
<Table columns={columns}></Table>
<Table scroll={{ x: 1300 }} columns={columns} {...tableProps}></Table>
</Space>
);
};

@ -0,0 +1,17 @@
import request from '@/utils';
import { Result, ThreadPoolTableBody, ThreadPoolTableRes } from './type';
const fetchThreadPoolTable = async (body: ThreadPoolTableBody): Promise<Result> => {
const { data } = await request<ThreadPoolTableRes>('/hippo4j/v1/cs/thread/pool/query/page', {
method: 'POST',
body,
});
return {
total: data?.total,
list: data?.records,
};
};
export default {
fetchThreadPoolTable,
};

@ -0,0 +1,123 @@
import { Params } from 'ahooks/lib/useAntdTable/types';
// body
export interface ThreadPoolTableBody {
/**
* current page
*/
current: number;
/**
* project id
*/
itemId?: string;
/**
* page size
*/
size: number;
/**
*tenant Id
*/
tenantId?: string;
/**
* thread pool ID
*/
tpId?: string;
}
export interface Record {
/**
*
*/
allowCoreThreadTimeOut?: number;
/**
*
*/
capacity?: number;
/**
*
*/
capacityAlarm?: number;
/**
* 线
*/
coreSize?: number;
/**
*
*/
executeTimeOut?: number;
/**
*
*/
gmtCreate?: string;
/**
*
*/
gmtModified?: string;
/**
* ID
*/
id: string;
/**
*
*/
isAlarm?: number;
/**
* ID
*/
itemId?: string;
/**
*
*/
keepAliveTime?: number;
/**
*
*/
livenessAlarm?: number;
/**
* 线
*/
maxSize?: number;
/**
*
*/
queueName?: null;
/**
*
*/
queueType?: number;
/**
*
*/
rejectedType?: number;
/**
* ID
*/
tenantId?: string;
/**
* 线ID
*/
tpId?: string;
}
export interface ThreadPoolTableRes {
countId: null;
current: number;
desc: boolean;
hitCount: boolean;
itemId: string;
maxLimit: null;
optimizeCountSql: boolean;
orders: string[];
pages: number;
records: Record[];
searchCount: boolean;
size: number;
tenantId: string;
total: number;
tpId: string;
}
export interface Result {
total: number;
list: Record[];
}

@ -0,0 +1,115 @@
import { useRequest } from 'ahooks';
import { Form, Modal, Input, notification, Select, Checkbox, message } from 'antd';
import React, { useEffect } from 'react';
import { fetchAddUser, fetchUpdateUser } from './service';
import { fetchTenantOptions } from '../tenant/service';
interface IProps {
type: string;
data: any;
visible: boolean;
onClose: () => void;
reset: () => void;
}
const ROLE_OPTIONS = [
{
label: 'ROLE_USER',
value: 'ROLE_USER',
},
{
label: 'ROLE_ADMIN',
value: 'ROLE_ADMIN',
},
{
label: 'ROLE_MANAGE',
value: 'ROLE_MANAGE',
},
];
const UserCreate: React.FC<IProps> = props => {
const { visible, onClose, data, type, reset } = props;
const [form] = Form.useForm();
const tenantRequest = useRequest(fetchTenantOptions, {
ready: !!type,
});
const updateRequest = useRequest(fetchUpdateUser, {
manual: true,
onSuccess: () => {
notification.success({ message: '更新成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
message.error(err.message);
},
});
const addRequest = useRequest(fetchAddUser, {
manual: true,
onSuccess: () => {
notification.success({ message: '创建成功' });
form.resetFields();
onClose();
reset();
},
onError: err => {
message.error(err.message);
},
});
const onSave = () => {
form
.validateFields()
.then(values => {
addRequest.run({ ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
const onUpdate = () => {
form
.validateFields()
.then(values => {
updateRequest.run({ id: data.id, ...values });
})
.catch(info => {
console.log('Validate Failed:', info);
});
};
useEffect(() => {
if (type === 'edit') {
form.setFieldsValue({
...data,
});
}
}, [type, data, form]);
return (
<Modal
open={visible}
onCancel={onClose}
width={600}
title={type === 'edit' ? '编辑' : '创建'}
onOk={type === 'edit' ? onUpdate : onSave}
confirmLoading={addRequest.loading || updateRequest.loading}
>
<Form labelAlign="right" labelCol={{ span: 6 }} wrapperCol={{ span: 15 }} form={form}>
<Form.Item label="用户名" name="userName" rules={[{ required: true }]}>
<Input placeholder="请输入" disabled={type === 'edit'} />
</Form.Item>
<Form.Item label="密码" name="password" rules={[{ required: true }]}>
<Input placeholder="请输入" />
</Form.Item>
<Form.Item label="角色" name="role" rules={[{ required: true }]}>
<Select options={ROLE_OPTIONS} placeholder="请选择" disabled={type === 'edit'} />
</Form.Item>
<Form.Item label="租户" name="tempResources">
<Checkbox.Group options={tenantRequest.data} />
</Form.Item>
</Form>
</Modal>
);
};
export default UserCreate;

@ -1,10 +1,11 @@
import { useAntdTable } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col } from 'antd';
import { useAntdTable, useRequest } from 'ahooks';
import { Button, Form, Input, Row, Space, Table, Col, Modal, notification, message } from 'antd';
import { SearchOutlined, EditOutlined } from '@ant-design/icons';
import React, { useState } from 'react';
import { fetchUserList } from './service';
import { fetchDeleteUser, fetchUserList } from './service';
import { useUrlSet } from '@/hooks/useUrlSet';
import style from './index.module.less';
import UserCreate from './create';
const baseColumns = [
{
@ -32,37 +33,54 @@ const baseColumns = [
const Tenant: React.FC = () => {
const [editVisible, setEditVisible] = useState(false);
const [type, setType] = useState('add');
const [curItem, setCurItem] = useState({});
const [form] = Form.useForm();
const { setUrl } = useUrlSet({ form });
const { tableProps, search } = useAntdTable(fetchUserList, { form });
// const {run: delete} = useRequest(fetchDeleteTenant, { manual: true });
const deleteRequest = useRequest(fetchDeleteUser, { manual: true });
const handleSearch = () => {
setUrl();
search.submit();
};
const handleDelete = (item: any) => {
Modal.confirm({
title: '提示',
content: `此操作将删除 ${item.userName},是否继续?`,
onOk: async () => {
try {
const res = await deleteRequest.runAsync(item.userName);
if (res && res.success) {
notification.success({ message: '删除成功' });
search.reset();
}
} catch (e: any) {
message.error(e.message || '服务器开小差啦~');
}
},
});
};
const actions = (type: string, item?: any) => {
switch (type) {
case 'add':
setType('add');
setEditVisible(true);
break;
case 'edit':
setType('edit');
setCurItem(item);
setEditVisible(true);
break;
case 'delete':
// handleDelete();
handleDelete(item);
break;
default:
break;
}
};
const handleSearch = () => {
setUrl();
search.submit();
const handleClose = () => {
setEditVisible(false);
};
// const handleDelete = (item: any) => {
// Modal.confirm({
// title: `此操作将删除${item.tenantName}, 是否继续?`,
// onOk: () => {
// search.submit();
// },
// });
// };
return (
<div className={style.tenant_wrapper}>
@ -70,7 +88,7 @@ const Tenant: React.FC = () => {
<Row>
<Col span={6}>
<Form.Item name="note">
<Input placeholder="用户名" />
<Input placeholder="用户名" allowClear />
</Form.Item>
</Col>
<Col span={18}>
@ -78,7 +96,7 @@ const Tenant: React.FC = () => {
<Button onClick={() => handleSearch()} type="primary" icon={<SearchOutlined />}>
</Button>
<Button onClick={() => setEditVisible(true)} type="primary" icon={<EditOutlined />}>
<Button onClick={() => actions('add')} type="primary" icon={<EditOutlined />}>
</Button>
</Space>
@ -91,7 +109,6 @@ const Tenant: React.FC = () => {
</Form>
<Table
{...tableProps}
bordered
rowKey="index"
columns={[
...baseColumns,
@ -104,7 +121,12 @@ const Tenant: React.FC = () => {
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
</Button>
<Button onClick={() => actions('edit', record)} type="link" className={style.opreate_btn}>
<Button
onClick={() => actions('delete', record)}
type="link"
className={style.opreate_btn}
disabled={record.userName === 'admin'}
>
</Button>
</Space>
@ -113,6 +135,15 @@ const Tenant: React.FC = () => {
},
]}
/>
{editVisible && (
<UserCreate
data={curItem}
onClose={handleClose}
visible={editVisible}
type={type}
reset={() => search.reset()}
/>
)}
</div>
);
};

@ -6,12 +6,6 @@ const fetchUserList = async (
): Promise<{ total: number; list: Array<any> }> => {
const res: any = await request('/hippo4j/v1/cs/auth/users/page', {
method: 'POST',
headers: {
Authorization:
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ',
cookie:
'Admin-Token=Bearer%20eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI3LGJhb3hpbnlpX2FkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTUzOTg4NDksImlhdCI6MTY5NDc5NDA0OSwicm9sIjoiUk9MRV9BRE1JTiJ9.syRDshKpd-xETsSdeMPRtk956f4BJkPt4utVsUl4smgH71Woj8SUq4w2RX1YtGTC4aTZRJYdKOfkTqwK0g_dHQ; userName=baoxinyi_admin',
},
body: {
...formData,
current: pageProps.current,
@ -24,55 +18,67 @@ const fetchUserList = async (
list: res.data.records.map((item: any, index: number) => ({ index: index + 1, ...item })),
};
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchAddTenant = async (id: string) => {
const res = await request('/hippo4j/v1/cs/tenant/save', {
const fetchAddUser = async (params: {
password?: string;
permission?: string;
role: string;
userName: string;
tempResources: Array<string>;
tenant: Array<string>;
resources?: Array<{ resource: string; action: 'rw' }>;
}) => {
const { tempResources = [] } = params;
const res = await request('/hippo4j/v1/cs/auth/users/add', {
method: 'POST',
params: { id },
body: {
...params,
tempResources: tempResources.length > 0 ? true : false,
resources: tempResources.map(item => ({ resource: item, action: 'rw' })),
},
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchDeleteTenant = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
});
if (res && res.success) {
return res;
const fetchUpdateUser = async (params: {
password?: string;
permission?: string;
role: string;
userName: string;
tempResources: Array<any>;
resources?: Array<{ resource: string; action: 'rw' }>;
}) => {
const { tempResources = [] } = params;
if (tempResources.length > 0) {
params.resources = tempResources.map(item => ({ resource: item, action: 'rw' }));
}
throw new Error(res.msg || '服务器开小差啦~');
};
const fetchUpdateTenant = async (id: string) => {
const res = await request('hippo4j/v1/cs/tenant/update', {
method: 'POST',
params: { id },
const res = await request('/hippo4j/v1/cs/auth/users/update', {
method: 'PUT',
body: { ...params },
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
const fetchTenantDetail = async (id: string) => {
const res = await request('/tenants', {
method: 'POST',
params: { id },
const fetchDeleteUser = async (id: string) => {
const url = '/hippo4j/v1/cs/auth/users/remove/' + id;
const res = await request(url, {
method: 'DELETE',
});
if (res && res.success) {
return res;
}
throw new Error(res.msg || '服务器开小差啦~');
throw new Error(res.message || '服务器开小差啦~');
};
export { fetchUserList, fetchAddTenant, fetchDeleteTenant, fetchUpdateTenant, fetchTenantDetail };
export { fetchUserList, fetchAddUser, fetchDeleteUser, fetchUpdateUser };

@ -4,9 +4,20 @@ import aboutRouter from '@/page/about/router';
import ThreadPoolRouter from '@/page/thread-pool/router';
import tenantRouter from '@/page/tenant/router';
import LoginRouter from '@/page/login/router';
// import itemRouter from '@/page/item/router';
// import userRouter from '@/page/user/router';
// import logRouter from '@/page/log/router';
import itemRouter from '@/page/item/router';
import userRouter from '@/page/user/router';
import logRouter from '@/page/log/router';
import ThreadPoolMonitorRouter from '@/page/thread-pool-monitor/router';
const routerList: IRouterList[] = [...homeRouter, ...aboutRouter, ...tenantRouter, ...ThreadPoolRouter, ...LoginRouter];
const routerList: IRouterList[] = [
...homeRouter,
...aboutRouter,
...tenantRouter,
...ThreadPoolRouter,
...LoginRouter,
...itemRouter,
...userRouter,
...logRouter,
...ThreadPoolMonitorRouter,
];
export default routerList;

@ -49,9 +49,19 @@ const isPlainObject = (obj: { [key: string]: any }): boolean => {
};
const setToken = (token: string) => {
localStorage.setItem(TokenKey, token);
Cookie.set(TokenKey, token);
};
const removeToken = () => {
localStorage.removeItem(TokenKey);
Cookie.remove(TokenKey);
};
const getToken = () => {
return localStorage.getItem(TokenKey) || Cookie.get(TokenKey);
};
/**
* @description object value
* @param obj
@ -79,4 +89,4 @@ const isEmpty = (value: any) => {
return typeof value === 'object' ? _.isEmpty(value) : isNilValue(value);
};
export { isPlainObject, isEmpty, filterEmptyField, setToken };
export { isPlainObject, isEmpty, filterEmptyField, setToken, removeToken, getToken };

@ -1,4 +1,4 @@
import { isPlainObject } from '../common';
import { getToken, isPlainObject } from '../common';
import { notification, message } from 'antd';
import Qs from 'qs';
@ -24,7 +24,7 @@ interface RequestOptions {
type Response<T = any> = {
success: boolean;
data?: T;
data: T;
module?: T;
msg?: string;
status?: number;
@ -40,9 +40,8 @@ const inital: RequestOptions = {
body: null,
headers: {
'Content-Type': 'application/json',
Authorization:
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMCxiYW94aW55aV91c2VyIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2OTU3MzAwNzYsImlhdCI6MTY5NTEyNTI3Niwicm9sIjoiUk9MRV9VU0VSIn0.4cWyhllP7u-aoRAIHs3nMggsgl4-LUCVBas8WE0FJYIe-YNS0wGf1_0RJq3TUGw00KmSaSRPKdoPgRTFqEphZA',
},
// headers,
credentials: true,
responseType: 'JSON',
cache: 'no-cache',
@ -85,7 +84,13 @@ function request<T>(url: string, config: RequestOptions): Promise<Response<T>> {
}
if (config.headers && isPlainObject(config.headers)) {
config.headers = Object.assign({}, inital.headers, config.headers);
if (!config.headers?.Authorization) {
config.headers.Authorization = getToken();
}
} else {
config.headers = { Authorization: getToken(), 'Content-Type': 'application/json' };
}
let { method, params, body, headers, credentials, responseType } = Object.assign({}, inital, config) as any;
if (typeof url !== 'string') throw new TypeError('url is not an string');
if (!/^http(s?):\/\//i.test(url)) url = baseURL + url;

@ -41,7 +41,7 @@
dependencies:
"@ctrl/tinycolor" "^3.4.0"
"@ant-design/cssinjs@^1.16.0":
"@ant-design/cssinjs@^1.16.0", "@ant-design/cssinjs@^1.16.1":
version "1.17.0"
resolved "https://registry.npmmirror.com/@ant-design/cssinjs/-/cssinjs-1.17.0.tgz#a3f69cf5131539b76ccdbfced43d242557599fea"
integrity sha512-MgGCZ6sfD3yQB0XW0hN4jgixMxApTlDYyct+pc7fRZNO4CaqWWm/9iXkkljNR27lyWLZmm+XiDfcIOo1bnrnMA==
@ -54,6 +54,18 @@
rc-util "^5.35.0"
stylis "^4.0.13"
"@ant-design/happy-work-theme@^1.0.0":
version "1.0.0"
resolved "https://registry.npmmirror.com/@ant-design/happy-work-theme/-/happy-work-theme-1.0.0.tgz#b18e2d2cb37df496def5c5773c146885c6cac87c"
integrity sha512-BKuz5PZkGZwXqzDwTE9fiHYlpKdDyoGnApEih2MG1GF79/a/YekxBc4tdqocykDtWzt3z1wwmHv8AiB7EUTWsQ==
dependencies:
"@ant-design/cssinjs" "^1.16.1"
"@babel/runtime" "^7.18.3"
"@ctrl/tinycolor" "^3.6.0"
classnames "^2.3.2"
rc-motion "^2.7.3"
rc-util "^5.33.0"
"@ant-design/icons-svg@^4.3.0":
version "4.3.1"
resolved "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.3.1.tgz#4b2f65a17d4d32b526baa6414aca2117382bf8da"
@ -4468,6 +4480,22 @@ eastasianwidth@^0.2.0:
resolved "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
echarts-for-react@^3.0.2:
version "3.0.2"
resolved "https://registry.npmmirror.com/echarts-for-react/-/echarts-for-react-3.0.2.tgz#ac5859157048a1066d4553e34b328abb24f2b7c1"
integrity sha512-DRwIiTzx8JfwPOVgGttDytBqdp5VzCSyMRIxubgU/g2n9y3VLUmF2FK7Icmg/sNVkv4+rktmrLN9w22U2yy3fA==
dependencies:
fast-deep-equal "^3.1.3"
size-sensor "^1.0.1"
echarts@^5.4.3:
version "5.4.3"
resolved "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz#f5522ef24419164903eedcfd2b506c6fc91fb20c"
integrity sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==
dependencies:
tslib "2.3.0"
zrender "5.4.4"
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@ -8733,7 +8761,7 @@ rc-menu@~9.12.0:
rc-overflow "^1.3.1"
rc-util "^5.27.0"
rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.0, rc-motion@^2.6.1, rc-motion@^2.6.2, rc-motion@^2.9.0:
rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.0, rc-motion@^2.6.1, rc-motion@^2.6.2, rc-motion@^2.7.3, rc-motion@^2.9.0:
version "2.9.0"
resolved "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.0.tgz#9e18a1b8d61e528a97369cf9a7601e9b29205710"
integrity sha512-XIU2+xLkdIr1/h6ohPZXyPBMvOmuyFZQ/T0xnawz+Rh+gh4FINcnZmMT5UTIj6hgI0VLDjTaPeRd+smJeSPqiQ==
@ -9647,6 +9675,11 @@ sisteransi@^1.0.5:
resolved "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
size-sensor@^1.0.1:
version "1.0.2"
resolved "https://registry.npmmirror.com/size-sensor/-/size-sensor-1.0.2.tgz#b8f8da029683cf2b4e22f12bf8b8f0a1145e8471"
integrity sha512-2NCmWxY7A9pYKGXNBfteo4hy14gWu47rg5692peVMst6lQLPKrVjhY+UTEsPI5ceFRJSl3gVgMYaUi/hKuaiKw==
slash@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
@ -10318,6 +10351,11 @@ tsconfig-paths@^3.14.2:
minimist "^1.2.6"
strip-bom "^3.0.0"
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@ -11152,3 +11190,10 @@ yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
zrender@5.4.4:
version "5.4.4"
resolved "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz#8854f1d95ecc82cf8912f5a11f86657cb8c9e261"
integrity sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==
dependencies:
tslib "2.3.0"

@ -81,7 +81,6 @@
<el-table-column :label="$t('common.num')" fixed="left" width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column :label="$t('threadPoolInstance.instanceID')" width="260">
<template slot-scope="scope">
<el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link>

Loading…
Cancel
Save