Skip to content

Commit

Permalink
fix(Tablet): disable restart for stopped tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmufazalov committed Mar 29, 2024
1 parent 5b42808 commit caa54f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/containers/Tablet/TabletControls/TabletControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const TabletControls = ({tablet, fetchData}: TabletControlsProps) => {
return HiveId && HiveId !== '0';
};

const isDisabledRestart = tablet.State === ETabletState.Stopped;

const isDisabledResume =
tablet.State !== ETabletState.Stopped && tablet.State !== ETabletState.Dead;

Expand All @@ -40,6 +42,7 @@ export const TabletControls = ({tablet, fetchData}: TabletControlsProps) => {
onConfirmAction={_onKillClick}
onConfirmActionSuccess={fetchData}
buttonClassName={b('control')}
buttonDisabled={isDisabledRestart}
>
{i18n('controls.kill')}
</ButtonWithConfirmDialog>
Expand Down

0 comments on commit caa54f2

Please sign in to comment.