-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning for Boot menu switch on running VM. #560
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,6 +435,7 @@ class VmDialog extends React.Component { | |
} | ||
|
||
const isEdit = !!vm | ||
const isUp = (isEdit && vm.get('status') === 'up') | ||
|
||
const sortedClusters = sortedBy(clusters.get('clusters'), 'name') | ||
|
||
|
@@ -462,6 +463,16 @@ class VmDialog extends React.Component { | |
<h1 id={`${idPrefix}-create-title`}>{msg.createANewVm()}</h1> | ||
) | ||
|
||
const bootMenuHint = isUp | ||
? (<React.Fragment> | ||
{msg.bootMenuTooltip()} | ||
<br /> | ||
<span className='pficon pficon-warning-triangle-o' /> | ||
| ||
{msg.bootMenuWarning()} | ||
</React.Fragment>) | ||
: msg.bootMenuTooltip() | ||
|
||
return ( | ||
<DetailContainer> | ||
{title} | ||
|
@@ -596,7 +607,14 @@ class VmDialog extends React.Component { | |
)} | ||
|
||
<dt> | ||
<FieldHelp content={msg.bootMenuTooltip()} text={msg.bootMenu()} /> | ||
{ | ||
isUp && | ||
<React.Fragment> | ||
<span className='pficon pficon-warning-triangle-o' /> | ||
| ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case, use of padding would be better. |
||
</React.Fragment> | ||
} | ||
<FieldHelp content={bootMenuHint} text={msg.bootMenu()} /> | ||
</dt> | ||
<dd> | ||
<Switch | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,6 +262,7 @@ export const messages = { | |
network: 'Network', | ||
noNetwork: 'No network', | ||
vnicProfileEmpty: '<Empty>', | ||
bootMenuWarning: 'All changes will take effect only after reboot!', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please no exclamation mark |
||
} | ||
|
||
export type MessageIdType = $Keys<typeof messages> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
isRunning