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 guest agent info to vm resource summary #5711
Add guest agent info to vm resource summary #5711
Conversation
b028b65
to
76f1e85
Compare
@pcbailey please review |
import { getVMIApiPath, getVMISubresourcePath } from '../selectors/vmi/selectors'; | ||
import { isGuestAgentInstalled } from '../components/dashboards-page/vm-dashboard/vm-alerts'; | ||
|
||
const guestAgentURL = (vmi: VMIKind) => |
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.
nitpick: Can we change this to getGuestAgentURL
?
/lgtm |
76f1e85
to
cf6b25b
Compare
44aa887
to
766960c
Compare
/test frontend |
@@ -78,11 +81,24 @@ export const VMDetails: React.FC<VMDetailsProps> = (props) => { | |||
const vmiLike = kindObj === VirtualMachineModel ? vm : vmi; | |||
const vmServicesData = getServicesForVmi(getLoadedData(props.services, []), vmi); | |||
const canUpdate = useAccessReview(asAccessReview(kindObj, vmiLike || {}, 'patch')) && !!vmiLike; | |||
const [guestAgentInfo] = useGuestAgentInfo({ vmi }); | |||
|
|||
const OSMismatch = |
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.
nitpick: Can we call this OSMismatchExists
?
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.
+1 fixed
const OSMismatch = | ||
vmi && guestAgentInfo && isWindows(vmiLike) !== (guestAgentInfo?.os?.id === 'mswindows'); | ||
const OSMismatchAlert = OSMismatch && ( | ||
<Alert className="co-alert" variant="warning" title="Operating syatem mismatch" isInline> |
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.
There's a typo in the title: syatem => system
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.
Thanks ❗
<Alert className="co-alert" variant="warning" title="Operating syatem mismatch" isInline> | ||
The operating system defined for this virtual machine does not match what is being reported by | ||
the Guest Agent. In order to correct this, you need to re-create the virtual machine with the | ||
currect VM selection. The disks of this virtual machine and be attached to the newly created |
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.
Typo: currect => correct
I think what you're trying to say in the last sentence is "The disks of this virtual machine can be attached to the newly created one.", right?
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.
yes =)
766960c
to
980809b
Compare
980809b
to
9587148
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pcbailey, yaacov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add guest agent info to vm resource summary
Design: http://openshift.github.io/openshift-origin-design/designs/virtualization/4.x/expose-guest-data/expose%20guest%20data.html
Notes:
supported os types - https://github.com/kubevirt/common-templates#templates
downstream struct - https://www.qemu.org/docs/master/qemu-ga-ref.html#index-GuestOSInfo
Screenshot:
Add hostname, timezone and os name:
Add alert on OS mismatch:
OS name from GA and from YAML: