1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Pass in individual values

This commit is contained in:
Ewout Prangsma 2018-07-05 08:39:29 +02:00
parent 791d677fe9
commit 7c18cce108
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -14,12 +14,12 @@ const HeaderView = () => (
</Table.Header>
);
const RowView = ({info}) => (
const RowView = ({name, mode, ready_pod_count, pod_count}) => (
<Table.Row>
<Table.Cell><Icon name="bell" color="red"/></Table.Cell>
<Table.Cell>{info.name}</Table.Cell>
<Table.Cell>{info.mode}</Table.Cell>
<Table.Cell>{info.ready_pod_count} / {info.pod_count}</Table.Cell>
<Table.Cell>{name}</Table.Cell>
<Table.Cell>{mode}</Table.Cell>
<Table.Cell>{ready_pod_count} / {pod_count}</Table.Cell>
</Table.Row>
);
@ -28,7 +28,14 @@ const ListView = ({items}) => (
<HeaderView/>
<Table.Body>
{
(items) ? items.map((item) => <RowView key={item.name} info={item}/>) : <p>No items</p>
(items) ? items.map((item) =>
<RowView
key={item.name}
name={item.name}
mode={item.mode}
ready_pod_count={item.ready_pod_count}
pod_count={item.pod_count}
/>) : <p>No items</p>
}
</Table.Body>
</Table>