mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-30 10:47:51 +08:00
Hide reconnect runtime button once reconnected (#731)
This commit is contained in:
parent
5eb0cf2517
commit
0b6acb9d34
2 changed files with 7 additions and 2 deletions
|
@ -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"""
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in a new issue