You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03:00 
			
		
		
		
	404 hosts search
This commit is contained in:
		| @@ -1,128 +0,0 @@ | |||||||
| import { IconDotsVertical, IconEdit, IconPower, IconSearch, IconTrash } from "@tabler/icons-react"; |  | ||||||
| import { intl } from "src/locale"; |  | ||||||
|  |  | ||||||
| export default function AuditTable() { |  | ||||||
| 	return ( |  | ||||||
| 		<div className="card mt-4"> |  | ||||||
| 			<div className="card-status-top bg-purple" /> |  | ||||||
| 			<div className="card-table"> |  | ||||||
| 				<div className="card-header"> |  | ||||||
| 					<div className="row w-full"> |  | ||||||
| 						<div className="col"> |  | ||||||
| 							<h2 className="mt-1 mb-0">{intl.formatMessage({ id: "auditlog.title" })}</h2> |  | ||||||
| 						</div> |  | ||||||
| 						<div className="col-md-auto col-sm-12"> |  | ||||||
| 							<div className="ms-auto d-flex flex-wrap btn-list"> |  | ||||||
| 								<div className="input-group input-group-flat w-auto"> |  | ||||||
| 									<span className="input-group-text input-group-text-sm"> |  | ||||||
| 										<IconSearch size={16} /> |  | ||||||
| 									</span> |  | ||||||
| 									<input |  | ||||||
| 										id="advanced-table-search" |  | ||||||
| 										type="text" |  | ||||||
| 										className="form-control form-control-sm" |  | ||||||
| 										autoComplete="off" |  | ||||||
| 									/> |  | ||||||
| 								</div> |  | ||||||
| 							</div> |  | ||||||
| 						</div> |  | ||||||
| 					</div> |  | ||||||
| 				</div> |  | ||||||
| 				<div id="advanced-table"> |  | ||||||
| 					<div className="table-responsive"> |  | ||||||
| 						<table className="table table-vcenter table-selectable"> |  | ||||||
| 							<thead> |  | ||||||
| 								<tr> |  | ||||||
| 									<th className="w-1" /> |  | ||||||
| 									<th> |  | ||||||
| 										<button type="button" className="table-sort d-flex justify-content-between"> |  | ||||||
| 											Source |  | ||||||
| 										</button> |  | ||||||
| 									</th> |  | ||||||
| 									<th> |  | ||||||
| 										<button type="button" className="table-sort d-flex justify-content-between"> |  | ||||||
| 											Destination |  | ||||||
| 										</button> |  | ||||||
| 									</th> |  | ||||||
| 									<th> |  | ||||||
| 										<button type="button" className="table-sort d-flex justify-content-between"> |  | ||||||
| 											SSL |  | ||||||
| 										</button> |  | ||||||
| 									</th> |  | ||||||
| 									<th> |  | ||||||
| 										<button type="button" className="table-sort d-flex justify-content-between"> |  | ||||||
| 											Access |  | ||||||
| 										</button> |  | ||||||
| 									</th> |  | ||||||
| 									<th> |  | ||||||
| 										<button type="button" className="table-sort d-flex justify-content-between"> |  | ||||||
| 											Status |  | ||||||
| 										</button> |  | ||||||
| 									</th> |  | ||||||
| 									<th className="w-1" /> |  | ||||||
| 								</tr> |  | ||||||
| 							</thead> |  | ||||||
| 							<tbody className="table-tbody"> |  | ||||||
| 								<tr> |  | ||||||
| 									<td data-label="Owner"> |  | ||||||
| 										<div className="d-flex py-1 align-items-center"> |  | ||||||
| 											<span |  | ||||||
| 												className="avatar avatar-2 me-2" |  | ||||||
| 												style={{ |  | ||||||
| 													backgroundImage: |  | ||||||
| 														"url(//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm)", |  | ||||||
| 												}} |  | ||||||
| 											/> |  | ||||||
| 										</div> |  | ||||||
| 									</td> |  | ||||||
| 									<td data-label="Destination"> |  | ||||||
| 										<div className="flex-fill"> |  | ||||||
| 											<div className="font-weight-medium"> |  | ||||||
| 												<span className="badge badge-lg domain-name">blog.jc21.com</span> |  | ||||||
| 											</div> |  | ||||||
| 											<div className="text-secondary mt-1">Created: 20th September 2024</div> |  | ||||||
| 										</div> |  | ||||||
| 									</td> |  | ||||||
| 									<td data-label="Source">http://172.17.0.1:3001</td> |  | ||||||
| 									<td data-label="SSL">Let's Encrypt</td> |  | ||||||
| 									<td data-label="Access">Public</td> |  | ||||||
| 									<td data-label="Status"> |  | ||||||
| 										<span className="badge bg-lime-lt">Online</span> |  | ||||||
| 									</td> |  | ||||||
| 									<td data-label="Status" className="text-end"> |  | ||||||
| 										<span className="dropdown"> |  | ||||||
| 											<button |  | ||||||
| 												type="button" |  | ||||||
| 												className="btn dropdown-toggle btn-action btn-sm px-1" |  | ||||||
| 												data-bs-boundary="viewport" |  | ||||||
| 												data-bs-toggle="dropdown" |  | ||||||
| 											> |  | ||||||
| 												<IconDotsVertical /> |  | ||||||
| 											</button> |  | ||||||
| 											<div className="dropdown-menu dropdown-menu-end"> |  | ||||||
| 												<span className="dropdown-header">Proxy Host #2</span> |  | ||||||
| 												<a className="dropdown-item" href="#"> |  | ||||||
| 													<IconEdit size={16} /> |  | ||||||
| 													Edit |  | ||||||
| 												</a> |  | ||||||
| 												<a className="dropdown-item" href="#"> |  | ||||||
| 													<IconPower size={16} /> |  | ||||||
| 													Disable |  | ||||||
| 												</a> |  | ||||||
| 												<div className="dropdown-divider" /> |  | ||||||
| 												<a className="dropdown-item" href="#"> |  | ||||||
| 													<IconTrash size={16} /> |  | ||||||
| 													Delete |  | ||||||
| 												</a> |  | ||||||
| 											</div> |  | ||||||
| 										</span> |  | ||||||
| 									</td> |  | ||||||
| 								</tr> |  | ||||||
| 							</tbody> |  | ||||||
| 						</table> |  | ||||||
| 					</div> |  | ||||||
| 				</div> |  | ||||||
| 			</div> |  | ||||||
| 		</div> |  | ||||||
| 	); |  | ||||||
| } |  | ||||||
| @@ -1,4 +1,3 @@ | |||||||
| import { IconSearch } from "@tabler/icons-react"; |  | ||||||
| import { useState } from "react"; | import { useState } from "react"; | ||||||
| import Alert from "react-bootstrap/Alert"; | import Alert from "react-bootstrap/Alert"; | ||||||
| import { LoadingPage } from "src/components"; | import { LoadingPage } from "src/components"; | ||||||
| @@ -28,21 +27,6 @@ export default function TableWrapper() { | |||||||
| 						<div className="col"> | 						<div className="col"> | ||||||
| 							<h2 className="mt-1 mb-0">{intl.formatMessage({ id: "auditlog.title" })}</h2> | 							<h2 className="mt-1 mb-0">{intl.formatMessage({ id: "auditlog.title" })}</h2> | ||||||
| 						</div> | 						</div> | ||||||
| 						<div className="col-md-auto col-sm-12"> |  | ||||||
| 							<div className="ms-auto d-flex flex-wrap btn-list"> |  | ||||||
| 								<div className="input-group input-group-flat w-auto"> |  | ||||||
| 									<span className="input-group-text input-group-text-sm"> |  | ||||||
| 										<IconSearch size={16} /> |  | ||||||
| 									</span> |  | ||||||
| 									<input |  | ||||||
| 										id="advanced-table-search" |  | ||||||
| 										type="text" |  | ||||||
| 										className="form-control form-control-sm" |  | ||||||
| 										autoComplete="off" |  | ||||||
| 									/> |  | ||||||
| 								</div> |  | ||||||
| 							</div> |  | ||||||
| 						</div> |  | ||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 				<Table data={data ?? []} isFetching={isFetching} onSelectItem={setEventId} /> | 				<Table data={data ?? []} isFetching={isFetching} onSelectItem={setEventId} /> | ||||||
|   | |||||||
| @@ -12,6 +12,7 @@ import Table from "./Table"; | |||||||
|  |  | ||||||
| export default function TableWrapper() { | export default function TableWrapper() { | ||||||
| 	const queryClient = useQueryClient(); | 	const queryClient = useQueryClient(); | ||||||
|  | 	const [search, setSearch] = useState(""); | ||||||
| 	const [deleteId, setDeleteId] = useState(0); | 	const [deleteId, setDeleteId] = useState(0); | ||||||
| 	const [editId, setEditId] = useState(0 as number | "new"); | 	const [editId, setEditId] = useState(0 as number | "new"); | ||||||
| 	const { isFetching, isLoading, isError, error, data } = useDeadHosts(["owner", "certificate"]); | 	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" })); | 		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 ( | 	return ( | ||||||
| 		<div className="card mt-4"> | 		<div className="card mt-4"> | ||||||
| 			<div className="card-status-top bg-red" /> | 			<div className="card-status-top bg-red" /> | ||||||
| @@ -56,6 +64,7 @@ export default function TableWrapper() { | |||||||
| 										type="text" | 										type="text" | ||||||
| 										className="form-control form-control-sm" | 										className="form-control form-control-sm" | ||||||
| 										autoComplete="off" | 										autoComplete="off" | ||||||
|  | 										onChange={(e: any) => setSearch(e.target.value.toLowerCase())} | ||||||
| 									/> | 									/> | ||||||
| 								</div> | 								</div> | ||||||
| 								<Button size="sm" className="btn-red" onClick={() => setEditId("new")}> | 								<Button size="sm" className="btn-red" onClick={() => setEditId("new")}> | ||||||
| @@ -66,7 +75,7 @@ export default function TableWrapper() { | |||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 				<Table | 				<Table | ||||||
| 					data={data ?? []} | 					data={filtered ?? data ?? []} | ||||||
| 					isFetching={isFetching} | 					isFetching={isFetching} | ||||||
| 					onEdit={(id: number) => setEditId(id)} | 					onEdit={(id: number) => setEditId(id)} | ||||||
| 					onDelete={(id: number) => setDeleteId(id)} | 					onDelete={(id: number) => setDeleteId(id)} | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; | import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react"; | ||||||
| import { intl } from "src/locale"; | import { intl } from "src/locale"; | ||||||
|  |  | ||||||
| export default function AuditTable() { | export default function SettingTable() { | ||||||
| 	return ( | 	return ( | ||||||
| 		<div className="card mt-4"> | 		<div className="card mt-4"> | ||||||
| 			<div className="card-status-top bg-teal" /> | 			<div className="card-status-top bg-teal" /> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user