mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Add new resource for certs
This commit is contained in:
parent
143fb7eb1b
commit
5319db16b4
12 changed files with 310 additions and 33 deletions
75
app/views/admin/certificates/show.haml
Normal file
75
app/views/admin/certificates/show.haml
Normal file
|
@ -0,0 +1,75 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs
|
||||
= t('certificates')
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('back_to_api_user'), [:admin, @api_user], class: 'btn btn-default')
|
||||
|
||||
%hr
|
||||
- if @certificate.errors.any?
|
||||
- @certificate.errors.each do |attr, err|
|
||||
= err
|
||||
%br
|
||||
- if @certificate.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t('csr')
|
||||
.pull-right
|
||||
= link_to(t('download'), download_csr_admin_api_user_certificate_path(@api_user, @certificate), class: 'btn btn-default btn-xs')
|
||||
- unless @crt
|
||||
= link_to(t('sign_this_request'), sign_admin_api_user_certificate_path(@api_user, @certificate), method: :post, class: 'btn btn-primary btn-xs')
|
||||
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t('version')
|
||||
%dd= @csr.version
|
||||
|
||||
%dt= t('subject')
|
||||
%dd= @csr.subject
|
||||
|
||||
%dt= t('signature_algorithm')
|
||||
%dd= @csr.signature_algorithm
|
||||
|
||||
- if @crt
|
||||
.row
|
||||
.col-md-12
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t('crt') unless @certificate.revoked?
|
||||
= t('crt_revoked') if @certificate.revoked?
|
||||
.pull-right
|
||||
= link_to(t('download'), download_crt_admin_api_user_certificate_path(@api_user, @certificate), class: 'btn btn-default btn-xs')
|
||||
- unless @certificate.revoked?
|
||||
= link_to(t('revoke_this_certificate'), revoke_admin_api_user_certificate_path(@api_user, @certificate), method: :post, class: 'btn btn-primary btn-xs')
|
||||
- if @crt
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t('version')
|
||||
%dd= @crt.version
|
||||
|
||||
%dt= t('serial_number')
|
||||
%dd= @crt.serial
|
||||
|
||||
%dt= t('signature_algorithm')
|
||||
%dd= @crt.signature_algorithm
|
||||
|
||||
%dt= t('issuer')
|
||||
%dd= @crt.issuer
|
||||
|
||||
%dt= t('valid_from')
|
||||
%dd= @crt.not_before
|
||||
|
||||
%dt= t('valid_to')
|
||||
%dd= @crt.not_after
|
||||
|
||||
%dt= t('subject')
|
||||
%dd= @crt.subject
|
||||
|
||||
%dt= t('extensions')
|
||||
%dd= @crt.extensions.map(&:to_s).join('<br>').html_safe
|
Loading…
Add table
Add a link
Reference in a new issue