summaryrefslogtreecommitdiff
path: root/app/views/admin/applications/index.html.haml
blob: 890155ee6045a95141bc43130305018d86aedc0d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
- page_title s_('AdminArea|Instance OAuth applications')

%h3.page-title
  = s_('AdminArea|Instance OAuth applications')
%p.light
  - docs_link_path = help_page_path('integration/oauth_provider')
  - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: docs_link_path }
  = s_('AdminArea|Manage applications for your instance that can use GitLab as an %{docs_link_start}OAuth provider%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }

- if @applications.empty?
  %section.empty-state.gl-text-center.gl-display-flex.gl-flex-direction-column
    .svg-content.svg-150
      = image_tag 'illustrations/empty-state/empty-admin-apps.svg', class: 'gl-max-w-full'

    .gl-max-w-full.gl-m-auto
      %h1.h4.gl-font-size-h-display= s_('AdminArea|No applications found')
      = link_to _('New application'), new_admin_application_path, class: 'btn gl-button btn-confirm'

- else
  %hr
  %p= link_to _('New application'), new_admin_application_path, class: 'gl-button btn btn-confirm'

  .table-responsive
    %table.b-table.gl-table.gl-w-full{ role: 'table' }
      %thead
        %tr
          %th
            = _('Name')
          %th
            = _('Callback URL')
          %th
            = _('Clients')
          %th
            = _('Trusted')
          %th
            = _('Confidential')
          %th
          %th
      %tbody.oauth-applications
        - @applications.each do |application|
          %tr{ id: "application_#{application.id}" }
            %td= link_to application.name, admin_application_path(application)
            %td= application.redirect_uri
            %td= @application_counts[application.id].to_i
            %td= application.trusted? ? _('Yes'): _('No')
            %td= application.confidential? ? _('Yes'): _('No')
            %td= link_to 'Edit', edit_admin_application_path(application), class: 'gl-button btn btn-link'
            %td= render 'delete_form', application: application

= paginate @applications, theme: 'gitlab'

.js-application-delete-modal