From 19b3a3806d3fd86f72ac781068fd5a37c29f39d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Thu, 29 Aug 2019 19:04:43 +0100 Subject: [PATCH] hide opted-out instances from table --- backend/lib/backend/api.ex | 2 +- frontend/src/components/organisms/InstanceTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/lib/backend/api.ex b/backend/lib/backend/api.ex index a5e492a..b5c8164 100644 --- a/backend/lib/backend/api.ex +++ b/backend/lib/backend/api.ex @@ -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 diff --git a/frontend/src/components/organisms/InstanceTable.tsx b/frontend/src/components/organisms/InstanceTable.tsx index d1bb502..c0a8e7f 100644 --- a/frontend/src/components/organisms/InstanceTable.tsx +++ b/frontend/src/components/organisms/InstanceTable.tsx @@ -78,7 +78,7 @@ class InstanceTable extends React.PureComponent {

Showing {(currentPage - 1) * pageSize + 1}-{Math.min(currentPage * pageSize, totalEntries)} of{" "} - {totalEntries} known instances + {totalEntries} known active instances