Commit c382bd26 authored by Timothy Andrew's avatar Timothy Andrew

Improve performance of the personal access tokens page.

parent 4e7acd88
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
%hr %hr
%h5= "Active Personal Access Tokens (#{@active_personal_access_tokens.count})" %h5= "Active Personal Access Tokens (#{@active_personal_access_tokens.length})"
- if @active_personal_access_tokens.exists? - if @active_personal_access_tokens.present?
.table-responsive .table-responsive
%table.table.table-striped.table-hover.active-personal-access-tokens %table.table.table-striped.table-hover.active-personal-access-tokens
%thead %thead
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
%th Expires %th Expires
%th Actions %th Actions
%tbody %tbody
- @active_personal_access_tokens.active.each do |token| - @active_personal_access_tokens.each do |token|
%tr %tr
%td= token.name %td= token.name
%td.input-group.personal-access-tokens-token-column %td.input-group.personal-access-tokens-token-column
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
%hr %hr
%h5= "Inactive Personal Access Tokens (#{@inactive_personal_access_tokens.count})" %h5= "Inactive Personal Access Tokens (#{@inactive_personal_access_tokens.length})"
- if @inactive_personal_access_tokens.exists? - if @inactive_personal_access_tokens.present?
.table-responsive .table-responsive
%table.table.table-striped.table-hover.inactive-personal-access-tokens %table.table.table-striped.table-hover.inactive-personal-access-tokens
%thead %thead
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
%th Token %th Token
%th Created %th Created
%tbody %tbody
- @inactive_personal_access_tokens.order("revoked, expires_at").each do |token| - @inactive_personal_access_tokens.each do |token|
%tr %tr
%td= token.name %td= token.name
%td.input-group.personal-access-tokens-token-column %td.input-group.personal-access-tokens-token-column
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment