hide opted-out instances from table
This commit is contained in:
parent
1c1ef37df9
commit
19b3a3806d
|
@ -9,7 +9,7 @@ defmodule Backend.Api do
|
|||
@spec get_instances(Integer.t() | nil) :: Scrivener.Page.t()
|
||||
def get_instances(page \\ nil) do
|
||||
Instance
|
||||
|> where([i], not is_nil(i.type))
|
||||
|> where([i], not is_nil(i.type) and not i.opt_out)
|
||||
|> Repo.paginate(page: page)
|
||||
end
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class InstanceTable extends React.PureComponent<IInstanceTableProps> {
|
|||
<PaginationContainer>
|
||||
<p>
|
||||
Showing {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, totalEntries)} of{" "}
|
||||
{totalEntries} known instances
|
||||
{totalEntries} known active instances
|
||||
</p>
|
||||
|
||||
<ButtonGroup>
|
||||
|
|
Loading…
Reference in a new issue