diff --git a/assets/scripts/reports.coffee b/assets/scripts/reports.coffee index 9b2a2c4..f1a285e 100644 --- a/assets/scripts/reports.coffee +++ b/assets/scripts/reports.coffee @@ -7,7 +7,8 @@ $(document).ready -> data: type: $('#report_type').val() choice: $('#report_choice').val() - compare: $('#report_compare').val()).done (data) -> + compare: $('#report_compare').val() + ).done (data) -> benchChart.options.title.text = data.choice benchChart.data.labels = data.names benchChart.data.datasets[0].data = data.avg_results diff --git a/assets/styles/rimmington.sass b/assets/styles/rimmington.sass index d220dfa..650a535 100644 --- a/assets/styles/rimmington.sass +++ b/assets/styles/rimmington.sass @@ -3,8 +3,3 @@ h1.invalid color: red - -.button - position: relative - top: -25% - margin-top: 50% diff --git a/src/routes/index.rb b/src/routes/index.rb index a5cadf5..37a2f45 100644 --- a/src/routes/index.rb +++ b/src/routes/index.rb @@ -4,11 +4,11 @@ class GameData < Sinatra::Base get '/' do - results = Result.reverse(:updated_at).limit(10).all() + tests = Test.reverse(:updated_at).limit(10).all() erb :'index/index', locals: { title: 'Dashboard', - results: results + tests: tests } end diff --git a/src/routes/reports.rb b/src/routes/reports.rb index 07a8087..66a68f2 100644 --- a/src/routes/reports.rb +++ b/src/routes/reports.rb @@ -5,11 +5,11 @@ class GameData < Sinatra::Base get '/reports' do benchmarks = Benchmark.order(:name).all() - hardware = Hardware.order(:name).all() + tests = Test.order(:name).all() erb :'reports/index', locals: { title: 'Generate Reports', - hardware: hardware, + tests: tests, benchmarks: benchmarks } end @@ -26,10 +26,10 @@ class GameData < Sinatra::Base min_results = [] report_compare.each do |c| - hrd = Hardware.where(id: c).first() - names.push(hrd.name) + tst = Test.where(id: c).first() + names.push(tst.name) - res = Result.where(benchmark_id: report_choice, hardware_id: c).first() + res = Result.where(benchmark_id: report_choice, test_id: c).first() avg_results.push(res.avg_score) min_results.push(res.min_score) end diff --git a/views/index/index.erb b/views/index/index.erb index 3490a5d..e99f42e 100644 --- a/views/index/index.erb +++ b/views/index/index.erb @@ -1,5 +1,5 @@
Hardware tested | -Benchmark used | -Score | +Test name | +# Benchmarks | +Last Updated |
---|---|---|---|---|---|
<%= r.hardware.name %> | -<%= r.benchmark.name %> | -<%= r.formatted_score() %> | +<%= t.name %> | +<%= t.benchmark.length %> | +<%= t.updated_at %> |