add better messaging for removing own user record

pull/2703/head
Iris Scholten 2018-01-31 16:43:51 -08:00
parent 91317a164d
commit 96de896539
3 changed files with 6 additions and 3 deletions

View File

@ -165,7 +165,6 @@ export const deleteUserAsync = (
) => async dispatch => {
dispatch(removeUser(user))
try {
console.log(user)
await deleteUserAJAX(user)
dispatch(
publishAutoDismissingNotification(

View File

@ -38,6 +38,10 @@ const AllUsersTableRow = ({
const wrappedDelete = () => onDelete(user)
const removeWarning = userIsMe
? 'WARNING: this will remove your user record entirely and log you out'
: 'Remove from all Orgs'
return (
<tr className={'chronograf-admin-table--user'}>
<td>
@ -75,11 +79,10 @@ const AllUsersTableRow = ({
</td>
<td style={{textAlign: 'right', width: colActions}}>
<ConfirmButton
confirmText="Remove from all Orgs"
confirmText={removeWarning}
confirmAction={wrappedDelete}
size="btn-xs"
text="Remove"
disabled={userIsMe}
customClass="table--show-on-row-hover"
/>
</td>

View File

@ -12,6 +12,7 @@
top: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
z-index: 1;
}
}
.confirm-button--confirmation {