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
Bug 2028106: convert vm,vmi actions to dynamic #10499
Bug 2028106: convert vm,vmi actions to dynamic #10499
Conversation
/retest |
a - we need to remove all the deprecated kebabAction code |
f - we need to unify the actions arguments, so we can loop on all actions and they will accept the same argument |
819d376
to
7daa298
Compare
@@ -716,6 +270,49 @@ export const VmActionFactory = { | |||
}), | |||
accessReview: asAccessReview(kindObj, vm, 'delete'), | |||
}), | |||
// disabled until https://issues.redhat.com/browse/CNV-9746 is implemented |
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.
this code should be removed, when https://issues.redhat.com/browse/CNV-9746
we will not use this code
cta: () => { | ||
if (!vmStatusBundle?.status?.isImporting()) { | ||
startVM(vm); | ||
} else { | ||
confirmModal({ | ||
title: i18next.t('kubevirt-plugin~ Start Virtual Machine'), | ||
title: i18next.t('kubevirt-plugin~ Start'), |
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.
why do we have a space before Start ?
do we need to play with css ? confirm model does not print the title correclty ?
VmActionFactory.OpenConsole(k8sModel, vm, { vmi }), | ||
// disabled until https://issues.redhat.com/browse/CNV-9746 is implemented |
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's removed until we have better way to do ssh, when we do, we will have a different action
@@ -74,7 +77,7 @@ export const useVmiActionsProvider = (vm: VMKind) => { | |||
VmActionFactory.OpenConsole(k8sModel, vm, { vmi }), | |||
CommonActionFactory.ModifyLabels(k8sModel, vm), | |||
CommonActionFactory.ModifyAnnotations(k8sModel, vm), | |||
VmActionFactory.Delete(k8sModel, vm, { vmi }), | |||
VmiActionFactory.Delete(k8sModel, vmi), |
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.
how will we delete a vm that does not have a vmi ?
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.
ahh .. ok
7daa298
to
f04d093
Compare
/retest |
f04d093
to
db8d0a7
Compare
/retest |
82651d5
to
084bf69
Compare
/retest |
3 similar comments
/retest |
/retest |
/retest |
let model: K8sKind; | ||
let objReference; | ||
let context; | ||
|
||
if (vm) { | ||
model = VirtualMachineModel; | ||
objReference = referenceFor(vm); | ||
context = { [objReference]: vm }; | ||
} else if (vmi) { | ||
model = VirtualMachineInstanceModel; | ||
objReference = referenceFor(vmi); | ||
context = { [objReference]: vmi }; | ||
} |
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.
consider:
let model: K8sKind; | |
let objReference; | |
let context; | |
if (vm) { | |
model = VirtualMachineModel; | |
objReference = referenceFor(vm); | |
context = { [objReference]: vm }; | |
} else if (vmi) { | |
model = VirtualMachineInstanceModel; | |
objReference = referenceFor(vmi); | |
context = { [objReference]: vmi }; | |
} | |
const dataBuilder = (vm: VMKind, vmi: VMIKind) => { | |
return { | |
model: (vm && VirtualMachineModel) || (vmi && VirtualMachineInstanceModel), | |
objReference: referenceFor(vm || vmi), | |
context: { [objReference]: vm || vmi }, | |
}; | |
}; | |
same goes to 2 other files where you use similar
d7b885f
to
98e7d33
Compare
/retest |
/lgtm |
@glekner: This pull request references Bugzilla bug 2028106, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: glekner, metalice, 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@glekner: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@glekner: All pull requests linked via external trackers have merged: Bugzilla bug 2028106 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
issue: https://issues.redhat.com/browse/CNV-14855
Topology view Paused VM
VM List Running VM
VM Details Page Stopped VM