Started work to move the CSS framework to Bootstrap 5
This commit is contained in:
@ -5,42 +5,9 @@ $primary-color: cornflowerblue
|
|||||||
$primary-color-highlight: color.adjust($primary-color, $lightness: -10%)
|
$primary-color-highlight: color.adjust($primary-color, $lightness: -10%)
|
||||||
|
|
||||||
body
|
body
|
||||||
background: #eee
|
background: rgb(240, 235, 248)
|
||||||
|
|
||||||
a
|
|
||||||
color: $primary-color
|
|
||||||
transition: color 225ms ease-in-out
|
|
||||||
&:hover
|
|
||||||
color: $primary-color-highlight
|
|
||||||
|
|
||||||
input[type=submit],
|
|
||||||
button
|
|
||||||
background: $primary-color
|
|
||||||
color: #eee
|
|
||||||
border-radius: 8px
|
|
||||||
transition: all 225ms ease-in-out
|
|
||||||
&:hover
|
|
||||||
background: $primary-color-highlight
|
|
||||||
color: white
|
|
||||||
|
|
||||||
#wrapper
|
#wrapper
|
||||||
background: white
|
background: white
|
||||||
padding: 1rem 2rem
|
padding: 1.5rem 2rem
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
|
|
||||||
#main-nav
|
|
||||||
margin-bottom: 15px
|
|
||||||
background: $primary-color
|
|
||||||
border-bottom: 1px solid #eee
|
|
||||||
|
|
||||||
ul
|
|
||||||
background: none
|
|
||||||
|
|
||||||
a
|
|
||||||
color: #eee
|
|
||||||
font-weight: bold
|
|
||||||
&:hover
|
|
||||||
color: white
|
|
||||||
|
|
||||||
h1.invalid
|
|
||||||
color: red
|
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
# Helpers - view helper functions
|
# Helpers - view helper functions
|
||||||
module Helpers
|
module Helpers
|
||||||
|
|
||||||
|
def ruby_version()
|
||||||
|
return RUBY_VERSION
|
||||||
|
end
|
||||||
|
|
||||||
|
def app_version()
|
||||||
|
return `git describe --tags`
|
||||||
|
end
|
||||||
|
|
||||||
def date_format(date)
|
def date_format(date)
|
||||||
dt = date.to_datetime
|
dt = date.to_datetime
|
||||||
return dt.strftime('%B %d, %Y @ %I:%M:%S %p %Z')
|
return dt.strftime('%B %d, %Y @ %I:%M:%S %p %Z')
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
require_relative 'index'
|
require_relative 'index'
|
||||||
require_relative 'hardware'
|
require_relative 'hardware'
|
||||||
require_relative 'benchmark'
|
require_relative 'benchmark'
|
||||||
require_relative 'result'
|
|
||||||
require_relative 'reports'
|
require_relative 'reports'
|
||||||
|
require_relative 'result'
|
||||||
require_relative 'test'
|
require_relative 'test'
|
||||||
|
|
||||||
require_relative 'api1'
|
require_relative 'api1'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# /reports routes
|
# /reports routes
|
||||||
class GameData < Sinatra::Base
|
class GameData < Sinatra::Base
|
||||||
|
|
||||||
get '/reports' do
|
get '/report' do
|
||||||
benchmarks = Benchmark.order(:name).all()
|
benchmarks = Benchmark.order(:name).all()
|
||||||
tests = Test.order(:name).all()
|
tests = Test.order(:name).all()
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class GameData < Sinatra::Base
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/reports' do
|
post '/report' do
|
||||||
report_type = params[:type]
|
report_type = params[:type]
|
||||||
report_choice = params[:choice]
|
report_choice = params[:choice]
|
||||||
report_compare = params[:compare]
|
report_compare = params[:compare]
|
||||||
|
@ -3,25 +3,6 @@
|
|||||||
# /result routes
|
# /result routes
|
||||||
class GameData < Sinatra::Base
|
class GameData < Sinatra::Base
|
||||||
|
|
||||||
get '/result' do
|
|
||||||
results = Result.reverse(:updated_at).limit(10).all()
|
|
||||||
|
|
||||||
erb :'result/index', locals: {
|
|
||||||
title: 'List of Results',
|
|
||||||
results: results
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
get '/result/add' do
|
|
||||||
hardware = Hardware.all()
|
|
||||||
benchmarks = Benchmark.all()
|
|
||||||
|
|
||||||
erb :'result/add', locals: {
|
|
||||||
title: 'Add Result',
|
|
||||||
hardware: hardware,
|
|
||||||
benchmarks: benchmarks
|
|
||||||
}
|
|
||||||
end
|
|
||||||
post '/result/add' do
|
post '/result/add' do
|
||||||
result_minimum = params[:result_minimum] if params.key?(:result_minimum)
|
result_minimum = params[:result_minimum] if params.key?(:result_minimum)
|
||||||
result_maximum = params[:result_maximum] if params.key?(:result_maximum)
|
result_maximum = params[:result_maximum] if params.key?(:result_maximum)
|
||||||
|
@ -1,43 +1,36 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-4">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>Add new benchmark</h1>
|
<h1>Add new benchmark</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
|
|
||||||
<form class="cell small-12" action="/benchmark/add" method="post">
|
<form class="col-12" action="/benchmark/add" method="post">
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell medium-9">
|
<div class="col-9">
|
||||||
<label>
|
<label for="benchmark_name">Benchmark name</label>
|
||||||
Benchmark name
|
<input id="benchmark_name" class="form-control" type="text" name="benchmark_name" placeholder="Example benchmark">
|
||||||
<input type="text" name="benchmark_name" placeholder="Example benchmark">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-3">
|
<div class="col-3">
|
||||||
<label>
|
<label for="benchmark_scoring">Scoring type</label>
|
||||||
Scoring type
|
<select id="benchmark_scoring" class="form-select" name="benchmark_scoring">
|
||||||
<select name="benchmark_scoring">
|
|
||||||
<option value="fps">Frames per Second (fps)</option>
|
<option value="fps">Frames per Second (fps)</option>
|
||||||
<option value="ms">Frame Time (ms)</option>
|
<option value="ms">Frame Time (ms)</option>
|
||||||
<option value="pts">Total Points</option>
|
<option value="pts">Total Points</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<textarea name="benchmark_description" class="cell small-12">Enter a description/notes here.</textarea>
|
<label for="benchmark_description">Benchmark description</label>
|
||||||
|
<textarea id="benchmark_description" class="form-control" name="benchmark_description">Enter a description/notes here.</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
<input class="btn btn-primary" type="submit" value="Create Benchmark">
|
||||||
<div class="cell small-12">
|
|
||||||
<input type="submit" class="button" value="Submit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,43 +1,36 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-4">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>Editing: <%= benchmark.name %></h1>
|
<h1>Editing: <%= benchmark.name %></h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
|
|
||||||
<form class="cell small-12" action="/benchmark/<%= benchmark.id %>/edit" method="post">
|
<form class="cell small-12" action="/benchmark/<%= benchmark.id %>/edit" method="post">
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell medium-9">
|
<div class="col-9">
|
||||||
<label>
|
<label for="benchmark_name">Benchmark name</label>
|
||||||
Benchmark name
|
<input id="benchmark_name" class="form-control" type="text" name="benchmark_name" placeholder="Example benchmark" value="<%= benchmark.name %>">
|
||||||
<input type="text" name="benchmark_name" placeholder="Example benchmark" value="<%= benchmark.name %>">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-3">
|
<div class="col-3">
|
||||||
<label>
|
<label for="benchmark_scoring">Scoring type</label>
|
||||||
Scoring type
|
<select id="benchmark_scoring" class="form-select" name="benchmark_scoring">
|
||||||
<select name="benchmark_scoring">
|
|
||||||
<option value="fps" <% if benchmark.scoring == 'fps' %>selected<% end %>>Frames per Second (fps)</option>
|
<option value="fps" <% if benchmark.scoring == 'fps' %>selected<% end %>>Frames per Second (fps)</option>
|
||||||
<option value="ms" <% if benchmark.scoring == 'ms' %>selected<% end %>>Frame Time (ms)</option>
|
<option value="ms" <% if benchmark.scoring == 'ms' %>selected<% end %>>Frame Time (ms)</option>
|
||||||
<option value="pts" <% if benchmark.scoring == 'pts' %>selected<% end %>>Total Points</option>
|
<option value="pts" <% if benchmark.scoring == 'pts' %>selected<% end %>>Total Points</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<textarea name="benchmark_description" class="cell small-12"><%= benchmark.description %></textarea>
|
<label for="benchmark_description">Benchmark description</label>
|
||||||
|
<textarea id="benchmark_description" class="form-control" name="benchmark_description"><%= benchmark.description %></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
<input class="btn btn-primary" type="submit" value="Submit Changes">
|
||||||
<div class="cell small-12">
|
|
||||||
<input type="submit" class="button" value="Submit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>List of benchmarks</h1>
|
<h1>List of benchmarks</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>
|
<p>
|
||||||
<a href="/benchmark/add">Add new benchmark</a>
|
<a href="/benchmark/add">Add new benchmark</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
<% if benchmarks.length > 0 %>
|
<% if benchmarks.length > 0 %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<table>
|
<table class="table table-hover table-responsive">
|
||||||
<thead>
|
<thead class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Benchmark name</th>
|
<th>Benchmark name</th>
|
||||||
<th>Scoring type</th>
|
<th>Scoring type</th>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<% benchmarks.each do |b| %>
|
<% benchmarks.each do |b| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/benchmark/<%= b.id %>"><%= b.name %></a</td>
|
<td><a href="/benchmark/<%= b.id %>"><%= b.name %></a></td>
|
||||||
<td><%= b.scoring %></td>
|
<td><%= b.scoring %></td>
|
||||||
<td><%= b.description %></td>
|
<td><%= b.description %></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>I'm sorry, there doesn't appear to be any benchmarks added yet. Check again later!</p>
|
<p>I'm sorry, there doesn't appear to be any benchmarks added yet. Check again later!</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1><%= benchmark.name %></h1>
|
<h1><%= benchmark.name %></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p><a href="/benchmark/<%= benchmark.id %>/edit">Edit</a></p>
|
<p><a href="/benchmark/<%= benchmark.id %>/edit">Edit</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
Benchmark scoring type: <%= benchmark.scoring %>
|
Benchmark scoring type: <%= benchmark.scoring %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
Description:
|
Description:
|
||||||
<p><%= benchmark.description %></p>
|
<p><%= benchmark.description %></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,32 +1,28 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>Add new hardware</h1>
|
<h1>Add new hardware</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
|
|
||||||
<form class="cell small-12" action="/hardware/add" method="post">
|
<form class="col-12" action="/hardware/add" method="post">
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell medium-9">
|
<div class="col-12 col-md-9">
|
||||||
<label>
|
<label for="hardware_name">Hardware name</label>
|
||||||
Hardware name
|
<input id="hardware_name" class="form-control" type="text" name="hardware_name" placeholder="Example hardware">
|
||||||
<input type="text" name="hardware_name" placeholder="Example hardware">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-3">
|
<div class="col-12 col-md-3">
|
||||||
<label>
|
<label for="hardware_type">Type</label>
|
||||||
Type
|
<select id="hardware_type" class="form-select" name="hardware_type">
|
||||||
<select name="hardware_type">
|
|
||||||
<option value="gpu">Graphics card</option>
|
<option value="gpu">Graphics card</option>
|
||||||
<option value="cpu">Processor</option>
|
<option value="cpu">Processor</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="Submit">
|
<input class="btn btn-primary" type="submit" value="Create Hardware">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,32 +1,28 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>Editing: <%= hardware.name %></h1>
|
<h1>Add new hardware</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
|
|
||||||
<form class="cell small-12" action="/hardware/<%= hardware.id %>/edit" method="post">
|
<form class="col-12" action="/hardware/<%= hardware.id %>/edit" method="post">
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell medium-9">
|
<div class="col-12 col-md-9">
|
||||||
<label>
|
<label for="hardware_name">Hardware name</label>
|
||||||
Hardware name
|
<input id="hardware_name" class="form-control" type="text" name="hardware_name" placeholder="Example hardware" value="<%= hardware.name %>">
|
||||||
<input type="text" name="hardware_name" placeholder="Example hardware" value="<%= hardware.name %>">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-3">
|
<div class="col-12 col-md-3">
|
||||||
<label>
|
<label for="hardware_type">Type</label>
|
||||||
Type
|
<select id="hardware_type" class="form-select" name="hardware_type">
|
||||||
<select name="hardware_type">
|
|
||||||
<option value="gpu" <% if hardware.type == 'gpu' %>selected<% end %>>Graphics card</option>
|
<option value="gpu" <% if hardware.type == 'gpu' %>selected<% end %>>Graphics card</option>
|
||||||
<option value="cpu" <% if hardware.type == 'cpu' %>selected<% end %>>Processor</option>
|
<option value="cpu" <% if hardware.type == 'cpu' %>selected<% end %>>Processor</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="Submit">
|
<input class="btn btn-primary" type="submit" value="Create Hardware">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>List of hardware</h1>
|
<h1>List of hardware</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>
|
<p>
|
||||||
<a href="/hardware/add">Add new hardware</a>
|
<a href="/hardware/add">Add new hardware</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<% if hardware.length > 0 %>
|
<% if hardware.length > 0 %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<table>
|
<table class="table table-hover table-responsive">
|
||||||
<thead>
|
<thead class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Hardware name</th>
|
<th>Hardware name</th>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>I'm sorry, there doesn't appear to be any hardware added yet. Check again later!</p>
|
<p>I'm sorry, there doesn't appear to be any hardware added yet. Check again later!</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1><%= hardware.name %></h1>
|
<h1><%= hardware.name %></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p><a href="/hardware/<%= hardware.id %>/edit">Edit</a></p>
|
<p><a href="/hardware/<%= hardware.id %>/edit">Edit</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
Hardware type: <%= hardware.type %>
|
Hardware type: <%= hardware.type %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
<% if tests.length > 0 %>
|
<% if tests.length > 0 %>
|
||||||
<div class="cell small-12">
|
<div class="twelve columns">
|
||||||
<h2>Latest benchmark results:</h2>
|
<h2>Latest benchmark results:</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="cell small-12">
|
|
||||||
|
<div class="twelve columns">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -24,7 +25,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="cell small-12">
|
<div class="twelve columns">
|
||||||
<p>I'm sorry, there don't appear to be any benchmark results logged yet. Check again later!</p>
|
<p>I'm sorry, there don't appear to be any benchmark results logged yet. Check again later!</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><%= title %> | Game Data</title>
|
<title><%= title %> | Game Data</title>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.7.5/css/foundation.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.7/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="/css/rimmington.css">
|
<link rel="stylesheet" href="/css/rimmington.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" charset="utf-8"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" charset="utf-8"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.7.5/js/foundation.min.js" charset="utf-8"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.7/js/bootstrap.min.js" charset="utf-8"></script>
|
||||||
<script src="/js/edgeville.js" charset="utf-8"></script>
|
<script src="/js/edgeville.js" charset="utf-8"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js" charset="utf-8"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js" charset="utf-8"></script>
|
||||||
</head>
|
</head>
|
||||||
@ -17,8 +17,11 @@
|
|||||||
<%= erb :'partials/navbar', :locals => locals %>
|
<%= erb :'partials/navbar', :locals => locals %>
|
||||||
|
|
||||||
<!-- main content -->
|
<!-- main content -->
|
||||||
<div id="wrapper" class="grid-container">
|
<div id="wrapper" class="container mb-4">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- site footer -->
|
||||||
|
<%= erb :'partials/footer', :locals => locals %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
8
views/partials/footer.erb
Normal file
8
views/partials/footer.erb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<nav id="main-footer" class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<p>Game Data version v<%= app_version() %></p>
|
||||||
|
<p>Running Ruby version v<%= ruby_version() %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
@ -1,11 +1,29 @@
|
|||||||
<div id="main-nav" class="top-bar">
|
<div id="main-nav" class="navbar navbar-expand-md bg-body-secondary mb-3">
|
||||||
<div class="top-bar-left">
|
<div class="container-fluid">
|
||||||
<ul class="menu">
|
<a class="navbar-brand mb-0 h1" href="#">Game Data</a>
|
||||||
<li><a href="/">Dashboard</a></li>
|
|
||||||
<li><a href="/hardware">Hardware</a></li>
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<li><a href="/benchmark">Benchmarks</a></li>
|
<span class="navbar-toggler-icon"></span>
|
||||||
<li><a href="/test">Tests</a></li>
|
</button>
|
||||||
<li><a href="/reports">Reports</a></li>
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
|
<ul class="navbar-nav me-auto mb-2 mb-md-0">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/">Dashboard</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/benchmark">Benchmarks</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/hardware">Hardware</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/test">Test</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/report">Reports</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
<div class="row">
|
||||||
|
<form class="col-12" action="/reports" method="post">
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="grid-x grid-margin-x">
|
||||||
<form class="cell small-12" action="/reports" method="post">
|
<select class="col-12 col-md-6 form-select" id="report_type" name="report_type" disabled>
|
||||||
<div class="grid-x grid-margin-x">
|
|
||||||
<select class="cell medium-6" id="report_type" name="report_type" disabled>
|
|
||||||
<option value="benchmark">Benchmark</option>
|
<option value="benchmark">Benchmark</option>
|
||||||
<option value="test">Test</option>
|
<option value="test">Test</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select class="cell medium-6" id="report_choice" name="report_choice">
|
<select class="col-12 col-md-6 form-select" id="report_choice" name="report_choice">
|
||||||
<% benchmarks.each do |b| %>
|
<% benchmarks.each do |b| %>
|
||||||
<option value="<%= b.id %>"><%= b.name %></option>
|
<option value="<%= b.id %>"><%= b.name %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -14,14 +14,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="grid-x grid-margin-x">
|
||||||
<select class="cell small-12" id="report_compare" name="report_compare[]" multiple>
|
<select class="col-12 form-select" id="report_compare" name="report_compare[]" multiple>
|
||||||
<% tests.each do |t| %>
|
<% tests.each do |t| %>
|
||||||
<option value="<%= t.id %>"><%= t.name %></option>
|
<option value="<%= t.id %>"><%= t.name %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" id="generate_button" value="Generate">
|
<input type="submit" class="btn btn-primary" id="generate_button" value="Generate">
|
||||||
<a href="#" class="button" id="download_button" disabled>Download</a>
|
<a href="#" class="button" id="download_button" disabled>Download</a>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="grid-x grid-margin-x">
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
|
||||||
<div class="cell small-12">
|
|
||||||
<h1>Add new result</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
|
||||||
|
|
||||||
<form class="cell small-12" action="/result/add" method="post">
|
|
||||||
<div class="grid-x grid-padding-x">
|
|
||||||
<div class="cell medium-6">
|
|
||||||
<label>
|
|
||||||
Hardware:
|
|
||||||
<select name="result_hardware">
|
|
||||||
<% hardware.each do |h| %>
|
|
||||||
<option value="<%= h.id %>"><%= h.name %></option>
|
|
||||||
<% end %>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cell medium-6">
|
|
||||||
<label>
|
|
||||||
Benchmark:
|
|
||||||
<select name="result_benchmark">
|
|
||||||
<% benchmarks.each do |b| %>
|
|
||||||
<option value="<%= b.id %>"><%= b.name %></option>
|
|
||||||
<% end %>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid-x grid-padding-x">
|
|
||||||
<div class="cell medium-4">
|
|
||||||
<label>
|
|
||||||
Average score:
|
|
||||||
<input type="number" name="result_average" value="0.0" step="0.01" required>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cell medium-4">
|
|
||||||
<label>
|
|
||||||
Minimum score:
|
|
||||||
<input type="number" name="result_minimum" value="0.0" step="0.01">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cell medium-4">
|
|
||||||
<label>
|
|
||||||
Maximum score:
|
|
||||||
<input type="number" name="result_maximum" value="0.0" step="0.01">
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="submit" class="button" value="Submit">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,44 +0,0 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
|
||||||
<div class="cell small-12">
|
|
||||||
<h1>List of results</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cell small-12">
|
|
||||||
<p>
|
|
||||||
<a href="/result/add">Add new result</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
|
||||||
<% if results.length > 0 %>
|
|
||||||
<div class="cell small-12">
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Hardware</th>
|
|
||||||
<th>Benchmark</th>
|
|
||||||
<th>Score (type)</th>
|
|
||||||
<th>Date added</th>
|
|
||||||
<th>Date modified</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<% results.each do |r| %>
|
|
||||||
<tr>
|
|
||||||
<td><%= r.hardware.name %></td>
|
|
||||||
<td><%= r.benchmark.name %></td>
|
|
||||||
<td><%= r.score %> (<%= r.benchmark.scoring %>)</td>
|
|
||||||
<td><%= date_format(r.created_at) %></td>
|
|
||||||
<td><%= date_format(r.updated_at) %></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<div class="cell small-12">
|
|
||||||
<p>I'm sorry, there don't appear to be any results added yet. Check again later!</p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
@ -1,50 +1,46 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>Add new test</h1>
|
<h1>Add new test</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row">
|
||||||
|
|
||||||
<form class="cell small-12" action="/test/add" method="post">
|
<form class="col-12" action="/test/add" method="post">
|
||||||
<div class="grid-x grid-padding-x">
|
<div class="row mb-3">
|
||||||
<div class="cell medium-6">
|
<div class="col-12 col-md-6 mb-3">
|
||||||
<label>
|
<label for="test_name">Test name</label>
|
||||||
Test name
|
<input id="test_name" class="form-control" type="text" name="test_name" placeholder="My hardware test (01/99)">
|
||||||
<input type="text" name="test_name" placeholder="My hardware test (01/99)">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-6">
|
<div class="col-12 col-md-6 mb-3">
|
||||||
<label>
|
<label for="test_hardware">Hardware to test</label>
|
||||||
Type
|
<select id="test_hardware" class="form-select" name="test_hardware">
|
||||||
<select name="test_hardware">
|
|
||||||
<% for h in hardware %>
|
<% for h in hardware %>
|
||||||
<option value="<%= h.id %>"><%= h.name %></option>
|
<option value="<%= h.id %>"><%= h.name %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-4">
|
<div class="col-12 col-md-4 mb-3">
|
||||||
<label>
|
<label for="test_benchmarks">Benchmarks</label>
|
||||||
Benchmarks
|
<select id="test_benchmarks" class="form-select" name="test_benchmarks[]" multiple>
|
||||||
<select name="test_benchmarks[]" multiple>
|
|
||||||
<% for b in benchmarks %>
|
<% for b in benchmarks %>
|
||||||
<option value="<%= b.id %>"><%= b.name %></option>
|
<option value="<%= b.id %>"><%= b.name %></option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell medium-8">
|
<div class="col-12 col-md-8 mb-3">
|
||||||
<label>
|
<label for="test_description">Test description</label>
|
||||||
Test description
|
<textarea id="test_description" class="form-control" name="test_description" placeholder="This is my test for a hardware..."></textarea>
|
||||||
<textarea name="test_description" placeholder="This is my test for a hardware..."></textarea>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="button" value="Submit">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<input class="btn btn-primary" type="submit" value="Create Test">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<h1>List of tests</h1>
|
<h1>List of tests</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>
|
<p>
|
||||||
<a href="/test/add">Add new test</a>
|
<a href="/test/add">Add new test</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x grid-margin-x">
|
<div class="row mb-3">
|
||||||
<% if tests.length > 0 %>
|
<% if tests.length > 0 %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<table>
|
<table class="table table-hover table-responsive">
|
||||||
<thead>
|
<thead class="table-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Test name</th>
|
<th>Test name</th>
|
||||||
<th># of benchmarks</th>
|
<th># of benchmarks</th>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="cell small-12">
|
<div class="col-12">
|
||||||
<p>I'm sorry, there doesn't appear to be any tests added yet. Check again later!</p>
|
<p>I'm sorry, there doesn't appear to be any tests added yet. Check again later!</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Reference in New Issue
Block a user