diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-04-20 14:20:24 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-04-28 22:28:36 +0530 |
commit | c382bd266d256cdbd732be928ecb6a532bfa8ddd (patch) | |
tree | ac3650c624a47926e4ac8bfa69ada0100091a482 /app/views/profiles | |
parent | 4e7acd88dc02e545ba696a2b4fd8c16bd6df31d5 (diff) | |
download | gitlab-ce-c382bd266d256cdbd732be928ecb6a532bfa8ddd.tar.gz |
Improve performance of the personal access tokens page.
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/personal_access_tokens/index.html.haml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml index af34eb389df..02800c37917 100644 --- a/app/views/profiles/personal_access_tokens/index.html.haml +++ b/app/views/profiles/personal_access_tokens/index.html.haml @@ -28,9 +28,9 @@ %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.table.table-striped.table-hover.active-personal-access-tokens %thead @@ -41,7 +41,7 @@ %th Expires %th Actions %tbody - - @active_personal_access_tokens.active.each do |token| + - @active_personal_access_tokens.each do |token| %tr %td= token.name %td.input-group.personal-access-tokens-token-column @@ -62,9 +62,9 @@ %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.table.table-striped.table-hover.inactive-personal-access-tokens %thead @@ -73,7 +73,7 @@ %th Token %th Created %tbody - - @inactive_personal_access_tokens.order("revoked, expires_at").each do |token| + - @inactive_personal_access_tokens.each do |token| %tr %td= token.name %td.input-group.personal-access-tokens-token-column |