Wizard: Add Administrator field to review step
this commit add administrator field to review step
This commit is contained in:
parent
e9876f6ed5
commit
5f7f958d07
2 changed files with 13 additions and 1 deletions
|
|
@ -75,6 +75,7 @@ import {
|
|||
selectUserPasswordByIndex,
|
||||
selectUserSshKeyByIndex,
|
||||
selectKernel,
|
||||
selectUserAdministrator,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { toMonthAndYear, yyyyMMddFormat } from '../../../../Utilities/time';
|
||||
import {
|
||||
|
|
@ -792,6 +793,8 @@ export const UsersList = () => {
|
|||
const userPassword = useAppSelector(userPasswordSelector);
|
||||
const userSshKeySelector = selectUserSshKeyByIndex(index);
|
||||
const userSshKey = useAppSelector(userSshKeySelector);
|
||||
const userIsAdministratorSelector = selectUserAdministrator(index);
|
||||
const userIsAdministrator = useAppSelector(userIsAdministratorSelector);
|
||||
|
||||
return (
|
||||
<TextContent>
|
||||
|
|
@ -824,6 +827,15 @@ export const UsersList = () => {
|
|||
<TextListItem component={TextListItemVariants.dd}>
|
||||
{userSshKey ? userSshKey : 'None'}
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dt}
|
||||
className="pf-v5-u-min-width"
|
||||
>
|
||||
Administrator
|
||||
</TextListItem>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
{userIsAdministrator ? 'True' : 'False'}
|
||||
</TextListItem>
|
||||
</>
|
||||
</TextList>
|
||||
</TextContent>
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ export const selectUserSshKeyByIndex =
|
|||
|
||||
export const selectUserAdministrator =
|
||||
(userIndex: number) => (state: RootState) => {
|
||||
return state.wizard.users[userIndex].isAdministrator;
|
||||
return state.wizard.users[userIndex]?.isAdministrator;
|
||||
};
|
||||
|
||||
export const selectKernel = (state: RootState) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue