Skip to content

Commit

Permalink
Provide ability to view password
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed May 31, 2024
1 parent c41a480 commit 2d4db7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions public/apps/account/password-reset-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function PasswordResetPanel(props: PasswordResetPanelProps) {
setIsCurrentPasswordInvalid(false);
}}
isInvalid={isCurrentPasswordInvalid}
type="dual"
/>
</FormRow>
<EuiSpacer />
Expand All @@ -141,6 +142,7 @@ export function PasswordResetPanel(props: PasswordResetPanelProps) {
setIsNewPasswordInvalid(false);
setIsRepeatNewPasswordInvalid(repeatNewPassword !== newPassword);
}}
type="dual"
isInvalid={isNewPasswordInvalid}
/>
</FormRow>
Expand All @@ -162,6 +164,7 @@ export function PasswordResetPanel(props: PasswordResetPanelProps) {
setRepeatNewPassword(value);
setIsRepeatNewPasswordInvalid(value !== newPassword);
}}
type="dual"
/>
</FormRow>

Expand Down
12 changes: 5 additions & 7 deletions public/apps/configuration/utils/password-edit-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import React from 'react';
import { CoreStart } from 'opensearch-dashboards/public';
import { EuiFieldText, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiIcon } from '@elastic/eui';
import { EuiFieldPassword, EuiFlexGroup, EuiFlexItem, EuiFormRow } from '@elastic/eui';
import { FormRow } from './form-row';
import { PASSWORD_INSTRUCTION } from '../../apps-constants';
import { getDashboardsInfo } from '../../../utils/dashboards-info-utils';
Expand Down Expand Up @@ -65,10 +65,9 @@ export function PasswordEditPanel(props: {
<EuiFlexGroup direction="row">
<EuiFlexItem grow={false}>
<FormRow headerText="Password" helpText={passwordHelpText}>
<EuiFieldText
<EuiFieldPassword
data-test-subj="password"
prepend={<EuiIcon type="lock" />}
type="password"
type="dual"
onChange={passwordChangeHandler}
/>
</FormRow>
Expand All @@ -82,10 +81,9 @@ export function PasswordEditPanel(props: {
headerText="Re-enter password"
helpText="The password must be identical to what you entered above."
>
<EuiFieldText
<EuiFieldPassword
data-test-subj="re-enter-password"
prepend={<EuiIcon type="lock" />}
type="password"
type="dual"
isInvalid={isRepeatPasswordInvalid}
onChange={repeatPasswordChangeHandler}
/>
Expand Down

0 comments on commit 2d4db7b

Please sign in to comment.