feat: add chatwoot instance status in superadmin (#6045)

* feat: add chatwoot instance status in superadmin

* feat: add redis metrics to instance health page

* chore: fix rubocop

* chore: rescue redis no connection

* chore: add rspec

* chore: refactor

* feat: add instance health to /api

* chore: rescue postgres

* chore: fix spec
This commit is contained in:
Vishnu Narayanan
2023-01-30 18:37:51 +05:30
committed by GitHub
parent 747e6cacb9
commit b1af814eab
7 changed files with 120 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ as defined by the routes in the `admin/` namespace
</li>
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
<% next if ["account_users", "dashboard", "devise/sessions", "app_configs" ].include? resource.resource %>
<% next if ["account_users", "dashboard", "devise/sessions", "app_configs", "instance_statuses" ].include? resource.resource %>
<li class="navigation__link navigation__link--<%= nav_link_state(resource) %>">
<i class="<%= sidebar_icons[resource.resource.to_sym] %>"></i>
<%= link_to(
@@ -50,6 +50,11 @@ as defined by the routes in the `admin/` namespace
</li>
<% end %>
<li class="navigation__link">
<i class="ion ion-medkit"></i>
<%= link_to "Instance Health", super_admin_instance_status_url %>
</li>
<li class="navigation__link">
<i class="ion ion ion-network"></i>
<%= link_to "Sidekiq", sidekiq_web_url, { target: "_blank" } %>

View File

@@ -0,0 +1,23 @@
<% content_for(:title) do %>
Instance Health
<% end %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title" id="page-title">
<%= content_for(:title) %>
</h1>
</header>
<section class="main-content__body">
<table>
<tr>
<th>Metric</th>
<th>Value</th>
</tr>
<% @metrics.each do |key,value| %>
<tr>
<td> <%= key %> </td>
<td> <%= value %> </td>
</tr>
<% end %>
</table>
</section>