mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 16:36:21 +00:00
Merge branch 'informative-deploys' into panel.sutty.nl
This commit is contained in:
commit
a2476ae86a
5 changed files with 7 additions and 1 deletions
|
@ -33,6 +33,7 @@ class DeployJob < ApplicationJob
|
|||
deploy_local: {
|
||||
status: deploy_locally,
|
||||
seconds: deploy_local.build_stats.last.seconds,
|
||||
size: deploy_local.build_stats.last.size,
|
||||
url: deploy_local.url
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +72,7 @@ class DeployJob < ApplicationJob
|
|||
@deployed[d.type.underscore.to_sym] = {
|
||||
status: d.deploy(output: @output),
|
||||
seconds: d.build_stats.last.seconds,
|
||||
size: d.build_stats.last.size,
|
||||
url: d.url
|
||||
}
|
||||
end
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
%th= t('.th.status')
|
||||
%th= t('.th.url')
|
||||
%th= t('.th.seconds')
|
||||
%th= t('.th.size')
|
||||
%tbody
|
||||
- @deploys.each_pair do |deploy, value|
|
||||
%tr
|
||||
|
@ -18,5 +19,6 @@
|
|||
%td= link_to value[:url], value[:url]
|
||||
%td
|
||||
%time{ datetime: "PT#{value[:seconds]}S" }= distance_of_time_in_words value[:seconds].seconds
|
||||
%td= number_to_human_size value[:size], precision: 2
|
||||
|
||||
= sanitize_markdown t('.help'), tags: %w[p a strong em]
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
- table << [t('.th.type'), t('.th.status'), t('.th.url'), t('.th.seconds')]
|
||||
- table.add_separator
|
||||
- @deploys.each_pair do |deploy, value|
|
||||
- table << [ t(".#{deploy}.title"), value[:status] ? t(".#{deploy}.success") : t(".#{deploy}.error"), value[:url], distance_of_time_in_words(value[:seconds].seconds) ]
|
||||
- table << [t(".#{deploy}.title"), value[:status] ? t(".#{deploy}.success") : t(".#{deploy}.error"), value[:url], distance_of_time_in_words(value[:seconds].seconds), number_to_human_size(value[:size], precision: 2)]
|
||||
\
|
||||
= t('.help')
|
||||
|
|
|
@ -79,6 +79,7 @@ en:
|
|||
type: Type
|
||||
status: Status
|
||||
seconds: Duration
|
||||
size: Space used
|
||||
url: Address
|
||||
deploy_local:
|
||||
title: Build the site
|
||||
|
|
|
@ -79,6 +79,7 @@ es:
|
|||
type: Tipo
|
||||
status: Estado
|
||||
seconds: Duración
|
||||
size: Espacio ocupado
|
||||
url: Dirección
|
||||
deploy_local:
|
||||
title: Generar el sitio
|
||||
|
|
Loading…
Reference in a new issue