Skip to content

Commit

Permalink
Fix: Empty Tables (vmware-tanzu#80)
Browse files Browse the repository at this point in the history
* Plans Table

- Listing ServiceClass plans as table instead of cards
- Changed Plan Provision button to be smaller to fit table better
- Moved AddBindingButton to InstanceView folder

* Fix: messaging for empty tables
  • Loading branch information
evanlouie authored Feb 15, 2018
1 parent 996e053 commit 781b7e7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
22 changes: 14 additions & 8 deletions src/components/BindingList/BindingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ export class BindingList extends React.Component<IBindingList> {
</tr>
</thead>
<tbody>
{bindings.map(binding => [
<BindingEntry
key={binding.metadata.uid}
binding={binding}
addBinding={addBinding}
getCatalog={getCatalog}
/>,
])}
{bindings.length > 0 ? (
bindings.map(binding => [
<BindingEntry
key={binding.metadata.uid}
binding={binding}
addBinding={addBinding}
getCatalog={getCatalog}
/>,
])
) : (
<tr>
<td colSpan={3}>No bindings found</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down
34 changes: 21 additions & 13 deletions src/components/InstanceView/InstanceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,27 @@ export class InstanceView extends React.Component<IInstanceViewProps> {
</tr>
</thead>
<tbody>
{conditions.map(condition => {
return (
<tr key={condition.lastTransitionTime}>
<td>{condition.type}</td>
<td>{condition.status}</td>
<td>{condition.lastTransitionTime}</td>
<td>
<code>{condition.reason}</code>
</td>
<td>{condition.message}</td>
</tr>
);
})}
{conditions.length > 0 ? (
conditions.map(condition => {
return (
<tr key={condition.lastTransitionTime}>
<td>{condition.type}</td>
<td>{condition.status}</td>
<td>{condition.lastTransitionTime}</td>
<td>
<code>{condition.reason}</code>
</td>
<td>{condition.message}</td>
</tr>
);
})
) : (
<tr>
<td colSpan={5}>
<p>No statuses</p>
</td>
</tr>
)}
</tbody>
</table>
</div>
Expand Down

0 comments on commit 781b7e7

Please sign in to comment.