2015-04-26 12:48:37 +05:30
|
|
|
- is_admin = defined?(admin) ? true : false
|
2020-07-28 23:09:34 +05:30
|
|
|
.row.gl-mt-3
|
2015-04-26 12:48:37 +05:30
|
|
|
.col-md-4
|
2022-11-25 23:54:43 +05:30
|
|
|
= render Pajamas::CardComponent.new(body_options: { class: 'gl-py-0'}) do |c|
|
|
|
|
- c.header do
|
2019-09-04 21:01:54 +05:30
|
|
|
= _('SSH Key')
|
2022-11-25 23:54:43 +05:30
|
|
|
- c.body do
|
|
|
|
%ul.content-list
|
|
|
|
%li
|
|
|
|
%span.light= _('Title:')
|
|
|
|
%strong= @key.title
|
2023-03-04 22:38:38 +05:30
|
|
|
%li
|
|
|
|
%span.light= s_('Profiles|Usage type:')
|
|
|
|
%strong= ssh_key_usage_types.invert[@key.usage_type]
|
2022-11-25 23:54:43 +05:30
|
|
|
%li
|
|
|
|
%span.light= _('Created on:')
|
|
|
|
%strong= @key.created_at.to_s(:medium)
|
|
|
|
%li
|
|
|
|
%span.light= _('Expires:')
|
|
|
|
%strong= @key.expires_at.try(:to_s, :medium) || _('Never')
|
|
|
|
%li
|
|
|
|
%span.light= _('Last used on:')
|
|
|
|
%strong= @key.last_used_at.try(:to_s, :medium) || _('Never')
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
.col-md-8
|
2022-10-11 01:57:18 +05:30
|
|
|
= form_errors(@key, type: 'key') unless @key.valid?
|
2015-04-26 12:48:37 +05:30
|
|
|
%pre.well-pre
|
|
|
|
= @key.key
|
2022-11-25 23:54:43 +05:30
|
|
|
= render Pajamas::CardComponent.new(body_options: { class: 'gl-py-0'}) do |c|
|
|
|
|
- c.header do
|
2020-01-01 13:55:28 +05:30
|
|
|
= _('Fingerprints')
|
2022-11-25 23:54:43 +05:30
|
|
|
- c.body do
|
|
|
|
%ul.content-list
|
2020-01-01 13:55:28 +05:30
|
|
|
%li
|
2022-11-25 23:54:43 +05:30
|
|
|
%span.light= 'MD5:'
|
|
|
|
%code.key-fingerprint= @key.fingerprint
|
|
|
|
- if @key.fingerprint_sha256.present?
|
|
|
|
%li
|
|
|
|
%span.light= 'SHA256:'
|
|
|
|
%code.key-fingerprint= @key.fingerprint_sha256
|
2020-01-01 13:55:28 +05:30
|
|
|
|
2015-10-24 18:46:33 +05:30
|
|
|
.col-md-12
|
2018-11-08 19:23:39 +05:30
|
|
|
.float-right
|
2019-09-04 21:01:54 +05:30
|
|
|
- if @key.can_delete?
|
2023-03-04 22:38:38 +05:30
|
|
|
= render 'shared/ssh_keys/key_delete', button_data: ssh_key_delete_modal_data(@key, path_to_key(@key, is_admin))
|