Skip to content

Commit

Permalink
Merge pull request #1009 from uwent/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
bzbradford committed May 23, 2024
2 parents 8109060 + 7760127 commit 500ca3b
Show file tree
Hide file tree
Showing 45 changed files with 947 additions and 1,088 deletions.
162 changes: 82 additions & 80 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
actioncable (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionmailbox (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.2)
actionpack (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionmailer (7.1.3.3)
actionpack (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3.2)
actionview (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionpack (7.1.3.3)
actionview (= 7.1.3.3)
activesupport (= 7.1.3.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.2)
actionpack (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
actiontext (7.1.3.3)
actionpack (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.2)
activesupport (= 7.1.3.2)
actionview (7.1.3.3)
activesupport (= 7.1.3.3)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.2)
activesupport (= 7.1.3.2)
activejob (7.1.3.3)
activesupport (= 7.1.3.3)
globalid (>= 0.3.6)
activemodel (7.1.3.2)
activesupport (= 7.1.3.2)
activerecord (7.1.3.2)
activemodel (= 7.1.3.2)
activesupport (= 7.1.3.2)
activemodel (7.1.3.3)
activesupport (= 7.1.3.3)
activerecord (7.1.3.3)
activemodel (= 7.1.3.3)
activesupport (= 7.1.3.3)
timeout (>= 0.4.0)
activestorage (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activesupport (= 7.1.3.2)
activestorage (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activesupport (= 7.1.3.3)
marcel (~> 1.0)
activesupport (7.1.3.2)
activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -81,7 +81,7 @@ GEM
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.7)
bigdecimal (3.1.8)
bindex (0.8.1)
brakeman (6.1.2)
racc
Expand Down Expand Up @@ -114,9 +114,9 @@ GEM
date (3.3.4)
diff-lcs (1.5.1)
docile (1.4.0)
dotenv (3.1.1)
dotenv-rails (3.1.1)
dotenv (= 3.1.1)
dotenv (3.1.2)
dotenv-rails (3.1.2)
dotenv (= 3.1.2)
railties (>= 6.1)
drb (2.2.1)
dry-cli (1.0.0)
Expand Down Expand Up @@ -146,10 +146,10 @@ GEM
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.4)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.13.0)
irb (1.13.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jsbundling-rails (1.3.0)
Expand All @@ -172,12 +172,12 @@ GEM
marcel (1.0.4)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.22.3)
minitest (5.23.1)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mutex_m (0.2.0)
nenv (0.3.0)
net-imap (0.4.10)
net-imap (0.4.11)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -191,8 +191,8 @@ GEM
net-smtp (0.5.0)
net-protocol
net-ssh (7.2.3)
nio4r (2.7.1)
nokogiri (1.16.4-x86_64-linux)
nio4r (2.7.3)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
Expand All @@ -212,8 +212,8 @@ GEM
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.10)
racc (1.8.0)
rack (3.0.11)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
Expand All @@ -223,30 +223,30 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
actionmailer (= 7.1.3.2)
actionpack (= 7.1.3.2)
actiontext (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activemodel (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
rails (7.1.3.3)
actioncable (= 7.1.3.3)
actionmailbox (= 7.1.3.3)
actionmailer (= 7.1.3.3)
actionpack (= 7.1.3.3)
actiontext (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activemodel (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
bundler (>= 1.15.0)
railties (= 7.1.3.2)
railties (= 7.1.3.3)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
railties (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -255,14 +255,15 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.6.3.1)
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.0)
reline (0.5.5)
regexp_parser (2.9.2)
reline (0.5.7)
io-console (~> 0.5)
rexml (3.2.6)
rexml (3.2.8)
strscan (>= 3.0.9)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -272,7 +273,7 @@ GEM
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.2)
Expand All @@ -284,7 +285,7 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.62.1)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -297,9 +298,9 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-performance (1.20.2)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
sassc (2.4.0)
ffi (~> 1.9)
Expand Down Expand Up @@ -334,19 +335,20 @@ GEM
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
standard (1.35.1)
standard (1.36.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.62.0)
rubocop (~> 1.63.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
rubocop-performance (~> 1.21.0)
stringio (3.1.0)
strscan (3.1.0)
terser (1.2.2)
execjs (>= 0.3.0, < 3)
thor (1.3.1)
Expand Down Expand Up @@ -375,7 +377,7 @@ GEM
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.13)
zeitwerk (2.6.14)

PLATFORMS
x86_64-linux
Expand Down
10 changes: 5 additions & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def long_range

def in_f
str = params[:in_f].to_s
return true if str == 'true'
return false if str == 'false'
return true
return true if str == "true"
return false if str == "false"
true
end

def units
Expand All @@ -37,12 +37,12 @@ def units

def t_min
val = params[:t_min]
val = val.to_f if val.present?
val.to_f if val.present?
end

def t_max
val = params[:t_max]
val = val.to_f if val.present?
val.to_f if val.present?
end

def c_to_f(temp)
Expand Down
9 changes: 2 additions & 7 deletions app/controllers/point_details_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ def index
units:
}.compact

puts params
puts in_f
puts units
puts t_min
puts t_max

@data = get_data_for(@panel)
@selected_data = @data.select { |h| h[:date] >= @start_date }

Expand Down Expand Up @@ -65,7 +59,8 @@ def get_insect_data
# get severity for each date
@severity_col = true
data.collect do |day|
severity = @pest.total_to_severity(day[:cumulative_value], date: day[:date])
dd = day[:cumulative_value] * (@in_f ? 1 : 1.8)
severity = @pest.total_to_severity(dd, date: day[:date])
if severity
next unless (legend = @pest.severity_legend[severity])
day[:severity] = legend[:name]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/severities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def index
end_date: @end_date,
lat_range: @lat_range,
long_range: @long_range,
units: @units,
units: @units
}.compact

grid = get_data_for(@pest.class.name)
Expand Down
5 changes: 4 additions & 1 deletion app/javascript/src/components/leftSidebar/DatePicker.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<style lang="scss">
@import '../../scss/settings.scss';
label {
padding: 0;
}
.select-wrapper {
display: flex;
}
.label-text {
color: #484848;
font-size: 0.75em;
padding: 0 5px;
}
.datepicker-tooltip {
Expand Down
Loading

0 comments on commit 500ca3b

Please sign in to comment.