5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 18:56:21 +00:00

mostrar espacio utilizado

This commit is contained in:
f 2022-04-06 20:42:40 -03:00
parent c47b4f179c
commit 9286670424
5 changed files with 7 additions and 1 deletions

View file

@ -31,6 +31,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
}
}
@ -69,6 +70,7 @@ class DeployJob < ApplicationJob
@deployed[d.type.underscore.to_sym] = {
status: d.deploy,
seconds: d.build_stats.last.seconds,
size: d.build_stats.last.size,
url: d.url
}
end

View file

@ -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]

View file

@ -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')

View file

@ -77,6 +77,7 @@ en:
type: Type
status: Status
seconds: Duration
size: Space used
url: Address
deploy_local:
title: Build the site

View file

@ -77,6 +77,7 @@ es:
type: Tipo
status: Estado
seconds: Duración
size: Espacio ocupado
url: Dirección
deploy_local:
title: Generar el sitio