fix(instances): handle machines pagination in networks view

This commit is contained in:
Sérgio Ramos 2018-03-02 11:49:16 +00:00
parent 31b46b216f
commit 7f136cc8bc

View File

@ -80,9 +80,10 @@ export default compose(
} }
}), }),
props: ({ data }) => { props: ({ data }) => {
const { machines, loading, error, variables } = data; const { loading, error, variables } = data;
const { name } = variables; const { name } = variables;
const machines = get(data, 'machines.results', []);
const instance = find(forceArray(machines), ['name', name]); const instance = find(forceArray(machines), ['name', name]);
const values = get(instance, 'networks', []); const values = get(instance, 'networks', []);
const networks = reverse(sortBy(values, 'public')); const networks = reverse(sortBy(values, 'public'));