Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Add Role cell to hosts listing #274

Merged
merged 1 commit into from
Apr 12, 2019
Merged

Add Role cell to hosts listing #274

merged 1 commit into from
Apr 12, 2019

Conversation

jtomasek
Copy link

@jtomasek jtomasek commented Apr 8, 2019

No description provided.

@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 12, 2019
@@ -55,7 +62,21 @@ const HostRow = ({ obj: host }) => {
},
} = host;

const machineName = _.get(host, 'status.machineRef.name');
const machineName = _.get(host, 'spec.machineRef.name');
Copy link
Author

Choose a reason for hiding this comment

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

I'll replace this with a selector call once kubevirt/web-ui-components#333 merges

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -55,7 +62,21 @@ const HostRow = ({ obj: host }) => {
},
} = host;

const machineName = _.get(host, 'status.machineRef.name');
const machineName = getHostMachineName(host);
const machineResource = {

Choose a reason for hiding this comment

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

you can use getResource from web-ui-components which has a lot of these fields prefilled

Copy link
Author

Choose a reason for hiding this comment

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

yeah, I tried but problem is that getResource only outputs resource kind as Model.kind and this does not work for machines as machines are stored in redux store by key which is a result of referenceForModel(MachineModel). So I had to specify the machineResource explicitly here.

I think the general goal is to keep all resources keyed using regerenceForModel in redux, so we'll have to update getResource function to handle it.

@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 12, 2019
@atiratree atiratree merged commit 301653d into kubevirt:master Apr 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants