Skip to content

Commit

Permalink
removing button disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Jan 18, 2021
1 parent e897daa commit bd0ae2d
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const RevertModelSnapshotFlyout: FC<Props> = ({
const [eventRateData, setEventRateData] = useState<LineChartPoint[]>([]);
const [anomalies, setAnomalies] = useState<Anomaly[]>([]);
const [chartReady, setChartReady] = useState(false);
const [applying, setApplying] = useState(false);

useEffect(() => {
createChartData();
Expand Down Expand Up @@ -125,7 +124,6 @@ export const RevertModelSnapshotFlyout: FC<Props> = ({
}

async function applyRevert() {
setApplying(true);
const end =
replay && runInRealTime === false ? job.data_counts.latest_record_timestamp : undefined;
try {
Expand All @@ -151,7 +149,6 @@ export const RevertModelSnapshotFlyout: FC<Props> = ({
hideRevertModal();
closeFlyout();
} catch (error) {
setApplying(false);
toasts.addError(new Error(error.body.message), {
title: i18n.translate('xpack.ml.revertModelSnapshotFlyout.revertErrorTitle', {
defaultMessage: 'Model snapshot revert failed',
Expand Down Expand Up @@ -395,7 +392,6 @@ export const RevertModelSnapshotFlyout: FC<Props> = ({
defaultMessage: 'Apply',
}
)}
confirmButtonDisabled={applying}
buttonColor="danger"
defaultFocusedButton="confirm"
>
Expand Down

0 comments on commit bd0ae2d

Please sign in to comment.