Skip to content

Commit

Permalink
Merge branch 'main' of github.com:theyosh/TerrariumPI into main
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Jan 23, 2024
2 parents 15f04de + 06132b8 commit 4d98435
Show file tree
Hide file tree
Showing 44 changed files with 5,634 additions and 2,982 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install OS dependencies
run: sudo apt-get install -y python3-dev libasound2-dev

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -75,4 +75,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
23 changes: 6 additions & 17 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,32 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Check Dockerfile exists
id: dockerfile
uses: andstor/file-existence-action@v2
with:
files: "Dockerfile"
uses: actions/checkout@v4
-
name: Set up QEMU
if: steps.Dockerfile.outputs.files_exists == 'true'
id: qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: arm
-
name: Set up Docker Buildx
if: steps.Dockerfile.outputs.files_exists == 'true'
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Docker meta
if: steps.Dockerfile.outputs.files_exists == 'true'
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: theyosh/terrariumpi
-
name: Login to DockerHub
if: steps.Dockerfile.outputs.files_exists == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if: steps.Dockerfile.outputs.files_exists == 'true'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # for posts's lastmod

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/svelte-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js LTS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: lts/*
Expand Down
14 changes: 7 additions & 7 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ avatar: /assets/img/profile_image.jpg
toc: true

comments:
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
active: giscus # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
# The active options are as follows:
disqus:
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
Expand All @@ -97,14 +97,14 @@ comments:
issue_term: # < url | pathname | title | ...>
# Giscus options › https://giscus.app
giscus:
repo: # <gh-username>/<repo>
repo_id:
category:
category_id:
mapping: # optional, default to 'pathname'
repo: theyosh/TerrariumPI # <gh-username>/<repo>
repo_id: MDEwOlJlcG9zaXRvcnk0OTY3MjQ1Mg==
category: Comments
category_id: DIC_kwDOAvXxBM4Ccopg
mapping: pathname # optional, default to 'pathname'
input_position: # optional, default to 'bottom'
lang: # optional, default to the value of `site.lang`
reactions_enabled: # optional, default to the value of `1`
reactions_enabled: 1 # optional, default to the value of `1`

# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
assets:
Expand Down
2 changes: 1 addition & 1 deletion docs/_hardware/hls-live_webcam.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Live HLS Stream
categories: [Hardware, Webcam]
tags: [webcam, live, remote, streaming]
tags: [webcam, live, streaming]

image:
path: /assets/img/HLS_Livestream.webp
Expand Down
2 changes: 1 addition & 1 deletion docs/_hardware/remote_button.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Remote Button
categories: [Hardware, Button]
tags: [button, remote, json, temperature, humidity,fertility,ph,uva,moisture,uvb,altitude,co2,distance,uvi,pressure,light]
tags: [button, remote]

image:
path: /assets/img/remote_sensor.webp
Expand Down
13 changes: 13 additions & 0 deletions docs/_posts/2018-11-28-pascal-hideout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: TerrariumPI on Pascal's Hideout
date: 2018-11-28 12:00:00 +0100
categories: [Website, News]
tags: [publication]

image:
path: /assets/img/publications/TerrariumPI_on_Pascals_Hideout.webp
src: /assets/img/publications/TerrariumPI_on_Pascals_Hideout.webp
alt: TerrariumPI on Pascal's Hideout
---
Website: [Pascal's Hideout](https://pascal.kolyn.nl/raspberry-pi/)\
Publication date: 28 november 2018
Binary file not shown.
4 changes: 2 additions & 2 deletions gui/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DropdownButton,
DropdownMenu,
DropdownDivider,
} from 'svelte-adminlte';
} from '@keenmate/svelte-adminlte';
import RoutePages, { onRouteLoaded, Pages, PageUrls } from './pages';
import { listenPageTitleChanged, customPageTitleUsed } from './stores/page-title';
Expand Down Expand Up @@ -543,7 +543,7 @@
</div>
</div>
<footer class="main-footer p-2 text-sm">
&copy; 2015 - 2023 <a target="_blank" rel="noopener noreferrer" href="https://theyosh.nl">TheYOSH</a>
&copy; 2015 - 2024 <a target="_blank" rel="noopener noreferrer" href="https://theyosh.nl">TheYOSH</a>
<!-- Credits to the original builders. The least I can do -->
<small>
using <a target="_blank" rel="noopener noreferrer" href="https://adminlte.io">AdminLTE</a>,
Expand Down
9 changes: 5 additions & 4 deletions gui/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getConfig, setConfig } from 'svelte-adminlte/src/config.js';
import { get } from 'svelte/store';
import { Config } from '@keenmate/svelte-adminlte';
import { isAuthenticated } from './stores/authentication';
import { default as currentUserStore } from './stores/current-user';

Expand All @@ -13,15 +14,15 @@ export const getCustomConfig = (extra) => {
const settings = {
...custom,
...window.terrariumPI,
...getConfig(),
...get(Config),
...extra,
};
setConfig(settings);
Config.set(settings);

if (settings.logged_in && settings.username) {
isAuthenticated.set(true);
currentUserStore.set(settings.username);
}

return getConfig();
return get(Config);
};
2 changes: 1 addition & 1 deletion gui/modals/ConfirmModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { Modal, ModalCloseButton } from 'svelte-adminlte';
import { Modal, ModalCloseButton } from '@keenmate/svelte-adminlte';
import { createEventDispatcher } from 'svelte';
import { _ } from 'svelte-i18n';
Expand Down
2 changes: 1 addition & 1 deletion gui/modals/LoadingModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { Modal } from 'svelte-adminlte';
import { Modal } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
Expand Down
2 changes: 1 addition & 1 deletion gui/modals/LoginFormModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { Modal, ModalCloseButton } from 'svelte-adminlte';
import { Modal, ModalCloseButton } from '@keenmate/svelte-adminlte';
import { onMount } from 'svelte';
import { successNotification, errorNotification } from '../providers/notification-provider';
Expand Down
2 changes: 1 addition & 1 deletion gui/modals/WebcamMarkerModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { Modal } from 'svelte-adminlte';
import { Modal } from '@keenmate/svelte-adminlte';
import { onMount, getContext } from 'svelte';
import { _ } from 'svelte-i18n';
import { createForm } from 'felte';
Expand Down
4 changes: 2 additions & 2 deletions gui/pages/About.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down Expand Up @@ -86,7 +86,7 @@
<a href="api/swagger/" target="_blank">Swagger</a>
</p>
<p>
<br />&copy; Copyright 2015 - 2023<br /><a href="https://theyosh.nl" target="_blank" rel="noopener noreferrer"
<br />&copy; Copyright 2015 - 2024<br /><a href="https://theyosh.nl" target="_blank" rel="noopener noreferrer"
>TheYOSH</a
>
</p>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Audiofiles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
dayjs.extend(duration);
import { onMount, onDestroy, getContext } from 'svelte';
import { _ } from 'svelte-i18n';
import { PageHeader, FileInput } from 'svelte-adminlte';
import { PageHeader, FileInput } from '@keenmate/svelte-adminlte';
import { locale } from '../locale/i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Buttons.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy, getContext, setContext } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Calendar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
dayjs.extend(duration);
import { onDestroy, onMount, getContext } from 'svelte';
import { _ } from 'svelte-i18n';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import tippy from 'sveltejs-tippy';
import { followCursor } from 'tippy.js';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Dashboard.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { PageHeader, InfoBox } from 'svelte-adminlte';
import { PageHeader, InfoBox } from '@keenmate/svelte-adminlte';
import { _, number } from 'svelte-i18n';
import { onMount, onDestroy, setContext } from 'svelte';
import { dayjs } from 'svelte-time';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Enclosures.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy, getContext, setContext } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Home.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { onMount, onDestroy } from 'svelte';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Log.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import { _ } from 'svelte-i18n';
import { onMount, onDestroy } from 'svelte';
import { PageHeader, BreadcrumbItem } from 'svelte-adminlte';
import { PageHeader, BreadcrumbItem } from '@keenmate/svelte-adminlte';
import { date, time } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/NotFound.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Notifications.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy, getContext } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Playlists.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import { onDestroy, onMount, getContext } from 'svelte';
import { _ } from 'svelte-i18n';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { dayjs } from 'svelte-time';
import duration from 'dayjs/esm/plugin/duration';
dayjs.extend(duration);
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Relays.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { onMount, onDestroy, getContext, setContext } from 'svelte';
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Sensors.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy, getContext, setContext } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
6 changes: 3 additions & 3 deletions gui/pages/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { onMount, onDestroy } from 'svelte';
import { writable } from 'svelte/store';
import { _, number } from 'svelte-i18n';
import { PageHeader, BreadcrumbItem } from 'svelte-adminlte';
import { PageHeader, BreadcrumbItem } from '@keenmate/svelte-adminlte';
import { createForm } from 'felte';
import { setConfig } from 'svelte-adminlte/src/config.js';
import { Config } from '@keenmate/svelte-adminlte';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
import { successNotification, errorNotification } from '../providers/notification-provider';
Expand Down Expand Up @@ -99,7 +99,7 @@
changeLang(values.language);
currency.set(values.currency);
setConfig(formToJSON(context.form));
Config.set(formToJSON(context.form));
autoDarkMode($isDay, $isDarkDesktop);
} catch (error) {
errorNotification(error.message, $_('notification.form.save.error.title', { default: 'Save Error' }));
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Status.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { onMount, onDestroy, setContext } from 'svelte';
import { PageHeader } from 'svelte-adminlte';
import { PageHeader } from '@keenmate/svelte-adminlte';
import { _ } from 'svelte-i18n';
import { setCustomPageTitle, customPageTitleUsed } from '../stores/page-title';
Expand Down
Loading

0 comments on commit 4d98435

Please sign in to comment.