2018-04-02 15:57:44 +00:00
|
|
|
%h5= s_("DeployTokens|Active Deploy Tokens (%{active_tokens})") % { active_tokens: active_tokens.length }
|
2018-03-19 16:11:12 +00:00
|
|
|
|
|
|
|
- if active_tokens.present?
|
|
|
|
.table-responsive.deploy-tokens
|
|
|
|
%table.table
|
|
|
|
%thead
|
|
|
|
%tr
|
2018-04-02 15:57:44 +00:00
|
|
|
%th= s_('DeployTokens|Name')
|
2018-04-05 22:07:36 +00:00
|
|
|
%th= s_('DeployTokens|Username')
|
2018-04-02 15:57:44 +00:00
|
|
|
%th= s_('DeployTokens|Created')
|
|
|
|
%th= s_('DeployTokens|Expires')
|
|
|
|
%th= s_('DeployTokens|Scopes')
|
2018-03-19 16:11:12 +00:00
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- active_tokens.each do |token|
|
|
|
|
%tr
|
|
|
|
%td= token.name
|
2018-04-05 22:07:36 +00:00
|
|
|
%td= token.username
|
2018-03-19 16:11:12 +00:00
|
|
|
%td= token.created_at.to_date.to_s(:medium)
|
|
|
|
%td
|
2018-04-06 19:48:17 +00:00
|
|
|
- if token.expires?
|
2018-03-19 16:11:12 +00:00
|
|
|
%span{ class: ('text-warning' if token.expires_soon?) }
|
2021-09-15 18:11:29 +00:00
|
|
|
= time_ago_with_tooltip(token.expires_at)
|
2018-03-19 16:11:12 +00:00
|
|
|
- else
|
2020-02-28 18:09:07 +00:00
|
|
|
%span.token-never-expires-label= _('Never')
|
2020-11-30 21:09:16 +00:00
|
|
|
%td= token.scopes.present? ? token.scopes.join(', ') : _('no scopes selected')
|
2021-04-01 15:08:54 +00:00
|
|
|
%td
|
|
|
|
.js-deploy-token-revoke-button{ data: { button_class: 'float-right', token: token.to_json, revoke_path: revoke_deploy_token_path(group_or_project, token) } }
|
|
|
|
|
2018-03-19 16:11:12 +00:00
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
2020-02-28 18:09:07 +00:00
|
|
|
= s_('DeployTokens|This %{entity_type} has no active Deploy Tokens.') % { entity_type: group_or_project.class.name.downcase }
|