Commit 793d9799 authored by Robert Speicher's avatar Robert Speicher

Show key fingerprint on DeployKeys#index

Also style all key fingerprints consistently across the app.
parent 6e5473f9
...@@ -23,6 +23,13 @@ pre { ...@@ -23,6 +23,13 @@ pre {
font-family: $monospace_font; font-family: $monospace_font;
} }
code {
&.key-fingerprint {
background: $body-bg;
color: $text-color;
}
}
/** /**
* Wiki typography * Wiki typography
* *
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
= link_to admin_deploy_key_path(deploy_key) do = link_to admin_deploy_key_path(deploy_key) do
%strong= deploy_key.title %strong= deploy_key.title
%td %td
%span %code.key-fingerprint= deploy_key.fingerprint
(#{deploy_key.fingerprint})
%td %td
%span.cgray %span.cgray
added #{time_ago_with_tooltip(deploy_key.created_at)} added #{time_ago_with_tooltip(deploy_key.created_at)}
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
= link_to path_to_key(key, is_admin) do = link_to path_to_key(key, is_admin) do
%strong= key.title %strong= key.title
%td %td
%span %code.key-fingerprint= key.fingerprint
(#{key.fingerprint})
%td %td
%span.cgray %span.cgray
added #{time_ago_with_tooltip(key.created_at)} added #{time_ago_with_tooltip(key.created_at)}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.col-md-8 .col-md-8
%p %p
%span.light Fingerprint: %span.light Fingerprint:
%strong= @key.fingerprint %code.key-fingerprint= @key.fingerprint
%pre.well-pre %pre.well-pre
= @key.key = @key.key
.pull-right .pull-right
......
...@@ -2,24 +2,20 @@ ...@@ -2,24 +2,20 @@
.pull-right .pull-right
- if @available_keys.include?(deploy_key) - if @available_keys.include?(deploy_key)
= link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do = link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
%i.fa.fa-plus = icon('plus')
Enable Enable
- else - else
- if deploy_key.destroyed_when_orphaned? && deploy_key.almost_orphaned? - if deploy_key.destroyed_when_orphaned? && deploy_key.almost_orphaned?
= link_to 'Remove', disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :put, class: "btn btn-remove delete-key btn-sm pull-right" = link_to 'Remove', disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :put, class: "btn btn-remove delete-key btn-sm pull-right"
- else - else
= link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do = link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
%i.fa.fa-power-off = icon('power-off')
Disable Disable
- if project = project_for_deploy_key(deploy_key) = icon('key')
= link_to namespace_project_deploy_key_path(project.namespace, project, deploy_key) do
%i.fa.fa-key
%strong= deploy_key.title %strong= deploy_key.title
- else %br
%i.fa.fa-key %code.key-fingerprint= deploy_key.fingerprint
%strong= deploy_key.title
%p.light.prepend-top-10 %p.light.prepend-top-10
- if deploy_key.public? - if deploy_key.public?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment