mirror of
https://github.com/openziti/zrok.git
synced 2024-11-29 11:34:07 +01:00
hide inactive services
This commit is contained in:
parent
347df266e9
commit
17038dc4e7
@ -38,6 +38,7 @@ func overviewHandler(_ metadata.OverviewParams, principal *rest_model_zrok.Princ
|
||||
},
|
||||
}
|
||||
for _, svc := range svcs {
|
||||
logrus.Infof("active = %t", svc.Active)
|
||||
es.Services = append(es.Services, &rest_model_zrok.Service{
|
||||
Active: svc.Active,
|
||||
CreatedAt: svc.CreatedAt.String(),
|
||||
|
@ -16,13 +16,32 @@ const Services = (props) => {
|
||||
name: 'Service Id',
|
||||
selector: row => row.zitiServiceId,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'Active',
|
||||
selector: row => row.active,
|
||||
sortable: true
|
||||
}
|
||||
]
|
||||
|
||||
const conditionalRowStyles = [
|
||||
{
|
||||
when: row => !row.active,
|
||||
style: {
|
||||
display: 'none'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={"nested-services"}>
|
||||
{ props.services && props.services.length > 0 && (
|
||||
<DataTable columns={columns} data={props.services} defaultSortFieldId={1}/>
|
||||
<DataTable
|
||||
columns={columns}
|
||||
data={props.services}
|
||||
defaultSortFieldId={1}
|
||||
conditionalRowStyles={conditionalRowStyles}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user