-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
@@ -55,7 +62,21 @@ const HostRow = ({ obj: host }) => { | |||
}, | |||
} = host; | |||
|
|||
const machineName = _.get(host, 'status.machineRef.name'); | |||
const machineName = _.get(host, 'spec.machineRef.name'); |
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'll replace this with a selector call once kubevirt/web-ui-components#333 merges
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.
Done
@@ -55,7 +62,21 @@ const HostRow = ({ obj: host }) => { | |||
}, | |||
} = host; | |||
|
|||
const machineName = _.get(host, 'status.machineRef.name'); | |||
const machineName = getHostMachineName(host); | |||
const machineResource = { |
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.
you can use getResource
from web-ui-components
which has a lot of these fields prefilled
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.
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.
No description provided.