Add hostname to delete host confirmation modal (#2310)

Fixes #2233
This commit is contained in:
James Alseth 2020-10-01 09:38:43 -07:00 committed by GitHub
parent 4a1d7c7785
commit a2f49dd620
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ export class ManageHostsPage extends PureComponent {
}
renderDeleteHostModal = () => {
const { showDeleteHostModal } = this.state;
const { showDeleteHostModal, selectedHost } = this.state;
const { toggleDeleteHostModal, onDestroyHost } = this;
if (!showDeleteHostModal) {
@ -341,7 +341,7 @@ export class ManageHostsPage extends PureComponent {
onExit={toggleDeleteHostModal(null)}
className={`${baseClass}__modal`}
>
<p>This action will delete the host from your Fleet instance.</p>
<p>This action will delete the host <strong>{selectedHost.hostname}</strong> from your Fleet instance.</p>
<p>If the host comes back online it will automatically re-enroll. To prevent the host from re-enrolling please disable or uninstall osquery on the host.</p>
<div className={`${baseClass}__modal-buttons`}>
<Button onClick={onDestroyHost} variant="alert">Delete</Button>