diff --git a/app.js b/app.js index 44fa17c..b137651 100644 --- a/app.js +++ b/app.js @@ -97,6 +97,7 @@ app.on("window-all-closed", () => // Creëert het hoofdvenster opnieuw wanneer het app icoon wordt aangeklikt en er zijn geen vensters open. app.on("activate", () => { + if (BrowserWindow.getAllWindows().length === 0) { createWindow(); @@ -105,6 +106,7 @@ app.on("activate", () => // + // Configureert IPC (Inter-Process Communication) luisteraars. function setupIpcMainListeners() { diff --git a/app.py b/app.py index f149a30..650e5fc 100644 --- a/app.py +++ b/app.py @@ -73,6 +73,31 @@ def get_weather(): } return jsonify(weather_data) + + +def get_planten_data(): + mydb = database_connect() + if mydb and mydb.is_connected(): + cursor = mydb.cursor(dictionary=True) # Corrected from corsor to cursor + + query = "SELECT id, plant_naam, plantensoort, plant_geteelt FROM planten" + + cursor.execute(query) + planten_data = cursor.fetchall() # Fetch all rows + mydb.close() + return planten_data + + +@app.route("/planten", methods=["GET"]) +def get_data_planten(): + planten_data = get_planten_data() + + if planten_data is None or len(planten_data) == 0: + + return jsonify({"error": "Failed to fetch data from database"}) + + + return jsonify(planten_data) # Directly return the list of dictionaries as JSON if __name__ == "__main__": app.run(host="127.0.0.1", port=5000) \ No newline at end of file diff --git a/goodgarden.sql b/goodgarden.sql deleted file mode 100644 index c0e33a4..0000000 --- a/goodgarden.sql +++ /dev/null @@ -1,316 +0,0 @@ --- phpMyAdmin SQL Dump --- version 5.2.1 --- https://www.phpmyadmin.net/ --- --- Host: 127.0.0.1 --- Gegenereerd op: 20 mrt 2024 om 10:19 --- Serverversie: 10.4.32-MariaDB --- PHP-versie: 8.2.12 - -DROP DATABASE IF EXISTS goodgarden; -CREATE DATABASE goodgarden; - -USE goodgarden; - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Database: `goodgarden` --- - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `battery_voltage_events` --- - -CREATE TABLE `battery_voltage_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `battery_voltage_events` --- - -INSERT INTO `battery_voltage_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(2185, 1710839863, '2024-03-19T09:17:43Z', 256, 4.03663), -(2186, 1710842346, '2024-03-19T09:59:06Z', 322, 4.08547); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `devices` --- - -CREATE TABLE `devices` ( - `id` int(10) UNSIGNED NOT NULL, - `serial_number` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `last_seen` int(11) DEFAULT NULL, - `last_battery_voltage` float DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `fetch` --- - -CREATE TABLE `fetch` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `par_events` --- - -CREATE TABLE `par_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `planten` --- - -CREATE TABLE `planten` ( - `id` int(20) UNSIGNED NOT NULL, - `plant_naam` varchar(255) DEFAULT NULL, - `plantensoort` varchar(255) DEFAULT NULL, - `plant_geteelt` tinyint(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `planten` --- - -INSERT INTO `planten` (`id`, `plant_naam`, `plantensoort`, `plant_geteelt`) VALUES -(47, 'Tomaten', 'Groente', 1), -(49, 'Komkommer', 'Groente', 1), -(50, 'Appel', 'Fruit', 1), -(51, 'Sla', 'Groente', 1), -(52, 'Wietplant', 'Onkruid', 0); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `relative_humidity_events` --- - -CREATE TABLE `relative_humidity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_electric_conductivity_events` --- - -CREATE TABLE `soil_electric_conductivity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_relative_permittivity_events` --- - -CREATE TABLE `soil_relative_permittivity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_temperature_events` --- - -CREATE TABLE `soil_temperature_events` ( - `id` int(10) NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Indexen voor geëxporteerde tabellen --- - --- --- Indexen voor tabel `battery_voltage_events` --- -ALTER TABLE `battery_voltage_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`); - --- --- Indexen voor tabel `devices` --- -ALTER TABLE `devices` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `last_seen` (`last_seen`), - ADD UNIQUE KEY `last_battery_voltage` (`last_battery_voltage`); - --- --- Indexen voor tabel `fetch` --- -ALTER TABLE `fetch` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- Indexen voor tabel `par_events` --- -ALTER TABLE `par_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- Indexen voor tabel `planten` --- -ALTER TABLE `planten` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `plant_naam` (`plant_naam`); - --- --- Indexen voor tabel `relative_humidity_events` --- -ALTER TABLE `relative_humidity_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- Indexen voor tabel `soil_electric_conductivity_events` --- -ALTER TABLE `soil_electric_conductivity_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- Indexen voor tabel `soil_relative_permittivity_events` --- -ALTER TABLE `soil_relative_permittivity_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- Indexen voor tabel `soil_temperature_events` --- -ALTER TABLE `soil_temperature_events` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `timestamp` (`timestamp`), - ADD UNIQUE KEY `gateway_receive_time` (`gateway_receive_time`), - ADD UNIQUE KEY `value` (`value`); - --- --- AUTO_INCREMENT voor geëxporteerde tabellen --- - --- --- AUTO_INCREMENT voor een tabel `battery_voltage_events` --- -ALTER TABLE `battery_voltage_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2189; - --- --- AUTO_INCREMENT voor een tabel `devices` --- -ALTER TABLE `devices` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; - --- --- AUTO_INCREMENT voor een tabel `fetch` --- -ALTER TABLE `fetch` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100; - --- --- AUTO_INCREMENT voor een tabel `par_events` --- -ALTER TABLE `par_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; - --- --- AUTO_INCREMENT voor een tabel `planten` --- -ALTER TABLE `planten` - MODIFY `id` int(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53; - --- --- AUTO_INCREMENT voor een tabel `relative_humidity_events` --- -ALTER TABLE `relative_humidity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; - --- --- AUTO_INCREMENT voor een tabel `soil_electric_conductivity_events` --- -ALTER TABLE `soil_electric_conductivity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; - --- --- AUTO_INCREMENT voor een tabel `soil_relative_permittivity_events` --- -ALTER TABLE `soil_relative_permittivity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; - --- --- AUTO_INCREMENT voor een tabel `soil_temperature_events` --- -ALTER TABLE `soil_temperature_events` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/mqtt/__pycache__/mqtt_client.cpython-311.pyc b/mqtt/__pycache__/mqtt_client.cpython-311.pyc index 6d31027..32d0255 100644 Binary files a/mqtt/__pycache__/mqtt_client.cpython-311.pyc and b/mqtt/__pycache__/mqtt_client.cpython-311.pyc differ diff --git a/mqtt/publisher.py b/mqtt/publisher.py index 5056e49..6cbf0a7 100644 --- a/mqtt/publisher.py +++ b/mqtt/publisher.py @@ -12,7 +12,12 @@ publish_interval = 30 # MOET ~300 ZIJN voor productiegebruik. # Definieer API-eindpunten en de corresponderende MQTT topics. api_endpoints = [ {"url": "https://garden.inajar.nl/api/devices/", "topic": "goodgarden/devices"}, - # Voeg meer API-eindpunten en topics toe zoals vereist. + {"url": "https://garden.inajar.nl/api/relative_humidity_events/", "topic": "goodgarden/relative_humidity"}, + {"url": "https://garden.inajar.nl/api/battery_voltage_events/", "topic": "goodgarden/battery_voltage"}, + {"url": "https://garden.inajar.nl/api/soil_electric_conductivity_events/", "topic": "goodgarden/soil_electric_conductivity"}, + {"url": "https://garden.inajar.nl/api/soil_relative_permittivity_events/", "topic": "goodgarden/soil_relative_permittivity"}, + {"url": "https://garden.inajar.nl/api/soil_temperature_events/", "topic": "goodgarden/soil_temperature"}, + {"url": "https://garden.inajar.nl/api/par_events/", "topic": "goodgarden/par_events"} ] def on_connect(client, userdata, flags, rc): diff --git a/src/css/style.css b/src/css/style.css deleted file mode 100644 index 334ce84..0000000 --- a/src/css/style.css +++ /dev/null @@ -1,405 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Akaya+Kanadaka&display=swap"); -@import url("https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&display=swap"); -h1, -h2, -h3, -h4, -h5 { - font-family: "Akaya Kanadaka", system-ui; - margin: 0; -} - -p, -td { - font-family: "Afacad", sans-serif; - color: black; -} - -a { - text-decoration: none; -} - -body { - background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("../images/achtergrond.png"); - background-repeat: no-repeat; - background-size: cover; - background-position: center; - font-family: "Afacad", sans-serif; - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - margin: 0; -} -body .mainContainer { - width: 85vw; - height: 38rem; - background-color: rgba(255, 255, 255, 0.85); - border-radius: 40px; - padding: 2rem; -} -body .mainContainer .goodgarden-logo { - position: absolute; - width: 10vw; - left: 50%; - top: 4.1rem; - transform: translateX(-50%); -} -body .mainContainer .informatie-kas-main-container { - display: grid; - grid-template-columns: 5fr 7fr; -} -body .mainContainer .mainBorder { - padding: 1.25rem 1.5rem; - padding: 1rem 0; - height: 35rem; - border: solid 5px rgb(171, 211, 174); - border-radius: 40px; -} -body .mainContainer .mainBorder .pagina-titel { - font-size: 2rem; - margin-left: 1.5rem; -} -body .mainContainer .mainBorder #sectie-1 { - display: flex; - flex-direction: column; - gap: 0; - padding: 0 2.5rem 0 1rem; - position: relative; -} -body .mainContainer .mainBorder #sectie-1 h1 { - background-color: green; -} -body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht { - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); - border-radius: 40px; - padding: 1rem; - background-color: white; -} -body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht .algemeen-overzicht { - border: solid 2px rgb(171, 211, 174); - border-radius: 35px; - font-size: 1.25rem; - padding: 0.5rem 1rem; -} -body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht .algemeen-overzicht .table-informatie-kas { - width: 100%; -} -body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht .algemeen-overzicht .table-informatie-kas .tr-informatie-kas { - display: flex; - justify-content: space-between; - text-align: left; -} -body .mainContainer .mainBorder #sectie-1 .grafiek { - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); - border-radius: 40px; - padding: 1rem; - position: relative; - background-color: white; -} -body .mainContainer .mainBorder #sectie-1 .grafiek .grafiek-innerbox { - border: solid 2px rgb(171, 211, 174); - border-radius: 35px; - font-size: 1.25rem; - padding: 0 1rem 2.5rem; - height: 225px; - position: relative; -} -body .mainContainer .mainBorder #sectie-1 .grafiek .grafiek-innerbox h2 { - position: absolute; - left: 50%; - transform: translateX(-50%); -} -body .mainContainer .mainBorder #sectie-1 .grafiek .grafiek-innerbox canvas { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} -body .mainContainer .mainBorder .content { - display: grid; - grid-template-columns: 3fr 1fr 3fr; - height: 100%; -} -body .mainContainer .mainBorder .content .kant-links { - grid-column: 1; -} -body .mainContainer .mainBorder .content .kant-links #planten { - width: 100%; - border-collapse: collapse; -} -body .mainContainer .mainBorder .content .kant-links #planten td article { - height: 7rem; - width: 10rem; - padding: 0.6rem; - margin: 0.1rem; - margin-left: 2rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - border: solid 3px rgb(171, 211, 174); - border-radius: 40px; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); -} -body .mainContainer .mainBorder .content .kant-links #planten td article #toevoegen { - height: 5rem; - width: 5rem; -} -body .mainContainer .mainBorder .content .kant-links #planten td article h2 { - color: gray; -} -body .mainContainer .mainBorder .content .kant-links #planten td article:hover { - background-color: lightgray; -} -body .mainContainer .mainBorder .content .kant-rechts { - grid-column: 3; -} -body .mainContainer .mainBorder .content .kant-rechts #metingen { - border: solid 3px rgb(171, 211, 174); - border-radius: 40px; -} -body .mainContainer .mainBorder .content .kant-rechts #metingen #main-waardes { - display: flex; - justify-content: space-between; - padding: 0.5rem; - padding-bottom: 0; - width: 100%; -} -body .mainContainer .mainBorder .content .kant-rechts #metingen #main-waardes table { - display: flex; - justify-content: space-between; - width: 100%; -} -body .mainContainer .mainBorder .grid-column-2 { - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); - border-radius: 40px; - padding: 1rem; - margin: 3.25rem 1rem 1.25rem 1rem; - background-color: white; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child { - border: solid 2px rgb(171, 211, 174); - border-radius: 35px; - height: 100%; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table { - padding: 1.5rem 2rem; - display: flex; - flex-direction: column; - align-items: stretch; - gap: 2.5rem; - justify-content: space-around; - height: 90%; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table table tr td { - font-size: 1.05rem; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-1 tr td { - font-size: 1.25rem; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-2 { - position: relative; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-2::after, body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-2::before { - content: ""; - position: absolute; - left: 0; - right: 0; - height: 1px; - width: 90%; - background: black; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-2::after { - bottom: -20px; -} -body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas-table-2::before { - top: -20px; -} - -.divider { - display: flex; - justify-content: center; - border: solid 1px rgb(171, 211, 174); - border-radius: 5px; - width: 80%; - margin: 0 auto; -} - -.modal { - display: none; - position: fixed; - z-index: 999; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - background: white; - padding: 1.25rem; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - width: 30vw; - height: auto; - border: solid 2px #abd3ae; - border-radius: 10px; -} - -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} - -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} - -#myModal select, -#myModal input { - width: calc(100% - 20px); - padding: 10px; - margin-bottom: 15px; - border: 2px solid #abd3ae; - border-radius: 5px; - box-sizing: border-box; -} - -#myModal .knop { - display: flex; - justify-content: space-between; -} - -#myModal button { - width: 48%; - padding: 10px; - box-sizing: border-box; - height: 40px; -} - -#myModal .knop-container { - display: flex; - justify-content: space-between; - margin-top: 20px; -} - -#myModal .knop-container input, -#myModal .knop-container button { - flex: 1; - margin: 0 5px; - padding: 10px; - box-sizing: border-box; -} - -#myModal input[type=text], -#myModal select { - border: 2px solid #abd3ae; - padding: 10px; - border-radius: 17px; - box-sizing: border-box; -} - -#myModal input[type=submit], -#myModal button { - color: #fff; - border: none; - border-radius: 15px; - cursor: pointer; -} - -#myModal input[type=submit] { - background-color: white; -} - -#myModal button { - background-color: white; - color: black; -} - -.toevoeging { - background: linear-gradient(45deg, #abd3ae, #2ecc71); -} - -.annulatie-knop { - background: linear-gradient(45deg, #ffcc00, #ff6600); -} - -#myModal button:hover { - background: linear-gradient(45deg, #abd3ae, #fff); - color: #000; -} - -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} - -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} - -.switch-container { - display: flex; - align-items: end; -} - -.switch { - position: relative; - display: inline-block; - width: 60px; - height: 30px; -} - -.switch input { - opacity: 0; - width: 0; - height: 0; -} - -.slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - border-radius: 34px; - transition: 0.4s; -} - -.slider:before { - position: absolute; - content: ""; - height: 26px; - width: 26px; - left: 4px; - bottom: 4px; - background-color: white; - border-radius: 50%; - transition: 0.4s; -} - -input:checked + .slider { - background-color: #2ecc71; -} - -input:checked + .slider:before { - transform: translateX(26px); -} - -.rechterkant { - display: flex; - justify-content: end; -} - -.plant-container, -#modalButton { - background-color: white; -}/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/src/css/style.css.map b/src/css/style.css.map deleted file mode 100644 index c39b804..0000000 --- a/src/css/style.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAGQ,mFAAA;AACA,2GAAA;AAgCR;;;;;EAME,wCApCY;EAqCZ,SAAA;AClCF;;ADqCA;;EAGE,iCAzCU;EA0CV,YAAA;ACnCF;;ADsCA;EAEE,qBAAA;ACpCF;;ADuCA;EAEE,iHAAA;EACA,4BAAA;EACA,sBAAA;EACA,2BAAA;EACA,iCAxDU;EAyDV,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;EACA,SAAA;ACrCF;ADuCE;EAEE,WAAA;EACA,aAAA;EACA,2CAAA;EACA,mBAAA;EACA,aAAA;ACtCJ;ADwCI;EAEE,kBAAA;EACA,WAAA;EACA,SAAA;EACA,WAAA;EACA,2BAAA;ACvCN;AD0CI;EAEE,aAAA;EACA,8BAAA;ACzCN;AD4CI;EAEE,uBAAA;EACA,eAAA;EACA,aAAA;EACA,oCAAA;EACA,mBAAA;AC3CN;AD6CM;EAEE,eAAA;EACA,mBAAA;AC5CR;AD+CM;EAEE,aAAA;EACA,sBAAA;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ACE,oDAAA;AChIF;;ADmIA;EACE,oDAAA;AChIF;;ADmIA;EACE,iDAAA;EACA,WAAA;AChIF;;ADmIA;EACE,WAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;AChIF;;ADmIA;;EAEE,YAAA;EACA,qBAAA;EACA,eAAA;AChIF;;ADmIA;EACE,aAAA;EACA,gBAAA;AChIF;;ADmIA;EACE,kBAAA;EACA,qBAAA;EACA,WAAA;EACA,YAAA;AChIF;;ADmIA;EACE,UAAA;EACA,QAAA;EACA,SAAA;AChIF;;ADmIA;EACE,kBAAA;EACA,eAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,sBAAA;EACA,mBAAA;EACA,gBAAA;AChIF;;ADmIA;EACE,kBAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;EACA,SAAA;EACA,WAAA;EACA,uBAAA;EACA,kBAAA;EACA,gBAAA;AChIF;;ADmIA;EACE,yBAAA;AChIF;;ADmIA;EACE,2BAAA;AChIF;;ADmIA;EACE,aAAA;EACA,oBAAA;AChIF;;ADmIE;;EAGE,uBAAA;ACjIJ","file":"style.css"} \ No newline at end of file diff --git a/src/css/style.scss b/src/css/style.scss deleted file mode 100644 index aa4a200..0000000 --- a/src/css/style.scss +++ /dev/null @@ -1,536 +0,0 @@ -$primary-color: rgb(171, 211, 174); -$secondary-color: rgb(143, 188, 143); - -@import url("https://fonts.googleapis.com/css2?family=Akaya+Kanadaka&display=swap"); -@import url("https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&display=swap"); - -$font-titels: "Akaya Kanadaka", system-ui; - -$font-text: "Afacad", sans-serif; - -@mixin flexbox-center -{ - display: flex; - justify-content: center; -} - -@mixin groene-border -{ - border: solid 2px $primary-color; -} - -@mixin box-shadow -{ - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); -} - -@mixin border-radius -{ - border-radius: 40px; -} - -@mixin inner-border-radius -{ - border-radius: 35px; -} - -h1, -h2, -h3, -h4, -h5 -{ - font-family: $font-titels; - margin: 0; -} - -p, -td -{ - font-family: $font-text; - color: black; -} - -a -{ - text-decoration: none; -} - -body -{ - background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("../images/achtergrond.png"); - background-repeat: no-repeat; - background-size: cover; - background-position: center; - font-family: $font-text; - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - margin: 0; - - .mainContainer - { - width: 85vw; - height: 38rem; - background-color: rgb(255, 255, 255, 85%); - border-radius: 40px; - padding: 2rem; - - .goodgarden-logo - { - position: absolute; - width: 10vw; - left: 50%; - top: 4.1rem; - transform: translateX(-50%); - } - - .informatie-kas-main-container - { - display: grid; - grid-template-columns: 5fr 7fr; - } - - .mainBorder - { - padding: 1.25rem 1.5rem; - padding: 1rem 0; - height: 35rem; - border: solid 5px $primary-color; - border-radius: 40px; - - .pagina-titel - { - font-size: 2rem; - margin-left: 1.5rem; - } - - #sectie-1 - { - display: flex; - flex-direction: column; - // gap: 1rem; - gap: 0; - padding: 0 2.5rem 0 1rem; - position: relative; - - h1 - { - background-color: green; - } - - .parent-algemeen-overzicht - { - @include box-shadow; - @include border-radius; - padding: 1rem; - // margin-top: 1rem; - background-color: white; - - .algemeen-overzicht - { - @include groene-border; - @include inner-border-radius; - font-size: 1.25rem; - padding: 0.5rem 1rem; - - .table-informatie-kas - { - width: 100%; - - .tr-informatie-kas - { - display: flex; - justify-content: space-between; - text-align: left; - } - } - } - } - - .grafiek - { - @include box-shadow; - @include border-radius; - padding: 1rem; - position: relative; - background-color: white; - - .grafiek-innerbox - { - @include groene-border; - @include inner-border-radius; - font-size: 1.25rem; - padding: 0 1rem 2.5rem; - height: 225px; - position: relative; - - h2 - { - position: absolute; - left: 50%; - transform: translateX(-50%); - } - - canvas - { - // Zorgt ervoor dat de grafiek precies in eht midden komt - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } - } - } - - .content - { - display: grid; - grid-template-columns: 3fr 1fr 3fr; - height: 100%; - - .kant - { - &-links - { - grid-column: 1; - - #planten - { - width: 100%; - border-collapse: collapse; - - td - { - article - { - height: 7rem; - width: 10rem; - padding: 0.6rem; - margin: 0.1rem; - margin-left: 2rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - border: solid 3px $primary-color; - border-radius: 40px; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - - #toevoegen - { - height: 5rem; - width: 5rem; - } - - h2 - { - color: gray; - } - - &:hover - { - background-color: lightgray; - } - } - } - } - } - - &-rechts - { - grid-column: 3; - // margin-right: 2rem; - - #metingen - { - border: solid 3px $primary-color; - border-radius: 40px; - - #main-waardes - { - display: flex; - justify-content: space-between; - padding: 0.5rem; - padding-bottom: 0; - width: 100%; - - table - { - display: flex; - justify-content: space-between; - width: 100%; - } - } - } - } - } - } - - .grid-column-2 - { - @include box-shadow; - @include border-radius; - padding: 1rem; - margin: 3.25rem 1rem 1.25rem 1rem; - background-color: white; - - .grid-2-child - { - @include groene-border; - @include inner-border-radius; - height: 100%; - - .parent-table - { - padding: 1.5rem 2rem; - display: flex; - flex-direction: column; - align-items: stretch; - gap: 2.5rem; - justify-content: space-around; - height: 90%; - - table - { - tr - { - td - { - font-size: 1.05rem; - } - } - } - - .kas-table-1 - { - tr - { - td - { - font-size: 1.25rem; - } - } - } - - .kas-table-2 - { - position: relative; - - &::after, - &::before - { - content: ""; - position: absolute; - left: 0; - right: 0; - height: 1px; - width: 90%; - background: black; - } - - &::after - { - bottom: -20px; - } - - &::before - { - top: -20px; - } - } - } - } - } - } - } -} - -.divider { - display: flex; - justify-content: center; - border: solid 1px $primary-color; - border-radius: 5px; - width: 80%; - margin: 0 auto; -} - -.modal { - display: none; - position: fixed; - z-index: 999; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - background: white; - padding: 1.25rem; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - width: 30vw; - height: auto; - border: solid 2px #abd3ae; - border-radius: 10px; -} -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} - -#myModal select, -#myModal input { - width: calc(100% - 20px); - padding: 10px; - margin-bottom: 15px; - border: 2px solid #abd3ae; - border-radius: 5px; - box-sizing: border-box; -} - -#myModal .knop { - display: flex; - justify-content: space-between; -} - -#myModal button { - width: 48%; - padding: 10px; - box-sizing: border-box; - height: 40px; -} - -#myModal .knop-container { - display: flex; - justify-content: space-between; - margin-top: 20px; -} - -#myModal .knop-container input, -#myModal .knop-container button { - flex: 1; - margin: 0 5px; - padding: 10px; - box-sizing: border-box; -} - -#myModal input[type="text"], -#myModal select { - border: 2px solid #abd3ae; - padding: 10px; - border-radius: 17px; - box-sizing: border-box; -} - -#myModal input[type="submit"], -#myModal button { - color: #fff; - border: none; - border-radius: 15px; - cursor: pointer; -} - -#myModal input[type="submit"] { - background-color: white; -} - -#myModal button { - background-color: white; - color: black; -} - -.toevoeging { - background: linear-gradient(45deg, #abd3ae, #2ecc71); -} - -.annulatie-knop { - background: linear-gradient(45deg, #ffcc00, #ff6600); -} - -#myModal button:hover { - background: linear-gradient(45deg, #abd3ae, #fff); - color: #000; -} - -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} - -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} - -.switch-container { - display: flex; - align-items: end; -} - -.switch { - position: relative; - display: inline-block; - width: 60px; - height: 30px; -} - -.switch input { - opacity: 0; - width: 0; - height: 0; -} - -.slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - border-radius: 34px; - transition: 0.4s; -} - -.slider:before { - position: absolute; - content: ""; - height: 26px; - width: 26px; - left: 4px; - bottom: 4px; - background-color: white; - border-radius: 50%; - transition: 0.4s; -} - -input:checked + .slider { - background-color: #2ecc71; -} - -input:checked + .slider:before { - transform: translateX(26px); -} - -.rechterkant { - display: flex; - justify-content: end; -} - - .plant-container, - #modalButton - { - background-color: white; - } - \ No newline at end of file diff --git a/src/py/script/__pycache__/db_connect.cpython-311.pyc b/src/py/script/__pycache__/db_connect.cpython-311.pyc index a8aed8f..398e518 100644 Binary files a/src/py/script/__pycache__/db_connect.cpython-311.pyc and b/src/py/script/__pycache__/db_connect.cpython-311.pyc differ diff --git a/src/py/script/goodgarden.sql b/src/py/script/goodgarden.sql deleted file mode 100644 index 93d8664..0000000 --- a/src/py/script/goodgarden.sql +++ /dev/null @@ -1,346 +0,0 @@ --- phpMyAdmin SQL Dump --- version 5.2.1 --- https://www.phpmyadmin.net/ --- --- Host: 127.0.0.1 --- Gegenereerd op: 14 feb 2024 om 14:36 --- Serverversie: 10.4.28-MariaDB --- PHP-versie: 8.2.4 - -DROP DATABASE IF EXISTS goodgarden; -CREATE DATABASE goodgarden; - -USE goodgarden; - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Database: `goodgarden` --- - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `battery_voltage_events` --- - -CREATE TABLE `battery_voltage_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `battery_voltage_events` --- - -INSERT INTO `battery_voltage_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(1, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(2, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(3, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(4, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(5, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(6, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(7, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(8, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(9, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(10, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `devices` --- - -CREATE TABLE `devices` ( - `id` int(10) UNSIGNED NOT NULL, - `serial_number` varchar(255) DEFAULT NULL, - `name` varchar(255) DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `last_seen` int(11) DEFAULT NULL, - `last_battery_voltage` float DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `devices` --- - -INSERT INTO `devices` (`id`, `serial_number`, `name`, `label`, `last_seen`, `last_battery_voltage`) VALUES -(1, '0033889B1BAB1169', 'firefly2_0051', 'The Field', 1707765066, 4.09768), -(2, '006FE1FC316ED7D8', 'firefly2_0111', 'The Field', 1707764966, 4.10745); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `fetch` --- - -CREATE TABLE `fetch` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `fetch` --- - -INSERT INTO `fetch` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(70, 1707851215, '2024-02-13T19:06:55Z', 322, 0.00000), -(71, 1707851215, '2024-02-13T19:06:55Z', 322, 1.52000), -(72, 1707851215, '2024-02-13T19:06:55Z', 322, 12.06000), -(73, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(74, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(75, 0, '', 0, 0.00000), -(76, 0, '', 0, 0.00000), -(77, 1707844638, '2024-02-13T17:17:18Z', 322, 0.00000), -(78, 1707851099, '2024-02-13T19:04:59Z', 256, 0.00000), -(79, 1707844638, '2024-02-13T17:17:18Z', 322, 71.08984), -(80, 1707851099, '2024-02-13T19:04:59Z', 256, 66.72949), -(81, 1707851215, '2024-02-13T19:06:55Z', 322, 0.00000), -(82, 1707851215, '2024-02-13T19:06:55Z', 322, 1.52000), -(83, 1707851215, '2024-02-13T19:06:55Z', 322, 12.06000), -(84, 0, '', 0, 0.00000), -(85, 0, '', 0, 0.00000), -(86, 1707844638, '2024-02-13T17:17:18Z', 322, 0.00000), -(87, 1707851099, '2024-02-13T19:04:59Z', 256, 0.00000), -(88, 1707844638, '2024-02-13T17:17:18Z', 322, 71.08984), -(89, 1707851099, '2024-02-13T19:04:59Z', 256, 66.72949), -(90, 1707825721, '2024-02-13T12:02:01Z', 256, 4.09890), -(91, 1707837460, '2024-02-13T15:17:40Z', 322, 4.10501), -(92, 0, '', 0, 0.00000), -(93, 0, '', 0, 0.00000), -(94, 1707844638, '2024-02-13T17:17:18Z', 322, 0.00000), -(95, 1707851099, '2024-02-13T19:04:59Z', 256, 0.00000), -(96, 1707844638, '2024-02-13T17:17:18Z', 322, 71.08984), -(97, 1707851099, '2024-02-13T19:04:59Z', 256, 66.72949); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `par_events` --- - -CREATE TABLE `par_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `par_events` --- - -INSERT INTO `par_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(1, 1707844638, '2024-02-13T17:17:18Z', 322, 0.00000), -(2, 1707851099, '2024-02-13T19:04:59Z', 256, 0.00000); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `relative_humidity_events` --- - -CREATE TABLE `relative_humidity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `relative_humidity_events` --- - -INSERT INTO `relative_humidity_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(3, 1707844638, '2024-02-13T17:17:18Z', 322, 71.08984), -(4, 1707851099, '2024-02-13T19:04:59Z', 256, 66.72949), -(5, 1707844638, '2024-02-13T17:17:18Z', 322, 71.08984), -(6, 1707851099, '2024-02-13T19:04:59Z', 256, 66.72949); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_electric_conductivity_events` --- - -CREATE TABLE `soil_electric_conductivity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `soil_electric_conductivity_events` --- - -INSERT INTO `soil_electric_conductivity_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(3, 1707851215, '2024-02-13T19:06:55Z', 322, 0.00000); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_relative_permittivity_events` --- - -CREATE TABLE `soil_relative_permittivity_events` ( - `id` int(10) UNSIGNED NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `soil_relative_permittivity_events` --- - -INSERT INTO `soil_relative_permittivity_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(3, 1707851215, '2024-02-13T19:06:55Z', 322, 1.52000); - --- -------------------------------------------------------- - --- --- Tabelstructuur voor tabel `soil_temperature_events` --- - -CREATE TABLE `soil_temperature_events` ( - `id` int(10) NOT NULL, - `timestamp` int(11) DEFAULT NULL, - `gateway_receive_time` varchar(50) DEFAULT NULL, - `device` int(11) DEFAULT NULL, - `value` decimal(10,5) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; - --- --- Gegevens worden geëxporteerd voor tabel `soil_temperature_events` --- - -INSERT INTO `soil_temperature_events` (`id`, `timestamp`, `gateway_receive_time`, `device`, `value`) VALUES -(3, 1707851215, '2024-02-13T19:06:55Z', 322, 12.06000); - --- --- Indexen voor geëxporteerde tabellen --- - --- --- Indexen voor tabel `battery_voltage_events` --- -ALTER TABLE `battery_voltage_events` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `devices` --- -ALTER TABLE `devices` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `fetch` --- -ALTER TABLE `fetch` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `par_events` --- -ALTER TABLE `par_events` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `relative_humidity_events` --- -ALTER TABLE `relative_humidity_events` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `soil_electric_conductivity_events` --- -ALTER TABLE `soil_electric_conductivity_events` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `soil_relative_permittivity_events` --- -ALTER TABLE `soil_relative_permittivity_events` - ADD PRIMARY KEY (`id`); - --- --- Indexen voor tabel `soil_temperature_events` --- -ALTER TABLE `soil_temperature_events` - ADD PRIMARY KEY (`id`); - --- --- AUTO_INCREMENT voor geëxporteerde tabellen --- - --- --- AUTO_INCREMENT voor een tabel `battery_voltage_events` --- -ALTER TABLE `battery_voltage_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; - --- --- AUTO_INCREMENT voor een tabel `devices` --- -ALTER TABLE `devices` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; - --- --- AUTO_INCREMENT voor een tabel `fetch` --- -ALTER TABLE `fetch` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=98; - --- --- AUTO_INCREMENT voor een tabel `par_events` --- -ALTER TABLE `par_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; - --- --- AUTO_INCREMENT voor een tabel `relative_humidity_events` --- -ALTER TABLE `relative_humidity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; - --- --- AUTO_INCREMENT voor een tabel `soil_electric_conductivity_events` --- -ALTER TABLE `soil_electric_conductivity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; - --- --- AUTO_INCREMENT voor een tabel `soil_relative_permittivity_events` --- -ALTER TABLE `soil_relative_permittivity_events` - MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; - --- --- AUTO_INCREMENT voor een tabel `soil_temperature_events` --- -ALTER TABLE `soil_temperature_events` - MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/src/py/script/plants.json b/src/py/script/plants.json index b406a46..a499c72 100644 --- a/src/py/script/plants.json +++ b/src/py/script/plants.json @@ -1,50 +1,26 @@ [ { - "id": 47, - "plant_naam": "Tomaten", + "id": 3, + "plant_naam": "Tomatenplant", "plantensoort": "Groente", "plant_geteelt": 1 }, { - "id": 49, - "plant_naam": "Komkommer", - "plantensoort": "Groente", - "plant_geteelt": 1 - }, - { - "id": 50, - "plant_naam": "Appel", - "plantensoort": "Fruit", - "plant_geteelt": 0 - }, - { - "id": 51, + "id": 4, "plant_naam": "Sla", "plantensoort": "Groente", - "plant_geteelt": 0 - }, - { - "id": 53, - "plant_naam": "Patat", - "plantensoort": "Aarde", - "plant_geteelt": 0 - }, - { - "id": 54, - "plant_naam": "asfasfas", - "plantensoort": "fasfasfsaf", - "plant_geteelt": 0 - }, - { - "id": 55, - "plant_naam": "sadfadsfdsf", - "plantensoort": "sdfdsafdsfdf", "plant_geteelt": 1 }, { - "id": 56, - "plant_naam": "asdasd", - "plantensoort": "asdasdasdasdasd", + "id": 5, + "plant_naam": "Peterselie", + "plantensoort": "Kruiden", + "plant_geteelt": 1 + }, + { + "id": 6, + "plant_naam": "Aardbei", + "plantensoort": "Fruit", "plant_geteelt": 1 } ] \ No newline at end of file diff --git a/src/py/static/css/style.css b/src/py/static/css/style.css index 0668a0e..412de2a 100644 --- a/src/py/static/css/style.css +++ b/src/py/static/css/style.css @@ -59,11 +59,12 @@ body .mainContainer .mainBorder { body .mainContainer .mainBorder .pagina-titel { font-size: 2rem; margin-left: 1.5rem; + margin-bottom: 1rem; } body .mainContainer .mainBorder #sectie-1 { display: flex; flex-direction: column; - gap: 1rem; + gap: 0.75rem; padding: 0 2.5rem 0 1rem; position: relative; } @@ -74,7 +75,6 @@ body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht { box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); border-radius: 40px; padding: 1rem; - margin-top: 1rem; background-color: white; } body .mainContainer .mainBorder #sectie-1 .parent-algemeen-overzicht .algemeen-overzicht { @@ -152,6 +152,7 @@ body .mainContainer .mainBorder .content .kant-links #planten td article h2 { } body .mainContainer .mainBorder .content .kant-links #planten td article:hover { background-color: lightgray; + cursor: pointer; } body .mainContainer .mainBorder .content .kant-rechts { grid-column: 3; @@ -243,11 +244,16 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- border-radius: 10px; } +.modal #plant-id { + font-size: 1.5rem; +} + .modal .close { color: #aaa; float: right; - font-size: 1.75rem; + font-size: 2rem; font-weight: bold; + margin-top: -35px; } .modal .close:hover, @@ -310,7 +316,7 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- } #myModal input[type=submit] { - background-color: white; + background: linear-gradient(45deg, #abd3ae, #6ebf7d); } #myModal button { @@ -326,25 +332,6 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- background: linear-gradient(45deg, #ffcc00, #ff6600); } -#myModal button:hover { - background: linear-gradient(45deg, #abd3ae, #fff); - color: #000; -} - -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} - -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} - .switch-container { display: flex; align-items: end; @@ -356,14 +343,12 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- width: 60px; height: 30px; } - -.switch input { +.switch .switch input { opacity: 0; width: 0; height: 0; } - -.slider { +.switch .slider { position: absolute; cursor: pointer; top: 0; @@ -374,8 +359,7 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- border-radius: 34px; transition: 0.4s; } - -.slider:before { +.switch .slider:before { position: absolute; content: ""; height: 26px; @@ -386,21 +370,77 @@ body .mainContainer .mainBorder .grid-column-2 .grid-2-child .parent-table .kas- border-radius: 50%; transition: 0.4s; } - -input:checked + .slider { +.switch input:checked + .slider { background-color: #2ecc71; } - -input:checked + .slider:before { +.switch input:checked + .slider:before { transform: translateX(26px); } - -.rechterkant { +.switch .rechterkant { display: flex; justify-content: end; } - -.plant-container, -#modalButton { +.switch .plant-container, +.switch #modalButton { background-color: white; +} +.switch .switch-container { + position: absolute; +} + +.pagina-container { + position: relative; + align-items: end; +} + +.close-button:hover { + background-color: rgb(171, 211, 174); /* Aangepaste hover kleur */ + color: white; /* Tekstkleur wit op hover voor betere zichtbaarheid */ +} + +.container { + position: relative; + align-items: end; +} + +.close-button { + position: absolute; + top: -90px; + right: -35px; + transform: translate(100%, 0%); + width: 50px; + height: 50px; + background-color: white; + color: rgb(171, 211, 174); + border-radius: 50%; /* Aangepast voor perfecte cirkel */ + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + font-size: 50px; + border: solid rgb(171, 211, 174) 2px; + font-weight: bold; +} + +.back-button { + position: absolute; + top: -90px; + right: -25px; + width: 50px; + height: 50px; + background-color: white; + color: rgb(171, 211, 174); + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + font-size: 35px; + border: solid rgb(171, 211, 174) 2px; + font-weight: bold; +} + +.back-button:hover { + background-color: rgb(171, 211, 174); + color: white; }/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/src/py/static/css/style.css.map b/src/py/static/css/style.css.map index 90630c9..38e0962 100644 --- a/src/py/static/css/style.css.map +++ b/src/py/static/css/style.css.map @@ -1 +1 @@ -{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAGQ,mFAAA;AACA,2GAAA;AAgCR;;;;;EAME,wCApCY;EAqCZ,SAAA;AClCF;;ADqCA;;EAGE,iCAzCU;EA0CV,YA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AA;EACA,oBAAA;ACxIF;AD2IE;;EAGE,uBAAA;AC1IJ;AD6IE;EACE,kBAAA;AC3IJ;;AD+IA;EACE,kBAAA;EACA,gBAAA;AC5IF;;AD+IA;EACE,oCAzhBc,EAyhBoB,2BAAA;EAClC,YAAA,EAAA,sDAAA;AC5IF;;AD+IA;EACE,kBAAA;EACA,gBAAA;AC5IF;;AD+IA;EAEE,kBAAA;EACA,UAAA;EACA,YAAA;EACA,8BAAA;EACA,WAAA;EACA,YAAA;EACA,uBAAA;EACA,yBA3iBc;EA4iBd,kBAAA,EAAA,mCAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,eAAA;EACA,oCAAA;EACA,iBAAA;AC7IF;;ADgJA;EACE,kBAAA;EACA,UAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,uBAAA;EACA,yBA7jBc;EA8jBd,kBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,eAAA;EACA,oCAAA;EACA,iBAAA;AC7IF;;ADgJA;EACE,oCAzkBc;EA0kBd,YAAA;AC7IF","file":"style.css"} \ No newline at end of file diff --git a/src/py/static/css/style.scss b/src/py/static/css/style.scss index 05fda39..25e7e1a 100644 --- a/src/py/static/css/style.scss +++ b/src/py/static/css/style.scss @@ -104,13 +104,14 @@ body { font-size: 2rem; margin-left: 1.5rem; + margin-bottom: 1rem; } #sectie-1 { display: flex; flex-direction: column; - gap: 1rem; + gap: 0.75rem; padding: 0 2.5rem 0 1rem; position: relative; @@ -124,7 +125,7 @@ body @include box-shadow; @include border-radius; padding: 1rem; - margin-top: 1rem; + // margin-top: 1rem; background-color: white; .algemeen-overzicht @@ -232,6 +233,7 @@ body &:hover { background-color: lightgray; + cursor: pointer; } } } @@ -371,11 +373,18 @@ body border: solid 2px #abd3ae; border-radius: 10px; } + +.modal #plant-id +{ + font-size: 1.5rem; +} + .modal .close { color: #aaa; float: right; - font-size: 1.75rem; + font-size: 2rem; font-weight: bold; + margin-top: -35px; } .modal .close:hover, .modal .close:active { @@ -437,7 +446,7 @@ body } #myModal input[type="submit"] { - background-color: white; + background: linear-gradient(45deg, #abd3ae, #6ebf7d); } #myModal button { @@ -453,24 +462,6 @@ body background: linear-gradient(45deg, #ffcc00, #ff6600); } -#myModal button:hover { - background: linear-gradient(45deg, #abd3ae, #fff); - color: #000; -} - -.modal .close { - color: #aaa; - float: right; - font-size: 1.75rem; - font-weight: bold; -} - -.modal .close:hover, -.modal .close:active { - color: black; - text-decoration: none; - cursor: pointer; -} .switch-container { display: flex; @@ -482,7 +473,7 @@ body display: inline-block; width: 60px; height: 30px; -} + .switch input { opacity: 0; @@ -532,3 +523,73 @@ input:checked + .slider:before { { background-color: white; } + + .switch-container { + position: absolute; + } +} + +.pagina-container { + position: relative; + align-items: end; +} + +.close-button:hover { + background-color: $primary-color; /* Aangepaste hover kleur */ + color: white; /* Tekstkleur wit op hover voor betere zichtbaarheid */ +} + +.container { + position: relative; + align-items: end; +} + +.close-button +{ + position: absolute; + top: -90px; + right: -35px; + transform: translate(100%, 0%); + width: 50px; + height: 50px; + background-color: white; + color: $primary-color; + border-radius: 50%; /* Aangepast voor perfecte cirkel */ + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + font-size: 50px; + border: solid $primary-color 2px; + font-weight: bold; +} + +.back-button { + position: absolute; + top: -90px; + right: -25px; + width: 50px; + height: 50px; + background-color: white; + color: $primary-color; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + font-size: 35px; + border: solid $primary-color 2px; + font-weight: bold; +} + +.back-button:hover { + background-color: $primary-color; + color: white +} + +// .modal-header +// { +// width: 100%; +// display: flex; +// flex-direction: row; +// } \ No newline at end of file diff --git a/src/py/static/images/Toevoegen.png b/src/py/static/images/Toevoegen.png deleted file mode 100644 index 3878c7e..0000000 Binary files a/src/py/static/images/Toevoegen.png and /dev/null differ diff --git a/src/py/static/images/plus.png b/src/py/static/images/plus.png new file mode 100644 index 0000000..41c3a31 Binary files /dev/null and b/src/py/static/images/plus.png differ diff --git a/src/py/static/js/main.js b/src/py/static/js/main.js index e5b49a1..8212056 100644 --- a/src/py/static/js/main.js +++ b/src/py/static/js/main.js @@ -40,36 +40,41 @@ function openModal() } } } - else - { - console.error("Modaal elementen niet gevonden"); - } + // else + // { + // console.error("Modaal elementen niet gevonden"); + // } } -document.addEventListener('DOMContentLoaded', () => -{ +// document.addEventListener('DOMContentLoaded', () => { + // Call openModal when DOM content is loaded openModal(); - // Roep andere functies hier aan zoals vereist, bijvoorbeeld: - // fetchWeatherDataAndDrawChart(); - - // Stuur een bericht naar het hoofdproces om het Python-script uit te voeren. + // Send a message to the main process to execute the Python script ipcRenderer.send('run-python-script', ['some', 'arguments']); - // Luister naar updates van HTML-data vanuit het hoofdproces. - ipcRenderer.on('update-html-data', (event, data) => - { - // Werk de HTML bij met de ontvangen data. - document.getElementById('batteryVoltage').innerText = data.batteryVoltage; - // Voeg vergelijkbare regels toe voor andere data velden. + ipcRenderer.on('python-script-response', (event, pythonData) => { + if (pythonData === 'error') { + console.error('An error occurred while retrieving data from Python'); + } else { + // Update HTML elements with data received from Python + document.getElementById('bodem-temperatuur').textContent = pythonData.bodemTemperatuur; // Adjust the property based on your actual Python response + } }); - // Trigger een event om data update aan te vragen. + // Listen for updates to HTML data from the main process + ipcRenderer.on('update-html-data', (event, data) => { + // Update the HTML with the received data + document.getElementById('batteryVoltage').innerText = data.batteryVoltage; + // Add similar lines for other data fields + }); + + // Trigger an event to request data update ipcRenderer.send('request-update-data'); - // Haal batterij data op wanneer de pagina laadt. + // Fetch battery data when the page loads fetchBatteryData(); -}); +// }); /** * Functie om een lijngrafiek te tekenen. @@ -83,8 +88,9 @@ function drawLineChart(xLabels, data) // Verkrijg het canvas element en de context voor tekenen. const canvas = document.getElementById("myCanvas"); + if (canvas) + { const ctx = canvas.getContext("2d"); - // Maak het canvas schoon voor nieuwe tekening. ctx.clearRect(0, 0, canvas.width, canvas.height); @@ -144,6 +150,11 @@ function drawLineChart(xLabels, data) } } } +else +{ + console.log("Canvas element does not exist on this page."); +} +} /** * Functie om weergegevens op te halen en een grafiek te tekenen. @@ -168,17 +179,17 @@ function fetchWeatherDataAndDrawChart() throw new Error('Network response was not ok.'); }) .then(data => - { - // Verkrijg de weersvoorspelling voor de eerste 5 dagen. - const weatherForecast = data.weather_forecast.slice(0, 5); - // Converteer datums naar dagen van de week. - const dates = weatherForecast.map(day => convertDateToDayOfWeek(day.dag)); - // Verkrijg de maximale temperaturen. - const temperatures = weatherForecast.map(day => day.max_temp); - - // Teken de lijngrafiek met de verkregen data. - drawLineChart(dates, temperatures); - }) + { + // Verkrijg de weersvoorspelling voor de eerste 5 dagen. + const weatherForecast = data.weather_forecast.slice(0, 5); + // Converteer datums naar afkortingen van dagen van de week. + const dates = weatherForecast.map(day => convertDateToDayOfWeek(day.dag)); + // Verkrijg de maximale temperaturen. + const temperatures = weatherForecast.map(day => day.max_temp); + + // Teken de lijngrafiek met de verkregen data. + drawLineChart(dates, temperatures); + }) .catch(error => { // Log eventuele fouten tijdens het ophalen. @@ -191,16 +202,32 @@ function fetchWeatherDataAndDrawChart() * @param {string} dateString - De datum als string in het formaat "dd-mm". * @returns {string} De afkorting van de dag van de week. */ -function convertDateToDayOfWeek(dateString) -{ - // Split de datum in dag en maand, en zet deze om naar nummers. - const [day, month] = dateString.split('-').map(Number); - // Maak een nieuwe datumobject (jaar is willekeurig omdat we alleen maand en dag nodig hebben). - const date = new Date(2024, month - 1, day); - // Verkrijg de dag van de week en zet deze om naar een afkorting. - const dayOfWeek = ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'][date.getDay()]; - return dayOfWeek; -} +// function convertDateToDayOfWeek(dateString) +// { +// // Split de datum in dag en maand, en zet deze om naar nummers. +// const [day, month] = dateString.split('-').map(Number); +// // Maak een nieuwe datumobject (jaar is willekeurig omdat we alleen maand en dag nodig hebben). +// const date = new Date(2024, month - 1, day); +// // Verkrijg de dag van de week en zet deze om naar een afkorting. +// const dayOfWeek = ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'][date.getDay()]; +// return dayOfWeek; +// } + +// function convertDateToDayOfWeek(dateString) +// { +// // Create a date object from the dateString +// const [year, month, day] = dateString.split("-").map(Number); +// const date = new Date(year, month - 1, day); + +// // Array of Dutch day names +// const dayNames = ["zo", "ma", "di", "wo", "do", "vr", "za"]; + +// // Return the day name according to the date object +// return dayNames[date.getDay()]; +// } + + + /** * Functie om batterijdata op te halen wanneer de pagina laadt. @@ -222,6 +249,7 @@ function fetchBatteryData() console.error('Error fetching battery data:', error); }); } + /** * Functie om batterijdata op de pagina bij te werken. @@ -230,22 +258,31 @@ function fetchBatteryData() */ function updateBatteryData(batteryData) { - // Update de data voor specifieke apparaten op basis van hun ID. - if (batteryData[1].device_id == 322) + // Check if on the specific page where the battery data should be updated + if (window.location.pathname.endsWith('index.html')) { - document.getElementById('deviceNumber-322').innerHTML = batteryData[1].device_id; - document.getElementById('voltage-322').innerHTML = batteryData[1].label; - document.getElementById('time-322').innerHTML = new Date(batteryData[0].last_seen).toLocaleTimeString(); - document.getElementById('tevredenheid-322').innerHTML = batteryData[1].last_battery_voltage; - } - if (batteryData[0].device_id == 256) - { - document.getElementById('deviceNumber-256').innerHTML = batteryData[0].device_id; - document.getElementById('voltage-256').innerHTML = batteryData[0].label; - document.getElementById('time-256').innerHTML = new Date(batteryData[0].last_seen).toLocaleTimeString(); - document.getElementById('tevredenheid-256').innerHTML = batteryData[0].last_battery_voltage; + // Update de data voor specifieke apparaten op basis van hun ID. + const sensor322Element = document.getElementById('deviceNumber-322'); + const sensor256Element = document.getElementById('deviceNumber-256'); + + if (batteryData[1].device_id === 322 && sensor322Element) + { + sensor322Element.innerHTML = batteryData[1].device_id; + document.getElementById('voltage-322').innerHTML = batteryData[1].label; + document.getElementById('time-322').innerHTML = new Date(batteryData[1].last_seen * 1000).toLocaleTimeString(); + document.getElementById('tevredenheid-322').innerHTML = batteryData[1].last_battery_voltage.toFixed(2); + } + if (batteryData[0].device_id === 256 && sensor256Element) + { + sensor256Element.innerHTML = batteryData[0].device_id; + document.getElementById('voltage-256').innerHTML = batteryData[0].label; + document.getElementById('time-256').innerHTML = new Date(batteryData[0].last_seen * 1000).toLocaleTimeString(); + document.getElementById('tevredenheid-256').innerHTML = batteryData[0].last_battery_voltage.toFixed(2); + } } } + + // Definieer de API-sleutel en de stad waarvoor we de weergegevens willen ophalen. const apiKey = "9516081f15727d063c9e2f08454a2fe9"; @@ -286,4 +323,84 @@ fetch(apiUrl) { // Log eventuele fouten tijdens het ophalen van de data. console.error('There was a problem with the fetch operation:', error); - }); \ No newline at end of file + }); + + function dynamischSensor() + { + if (window.location.pathname.endsWith('index.html') || window.location.pathname === '/') + { + const sensor1 = document.getElementById("sensor-1"); + const sensor2 = document.getElementById("sensor-2"); + + if (sensor1 && sensor2) + { + sensor1.href = `sensor.html?id=${322}`; + sensor2.href = `sensor.html?id=${256}`; + } + else + { + console.log("Elementen 'sensor-1' of 'sensor-2' bestaan niet in de DOM."); + } + } + } + + // Aanroepen van de functie + dynamischSensor(); + + + function closeApplication() { + if (confirm("Weet je zeker dat je de applicatie wilt sluiten?")) { + window.close(); + }} + + function fetchPlantenData() + { + // Gebruik Axios om een GET-verzoek te versturen naar de planten endpoint. + axios.get('http://127.0.0.1:5000/planten') + .then(response => + { + // Verwerk de ontvangen data. + const plantenData = response.data; + updatePlantenData(plantenData); + }) + .catch(error => + { + // Log eventuele fouten tijdens het ophalen. + console.error('Error fetching planten data:', error); + }); + } + + function getPlantIdFromUrl() + { + // Maak een URL-object van de huidige locatie. + const currentUrl = new URL(window.location.href); + // Gebruik de URLSearchParams API om de query parameters te verwerken. + const searchParams = currentUrl.searchParams; + // Haal de 'id' query parameter op. + return searchParams.get('id'); // Dit zal een string retourneren of null als het niet bestaat. + } + + function updatePlantenData(plantenData) + { + // Verkrijg de plant ID uit de URL. + const plantId = parseInt(getPlantIdFromUrl(), 10); + + // Vind de plant met die ID in de ontvangen JSON-data. + const gevondenPlant = plantenData.find(plant => plant.id === plantId); + + // Update de titel van de pagina met de naam van de gevonden plant. + if (gevondenPlant) + { + document.title = gevondenPlant.plant_naam; + document.querySelector(".plant-titel").textContent = gevondenPlant.plant_naam; + console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); + } + else + { + console.log(`Geen plant gevonden met ID ${plantId}`); + } + } + + // Roep fetchPlantenData aan ergens waar het logisch is binnen je applicatielogica, bijvoorbeeld na het laden van de pagina of na een gebruikersactie. + fetchPlantenData(); + \ No newline at end of file diff --git a/src/py/static/js/planten.class.js b/src/py/static/js/planten.class.js index 6262cb5..9690491 100644 --- a/src/py/static/js/planten.class.js +++ b/src/py/static/js/planten.class.js @@ -88,7 +88,8 @@ class PlantGrid { // Handle the "Add" button const article = document.createElement("article"); const img = article.appendChild(document.createElement("img")); - img.src = "../static/images/Toevoegen.png"; + img.src = "../static/images/plus.png"; + // img.src = "../images/plus.png"; img.id = "toevoegen"; img.alt = "Add"; article.id = "modalButton"; @@ -107,60 +108,7 @@ class PlantGrid { } - displayGrid() { - const plantenTable = document.getElementById("planten"); // Verkrijg de tabel waarin het raster getoond moet worden. - let itemCount = 0; // Teller voor het aantal items in het raster. - - this.grid.forEach((row, rowIndex) => { - const tr = document.createElement("tr"); // Maak een tabelrij element. - - row.forEach((plant, colIndex) => { - const td = document.createElement("td"); // Maak een tabeldata element. - - // Logica om plantitems of de "Toevoegen" knop te verwerken. - if (itemCount < 8) { - if (plant) { - // Verwerk normale plantitems. - // Creëer een link element naar de planteninformatiepagina met plant ID als query parameter. - // Voeg vervolgens een artikel, afbeelding en titel toe met de plantinformatie. - // Handle regular plant items - const link = document.createElement("a"); - link.href = `planteninfo.html?id=${plant.id}`; - - const article = document.createElement("article"); - article.classList.add("plant-container"); - link.appendChild(article); - - const img = article.appendChild(document.createElement("img")); - img.src = "../static/images/icon_awesome-apple-alt.png"; - const h2 = article.appendChild(document.createElement("h2")); - h2.classList.add("plant-naam"); - h2.textContent = plant.plantNaam; - - td.appendChild(link); - itemCount++; - } else if (rowIndex === this.rows - 1 && colIndex === this.cols - 1 && itemCount <= 7) { - // Handle the "Add" button - const article = document.createElement("article"); - const img = article.appendChild(document.createElement("img")); - img.src = "../static/images/Toevoegen.png"; - img.id = "toevoegen"; - img.alt = "Add"; - article.id = "modalButton"; - article.onclick = openModal; - - td.appendChild(article); - itemCount++; - } - } - - tr.appendChild(td); // Voeg de td toe aan de tr. - }); - - plantenTable.appendChild(tr); // Voeg de tr toe aan de tabel. - }); -} } document.addEventListener("DOMContentLoaded", () => { diff --git a/src/py/templates/index.html b/src/py/templates/index.html index 1505214..8fa8e53 100644 --- a/src/py/templates/index.html +++ b/src/py/templates/index.html @@ -12,24 +12,27 @@ -
+
+
+
×
+
-
- -
-
+
\ No newline at end of file diff --git a/src/py/templates/kas_informatie.html b/src/py/templates/kas_informatie.html index f5ccc8e..d2182ab 100644 --- a/src/py/templates/kas_informatie.html +++ b/src/py/templates/kas_informatie.html @@ -13,6 +13,12 @@
+
+
×
+
+
@@ -20,7 +26,7 @@
-

Informatie Kas

+

Informatie Kas

diff --git a/src/py/templates/planteninfo.html b/src/py/templates/planteninfo.html index e873a84..ad8245e 100644 --- a/src/py/templates/planteninfo.html +++ b/src/py/templates/planteninfo.html @@ -8,11 +8,17 @@ - Informatie Kas + Planten
+
+
×
+
+
+ +
@@ -20,7 +26,7 @@
-

Informatie Kas

+

 

diff --git a/src/py/templates/pomp_informatie.html b/src/py/templates/pomp_informatie.html new file mode 100644 index 0000000..0275266 --- /dev/null +++ b/src/py/templates/pomp_informatie.html @@ -0,0 +1,136 @@ + + + + + + + + + + + Informatie Kas + + +
+ + +
+
+

Informatie Pomp

+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
Pomp Status:Uitstekend!
Waterverbruik:0.5 L/u
Volgende Irrigatie24:00
Laatste Irrigatie:18:00
+
+
+ +
+
+

Waterverbruik

+ +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + +
Aantal geplant:Loading...
Succesvolle Oogst:2
Gefaalde Oogst:2
+ + + + + + + + + + + + + + + + + + +
Warmste Maand:n.v.t.
koudste Maand:December
Gemiddelde Bodemtemp.:2˚C
Gemiddelde Uren Zonlicht:2u
+ + + + + + + + + + + + + + + + + + +
Laatste Irrigatie:2u
Aankomende Irrigatie:2u
Laatste Bemesting2d
Aankomende Bemesting:2w
+
+
+
+
+
+ + + diff --git a/src/py/templates/sensor.html b/src/py/templates/sensor.html new file mode 100644 index 0000000..c5f172e --- /dev/null +++ b/src/py/templates/sensor.html @@ -0,0 +1,136 @@ + + + + + + + + + + + Informatie Kas + + +
+ + +
+
+

Informatie Kas

+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
Device
Batterij Voltage
Tijden
Zulu
+
+
+ +
+
+

Zonlicht

+ +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + +
Aantal geplant:Loading...
Succesvolle Oogst:2
Gefaalde Oogst:2
+ + + + + + + + + + + + + + + + + + +
Warmste Maand:n.v.t.
koudste Maand:December
Gemiddelde Bodemtemp.:2˚C
Gemiddelde Uren Zonlicht:2u
+ + + + + + + + + + + + + + + + + + +
Laatste Irrigatie:2u
Aankomende Irrigatie:2u
Laatste Bemesting2d
Aankomende Bemesting:2w
+
+
+
+
+
+ + + diff --git a/src/py/templates/sensoren.html b/src/py/templates/sensoren.html deleted file mode 100644 index 442839c..0000000 --- a/src/py/templates/sensoren.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Sensoren - - - - - -
-
- -
-
-
- -
- -
-
-
- -
-
- -
-
-
-
-
- - \ No newline at end of file