Skip to content

Commit

Permalink
display the last change seq
Browse files Browse the repository at this point in the history
  • Loading branch information
the-last-pastafarian committed Jan 10, 2024
1 parent 7a98eec commit 818d200
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions server/lib/field_hub/couch_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,12 @@ defmodule FieldHub.CouchService do
end

def get_last_update_infos(project_identifier) do
infos = get_update_infos(project_identifier)
infos = (get_update_infos(project_identifier).body
|> Jason.decode!())["last_seq"]
#
IO.inspect(infos)

project_identifier
infos
# project_identifier
end

defp get_update_infos(project_identifier) do
Expand Down
12 changes: 6 additions & 6 deletions server/lib/field_hub_web/live/project_show_live.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
} -> %>
<section>Database documents: <%= db_doc_count %></section>
<%!-- <section>Last update: <%= "TODO: indicate here when the last update took place and an id ???" %></section> --%>
<section>Last update: <%= @last_update %>
<section>Last change seq: <%= @last_update %>
<%!-- TODO Better display and retriev infos --%>
<table>
<tr><td>seq:</td><td>12</td></tr>
<tr><td>id:</td><td>foo</td></tr>
<tr><td>changes:</td><td>[{"rev":"1-23202479633c2b380f79507a776743d5"}]</td></tr>
</table>
<%!-- <table>
<tr><td>seq:</td><td>17</td></tr>
<tr><td>id:</td><td>e54ce645-43a1-49f5-bc3b-e634ed50c4f0</td></tr>
<tr><td>changes:</td><td>[{"rev":"1-fd94749d65793d803f86ccf0aa009d25"}]</td></tr>
</table> --%>
</section>
<section>Database size: <%= Sizeable.filesize(db_file_size) %> (<%= db_file_size %> bytes)</section>
<%= case files do %>
Expand Down

0 comments on commit 818d200

Please sign in to comment.