6cf55e5129
Adds 2 end-to-end tests: 1. Add and remove an SSH key 2. Add an SSH key and use it to clone and push Includes changes to factories to allow Git actions via SSH
27 lines
809 B
Text
27 lines
809 B
Text
- is_admin = defined?(admin) ? true : false
|
|
.row.prepend-top-default
|
|
.col-md-4
|
|
.card
|
|
.card-header
|
|
SSH Key
|
|
%ul.content-list
|
|
%li
|
|
%span.light Title:
|
|
%strong= @key.title
|
|
%li
|
|
%span.light Created on:
|
|
%strong= @key.created_at.to_s(:medium)
|
|
%li
|
|
%span.light Last used on:
|
|
%strong= @key.last_used_at.try(:to_s, :medium) || 'N/A'
|
|
|
|
.col-md-8
|
|
= form_errors(@key, type: 'key') unless @key.valid?
|
|
%p
|
|
%span.light Fingerprint:
|
|
%code.key-fingerprint= @key.fingerprint
|
|
%pre.well-pre
|
|
= @key.key
|
|
.col-md-12
|
|
.float-right
|
|
= 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"
|