-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
kubernetes: virtual machines - add Vm Detail page #9466
Conversation
Few notes about the design:
|
+ the vm details are accessible at |
375f208
to
edf4a30
Compare
+ there are two React 16 TODOs in |
a599129
to
b925116
Compare
VM, not Vm. I'm also unsure about the title 'Vm' instead of just 'Details' ? |
thanks
Could be 'Details' but we have to indicate the difference between 'VM' and 'VM Instance' somehow, because they will have similar pages.
I can add breadcrumbs. But all of the other pages in Kubernetes plugin are done this way. I am not sure if I should keep it for consistency simpler like this. There is also another problem:
|
I agree with this. It's important to keep consistency across pages. We can revisit the current pattern later if it performs badly in usability tests, and if so, we can change all the navigation across all pages in the kubernetes plugin to work like that. But for now, I would prefer if the current behaviour is kept. |
fixed Vm -> 'VM' |
<div> | ||
<DetailPage> | ||
{header} | ||
<DetailPageRow title={cockpit.format(_("Vm with uid $0 does not exist."), vmUid)} idPrefix={'vm-not-found'} /> |
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.
nit: uid
should be in CAPITAL
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.
fine for a follow-up
@@ -66,7 +66,7 @@ const prepareDiskData = (disk, vm, pvs, idPrefix) => { | |||
if (pv) { | |||
bus = _("iSCSI"); | |||
onNavigate = () => cockpit.jump(`/kubernetes#/volumes/${pv.metadata.name}`); | |||
} else if (disk.disk.bus) { | |||
} else if (disk.disk && disk.disk) { |
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 this what was intended?
* @param {kubeMethods} kubeMethods | ||
* @param {KubeRequest} KubeRequest | ||
*/ | ||
function init($scope, $routeParams, kubeLoader, kubeSelect, kubeMethods, KubeRequest) { |
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.
I think we can share can between these two entry points even more
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.
What do you suggest? Unifying the id of the root element and passing the component to render? I do not see other improvements otherwise.
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.
After offline discussion, this is nothing critical. I'm fine with this approach.
Important to note: this should work for kubevirt I've tested this PR against Might be my misunderstanding, but I'm not quite sure if recent 2 entrypoints are good solution. If the user navigates between list and detail, redux store is reinitialized so loosing its state. There's so far no issue with that but I can imagine use-cases where this might be serious issue. |
@mareklibra please can you rereview? |
20da1ed
to
d76ee4e
Compare
It seems I am not able to re-trigger the tests with
Does somebody have a clue what might be a problem? |
i also have refreshed token in ~/.config/github-token |
@suomiy : You are in the contributors team, so I'm afraid I don't have an immediate idea what's wrong. |
This should work against kubevirt 0.6.0 - so let's aim at merging this and change later once #9638 lands with |
One syntax issue found: rest of Cockpit uses semicolons. I'm wondering why linter is not enforcing this. I suggest fix eslint rules along code in a follow-up. |
@mareklibra fixed |
1f7f44b
to
6136f49
Compare
- used primarily for the detail pages of listings
- add navigation between vms and vm - refactor initialization / redux store - add status to VmOverviewTabKubevirt when in VmDetail - refactor ids in VmMetricsTab
testKubevirtVmInstance fails, setting needswork. (Let's please not introduce even more flakes, the kubevirt tests are already bad enough for landing PRs.) |
@martinpitt this is actually the same flake as in |
@suomiy : OK; let's retry the tests instead, the new test should at least be able to succeed. For reproducing, try to run the tests with |
I tried that (100% usage CPU and 90% RAM) but still no luck. Also got few of these: bcbcarl/react-c3js#22 ,which I hope are not a cause of some of these failures. Current test runs seems to have passed fine for |
First stage of #8948
I also created DetailPage component for easier creation of pages like this (will be used at least for Vm/Vm Instance). Not sure if I should split the component to another PR?
Todo: