Skip to content

Commit 9bcffd6

Browse files
fix(Tablet): disable restart for stopped tablets (#780)
1 parent 5b42808 commit 9bcffd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/containers/Tablet/TabletControls/TabletControls.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export const TabletControls = ({tablet, fetchData}: TabletControlsProps) => {
2727
return HiveId && HiveId !== '0';
2828
};
2929

30+
const isDisabledRestart = tablet.State === ETabletState.Stopped;
31+
3032
const isDisabledResume =
3133
tablet.State !== ETabletState.Stopped && tablet.State !== ETabletState.Dead;
3234

@@ -40,6 +42,7 @@ export const TabletControls = ({tablet, fetchData}: TabletControlsProps) => {
4042
onConfirmAction={_onKillClick}
4143
onConfirmActionSuccess={fetchData}
4244
buttonClassName={b('control')}
45+
buttonDisabled={isDisabledRestart}
4346
>
4447
{i18n('controls.kill')}
4548
</ButtonWithConfirmDialog>

0 commit comments

Comments
 (0)