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()
|
@spec get_instances(Integer.t() | nil) :: Scrivener.Page.t()
|
||||||
def get_instances(page \\ nil) do
|
def get_instances(page \\ nil) do
|
||||||
Instance
|
Instance
|
||||||
|> where([i], not is_nil(i.type))
|
|> where([i], not is_nil(i.type) and not i.opt_out)
|
||||||
|> Repo.paginate(page: page)
|
|> Repo.paginate(page: page)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class InstanceTable extends React.PureComponent<IInstanceTableProps> {
|
||||||
<PaginationContainer>
|
<PaginationContainer>
|
||||||
<p>
|
<p>
|
||||||
Showing {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, totalEntries)} of{" "}
|
Showing {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, totalEntries)} of{" "}
|
||||||
{totalEntries} known instances
|
{totalEntries} known active instances
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
|
|
Loading…
Reference in a new issue