diff --git a/frontend/src/pages/AuditLog/AuditTable.tsx b/frontend/src/pages/AuditLog/AuditTable.tsx deleted file mode 100644 index 018078b7..00000000 --- a/frontend/src/pages/AuditLog/AuditTable.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import { IconDotsVertical, IconEdit, IconPower, IconSearch, IconTrash } from "@tabler/icons-react"; -import { intl } from "src/locale"; - -export default function AuditTable() { - return ( -
-
-
-
-
-
-

{intl.formatMessage({ id: "auditlog.title" })}

-
-
-
-
- - - - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
-
- -
-
-
-
- blog.jc21.com -
-
Created: 20th September 2024
-
-
http://172.17.0.1:3001Let's EncryptPublic - Online - - - -
- Proxy Host #2 - - - Edit - - - - Disable - - - -
-
-
-
-
- ); -} diff --git a/frontend/src/pages/AuditLog/TableWrapper.tsx b/frontend/src/pages/AuditLog/TableWrapper.tsx index 17422f2c..dde7d6d4 100644 --- a/frontend/src/pages/AuditLog/TableWrapper.tsx +++ b/frontend/src/pages/AuditLog/TableWrapper.tsx @@ -1,4 +1,3 @@ -import { IconSearch } from "@tabler/icons-react"; import { useState } from "react"; import Alert from "react-bootstrap/Alert"; import { LoadingPage } from "src/components"; @@ -28,21 +27,6 @@ export default function TableWrapper() {

{intl.formatMessage({ id: "auditlog.title" })}

-
-
-
- - - - -
-
-
diff --git a/frontend/src/pages/Nginx/DeadHosts/TableWrapper.tsx b/frontend/src/pages/Nginx/DeadHosts/TableWrapper.tsx index f627b650..3f0b1cde 100644 --- a/frontend/src/pages/Nginx/DeadHosts/TableWrapper.tsx +++ b/frontend/src/pages/Nginx/DeadHosts/TableWrapper.tsx @@ -12,6 +12,7 @@ import Table from "./Table"; export default function TableWrapper() { const queryClient = useQueryClient(); + const [search, setSearch] = useState(""); const [deleteId, setDeleteId] = useState(0); const [editId, setEditId] = useState(0 as number | "new"); const { isFetching, isLoading, isError, error, data } = useDeadHosts(["owner", "certificate"]); @@ -36,6 +37,13 @@ export default function TableWrapper() { showSuccess(intl.formatMessage({ id: enabled ? "notification.host-enabled" : "notification.host-disabled" })); }; + let filtered = null; + if (search && data) { + filtered = data?.filter((item) => { + return item.domainNames.some((domain: string) => domain.toLowerCase().includes(search)); + }); + } + return (
@@ -56,6 +64,7 @@ export default function TableWrapper() { type="text" className="form-control form-control-sm" autoComplete="off" + onChange={(e: any) => setSearch(e.target.value.toLowerCase())} />
setEditId(id)} onDelete={(id: number) => setDeleteId(id)} diff --git a/frontend/src/pages/Settings/SettingTable.tsx b/frontend/src/pages/Settings/SettingTable.tsx index 0cba2d58..28a7ee04 100644 --- a/frontend/src/pages/Settings/SettingTable.tsx +++ b/frontend/src/pages/Settings/SettingTable.tsx @@ -1,7 +1,7 @@ import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; import { intl } from "src/locale"; -export default function AuditTable() { +export default function SettingTable() { return (