Add admin page for web apps
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
52
app/views/admin/app_catalog/web_apps/index.html.erb
Normal file
52
app/views/admin/app_catalog/web_apps/index.html.erb
Normal file
@@ -0,0 +1,52 @@
|
||||
<%= render HeaderComponent.new(title: "App Catalog") %>
|
||||
|
||||
<%= render MainWithSidenavComponent.new(sidenav_partial: 'shared/admin_sidenav_app_catalog') do %>
|
||||
<section>
|
||||
<%= render QuickstatsContainerComponent.new do %>
|
||||
<%= render QuickstatsItemComponent.new(
|
||||
type: :number,
|
||||
title: 'Known Web Apps',
|
||||
value: @stats[:known_apps],
|
||||
) %>
|
||||
<%# <%= render QuickstatsItemComponent.new(
|
||||
<%# type: :number,
|
||||
<%# title: 'Accepted',
|
||||
<%# value: @stats[:accepted],
|
||||
<%# ) %>
|
||||
<%# <%= render QuickstatsItemComponent.new(
|
||||
<%# type: :number,
|
||||
<%# title: 'Users with referrals',
|
||||
<%# value: @stats[:users_with_referrals],
|
||||
<%# meta: "/ #{User.count}"
|
||||
<%# ) %>
|
||||
<% end %>
|
||||
</section>
|
||||
<% if @web_apps.any? %>
|
||||
<section>
|
||||
<h3>Web Apps</h3>
|
||||
<table class="divided mb-8">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>URL</th>
|
||||
<th class="hidden md:table-cell">RS Auths</th>
|
||||
<th class="hidden md:table-cell">Created at</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @web_apps.each do |web_app| %>
|
||||
<tr>
|
||||
<td><%= web_app.name %></td>
|
||||
<td><%= link_to web_app.url, web_app.url,
|
||||
target: "_blank", rel: "nofollow noopener",
|
||||
class: "ks-text-link" %></td>
|
||||
<td class="hidden md:table-cell"><%= web_app.remote_storage_authorizations.count %></td>
|
||||
<td class="hidden md:table-cell"><%= web_app.created_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%== pagy_nav @pagy %>
|
||||
</section>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user