Skip to content

Commit

Permalink
Merge branch 'master' into 1136
Browse files Browse the repository at this point in the history
  • Loading branch information
c-m-duncan authored Apr 27, 2023
2 parents 7cb047a + ea17417 commit 32f5eee
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion apps/andi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For details on how to use the ANDI API, please review the Postman collection loc

When ANDI emits events of various types, it logs the details of the event to a Postgres table named `audit_events`.

In order to access those logs, a user can run the following commands from the elixir console:
To access these logs a user will need access to the elixir console from a running version of ANDI. If ANDI is running in a kubernetes pod, the user will need to shell into the pod then run the `bin/andi remote_console` command to get access to ANDI's elixir console. Then see the below options for what logs can be accessed.

1. To get all logs of all events, run the command `Andi.Schemas.AuditEvents.get_all()`. Note that this may result in a large volume of events.
2. To get a specific log entry by id, run the command `Andi.Schemas.AuditEvents.get(audit_event_id)`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ defmodule AndiWeb.EditOrganizationLiveView do
</div>
</form>
<div class="harvested-datasets-table">
<h2>Remote Datasets Attached To This Organization</h2>
<%= live_component(@socket, AndiWeb.OrganizationLiveView.HarvestedDatasetsTable, datasets: @harvested_datasets, order: @order) %>
</div>
<%= live_component(@socket, AndiWeb.UnsavedChangesModal, id: "edit-org-unsaved-changes-modal", visibility: @unsaved_changes_modal_visibility) %>
<%= live_component(@socket, AndiWeb.EditLiveView.PublishSuccessModal, visibility: @publish_success_modal_visibility) %>
Expand Down
3 changes: 1 addition & 2 deletions apps/andi/lib/andi_web/views/options.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ defmodule AndiWeb.Views.Options do
%{
"" => "",
"ingest" => "Ingest",
"stream" => "Stream",
"remote" => "Remote"
"stream" => "Stream"
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,29 +302,7 @@ defmodule AndiWeb.EditOrganizationLiveViewTest do
]
end

test "shows all harvested datasets associated with a given organization", %{
conn: conn,
org: org,
dataset1: dataset1,
dataset2: dataset2,
dataset3: dataset3
} do
assert {:ok, view, html} = live(conn, @url_path <> org.id)

get_text(html, ".organizations-table__tr")

assert get_text(html, ".organizations-table__tr") =~ dataset1.business.dataTitle
assert get_text(html, ".organizations-table__tr") =~ dataset2.business.dataTitle
refute get_text(html, ".organizations-table__tr") =~ dataset3.business.dataTitle
end

test "include checkbox is present for all datasets", %{conn: conn, org: org} do
assert {:ok, view, html} = live(conn, @url_path <> org.id)

assert length(Floki.attribute(html, ".organizations-table__checkbox--input", "checked")) == 3
end

test "unselecting include for a dataset sends a dataset delete event and updates the include field in the havested table", %{
test "unselecting include for a dataset sends a dataset delete event", %{
conn: conn,
org: org,
dataset4: dataset4
Expand All @@ -337,8 +315,6 @@ defmodule AndiWeb.EditOrganizationLiveViewTest do

render_change(view, "toggle_include", %{"id" => dataset4.id})

assert %{include: false} = Organizations.get_harvested_dataset(dataset4.id)

eventually(fn ->
assert nil == Datasets.get(dataset4.id)
end)
Expand Down

0 comments on commit 32f5eee

Please sign in to comment.