Skip to content

Commit

Permalink
feat: ui destination status and last seen
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed Jul 6, 2022
1 parent 6b6cfaa commit f967d6d
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions ui/pages/destinations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const columns = [
{
Header: 'Name',
accessor: 'name',
width: '67%',
width: '70%',
Cell: ({ row, value }) => {
return (
<div className='flex items-center py-2'>
Expand Down Expand Up @@ -305,13 +305,34 @@ const columns = [
{
Header: 'Kind',
accessor: v => v,
width: '33%',
width: '15%',
Cell: ({ value }) => (
<span className='rounded bg-gray-800 px-2 py-0.5 text-gray-400'>
{value.kind}
</span>
),
},
{
Header: 'Status',
accessor: v => v,
width: '15%',
Cell: ({ value }) => (
<div className='flex items-center py-2'>
{value.kind === 'cluster' && (
<>
<div
className={`h-2 w-2 rounded-full ${
value.connected ? 'bg-green-400' : 'bg-gray-400'
}`}
/>
<span className='px-2 text-gray-400'>
{value.connected ? 'Connected' : 'Disconnected'}
</span>
</>
)}
</div>
),
},
]

export default function Destinations() {
Expand Down

0 comments on commit f967d6d

Please sign in to comment.