mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-10-05 22:05:49 +01:00
Merge pull request #5546 from D0LBA3B/feature/proxy-host-delete-context
Adds host info to proxy host delete confirmation modal
This commit is contained in:
@@ -99,14 +99,27 @@ export default function TableWrapper() {
|
|||||||
isFiltered={!!search}
|
isFiltered={!!search}
|
||||||
isFetching={isFetching}
|
isFetching={isFetching}
|
||||||
onEdit={(id: number) => showProxyHostModal(id)}
|
onEdit={(id: number) => showProxyHostModal(id)}
|
||||||
onDelete={(id: number) =>
|
onDelete={(id: number) => {
|
||||||
|
const host = data?.find((h) => h.id === id);
|
||||||
showDeleteConfirmModal({
|
showDeleteConfirmModal({
|
||||||
title: <T id="object.delete" tData={{ object: "proxy-host" }} />,
|
title: <T id="object.delete" tData={{ object: "proxy-host" }} />,
|
||||||
onConfirm: () => handleDelete(id),
|
onConfirm: () => handleDelete(id),
|
||||||
invalidations: [["proxy-hosts"], ["proxy-host", id]],
|
invalidations: [["proxy-hosts"], ["proxy-host", id]],
|
||||||
children: <T id="object.delete.content" tData={{ object: "proxy-host" }} />,
|
children: (
|
||||||
})
|
<>
|
||||||
}
|
<T id="object.delete.content" tData={{ object: "proxy-host" }} />
|
||||||
|
{host?.domainNames?.length ? (
|
||||||
|
<div className="mt-2 fw-bold text-break">{host.domainNames.join(", ")}</div>
|
||||||
|
) : null}
|
||||||
|
{host?.forwardHost ? (
|
||||||
|
<div className="mt-1 text-muted small">
|
||||||
|
({host.forwardScheme}://{host.forwardHost}:{host.forwardPort})
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}}
|
||||||
onDisableToggle={handleDisableToggle}
|
onDisableToggle={handleDisableToggle}
|
||||||
onNew={() => showProxyHostModal("new")}
|
onNew={() => showProxyHostModal("new")}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user