Skip to content

Commit

Permalink
chore(CHYT): better vaildation for start dialog [YTFRONT-3683]
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-efremoff committed Jan 9, 2024
1 parent 5f61464 commit aff6e43
Showing 1 changed file with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function ChytStartConfirmation({
}}
footerProps={{textApply: `Start clique ${alias}`}}
onClose={onClose}
initialValues={{pool: pool ?? format.NO_VALUE}}
initialValues={{pool: pool}}
onAdd={(form) => {
const {untracked} = form.getState().values;
return dispatch(chytListAction('start', {alias, untracked}))
Expand All @@ -163,25 +163,8 @@ function ChytStartConfirmation({
type: 'plain',
name: 'pool',
caption: 'Pool',
},
{
type: 'block',
name: 'poolNotice',
visibilityCondition: {
when: 'pool',
isActive: (v) => !v,
},
extras: ({pool, untracked}: StartFormValues) => {
return {
children:
!pool && !untracked ? (
<Text color="warning">
Pool is not set. Clique without a pool can be started only
in untracked mode. Set the pool in speclet options to start
the clique in normal mode.
</Text>
) : null,
};
extras: {
placeholder: format.NO_VALUE,
},
},
{
Expand Down

0 comments on commit aff6e43

Please sign in to comment.