Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Enhancements
* [[`PR-30`](https://github.com/thiagoesteves/observer_web/pull/30)] Adding configurable timeout for fetching specific states.
* [[`PR-31`](https://github.com/thiagoesteves/observer_web/pull/31)] Adding process dictionary information.

## 0.1.12 🚀 (2025-10-12)

Expand Down
1 change: 1 addition & 0 deletions lib/observer_web/apps/process.ex
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ defmodule ObserverWeb.Apps.Process do
},
meta: structure_meta(data, pid),
state: state,
dictionary: dictionary,
phx_lv_socket: phx_lv_socket
}
end
Expand Down
21 changes: 14 additions & 7 deletions lib/web/pages/apps/process.ex
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,23 @@ defmodule Observer.Web.Apps.Process do
{item.value}
</:col>
</Core.table_process>
<.relations title="State" value={"#{inspect(@info.state)}"} copy_id={@id} />
</div>

<div class="flex grid grid-cols-2 mt-1 gap-1 items-top">
<.relations
title="State"
value={"#{inspect(@info.state)}"}
copy_id={"process-state-#{@id}"}
/>
<.relations
title="Dictionary"
value={"#{inspect(@info.dictionary)}"}
copy_id={"process-dictionary-#{@id}"}
/>
</div>

<div class="flex grid grid-cols-4 mt-1 gap-1 items-top">
<.relations title="Links" value={"#{inspect(@info.relations.links)}"} />

<.relations title="Ancestors" value={"#{inspect(@info.relations.ancestors)}" } />
<.relations title="Monitors" value={"#{inspect(@info.relations.monitors)}"} />
<.relations title="Monitored by" value={"#{inspect(@info.relations.monitored_by)}"} />
Expand Down Expand Up @@ -184,11 +195,7 @@ defmodule Observer.Web.Apps.Process do
<%= if @copy_id do %>
<div class="flex items-center justify-between w-full">
{@title}
<CopyToClipboard.content
:if={@copy_id}
id={"process-state-messages-#{@copy_id}"}
message={@value}
/>
<CopyToClipboard.content :if={@copy_id} id={@copy_id} message={@value} />
</div>
<% else %>
{@title}
Expand Down
7 changes: 4 additions & 3 deletions test/observer_web/web/live/apps/page_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ defmodule Observer.Web.Apps.PageLiveTest do
|> element("#apps-multi-select-toggle-options")
|> render_click()

refute html =~ "8888"
refute html =~ "9900"

html =
index_live
|> element("#apps-update-form")
|> render_change(%{get_state_timeout: "8888"})
|> render_change(%{get_state_timeout: "9900"})

assert html =~ "8888"
assert html =~ "9900"
end

test "Add/Remove Local Service + Kernel App", %{conn: conn} do
Expand Down Expand Up @@ -269,6 +269,7 @@ defmodule Observer.Web.Apps.PageLiveTest do
class: ""
},
state: "Phoenix.LiveView.Socket",
dictionary: [],
phx_lv_socket: %Phoenix.LiveView.Socket{
id: "my-test-id",
assigns: %{flag: true},
Expand Down