-
Notifications
You must be signed in to change notification settings - Fork 616
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
VirtualMachine details: add Disks tab #1731
VirtualMachine details: add Disks tab #1731
Conversation
Hi @suomiy. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
"kubevirt-web-ui-components": "^0.1.34-4" | ||
"kubevirt-web-ui-components": "^0.1.34-4", | ||
"kubevirt-typescript-api": "^0.18.1-rc", | ||
"openshift-typescript-api": "^4.1.0-rc1" |
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.
added all TS definitions of openshift/kubevirt objects. These are generated from openapi specifications with few manual changes and released as kubevirt-typescript-api
and openshift-typescript-api
packages.
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.
maybe it would make sense to move this into main package.json
and use all the types across the whole project
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.
thoughts?
import { Firehose, LoadingInline } from '@console/internal/components/utils'; | ||
import { HelpBlock, FormGroup } from 'patternfly-react'; | ||
import { StorageClassModel } from '@console/internal/models'; | ||
import { V1StorageClass } from 'openshift-typescript-api/esm'; |
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.
eg: usage of the fully typed V1StorageClass
Similar approach will be used for NICs in the followup |
37dd455
to
6bf96df
Compare
This is not an editor pattern we've used elsewhere in console. Have we considered just showing a dialog? That would be more inline with the existing experience. |
created a Base PR for YAML editor and Events: #1739 |
hey @spadgett this design aligns with Patternfly so I believe it's the right way to do it. Does it make sense to have a follow up discussion to determine how to deal with inline editing in OpenShift in general? That might be out of scope for this PR. @lizsurette @beanh66 WDYT? |
Agreed that we should probably discuss this as a follow-up. The history here is that within the Create VM flow (which is in a modal wizard) we really couldn't open a modal to edit these items on top of a modal, so went with the inline edit table pattern. |
6bf96df
to
9ef9efc
Compare
I agree with @spadgett, we should consider using the kebab menu and popping a modal to make these edits similar to editing labels or annotations today. |
Are you guys okay with this being inconsistent with the wizard flow of adding/editing Disks and Networks where we will need to use inline tables rather than pop a modal on a modal? FYI @jelkosz since this would be a new implementation for editing Disks and Networks in VM Details. |
The annotations editor does not have a specific tab, since there is only an "X annotations" label in the details screen and a pencil next to it. If I click the pencil, a popup shows up which is using the same pattern inside as we have here (e.g. a table where you can edit the fields inline). I don't think we can have disks and nics to be hidden behind a small "5 disks" label and than having a table in the kebab - configuring virtual machine disks and nics is way too involved operation for that, far from being a list of key-value pairs. Even today, but will grow bigger probably. Also, the disks and nics are the most important HW configurations of the VM... Anyway, this seems to be a topic where all options have strong pros and cons and we could argue about them for a long time. But the main question for me is, do we want to argue about it now and block this PR? Or can we just proceed with this PR and take the discussion offline to a followup? If the design is at least acceptable, I would really vote against re-writing it now if we want to stood any chance of moving the content of the fork here on time. |
9ef9efc
to
5b86217
Compare
5b86217
to
b10d641
Compare
b10d641
to
e41c2b3
Compare
removed dependency on the types (#1773) Can we continue with this PR as is and resolve the ongoing discussion in the followup if the design changes? |
I agree with @jelkosz |
e425813
to
412e53f
Compare
/ok-to-test |
68695af
to
b101a86
Compare
...d/packages/kubevirt-plugin/src/components/modals/delete-device-modal/delete-device-modal.tsx
Outdated
Show resolved
Hide resolved
|
||
export type DeleteDeviceModalProps = { | ||
deviceType: DeviceType; | ||
device: any; |
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 we add better 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.
The types will be added after #1813 is merged
frontend/packages/kubevirt-plugin/src/components/vm-disks/create-disk-row.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/kubevirt-plugin/src/components/vm-disks/_create-disk-row.scss
Outdated
Show resolved
Hide resolved
frontend/packages/kubevirt-plugin/src/components/vm-disks/create-disk-row.tsx
Show resolved
Hide resolved
frontend/packages/kubevirt-plugin/src/k8s/patches/vm-template/index.ts
Outdated
Show resolved
Hide resolved
frontend/packages/kubevirt-plugin/src/k8s/patches/vm-template/index.ts
Outdated
Show resolved
Hide resolved
|
||
import { getStorageSize } from '../selectors'; | ||
|
||
export const getDataVolumeResources = (dataVolume) => _.get(dataVolume, 'spec.pvc.resources'); |
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.
types ?
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.
will be added after #1813
a1274b5
to
861aac9
Compare
fixed |
- actions: create & remove VM disks
861aac9
to
8594b52
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner, suomiy 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 |
/test backend |
/test frontend |
/retest |
1 similar comment
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
Depends on:
screenshot: