2014-12-30 10:01:30 +00:00
|
|
|
- is_admin = defined?(admin) ? true : false
|
2020-06-26 06:09:03 +00:00
|
|
|
.row.gl-mt-3
|
2014-12-29 16:09:39 +00:00
|
|
|
.col-md-4
|
2018-04-10 17:11:34 +00:00
|
|
|
.card
|
|
|
|
.card-header
|
2019-05-30 17:56:56 +00:00
|
|
|
= _('SSH Key')
|
2018-05-29 15:08:35 +00:00
|
|
|
%ul.content-list
|
2014-12-29 16:09:39 +00:00
|
|
|
%li
|
2019-05-30 17:56:56 +00:00
|
|
|
%span.light= _('Title:')
|
2014-12-29 16:09:39 +00:00
|
|
|
%strong= @key.title
|
|
|
|
%li
|
2019-05-30 17:56:56 +00:00
|
|
|
%span.light= _('Created on:')
|
2016-01-06 22:27:56 +00:00
|
|
|
%strong= @key.created_at.to_s(:medium)
|
2020-03-13 09:09:23 +00:00
|
|
|
%li
|
|
|
|
%span.light= _('Expires:')
|
|
|
|
%strong= @key.expires_at.try(:to_s, :medium) || _('Never')
|
2016-12-21 14:59:54 +00:00
|
|
|
%li
|
2019-05-30 17:56:56 +00:00
|
|
|
%span.light= _('Last used on:')
|
2020-03-13 09:09:23 +00:00
|
|
|
%strong= @key.last_used_at.try(:to_s, :medium) || _('Never')
|
2014-12-29 16:09:39 +00:00
|
|
|
|
|
|
|
.col-md-8
|
2017-08-28 20:33:35 +00:00
|
|
|
= form_errors(@key, type: 'key') unless @key.valid?
|
2014-12-29 16:09:39 +00:00
|
|
|
%pre.well-pre
|
|
|
|
= @key.key
|
2019-12-11 18:08:10 +00:00
|
|
|
.card
|
|
|
|
.card-header
|
|
|
|
= _('Fingerprints')
|
|
|
|
%ul.content-list
|
|
|
|
%li
|
|
|
|
%span.light= 'MD5:'
|
|
|
|
%code.key-fingerprint= @key.fingerprint
|
|
|
|
- if @key.fingerprint_sha256.present?
|
|
|
|
%li
|
|
|
|
%span.light= 'SHA256:'
|
|
|
|
%code.key-fingerprint= @key.fingerprint_sha256
|
|
|
|
|
|
|
|
|
2015-10-09 12:30:42 +00:00
|
|
|
.col-md-12
|
2018-04-09 17:42:45 +00:00
|
|
|
.float-right
|
2019-05-29 13:47:40 +00:00
|
|
|
- if @key.can_delete?
|
2021-01-25 18:09:03 +00:00
|
|
|
= render 'shared/ssh_keys/key_delete', text: _('Delete'), html_class: "btn btn-danger gl-button delete-key js-confirm-modal-button", button_data: ssh_key_delete_modal_data(@key, path_to_key(@key, is_admin))
|