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 CNV activities #3577
Add CNV activities #3577
Conversation
rawagner
commented
Nov 26, 2019
- Disk import
- v2v import
import { referenceForModel } from '@console/internal/module/k8s'; | ||
import { VirtualMachineModel } from '../../../models'; | ||
|
||
export const DiskImportActivity = ({ resource }) => ( |
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.
please add type
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.
type added
</ActivityProgress> | ||
); | ||
|
||
export const V2VImportActivity = ({ resource }) => ( |
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.
likewise
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.
type added
export const V2VImportActivity = ({ resource }) => ( | ||
<ActivityProgress | ||
title="Importing VM (v2v)" | ||
progress={parseInt(_.get(resource.metadata.annotations, 'v2vConversionProgress', 0), 10)} |
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.
can resource
be undefined?
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.
It cannot. This is a resource which is fetched from k8s (definition is https://github.com/openshift/console/pull/3577/files#diff-ebd2d0d608781a3c30e4c97813f813c2R284 ), run through isActivity
for given activity like https://github.com/openshift/console/pull/3577/files#diff-ebd2d0d608781a3c30e4c97813f813c2R289 or https://github.com/openshift/console/pull/3577/files#diff-ebd2d0d608781a3c30e4c97813f813c2R306 which if returns true, then the resource is passed to component.
> | ||
<ResourceLink | ||
kind={referenceForModel(VirtualMachineModel)} | ||
name={resource.metadata.ownerReferences[0].name} |
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.
Is presence of ownerReference[0]
guaranteed? I understand how it is being created recently. But I would suggest to be more defensive.
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.
fixed. Im more defensive now
ab3d3ad
to
501783c
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mareklibra, rawagner 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Add CNV activities