Dynamic Webpage: Difference between revisions
| Line 38: | Line 38: | ||
* <code>cd /usr/local/src/vue.js</code> | * <code>cd /usr/local/src/vue.js</code> | ||
* <code>wget -O vue.global.prod.js https://unpkg.com/vue@3/dist/vue.global.prod.js</code> | * <code>wget -O vue.global.prod.js https://unpkg.com/vue@3/dist/vue.global.prod.js</code> | ||
* <code>sudo ln | * <code>sudo ln /usr/local/src/vue.js/vue.global.prod.js vue.global.prod.js</code> | ||
==== Moment.js ==== | ==== Moment.js ==== | ||
| Line 44: | Line 44: | ||
* <code>cd /usr/local/src/moment.js</code> | * <code>cd /usr/local/src/moment.js</code> | ||
* <code>wget -O moment.min.js https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js</code> | * <code>wget -O moment.min.js https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js</code> | ||
* <code>sudo ln | * <code>sudo ln /usr/local/src/moment.js/moment.min.js moment.min.js</code> | ||
==== Chart.js ==== | ==== Chart.js ==== | ||
| Line 50: | Line 50: | ||
* <code>cd /usr/local/src/chart.js</code> | * <code>cd /usr/local/src/chart.js</code> | ||
* <code>wget -O Chart.min.js https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js</code> | * <code>wget -O Chart.min.js https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js</code> | ||
* <code>sudo ln | * <code>sudo ln /usr/local/src/chart.js/Chart.min.js Chart.min.js </code> | ||
Revision as of 18:24, 8 December 2025
The dynamic webpage implements the following features:
- Display of measurement data
- Display of log from refill, Balling mineral dosing and feed
- Display and interface for creating and modifying feed profiles
- Display and interface for modifying the feed schedule
- Display and interface for modifying the Balling mineral dosing amount
- Display and interface for modifying the actuator schedule
- Display and interface for setting the refill controller state
The demo of the webpage is available here
Installation
Webpage
Clone the website and the API to /usr/local/src/:
- git clone https://in-dubio@bitbucket.org/in-dubio/aquarium-vue.git
- git clone https://in-dubio@bitbucket.org/in-dubio/aquarium-api.git
Remove existing webpage using rm /var/www/index.html.
Assuming the web server is storing the content in /var/www/html/:
Create symbolic links from the web server directory pointing to the downloaded pages:
- sudo ln -s /usr/local/src/aquarium-vue/* /var/www/html
Create symbolic links from the web server directory pointing to the API scripts:
sudo ln -s /usr/local/src/aquarium-api/api.php /var/www/html/api.phpsudo ln -s /srv/aquarium-api/functions.php /var/www/html/functions.phpsudo ln -s /srv/aquarium-api/db.php /var/www/html/db.php
Note: Do NOT copy ALL files from the API repository to the website.
Libraries
Download the libraries into separate folder(s) and create symbolic links. Ensure you have the required rights.
Below versions are PROD version (no console error logging).
The libraries are downloaded outside of the target directory of the webpage. Symbolic links need to be created to the js folder.
Vue.js
mkdir /usr/local/src/vue.jscd /usr/local/src/vue.jswget -O vue.global.prod.js https://unpkg.com/vue@3/dist/vue.global.prod.jssudo ln /usr/local/src/vue.js/vue.global.prod.js vue.global.prod.js
Moment.js
mkdir /usr/local/src/moment.jscd /usr/local/src/moment.jswget -O moment.min.js https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.jssudo ln /usr/local/src/moment.js/moment.min.js moment.min.js
Chart.js
mkdir /usr/local/src/chart.jscd /usr/local/src/chart.jswget -O Chart.min.js https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.jssudo ln /usr/local/src/chart.js/Chart.min.js Chart.min.js