Skip to content

Commit

Permalink
added update now button
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 8, 2025
1 parent 5af42c1 commit d62d5fd
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions src/pages/tools/tenantbreachlookup/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { EyeIcon } from "@heroicons/react/24/outline";
import { ExclamationTriangleIcon, EyeIcon } from "@heroicons/react/24/outline";
import { ApiGetCall } from "../../../api/ApiCall";
import { Button, CircularProgress, SvgIcon } from "@mui/material";
import { useSettings } from "../../../hooks/use-settings";

const Page = () => {
const pageTitle = "Potential Breaches";
const tenantFilter = useSettings()?.currentTenant;
const ApiCall = ApiGetCall({
url: "/api/ExecBreachSearch",
data: { tenantFilter: tenantFilter },
waiting: false,
});

const pageTitle = "Potential Breached passwords and information";
const apiUrl = "/api/ListBreachesTenant";
const actions = [
{
Expand All @@ -14,12 +24,31 @@ const Page = () => {
color: "success",
},
];

return (
<CippTablePage
actions={actions}
title={pageTitle}
apiUrl={apiUrl}
simpleColumns={["email", "password", "sources"]}
cardButton={
<>
<Button onClick={ApiCall.refetch}>
Run Breach Check
{ApiCall.isFetching && (
<SvgIcon>
<CircularProgress size={10} />
</SvgIcon>
)}
{ApiCall.isError && (
<SvgIcon color="error">
<ExclamationTriangleIcon />
</SvgIcon>
)}
{ApiCall.isSuccess && <SvgIcon color="success"></SvgIcon>}
</Button>
</>
}
/>
);
};
Expand Down

0 comments on commit d62d5fd

Please sign in to comment.