Skip to content

Conversation

@yaacov
Copy link
Member

@yaacov yaacov commented Dec 31, 2019

List VMIs in the VM list view

We decided to expose VMIs to users, this PR expose the the VMI in the VM list page.

  1. list VMIs in the "Virtual machines" list.
  2. Add created, node and IP columns.
  3. Update the "running" icon to align with console "running" icon.
  4. Sort by status.

Refs:
https://issues.redhat.com/browse/KNIP-1165
openshift/openshift-origin-design#310

Virtual Machines · OKD(2)

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 31, 2019
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. component/kubevirt Related to kubevirt-plugin labels Dec 31, 2019
@yaacov
Copy link
Member Author

yaacov commented Dec 31, 2019

@irosenzw @glekner please review

cc:// @yfrimanm

@yaacov yaacov mentioned this pull request Dec 31, 2019
3 tasks
@glekner
Copy link
Contributor

glekner commented Jan 1, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 1, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@yaacov
Copy link
Member Author

yaacov commented Jan 1, 2020

/hold

until e2e test is fixed ...

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 1, 2020
@matthewcarleton
Copy link
Contributor

@yaacov thanks for doing this!
It's nice to see the option implemented.
I think biggest issues I see with this option are:

  1. If the user goes looking for a VMI will they find it easily? It could be buried in a long list.
  2. Is it easy for users to understand what a VMI is and how it relates to VMs?
  3. In this scenario that VMI may or may not have an owner. I seems useful to indicate when there is no owner in case the VMI should not exist.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort is not working

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, ill look at it when implementing #3841 (comment) , sorting by nodes is much more tricky :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really the best icon for running? Sync icon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, sorting by node could be useful as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more tricky than you think :-)
VM kind has no direct reference to node ... will look how to do it nicely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could make isVM variable and use it in the conditionals bellow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@spadgett
Copy link
Member

spadgett commented Jan 2, 2020

#3847 has fixed the e2e tests, but leaving the hold since there are pending review comments

@jelkosz
Copy link

jelkosz commented Jan 6, 2020

now it should pass
/retest

@yaacov yaacov force-pushed the kubevirt-add-vmis-to-vm-list branch from 5e51e50 to b97ff4b Compare January 8, 2020 08:40
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2020
@yaacov
Copy link
Member Author

yaacov commented Jan 8, 2020

@suomiy hi, i addressed the issues you raised, please re review.

@yaacov
Copy link
Member Author

yaacov commented Jan 8, 2020

/hold cancel
it was for the e2e tests, we can remove it now

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2020
Copy link
Member

@atiratree atiratree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good and works :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use a better name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be switched with line above to have only one call of getBasicID

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, missed that ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably wait for vms to load first before we show vmis to prevent flickering

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it would be more readable to inline the function body here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these little helpers around the statuses are getting out of hand. We should refactor all of it and use ValueEnum for that (example usage in e.g. StorageUISource, DiskType)

I guess you don't want to do it in this PR right? >.<

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no .....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already looked for the status in the flatten function, so we don't have to id here and we can just pass it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we name it vmMenuActions and vmiMenuActions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also move the vmiMenuActions to standalone file so they can be exportable in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed and moved to menu-actions for now ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should rather just pass the status as an argument and move this function to ./constants.ts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it going to be confusing that the sort behaves differently than the visual perspective?

I get, that the categories might be useful. Anyway, we should rather name it getVMStatusSortString.

side note: we could have the categories present in ValueEnum

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed and moved to constants

@yaacov yaacov force-pushed the kubevirt-add-vmis-to-vm-list branch 3 times, most recently from 21643c9 to 938ff62 Compare January 8, 2020 12:37
@yaacov
Copy link
Member Author

yaacov commented Jan 8, 2020

/test analyze

@atiratree
Copy link
Member

looks good, but still missing #3841 (comment)

…te running icon

Signed-off-by: yaacov <kobi.zamir@gmail.com>
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

16 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@spadgett
Copy link
Member

/hold
the status for e2e-gcp-console is incorrect. this hasn't passed CI yet

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2020
@spadgett
Copy link
Member

/test e2e-gcp-console

@spadgett
Copy link
Member

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2020
@spadgett
Copy link
Member

/hold
let's make sure the test runs to completion

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2020
@spadgett
Copy link
Member

/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants