2015-04-26 12:48:37 +05:30
|
|
|
- is_admin = defined?(admin) ? true : false
|
2016-06-02 11:05:42 +05:30
|
|
|
.row.prepend-top-default
|
2015-04-26 12:48:37 +05:30
|
|
|
.col-md-4
|
2018-11-08 19:23:39 +05:30
|
|
|
.card
|
|
|
|
.card-header
|
2019-09-04 21:01:54 +05:30
|
|
|
= _('SSH Key')
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.content-list
|
2015-04-26 12:48:37 +05:30
|
|
|
%li
|
2019-09-04 21:01:54 +05:30
|
|
|
%span.light= _('Title:')
|
2015-04-26 12:48:37 +05:30
|
|
|
%strong= @key.title
|
|
|
|
%li
|
2019-09-04 21:01:54 +05:30
|
|
|
%span.light= _('Created on:')
|
2016-01-14 18:37:52 +05:30
|
|
|
%strong= @key.created_at.to_s(:medium)
|
2017-08-17 22:00:37 +05:30
|
|
|
%li
|
2019-09-04 21:01:54 +05:30
|
|
|
%span.light= _('Last used on:')
|
2017-08-17 22:00:37 +05:30
|
|
|
%strong= @key.last_used_at.try(:to_s, :medium) || 'N/A'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
.col-md-8
|
2018-03-17 18:26:18 +05:30
|
|
|
= form_errors(@key, type: 'key') unless @key.valid?
|
2015-04-26 12:48:37 +05:30
|
|
|
%pre.well-pre
|
|
|
|
= @key.key
|
2020-01-01 13:55:28 +05:30
|
|
|
.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-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?
|
|
|
|
= link_to _('Remove'), path_to_key(@key, is_admin), data: {confirm: _('Are you sure?')}, method: :delete, class: "btn btn-remove delete-key qa-delete-key-button"
|