diff --git a/app/views/manage/_statistics_list.html.haml b/app/views/manage/_statistics_list.html.haml index d28ab52ad..38b918792 100644 --- a/app/views/manage/_statistics_list.html.haml +++ b/app/views/manage/_statistics_list.html.haml @@ -28,3 +28,4 @@ .text= t('.recordings.all', value: @data[:recordings][:all]) .text= t('.recordings.total', value: distance_of_time_in_words_to_now(Time.now + @data[:recordings][:total], include_seconds: false)) .text= t('.recordings.average', value: distance_of_time_in_words_to_now(Time.now + @data[:recordings][:average], include_seconds: false)) + .text= t('.recordings.size', value: human_file_size(@data[:recordings][:size])) diff --git a/config/locales/en/mconf.yml b/config/locales/en/mconf.yml index d11af2da9..19cb3c5e9 100755 --- a/config/locales/en/mconf.yml +++ b/config/locales/en/mconf.yml @@ -1075,6 +1075,7 @@ en: all: "All recordings: %{value}" total: "Total recordings duration: %{value}" average: "Average recordings duration: %{value}" + size: "Total size: %{value}" user_item: allow_record: "Give the user permission to record conferences" auth_using: "using" diff --git a/config/locales/pt-br/mconf.yml b/config/locales/pt-br/mconf.yml index 662a0fe97..7b3aa673e 100644 --- a/config/locales/pt-br/mconf.yml +++ b/config/locales/pt-br/mconf.yml @@ -1073,6 +1073,7 @@ pt-br: all: "Total de gravações: %{value}" total: "Duração de todas as gravações: %{value}" average: "Média de duração por gravação: %{value}" + size: "Tamanho total de todas as gravações: %{value}" user_item: allow_record: "Conceder permissão de gravação" auth_using: "usando" diff --git a/lib/mconf/statistics_module.rb b/lib/mconf/statistics_module.rb index 39576081f..9b34d6a44 100644 --- a/lib/mconf/statistics_module.rb +++ b/lib/mconf/statistics_module.rb @@ -81,16 +81,19 @@ def self.total_recordings(from, to) duration = 0 average = 0 count = 0 + size = 0 recordings.find_each do |r| # total duration duration = r.end_time - r.start_time total = total + duration + size = size + r.size count = count + 1 end # duration average result[:all] = count + result[:size] = size if count == 0 result[:average] = 0 else