- content_for :header_title do
  Application Status



.pull-right
  Last commit
  = link_to @head_commit[0..6] , "https://github.com/theodi/open-data-certificate/commit/#{@head_commit}", class: 'badge'


%h1
  Job queue

%p
  %strong= pluralize @job_count, 'jobs'
  queued

%hr.heavy

%h1
  Surveys

%p
  %strong= pluralize Certificate.counts[:all], 'surveys'
  started

%hr.heavy

.embedded

  %h1
    Embedded certificates

  %p
    %strong= pluralize EmbedStat.all.count, 'certificates'
    embedded

  %p
    =link_to "Download list of embedded certificates", embed_stats_path(format: "csv")

  %hr.heavy

%h1 Published datasets with certificates

= render partial: "home/stats", locals: {type: "published"}

%h1 Published and draft datasets with certificates

= render partial: "home/stats", locals: {type: "all"}

%p.data
  = link_to("Download legacy data", "legacy_stats.csv")

- content_for :header_title do
  Application Status



.pull-right
  Last commit
  = link_to @head_commit[0..6] , "https://github.com/theodi/open-data-certificate/commit/#{@head_commit}", class: 'badge'


%h1
  Job queue

%p
  %strong= pluralize @job_count, 'jobs'
  queued

%hr.heavy

%h1
  Surveys

%p
  %strong= pluralize Certificate.counts[:all], 'surveys'
  started

%hr.heavy

.embedded

  %h1
    Embedded certificates

  %p
    %strong= pluralize EmbedStat.unique_datasets, 'certificates'
    embedded on
    %strong= pluralize EmbedStat.all.count, 'webpages'
    and
    %strong= pluralize EmbedStat.unique_domains, 'domains'

  %p
    =link_to "Download list of embedded certificates", embed_stats_path(format: "csv")

  %hr.heavy

%h1 Published datasets with certificates

= render partial: "home/stats", locals: {type: "published"}

%h1 Published and draft datasets with certificates

= render partial: "home/stats", locals: {type: "all"}

%p.data
  = link_to("Download legacy data", "legacy_stats.csv")

Add stats to status page
Add stats to status page
