Skip to content

Commit

Permalink
fix: only show upgrade when restart or upgrade needed (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-silva authored Oct 8, 2024
1 parent 5fe4ce0 commit ea055e8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ export const OperatorCell = ({
);
const { canRead } = useRBACPermissions('database-engines', operatorsToCheck);
const navigate = useNavigate();
const somePendingTask =
pendingActions.filter(
(a) => a.pendingTask === 'restart' || a.pendingTask === 'upgradeEngine'
).length > 0;

return (
<Stack direction="row" alignItems="center" width="100%">
<Typography variant="body1">{description}</Typography>
{(upgradeAvailable || pendingActions.length) && canRead && (
{(upgradeAvailable || somePendingTask) && canRead && (
<Button
onClick={() => navigate(`/settings/namespaces/${name}`)}
sx={{ ml: 'auto' }}
Expand Down

0 comments on commit ea055e8

Please sign in to comment.