Skip to content

Commit

Permalink
[PLAT-14749][Platform]Add a warning message to image upgrade dialog
Browse files Browse the repository at this point in the history
Summary: Added the YBAlert to ask the user to verify the image in standalone pc before upgrading the linux version

Test Plan:
Tested manually

{F273453}

Reviewers: lsangappa

Reviewed By: lsangappa

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D37050
  • Loading branch information
haikarthikssk committed Aug 6, 2024
1 parent a42549e commit 3923ec5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { find, isEmpty } from 'lodash';
import * as yup from 'yup';
import { useMutation } from 'react-query';
import { Grid, MenuItem, Typography, makeStyles } from '@material-ui/core';
import { YBInputField, YBModal, YBSelectField } from '../../../../../redesign/components';
import { AlertVariant, YBAlert, YBInputField, YBModal, YBSelectField } from '../../../../../redesign/components';
import { createErrorMessage } from '../../../../../redesign/features/universe/universe-form/utils/helpers';
import { ClusterType, Universe } from '../../../../../redesign/helpers/dtos';
import {
Expand Down Expand Up @@ -53,8 +53,11 @@ const useStyles = makeStyles((theme) => ({
targetVersion: {
marginTop: '28px'
},
alert: {
marginTop: '50px'
},
info: {
marginTop: '60px',
marginTop: '16px',
padding: '15px',
borderRadius: '4px',
border: `1px solid ${theme.palette.ybacolors.ybBorderGray}`,
Expand Down Expand Up @@ -170,7 +173,7 @@ export const UpgradeLinuxVersionModal: FC<UpgradeLinuxVersionModalProps> = ({
className: classes.content
}}
overrideWidth={'886px'}
overrideHeight={'686px'}
overrideHeight={'720px'}
cancelLabel={t('cancel', { keyPrefix: 'common' })}
submitLabel={t('submitLabel')}
buttonProps={{
Expand Down Expand Up @@ -254,7 +257,19 @@ export const UpgradeLinuxVersionModal: FC<UpgradeLinuxVersionModalProps> = ({
<YBInputField control={control} name={'sleepAfterInSeconds'} type="number" fullWidth />
</Grid>
</Grid>

<YBAlert
open
text={
<Trans
i18nKey={`linuxVersion.upgradeModal.verifyImageText`}
components={{
b: <b />
}}
/>
}
variant={AlertVariant.Warning}
className={classes.alert}
/>
<div className={classes.info}>
<Trans
i18nKey={`linuxVersion.upgradeModal.infoContent`}
Expand Down
3 changes: 2 additions & 1 deletion managed/ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,8 @@
"submitLabel": "Upgrade",
"restartAfterInSecond": "Rolling Restart Delay Between Servers (secs)",
"successMsg": "Success. Click <0>here</0> for task details",
"sameVersionErrMsg": "Universe is already using the imageBundle \"{{image_name}}\". Performing OS patching using it will result in no operation."
"sameVersionErrMsg": "Universe is already using the imageBundle \"{{image_name}}\". Performing OS patching using it will result in no operation.",
"verifyImageText": "It is recommended to <b>verify that the selected image can boot successfully</b> on a standalone VM with the same instance type as the universe before initiating the upgrade."
},
"deleteModal": {
"title": "Delete Linux Version",
Expand Down

0 comments on commit 3923ec5

Please sign in to comment.