Hide reconnect runtime button once reconnected (#731)

This commit is contained in:
Jonatan Kłosko 2021-12-03 14:03:06 +01:00 committed by GitHub
parent 5eb0cf2517
commit 0b6acb9d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -15,6 +15,7 @@ defmodule LivebookWeb.Output do
id: "#{@id}-output#{group_idx}_#{idx}",
socket: @socket,
runtime: @runtime,
cell_validity_status: @cell_validity_status,
input_values: @input_values
}) %>
</div>
@ -117,8 +118,11 @@ defmodule LivebookWeb.Output do
live_component(LivebookWeb.Output.ControlComponent, id: id, attrs: attrs)
end
defp render_output({:error, formatted, :runtime_restart_required}, %{runtime: runtime})
when runtime != nil do
defp render_output({:error, formatted, :runtime_restart_required}, %{
runtime: runtime,
cell_validity_status: cell_validity_status
})
when runtime != nil and cell_validity_status == :evaluated do
assigns = %{formatted: formatted, is_standalone: Livebook.Runtime.standalone?(runtime)}
~H"""

View file

@ -120,6 +120,7 @@ defmodule LivebookWeb.SessionLive.CellComponent do
id={"cell-#{@cell_view.id}-evaluation#{evaluation_number(@cell_view.evaluation_status, @cell_view.number_of_evaluations)}-outputs"}
socket={@socket}
runtime={@runtime}
cell_validity_status={@cell_view.validity_status}
input_values={@cell_view.input_values} />
</div>
<% end %>