Skip to content

Commit

Permalink
Merge pull request #917 from senid231/916-fix-active-nodes-admin-ui
Browse files Browse the repository at this point in the history
fix active_nodes page
  • Loading branch information
dmitry-sinina authored Mar 7, 2021
2 parents 4fdb470 + 9d8f034 commit d8bce63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/decorators/active_node_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ def safe_system_status

def active_calls_count
if safe_system_status.present?
h.link_to(safe_system_status['calls'], h.active_calls_path(q: { node_id_eq: model.id }))
h.link_to(safe_system_status[:calls], h.active_calls_path(q: { node_id_eq: model.id }))
end
end

def version
safe_system_status['version'] if safe_system_status.present?
safe_system_status[:version] if safe_system_status.present?
end

def shutdown_req_time
safe_system_status['shutdown_request_time'] if safe_system_status.present?
safe_system_status[:shutdown_request_time] if safe_system_status.present?
end

def sessions_num
safe_system_status['sessions'] if safe_system_status.present?
safe_system_status[:sessions] if safe_system_status.present?
end

def uptime
humanize_time_interval(safe_system_status['uptime']) if safe_system_status.present?
humanize_time_interval(safe_system_status[:uptime]) if safe_system_status.present?
end

def humanize_time_interval(seconds)
Expand Down

0 comments on commit d8bce63

Please sign in to comment.