summaryrefslogtreecommitdiff
path: root/app/views/dashboard/_recent_measurements.html.erb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
commit52b044d6a4278c229992404ad5801769c2d13363 (patch)
treeb30b34da58f26117c035391d09366b190350b1e3 /app/views/dashboard/_recent_measurements.html.erb
First commit.
Vive le Castel Peter !
Diffstat (limited to 'app/views/dashboard/_recent_measurements.html.erb')
-rw-r--r--app/views/dashboard/_recent_measurements.html.erb22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/dashboard/_recent_measurements.html.erb b/app/views/dashboard/_recent_measurements.html.erb
new file mode 100644
index 0000000..bc63a60
--- /dev/null
+++ b/app/views/dashboard/_recent_measurements.html.erb
@@ -0,0 +1,22 @@
+<div class="card shadow mb-4">
+ <div class="card-header d-flex justify-content-between align-items-center">
+ <h5 class="mb-0">Nutrient Measurements</h5>
+ <div class="btn-group">
+ <%#= link_to "Add new measurement", editor_rafts_path, class: "btn btn-sm btn-primary" %>
+ <%#= link_to "View all", editor_rafts_path, class: "btn btn-sm btn-secondary" %>
+ </div>
+ </div>
+
+ <div class="card-body p-0">
+ <div class="container mb-3">
+ <%= line_chart @npk_measurement_data,
+ title: "NPK",
+ ytitle: "Concentration (mg/L)" %>
+ </div>
+ <div class="container mb-3">
+ <%= line_chart @ammonium_measurement_data,
+ title: "Ammonium",
+ ytitle: "Concentration (mg/L)" %>
+ </div>
+ </div>
+</div>
Copyright 2019--2025 Marius PETER