Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_table.html.haml « deploy_tokens « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ad73442807ed80a0eca97f76bf5daeb1b2dd363e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
%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?) }
                  In #{distance_of_time_in_words_to_now(token.expires_at)}
              - else
                %span.token-never-expires-label= _('Never')
            %td= token.scopes.present? ? token.scopes.join(", ") : html_escape_once(_('<no scopes selected>')).html_safe
            %td= link_to s_('DeployTokens|Revoke'), "#", class: "btn btn-danger float-right", data: { toggle: "modal", target: "#revoke-modal-#{token.id}"}
            = render 'shared/deploy_tokens/revoke_modal', token: token, group_or_project: group_or_project
- else
  .settings-message.text-center
    = s_('DeployTokens|This %{entity_type} has no active Deploy Tokens.') % { entity_type: group_or_project.class.name.downcase }