2018-05-09 12:01:36 +05:30
|
|
|
%h5= s_("DeployTokens|Active Deploy Tokens (%{active_tokens})") % { active_tokens: active_tokens.length }
|
|
|
|
|
|
|
|
- if active_tokens.present?
|
|
|
|
.table-responsive.deploy-tokens
|
|
|
|
%table.table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= s_('DeployTokens|Name')
|
|
|
|
%th= s_('DeployTokens|Username')
|
|
|
|
%th= s_('DeployTokens|Created')
|
|
|
|
%th= s_('DeployTokens|Expires')
|
|
|
|
%th= s_('DeployTokens|Scopes')
|
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- active_tokens.each do |token|
|
|
|
|
%tr
|
|
|
|
%td= token.name
|
|
|
|
%td= token.username
|
|
|
|
%td= token.created_at.to_date.to_s(:medium)
|
|
|
|
%td
|
|
|
|
- if token.expires?
|
|
|
|
%span{ class: ('text-warning' if token.expires_soon?) }
|
2021-11-11 11:23:49 +05:30
|
|
|
= time_ago_with_tooltip(token.expires_at)
|
2018-05-09 12:01:36 +05:30
|
|
|
- else
|
2020-04-08 14:13:33 +05:30
|
|
|
%span.token-never-expires-label= _('Never')
|
2021-02-22 17:27:13 +05:30
|
|
|
%td= token.scopes.present? ? token.scopes.join(', ') : _('no scopes selected')
|
2021-04-29 21:17:54 +05:30
|
|
|
%td
|
2022-05-07 20:08:51 +05:30
|
|
|
.js-deploy-token-revoke-button{ data: deploy_token_revoke_button_data(token: token, group_or_project: group_or_project) }
|
2021-04-29 21:17:54 +05:30
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
2020-04-08 14:13:33 +05:30
|
|
|
= s_('DeployTokens|This %{entity_type} has no active Deploy Tokens.') % { entity_type: group_or_project.class.name.downcase }
|