Skip to content

Commit 0194fab

Browse files
committed
Show users count for OAuth Applications
1 parent f186567 commit 0194fab

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

app/views/cpanel/applications/index.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<td>编号</td>
1414
<td>名称</td>
1515
<td>Client Id</td>
16-
<td>Owner</td>
16+
<td>所有者</td>
17+
<td>用户量</td>
1718
<td>创建时间</td>
1819
<td class="opts"></td>
1920
</tr>
@@ -23,6 +24,7 @@
2324
<td><%= link_to item.name, cpanel_application_path(item.id) %></td>
2425
<td><%= item.uid %></td>
2526
<td><%= user_name_tag(item.owner) %></td>
27+
<td><%= item.access_tokens.count %></td>
2628
<td><%= l(item.created_at, format: :long) %></td>
2729
<td>
2830
<%= link_to "", cpanel_application_path(item.id), method: :delete, 'data-confirm' => '确定要删除吗?', class: "fa fa-trash" %>

app/views/cpanel/applications/show.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<label class="col-sm-1">Secret:</label> <%= @application.secret %></li>
1212
<li class="list-group-item">
1313
<label class="col-sm-1">创建人:</label> <%= user_name_tag(@application.owner) %></li>
14+
<li class="list-group-item">
15+
<label class="col-sm-1">用户量:</label> <%= @application.access_tokens.count %></li>
1416
</ul>
1517

1618
<div class="toolbar">

app/views/doorkeeper/applications/index.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<th><%= t('.name') %></th>
1414
<th>Client Id</th>
1515
<th><%= t('.callback_url') %></th>
16+
<th>用户量</th>
1617
<th></th>
1718
</tr>
1819
</thead>
@@ -22,6 +23,7 @@
2223
<td><%= link_to app.name, oauth_application_path(app) %></td>
2324
<td><%= app.uid %></td>
2425
<td><%= app.redirect_uri %></td>
26+
<td><%= app.access_tokens.count %></td>
2527
<td class="opts">
2628
<%= link_to icon_tag('pencil'), edit_oauth_application_path(app)%>
2729
<%= link_to icon_tag('trash'), oauth_application_path(app), data: { method: :delete, confirm: "确定要删除么?" }%>

0 commit comments

Comments
 (0)