commit
bc0756ca64
7 changed files with 25 additions and 19 deletions
26
Gemfile.lock
26
Gemfile.lock
|
@ -76,7 +76,7 @@ GEM
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.2)
|
addressable (2.5.2)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
administrate (0.10.0)
|
administrate (0.11.0)
|
||||||
actionpack (>= 4.2, < 6.0)
|
actionpack (>= 4.2, < 6.0)
|
||||||
actionview (>= 4.2, < 6.0)
|
actionview (>= 4.2, < 6.0)
|
||||||
activerecord (>= 4.2, < 6.0)
|
activerecord (>= 4.2, < 6.0)
|
||||||
|
@ -92,7 +92,7 @@ GEM
|
||||||
arel (9.0.0)
|
arel (9.0.0)
|
||||||
ast (2.4.0)
|
ast (2.4.0)
|
||||||
attr_required (1.0.1)
|
attr_required (1.0.1)
|
||||||
autoprefixer-rails (8.3.0)
|
autoprefixer-rails (9.2.0)
|
||||||
execjs
|
execjs
|
||||||
axlsx (3.0.0.pre)
|
axlsx (3.0.0.pre)
|
||||||
htmlentities (~> 4.3, >= 4.3.4)
|
htmlentities (~> 4.3, >= 4.3.4)
|
||||||
|
@ -372,7 +372,7 @@ GEM
|
||||||
formatador (0.2.5)
|
formatador (0.2.5)
|
||||||
globalid (0.4.1)
|
globalid (0.4.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
groupdate (4.0.1)
|
groupdate (4.0.2)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
guard (2.14.2)
|
guard (2.14.2)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
|
@ -422,7 +422,7 @@ GEM
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
i18n (1.1.0)
|
i18n (1.1.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
inflecto (0.0.2)
|
inflecto (0.0.2)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
|
@ -498,7 +498,7 @@ GEM
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nio4r (2.3.1)
|
nio4r (2.3.1)
|
||||||
nokogiri (1.8.4)
|
nokogiri (1.8.5)
|
||||||
mini_portile2 (~> 2.3.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
notiffany (0.1.1)
|
notiffany (0.1.1)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
|
@ -571,7 +571,7 @@ GEM
|
||||||
rack
|
rack
|
||||||
rack-protection (2.0.3)
|
rack-protection (2.0.3)
|
||||||
rack
|
rack
|
||||||
rack-proxy (0.6.4)
|
rack-proxy (0.6.5)
|
||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
|
@ -663,7 +663,7 @@ GEM
|
||||||
rspec-support (3.8.0)
|
rspec-support (3.8.0)
|
||||||
rspec_junit_formatter (0.4.1)
|
rspec_junit_formatter (0.4.1)
|
||||||
rspec-core (>= 2, < 4, != 2.12.0)
|
rspec-core (>= 2, < 4, != 2.12.0)
|
||||||
rubocop (0.59.0)
|
rubocop (0.59.2)
|
||||||
jaro_winkler (~> 1.5.1)
|
jaro_winkler (~> 1.5.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.5, != 2.5.1.1)
|
parser (>= 2.5, != 2.5.1.1)
|
||||||
|
@ -680,7 +680,7 @@ GEM
|
||||||
rubyzip (1.2.2)
|
rubyzip (1.2.2)
|
||||||
safe_yaml (1.0.4)
|
safe_yaml (1.0.4)
|
||||||
sanitize-url (0.1.4)
|
sanitize-url (0.1.4)
|
||||||
sass (3.5.6)
|
sass (3.6.0)
|
||||||
sass-listen (~> 4.0.0)
|
sass-listen (~> 4.0.0)
|
||||||
sass-listen (4.0.0)
|
sass-listen (4.0.0)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
@ -694,12 +694,12 @@ GEM
|
||||||
scenic (1.4.1)
|
scenic (1.4.1)
|
||||||
activerecord (>= 4.0.0)
|
activerecord (>= 4.0.0)
|
||||||
railties (>= 4.0.0)
|
railties (>= 4.0.0)
|
||||||
scss_lint (0.57.0)
|
scss_lint (0.57.1)
|
||||||
rake (>= 0.9, < 13)
|
rake (>= 0.9, < 13)
|
||||||
sass (~> 3.5.5)
|
sass (~> 3.5, >= 3.5.5)
|
||||||
select2-rails (4.0.3)
|
select2-rails (4.0.3)
|
||||||
thor (~> 0.14)
|
thor (~> 0.14)
|
||||||
selectize-rails (0.12.4.1)
|
selectize-rails (0.12.5)
|
||||||
selenium-webdriver (3.8.0)
|
selenium-webdriver (3.8.0)
|
||||||
childprocess (~> 0.5)
|
childprocess (~> 0.5)
|
||||||
rubyzip (~> 1.0)
|
rubyzip (~> 1.0)
|
||||||
|
@ -726,7 +726,7 @@ GEM
|
||||||
jquery-rails
|
jquery-rails
|
||||||
kaminari (>= 0.17)
|
kaminari (>= 0.17)
|
||||||
rails (>= 3.2)
|
rails (>= 3.2)
|
||||||
spreadsheet_architect (3.1.0)
|
spreadsheet_architect (3.2.0)
|
||||||
axlsx (>= 2, < 4)
|
axlsx (>= 2, < 4)
|
||||||
axlsx_styler (>= 0.1.7, < 2)
|
axlsx_styler (>= 0.1.7, < 2)
|
||||||
rodf (>= 1.0.0, < 2)
|
rodf (>= 1.0.0, < 2)
|
||||||
|
@ -786,7 +786,7 @@ GEM
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff
|
hashdiff
|
||||||
webpacker (4.0.0.pre.pre.2)
|
webpacker (4.0.0.pre.3)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
rack-proxy (>= 0.6.1)
|
rack-proxy (>= 0.6.1)
|
||||||
railties (>= 4.2)
|
railties (>= 4.2)
|
||||||
|
|
|
@ -298,13 +298,19 @@ class StatsController < ApplicationController
|
||||||
|
|
||||||
# Compute the mean time for this procedure
|
# Compute the mean time for this procedure
|
||||||
procedure_processing_times = dossiers_grouped_by_procedure.map do |procedure_id, procedure_dossiers|
|
procedure_processing_times = dossiers_grouped_by_procedure.map do |procedure_id, procedure_dossiers|
|
||||||
|
procedure_fields_count = procedure_id_type_de_champs_count[procedure_id]
|
||||||
|
|
||||||
|
if (procedure_fields_count == 0 || procedure_fields_count.nil?)
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
procedure_dossiers_processing_time = procedure_dossiers.map { |_, processing_time, _| processing_time }
|
procedure_dossiers_processing_time = procedure_dossiers.map { |_, processing_time, _| processing_time }
|
||||||
procedure_mean = mean(procedure_dossiers_processing_time)
|
procedure_mean = mean(procedure_dossiers_processing_time)
|
||||||
|
|
||||||
# We normalize the data for 24 fields
|
# We normalize the data for 24 fields
|
||||||
procedure_fields_count = procedure_id_type_de_champs_count[procedure_id]
|
|
||||||
procedure_mean * (MEAN_NUMBER_OF_CHAMPS_IN_A_FORM / procedure_fields_count)
|
procedure_mean * (MEAN_NUMBER_OF_CHAMPS_IN_A_FORM / procedure_fields_count)
|
||||||
end
|
end
|
||||||
|
.compact
|
||||||
|
|
||||||
# Compute the average mean time for all the procedures of this month
|
# Compute the average mean time for all the procedures of this month
|
||||||
month_average = mean(procedure_processing_times)
|
month_average = mean(procedure_processing_times)
|
||||||
|
|
|
@ -51,7 +51,7 @@ as well as a link to its edit page.
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
||||||
><%= render_field attribute %></dd>
|
><%= render_field attribute, page: page %></dd>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -45,7 +45,7 @@ as well as a link to its edit page.
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
||||||
><%= render_field attribute %></dd>
|
><%= render_field attribute, page: page %></dd>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -48,7 +48,7 @@ as well as a link to its edit page.
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
||||||
><%= render_field attribute %></dd>
|
><%= render_field attribute, page: page %></dd>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -55,7 +55,7 @@ as well as a link to its edit page.
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
||||||
><%= render_field attribute %></dd>
|
><%= render_field attribute, page: page %></dd>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -51,7 +51,7 @@ as well as a link to its edit page.
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
|
||||||
><%= render_field attribute %></dd>
|
><%= render_field attribute, page: page %></dd>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Reference in a new issue