Fix views

This commit is contained in:
Kamil Trzcinski 2016-02-10 16:45:59 +01:00 committed by James Edwards-Jones
parent e5e2e7b703
commit 0552c0b6f1
3 changed files with 22 additions and 21 deletions

View file

@ -71,8 +71,6 @@ class PagesDomain < ActiveRecord::Base
@fingeprint ||= OpenSSL::Digest::SHA256.new(x509.to_der).to_s
end
private
def x509
return unless certificate
@x509 ||= OpenSSL::X509::Certificate.new(certificate)
@ -87,6 +85,8 @@ class PagesDomain < ActiveRecord::Base
nil
end
private
def update
::Projects::UpdatePagesConfigurationService.new(project).execute
end

View file

@ -1,16 +1,17 @@
.panel.panel-default
.panel-heading
Domains (#{@domains.count})
%ul.well-list
- @domains.each do |domain|
%li
.pull-right
= link_to 'Details', namespace_project_page_path(@project.namespace, @project, domain), class: "btn btn-sm btn-grouped"
= link_to 'Remove', namespace_project_page_path(@project.namespace, @project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
.clearfix
%span= link_to domain.domain, domain.url
%p
- if domain.subject
%span.label.label-gray Certificate: #{domain.subject}
- if domain.expired?
%span.label.label-danger Expired
- if @domains.any?
.panel.panel-default
.panel-heading
Domains (#{@domains.count})
%ul.well-list
- @domains.each do |domain|
%li
.pull-right
= link_to 'Details', namespace_project_page_path(@project.namespace, @project, domain), class: "btn btn-sm btn-grouped"
= link_to 'Remove', namespace_project_page_path(@project.namespace, @project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
.clearfix
%span= link_to domain.domain, domain.url
%p
- if domain.subject
%span.label.label-gray Certificate: #{domain.subject}
- if domain.expired?
%span.label.label-danger Expired

View file

@ -1,7 +1,7 @@
- page_title "#{@domain.domain}", "Pages Domain"
%h3.page-title
#{@domain.domain}
Pages Domain
.table-holder
%table.table
@ -14,9 +14,9 @@
%td
Certificate
%td
- if @domain.certificate
- if @domain.x509
%pre
= @domain.certificate.to_text
= @domain.x509.to_text
- else
.light
missing