Compare commits

...

103 Commits

Author SHA1 Message Date
dependabot[bot] 95f134eb27 npm-dep: bump eslint-plugin-svelte from 2.32.3 to 2.32.4 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 18:05:31 +00:00
seriousm4x cb14a87783 npm-dep: update 2023-07-21 20:03:52 +02:00
seriousm4x 9fdfc8ad0b error check all database writes (debug for #135) 2023-07-21 20:02:11 +02:00
dependabot[bot] 04a4299930 npm-dep: bump svelte from 4.1.0 to 4.1.1 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.1.1/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 10:01:58 +00:00
dependabot[bot] ad6c2afbc2 npm-dep: bump eslint-plugin-svelte from 2.32.2 to 2.32.3 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.32.2 to 2.32.3.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.32.2...v2.32.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 09:18:29 +00:00
seriousm4x bc1d8c8e6f nicer changelogs 2023-07-20 01:37:38 +02:00
seriousm4x d1f3d38835 no more auto merge commits 2023-07-20 01:37:25 +02:00
seriousm4x 3f4e650a1e Merge pull request #129 from seriousm4x/dependabot/npm_and_yarn/frontend/svelte-4.1.0
Bump svelte from 4.0.5 to 4.1.0 in /frontend
2023-07-20 01:11:06 +02:00
seriousm4x 2b1e4672d8 Merge pull request #128 from seriousm4x/dependabot/npm_and_yarn/frontend/eslint-8.45.0
Bump eslint from 8.44.0 to 8.45.0 in /frontend
2023-07-20 01:10:57 +02:00
seriousm4x 2698c12399 Merge pull request #120 from seriousm4x/dependabot/npm_and_yarn/frontend/typescript-eslint/eslint-plugin-5.62.0
Bump @typescript-eslint/eslint-plugin from 5.61.0 to 5.62.0 in /frontend
2023-07-20 01:10:48 +02:00
seriousm4x 1d2e5de54a Merge pull request #119 from seriousm4x/dependabot/npm_and_yarn/frontend/typescript-eslint/parser-5.62.0
Bump @typescript-eslint/parser from 5.61.0 to 5.62.0 in /frontend
2023-07-20 01:10:38 +02:00
dependabot[bot] 31b7bf5de2 Bump svelte from 4.0.5 to 4.1.0 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.0.5 to 4.1.0.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.1.0/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 23:07:28 +00:00
dependabot[bot] c6e0668882 Bump @typescript-eslint/eslint-plugin from 5.61.0 to 5.62.0 in /frontend
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.61.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 23:03:49 +00:00
dependabot[bot] c32e8ffa8d Bump @typescript-eslint/parser from 5.61.0 to 5.62.0 in /frontend
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.61.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 23:03:45 +00:00
dependabot[bot] 1b7020f9bd Bump eslint from 8.44.0 to 8.45.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 23:03:36 +00:00
seriousm4x 13e3dc529a update deps 2023-07-20 01:02:15 +02:00
github-actions[bot] 38d334bee3 Merge pull request #127 from seriousm4x/dependabot/go_modules/backend/github.com/pocketbase/pocketbase-0.16.10
Bump github.com/pocketbase/pocketbase from 0.16.9 to 0.16.10 in /backend
2023-07-17 09:43:40 +00:00
dependabot[bot] dbe38ed7e8 Bump github.com/pocketbase/pocketbase from 0.16.9 to 0.16.10 in /backend
Bumps [github.com/pocketbase/pocketbase](https://github.com/pocketbase/pocketbase) from 0.16.9 to 0.16.10.
- [Release notes](https://github.com/pocketbase/pocketbase/releases)
- [Changelog](https://github.com/pocketbase/pocketbase/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/pocketbase/compare/v0.16.9...v0.16.10)

---
updated-dependencies:
- dependency-name: github.com/pocketbase/pocketbase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 09:43:26 +00:00
github-actions[bot] 3a1dab3507 Merge pull request #126 from seriousm4x/dependabot/npm_and_yarn/frontend/vite-4.4.4
Bump vite from 4.4.3 to 4.4.4 in /frontend
2023-07-14 09:54:33 +00:00
dependabot[bot] a803c7d251 Bump vite from 4.4.3 to 4.4.4 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.3 to 4.4.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 09:54:19 +00:00
github-actions[bot] bed48a9839 Merge pull request #125 from seriousm4x/dependabot/go_modules/backend/github.com/pocketbase/pocketbase-0.16.9
Bump github.com/pocketbase/pocketbase from 0.16.8 to 0.16.9 in /backend
2023-07-14 09:44:21 +00:00
dependabot[bot] 18b1996a92 Bump github.com/pocketbase/pocketbase from 0.16.8 to 0.16.9 in /backend
Bumps [github.com/pocketbase/pocketbase](https://github.com/pocketbase/pocketbase) from 0.16.8 to 0.16.9.
- [Release notes](https://github.com/pocketbase/pocketbase/releases)
- [Changelog](https://github.com/pocketbase/pocketbase/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/pocketbase/compare/v0.16.8...v0.16.9)

---
updated-dependencies:
- dependency-name: github.com/pocketbase/pocketbase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 09:44:04 +00:00
github-actions[bot] 400daae874 Merge pull request #124 from seriousm4x/dependabot/npm_and_yarn/frontend/sveltejs/kit-1.22.3
Bump @sveltejs/kit from 1.22.1 to 1.22.3 in /frontend
2023-07-13 10:06:50 +00:00
dependabot[bot] f0a59ea7a1 Bump @sveltejs/kit from 1.22.1 to 1.22.3 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.22.1 to 1.22.3.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.22.3/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 10:06:37 +00:00
github-actions[bot] d182dd18c6 Merge pull request #122 from seriousm4x/dependabot/npm_and_yarn/frontend/vite-4.4.3
Bump vite from 4.4.2 to 4.4.3 in /frontend
2023-07-12 10:06:59 +00:00
dependabot[bot] 88763ebb8e Bump vite from 4.4.2 to 4.4.3 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 10:06:45 +00:00
github-actions[bot] 18ea7ae4e2 Merge pull request #121 from seriousm4x/dependabot/npm_and_yarn/frontend/pocketbase-0.15.3
Bump pocketbase from 0.15.2 to 0.15.3 in /frontend
2023-07-12 10:06:39 +00:00
dependabot[bot] bf9d8d9b85 Bump pocketbase from 0.15.2 to 0.15.3 in /frontend
Bumps [pocketbase](https://github.com/pocketbase/js-sdk) from 0.15.2 to 0.15.3.
- [Release notes](https://github.com/pocketbase/js-sdk/releases)
- [Changelog](https://github.com/pocketbase/js-sdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/js-sdk/compare/v0.15.2...v0.15.3)

---
updated-dependencies:
- dependency-name: pocketbase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 10:06:25 +00:00
Maxi Quoß 06b7d3e8a6 lower minimum user password length to 5, #112 2023-07-10 16:11:34 +02:00
github-actions[bot] cda98f6c0c Merge pull request #118 from seriousm4x/dependabot/go_modules/backend/github.com/pocketbase/pocketbase-0.16.8
Bump github.com/pocketbase/pocketbase from 0.16.7 to 0.16.8 in /backend
2023-07-10 09:17:06 +00:00
dependabot[bot] 6be4f29f08 Bump github.com/pocketbase/pocketbase from 0.16.7 to 0.16.8 in /backend
Bumps [github.com/pocketbase/pocketbase](https://github.com/pocketbase/pocketbase) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/pocketbase/pocketbase/releases)
- [Changelog](https://github.com/pocketbase/pocketbase/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/pocketbase/compare/v0.16.7...v0.16.8)

---
updated-dependencies:
- dependency-name: github.com/pocketbase/pocketbase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 09:16:48 +00:00
github-actions[bot] 31874768eb Merge pull request #117 from seriousm4x/dependabot/npm_and_yarn/frontend/svelte-4.0.5
Bump svelte from 4.0.4 to 4.0.5 in /frontend
2023-07-07 10:11:03 +00:00
dependabot[bot] 2c240a84cf Bump svelte from 4.0.4 to 4.0.5 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.0.5/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-07 10:10:49 +00:00
github-actions[bot] 2e897bff63 Merge pull request #116 from seriousm4x/dependabot/npm_and_yarn/frontend/sveltejs/kit-1.22.1
Bump @sveltejs/kit from 1.22.0 to 1.22.1 in /frontend
2023-07-07 10:09:52 +00:00
dependabot[bot] 7b1105aa22 Bump @sveltejs/kit from 1.22.0 to 1.22.1 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.22.0 to 1.22.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.22.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-07 10:09:34 +00:00
github-actions[bot] 77aacf7941 Merge pull request #115 from seriousm4x/dependabot/npm_and_yarn/frontend/vite-4.4.2
Bump vite from 4.4.0 to 4.4.2 in /frontend
2023-07-07 10:08:23 +00:00
dependabot[bot] 77e4d1093a Bump vite from 4.4.0 to 4.4.2 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.0 to 4.4.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-07 10:08:08 +00:00
seriousm4x 181b53205b Merge pull request #113 from seriousm4x/dependabot/npm_and_yarn/frontend/vite-4.4.0
Bump vite from 4.3.9 to 4.4.0 in /frontend
2023-07-07 01:01:31 +02:00
seriousm4x 9a72c23516 Merge pull request #114 from seriousm4x/dependabot/go_modules/backend/github.com/prometheus-community/pro-bing-0.3.0
Bump github.com/prometheus-community/pro-bing from 0.2.0 to 0.3.0 in /backend
2023-07-07 01:00:56 +02:00
dependabot[bot] a171a5b5cb Bump github.com/prometheus-community/pro-bing in /backend
Bumps [github.com/prometheus-community/pro-bing](https://github.com/prometheus-community/pro-bing) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/prometheus-community/pro-bing/releases)
- [Changelog](https://github.com/prometheus-community/pro-bing/blob/main/.goreleaser.yaml)
- [Commits](https://github.com/prometheus-community/pro-bing/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus-community/pro-bing
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 09:28:58 +00:00
dependabot[bot] 3a2154c3ab Bump vite from 4.3.9 to 4.4.0 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.9 to 4.4.0.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@4.4.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 09:21:49 +00:00
seriousm4x 6824668f76 Merge pull request #111 from seriousm4x/dependabot/npm_and_yarn/frontend/sveltejs/kit-1.22.0
Bump @sveltejs/kit from 1.21.0 to 1.22.0 in /frontend
2023-07-05 20:10:49 +02:00
dependabot[bot] 85f7b120ca Bump @sveltejs/kit from 1.21.0 to 1.22.0 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.22.0/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 18:09:40 +00:00
github-actions[bot] 8d2a55c868 Merge pull request #110 from seriousm4x/dependabot/npm_and_yarn/frontend/svelte-4.0.4
Bump svelte from 4.0.3 to 4.0.4 in /frontend
2023-07-05 09:12:14 +00:00
dependabot[bot] f5f5cca1ba Bump svelte from 4.0.3 to 4.0.4 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.0.4/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 09:12:00 +00:00
github-actions[bot] cf04a57e6d Merge pull request #109 from seriousm4x/dependabot/npm_and_yarn/frontend/svelte-4.0.3
Bump svelte from 4.0.2 to 4.0.3 in /frontend
2023-07-04 10:00:43 +00:00
dependabot[bot] a832d89a14 Bump svelte from 4.0.2 to 4.0.3 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.0.3/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 10:00:28 +00:00
seriousm4x 02bf30c393 dark theme star history 2023-07-03 20:39:49 +02:00
seriousm4x 47c03527d0 update go dependencies 2023-07-03 20:03:12 +02:00
seriousm4x 92a4657459 update dependencies 2023-07-03 20:02:20 +02:00
seriousm4x 6d0d4a8adc Merge pull request #106 from seriousm4x/dependabot/npm_and_yarn/frontend/eslint-8.44.0
Bump eslint from 8.43.0 to 8.44.0 in /frontend
2023-07-03 19:55:31 +02:00
dependabot[bot] a395b3ed60 Bump eslint from 8.43.0 to 8.44.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 09:18:47 +00:00
github-actions[bot] 8830222e10 Merge pull request #107 from seriousm4x/dependabot/npm_and_yarn/frontend/eslint-plugin-svelte-2.32.2
Bump eslint-plugin-svelte from 2.32.1 to 2.32.2 in /frontend
2023-07-03 09:17:56 +00:00
dependabot[bot] ffc4e92f96 Bump eslint-plugin-svelte from 2.32.1 to 2.32.2 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.32.1 to 2.32.2.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.32.1...v2.32.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 09:17:30 +00:00
seriousm4x 5674e5681e huge change 2023-07-01 21:58:06 +02:00
seriousm4x ba03d9e490 add star history chart 2023-07-01 21:55:17 +02:00
seriousm4x eb54cb9403 adjust column width #105 2023-07-01 20:34:38 +02:00
seriousm4x debd82a288 add mac vendor to scan table 2023-07-01 19:27:29 +02:00
seriousm4x 319817983e only allow user registrations from oauth, not user/password #103 2023-07-01 17:48:33 +02:00
seriousm4x a31f704274 add oidc user auth #103 2023-07-01 14:27:56 +02:00
seriousm4x c3eb2d869c netowrk scan: use reverse dns lookup for unknown devices #105 2023-07-01 12:35:41 +02:00
seriousm4x 49584c22a5 added "add all devices" button for network scan #104 2023-07-01 11:59:20 +02:00
seriousm4x 63bf2367c2 avoid device replication #97 2023-07-01 11:24:50 +02:00
github-actions[bot] b5200ec372 Merge pull request #102 from seriousm4x/dependabot/npm_and_yarn/frontend/eslint-plugin-svelte-2.32.1
Bump eslint-plugin-svelte from 2.32.0 to 2.32.1 in /frontend
2023-06-30 09:45:42 +00:00
dependabot[bot] 05d6aaf7d0 Bump eslint-plugin-svelte from 2.32.0 to 2.32.1 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.32.0 to 2.32.1.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.32.0...v2.32.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 09:45:29 +00:00
seriousm4x 28b51f7b8d Merge pull request #99 from seriousm4x/dependabot/npm_and_yarn/frontend/eslint-plugin-svelte-2.32.0
Bump eslint-plugin-svelte from 2.31.1 to 2.32.0 in /frontend
2023-06-30 00:07:23 +02:00
dependabot[bot] 487b0d9689 Bump eslint-plugin-svelte from 2.31.1 to 2.32.0 in /frontend
Bumps [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte) from 2.31.1 to 2.32.0.
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/compare/v2.31.1...v2.32.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 22:03:07 +00:00
github-actions[bot] 1daeef8c14 Merge pull request #100 from seriousm4x/dependabot/npm_and_yarn/frontend/svelte-4.0.1
Bump svelte from 4.0.0 to 4.0.1 in /frontend
2023-06-29 22:01:42 +00:00
dependabot[bot] a632eb2cc9 Bump svelte from 4.0.0 to 4.0.1 in /frontend
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.0.1/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 22:01:29 +00:00
github-actions[bot] 5a64dcf327 Merge pull request #98 from seriousm4x/dependabot/npm_and_yarn/frontend/typescript-5.1.6
Bump typescript from 5.1.5 to 5.1.6 in /frontend
2023-06-29 21:59:45 +00:00
dependabot[bot] 99997b75e9 Bump typescript from 5.1.5 to 5.1.6 in /frontend
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.5 to 5.1.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 21:59:31 +00:00
seriousm4x c75564fc98 Merge pull request #101 from seriousm4x/dependabot/npm_and_yarn/frontend/sveltejs/kit-1.21.0
Bump @sveltejs/kit from 1.20.5 to 1.21.0 in /frontend
2023-06-29 23:58:42 +02:00
Maxi Quoß 57e2d5c331 dependabot: auto-merge semver-patch updates 2023-06-29 23:57:37 +02:00
seriousm4x 8628e13e45 add device groups #97 2023-06-29 17:16:10 +02:00
dependabot[bot] d0f3b41558 Bump @sveltejs/kit from 1.20.5 to 1.21.0 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.20.5 to 1.21.0.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.21.0/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 09:34:21 +00:00
Maxi Quoß c37294dec0 update dependencies 2023-06-28 11:50:08 +02:00
Maxi Quoß 343be4249b update dependencies 2023-06-28 11:36:53 +02:00
seriousm4x 9a1c8b74f9 Merge pull request #84 from seriousm4x/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2023-06-28 11:27:39 +02:00
seriousm4x 19d0cff28c Merge pull request #83 from seriousm4x/dependabot/github_actions/actions/setup-go-4
Bump actions/setup-go from 3 to 4
2023-06-28 11:27:28 +02:00
seriousm4x 29bf818a27 Merge pull request #82 from seriousm4x/dependabot/github_actions/docker/build-push-action-4
Bump docker/build-push-action from 3 to 4
2023-06-28 11:27:17 +02:00
dependabot[bot] 769db97654 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 09:24:41 +00:00
dependabot[bot] 1df79f0699 Bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 09:24:37 +00:00
dependabot[bot] d81ffd8435 Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 09:24:32 +00:00
seriousm4x ac85abcb13 Merge pull request #81 from gaby/dependabot
Add support for dependabot
2023-06-28 11:23:48 +02:00
Juan Calderon-Perez 613022453d Add support for dependabot 2023-06-27 21:09:44 -04:00
Maxi Quoß 45c0fbb462 higher contrast for titles 2023-06-01 15:18:58 +02:00
Maxi Quoß b011d88b3d workflow: codeberg remove cron 2023-06-01 14:56:21 +02:00
Maxi Quoß 2bc7bab5f7 remove v2 restore 2023-06-01 14:38:07 +02:00
Maxi Quoß 4eed2bf31b format 2023-06-01 14:37:10 +02:00
Maxi Quoß 326a7f359f update dependencies 2023-06-01 14:33:49 +02:00
Maxi Quoß cbbd0f301e workflow: add codeberg mirror 2023-06-01 13:18:27 +02:00
seriousm4x fdf125d071 fix wrong icon url for prod env, fix #70 2023-04-12 23:27:42 +02:00
seriousm4x 72e3d3d343 npm format 2023-04-07 22:04:39 +02:00
seriousm4x 3331b53d39 npm format 2023-04-07 22:01:15 +02:00
seriousm4x 1faae16e18 update dependencies
- fix sveltekit csrf issue
- pocketbase 0.14.3
2023-04-07 21:57:41 +02:00
seriousm4x 28cc52f6c1 Merge pull request #67 from seriousm4x/dependabot/npm_and_yarn/frontend/sveltejs/kit-1.15.1
Bump @sveltejs/kit from 1.12.0 to 1.15.1 in /frontend
2023-04-04 23:46:42 +02:00
dependabot[bot] 6a388229dd Bump @sveltejs/kit from 1.12.0 to 1.15.1 in /frontend
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit) from 1.12.0 to 1.15.1.
- [Release notes](https://github.com/sveltejs/kit/releases)
- [Changelog](https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@1.15.1/packages/kit)

---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 21:45:44 +00:00
Maxi Quoß 014e6785be readme: add armv6 to images 2023-03-26 11:37:25 +02:00
seriousm4x 2fed755948 readme: create admin on frontend 2023-03-23 20:54:35 +01:00
seriousm4x 9106d25b95 add armv6 support #64 2023-03-21 01:13:16 +01:00
Maxi Quoß 8e9ba1503c add package-lock again 2023-03-19 20:04:22 +01:00
Maxi Quoß 9e83416848 update dependencies 2023-03-19 19:58:13 +01:00
Maxi Quoß 054f60ee48 fix #63 2023-03-19 19:52:10 +01:00
31 changed files with 4824 additions and 4065 deletions
+24
View File
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/backend"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: go-dep
- package-ecosystem: npm
directory: "/frontend"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: npm-dep
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: gh-action
+17
View File
@@ -0,0 +1,17 @@
# Sync repo to the Codeberg mirror
name: Mirror Sync
on:
push:
branches: ["master"]
workflow_dispatch:
jobs:
codeberg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: "git@codeberg.org:seriousm4x/UpSnap.git"
ssh_private_key: ${{ secrets.CODEBERG_SSH }}
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+3 -3
View File
@@ -31,7 +31,7 @@ jobs:
# setup go
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ">=1.20"
@@ -87,10 +87,10 @@ jobs:
# build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
+1
View File
@@ -199,3 +199,4 @@ backend/pb_public/*
!backend/pb_public/.gitkeep
dist/
vite.config.js.timestamp*
+17 -15
View File
@@ -4,7 +4,7 @@
<div align="center" width="100%">
<h2>UpSnap</h2>
<p>A simple wake on lan app written with SvelteKit, Go, PocketBase and nmap.</p>
<p>A simple wake on lan web app written with SvelteKit, Go, PocketBase and nmap.</p>
<a target="_blank" href="https://github.com/seriousm4x/upsnap"><img src="https://img.shields.io/github/stars/seriousm4x/upsnap" /></a>
<a target="_blank" href="https://github.com/seriousm4x/UpSnap/releases"><img src="https://img.shields.io/github/downloads/seriousm4x/upsnap/total" /></a>
<a target="_blank" href="https://github.com/seriousm4x/UpSnap/releases"><img src="https://img.shields.io/github/go-mod/go-version/seriousm4x/UpSnap?filename=backend/go.mod" /></a>
@@ -15,13 +15,13 @@
## ✨ Features
- Dashboard to wake up devices with one click
- Set timed wake and shutdown events via cron
- Add custom ports to devices which will be pinged
- Discover devices by scanning network
- User/Password protected login
- Dark/light or system prefered color scheme
- [Docker images](https://github.com/seriousm4x/UpSnap/pkgs/container/upsnap) for amd64, arm64, arm/v7
- Dashboard to wake up devices with one click
- Set timed wake and shutdown events via cron
- Add custom ports to devices which will be pinged
- Discover devices by scanning network
- User/Password or OIDC protected login
- Dark/light or system prefered color scheme
- [Docker images](https://github.com/seriousm4x/UpSnap/pkgs/container/upsnap) for amd64, arm64, arm/v7, arm/v6
## 📸 Screenshots
@@ -49,8 +49,8 @@ If you want to change the port, change the following (5000 in this case):
```yml
entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
healthcheck:
test: curl -fs "http://localhost:5000/api/health" || exit 1
interval: 10s
test: curl -fs "http://localhost:5000/api/health" || exit 1
interval: 10s
```
And if you need additional packages inside the container, do this:
@@ -77,8 +77,8 @@ upsnap.example.com {
User management is done through the PocketBase webinterface at [http://localhost:8090/\_/](http://localhost:8090/_/). This is mainly for internal use, such as within a home or corporate network. For external use please see below.
- To manage users, click the "Collections" icon on the left and select "users".
- To manage admins, click the "Settings" icon on the left and select "Admin".
- To manage users, click the "Collections" icon on the left and select "users".
- To manage admins, click the "Settings" icon on the left and select "Admin".
Api permissions listed by user role:
@@ -113,8 +113,6 @@ go mod tidy
go run main.go serve
```
Log in to [http://localhost:8090/\_/](http://localhost:8090/_/), create an admin user and add some devices.
2. Start frontend
```sh
@@ -123,4 +121,8 @@ pnpm i
pnpm run dev
```
Open up [http://localhost:5173/](http://localhost:5173/)
Open up [http://localhost:5173/](http://localhost:5173/), create an admin user and add some devices.
## 🌟 Star History
[![Star History Chart](https://api.star-history.com/svg?repos=seriousm4x/UpSnap&type=Date&theme=dark)](https://star-history.com/#seriousm4x/UpSnap&Date)
+18
View File
@@ -19,6 +19,7 @@ builds:
- arm64
- arm
goarm:
- 6
- 7
ignore:
- goos: windows
@@ -32,4 +33,21 @@ checksum:
snapshot:
name_template: "{{ .Version }}"
changelog:
use: github
sort: asc
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: "Go dependencies"
regexp: '^.*?go-dep(\([[:word:]]+\))??!?:.+$'
order: 2
- title: "Npm dependencies"
regexp: '^.*?npm-dep(\([[:word:]]+\))??!?:.+$'
order: 3
- title: "Github Actions"
regexp: '^.*?gh-action(\([[:word:]]+\))??!?:.+$'
order: 4
+30 -10
View File
@@ -43,12 +43,16 @@ func RunPing(app *pocketbase.PocketBase) {
if newStatus {
if oldStatus == "offline" || oldStatus == "" {
device.Set("status", "online")
app.Dao().SaveRecord(device)
if err := app.Dao().SaveRecord(device); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}
} else {
if oldStatus == "online" || oldStatus == "" {
device.Set("status", "offline")
app.Dao().SaveRecord(device)
if err := app.Dao().SaveRecord(device); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}
}
}(device)
@@ -63,9 +67,13 @@ func RunPing(app *pocketbase.PocketBase) {
isUp := networking.CheckPort(device.GetString("ip"), port.GetString("number"))
if isUp != port.GetBool("status") {
port.Set("status", isUp)
app.Dao().SaveRecord(port)
if err := app.Dao().SaveRecord(port); err != nil {
logger.Error.Println("Failed to save record:", err)
}
device.RefreshUpdated()
app.Dao().SaveRecord(device)
if err := app.Dao().SaveRecord(device); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}
}
}(device)
@@ -88,14 +96,20 @@ func RunWakeShutdown(app *pocketbase.PocketBase) {
go func(d *models.Record) {
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
d.Set("status", "pending")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.WakeDevice(d); err != nil {
logger.Error.Println(err)
d.Set("status", "offline")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
d.Set("status", "online")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}
})
if err != nil {
@@ -110,14 +124,20 @@ func RunWakeShutdown(app *pocketbase.PocketBase) {
go func(d *models.Record) {
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
d.Set("status", "pending")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.ShutdownDevice(d); err != nil {
logger.Error.Println(err)
d.Set("status", "online")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
d.Set("status", "offline")
app.Dao().SaveRecord(d)
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}
})
if err != nil {
+53 -53
View File
@@ -6,91 +6,91 @@ require (
github.com/labstack/echo/v5 v5.0.0-20220201181537-ed2888cfa198
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a
github.com/pocketbase/dbx v1.10.0
github.com/pocketbase/pocketbase v0.13.0
github.com/prometheus-community/pro-bing v0.1.0
github.com/pocketbase/pocketbase v0.16.10
github.com/prometheus-community/pro-bing v0.3.0
github.com/robfig/cron/v3 v3.0.1
)
require (
github.com/AlecAivazis/survey/v2 v2.3.6 // indirect
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.44.214 // indirect
github.com/aws/aws-sdk-go-v2 v1.17.5 // indirect
github.com/aws/aws-sdk-go v1.44.303 // indirect
github.com/aws/aws-sdk-go-v2 v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.15 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.15 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.23 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.55 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.23 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.21 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.28 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.27 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.72 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.27 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.24 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.23 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.23 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.30.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.30 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.4 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.37.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/domodwyer/mailyak/v3 v3.4.0 // indirect
github.com/domodwyer/mailyak/v3 v3.6.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/ganigeorgiev/fexpr v0.3.0 // indirect
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 // indirect
github.com/mdlayher/packet v1.1.1 // indirect
github.com/mdlayher/socket v0.4.0 // indirect
github.com/mdlayher/packet v1.1.2 // indirect
github.com/mdlayher/socket v0.4.1 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.28.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/image v0.5.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
gocloud.dev v0.32.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/image v0.9.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/tools v0.11.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.111.0 // indirect
google.golang.org/api v0.132.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.22.3 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect
google.golang.org/grpc v1.56.2 // indirect
google.golang.org/protobuf v1.31.0 // indirect
lukechampine.com/uint128 v1.3.0 // indirect
modernc.org/cc/v3 v3.41.0 // indirect
modernc.org/ccgo/v3 v3.16.14 // indirect
modernc.org/libc v1.24.1 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.6.0 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.21.0 // indirect
modernc.org/sqlite v1.24.0 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.1.0 // indirect
)
+879 -283
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,61 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/models"
)
func init() {
m.Register(func(db dbx.Builder) error {
jsonData := `{
"id": "djqp3uxrac2ores",
"created": "2023-06-29 10:39:59.291Z",
"updated": "2023-06-29 10:39:59.291Z",
"name": "groups",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "b3oaemnp",
"name": "name",
"type": "text",
"required": true,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}
],
"indexes": [],
"listRule": "@request.auth.id != \"\"",
"viewRule": "@request.auth.id != \"\"",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"options": {}
}`
collection := &models.Collection{}
if err := json.Unmarshal([]byte(jsonData), &collection); err != nil {
return err
}
return daos.New(db).SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("djqp3uxrac2ores")
if err != nil {
return err
}
return dao.DeleteCollection(collection)
})
}
@@ -0,0 +1,54 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/models/schema"
)
func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("z5lghx2r3tm45n1")
if err != nil {
return err
}
// add
new_groups := &schema.SchemaField{}
json.Unmarshal([]byte(`{
"system": false,
"id": "rk2vrn57",
"name": "groups",
"type": "relation",
"required": false,
"unique": false,
"options": {
"collectionId": "djqp3uxrac2ores",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": null,
"displayFields": []
}
}`), new_groups)
collection.Schema.AddField(new_groups)
return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("z5lghx2r3tm45n1")
if err != nil {
return err
}
// remove
collection.Schema.RemoveField("rk2vrn57")
return dao.SaveCollection(collection)
})
}
@@ -0,0 +1,57 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
options := map[string]any{}
json.Unmarshal([]byte(`{
"allowEmailAuth": true,
"allowOAuth2Auth": true,
"allowUsernameAuth": true,
"exceptEmailDomains": [],
"manageRule": null,
"minPasswordLength": 8,
"onlyEmailDomains": [],
"requireEmail": false
}`), &options)
collection.SetOptions(options)
return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
options := map[string]any{}
json.Unmarshal([]byte(`{
"allowEmailAuth": true,
"allowOAuth2Auth": false,
"allowUsernameAuth": true,
"exceptEmailDomains": [],
"manageRule": null,
"minPasswordLength": 8,
"onlyEmailDomains": [],
"requireEmail": false
}`), &options)
collection.SetOptions(options)
return dao.SaveCollection(collection)
})
}
@@ -0,0 +1,34 @@
package migrations
import (
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/tools/types"
)
func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
collection.CreateRule = types.Pointer("@request.data.password:isset = false")
return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
collection.CreateRule = nil
return dao.SaveCollection(collection)
})
}
@@ -0,0 +1,57 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
options := map[string]any{}
json.Unmarshal([]byte(`{
"allowEmailAuth": true,
"allowOAuth2Auth": true,
"allowUsernameAuth": true,
"exceptEmailDomains": [],
"manageRule": null,
"minPasswordLength": 5,
"onlyEmailDomains": [],
"requireEmail": false
}`), &options)
collection.SetOptions(options)
return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);
collection, err := dao.FindCollectionByNameOrId("27do0wbcuyfmbmx")
if err != nil {
return err
}
options := map[string]any{}
json.Unmarshal([]byte(`{
"allowEmailAuth": true,
"allowOAuth2Auth": true,
"allowUsernameAuth": true,
"exceptEmailDomains": [],
"manageRule": null,
"minPasswordLength": 8,
"onlyEmailDomains": [],
"requireEmail": false
}`), &options)
collection.SetOptions(options)
return dao.SaveCollection(collection)
})
}
+31 -10
View File
@@ -22,14 +22,18 @@ func HandlerWake(c echo.Context) error {
}
go func(*models.Record) {
record.Set("status", "pending")
App.Dao().SaveRecord(record)
if err := App.Dao().SaveRecord(record); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.WakeDevice(record); err != nil {
logger.Error.Println(err)
record.Set("status", "offline")
} else {
record.Set("status", "online")
}
App.Dao().SaveRecord(record)
if err := App.Dao().SaveRecord(record); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}(record)
return c.JSON(http.StatusOK, record)
}
@@ -41,14 +45,18 @@ func HandlerShutdown(c echo.Context) error {
}
go func(*models.Record) {
record.Set("status", "pending")
App.Dao().SaveRecord(record)
if err := App.Dao().SaveRecord(record); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.ShutdownDevice(record); err != nil {
logger.Error.Println(err)
record.Set("status", "online")
} else {
record.Set("status", "offline")
}
App.Dao().SaveRecord(record)
if err := App.Dao().SaveRecord(record); err != nil {
logger.Error.Println("Failed to save record:", err)
}
}(record)
return c.JSON(http.StatusOK, record)
}
@@ -95,9 +103,10 @@ func HandlerScan(c echo.Context) error {
}
type Device struct {
Name string `json:"name"`
IP string `json:"ip"`
MAC string `json:"mac"`
Name string `json:"name"`
IP string `json:"ip"`
MAC string `json:"mac"`
MACVendor string `json:"mac_vendor"`
}
// extract info from struct into data
@@ -121,15 +130,27 @@ func HandlerScan(c echo.Context) error {
dev.MAC = addr.Addr
}
if addr.Vendor != "" {
dev.Name = addr.Vendor
dev.MACVendor = addr.Vendor
} else {
dev.MACVendor = "Unknown"
}
}
if dev.IP == "" || dev.MAC == "" {
continue
}
if dev.Name == "" {
dev.Name = "Unknown"
names, err := net.LookupAddr(dev.IP)
if err != nil || len(names) == 0 {
dev.Name = dev.MACVendor
} else {
dev.Name = strings.TrimSuffix(names[0], ".")
}
if dev.Name == "" && dev.MACVendor == "" {
continue
}
res.Devices = append(res.Devices, dev)
}
+23 -19
View File
@@ -1,21 +1,25 @@
version: "3"
services:
upsnap:
container_name: upsnap
image: ghcr.io/seriousm4x/upsnap:3
network_mode: host
restart: unless-stopped
volumes:
- ./data:/app/pb_data
# environment:
# - TZ=Europe/Berlin # Set container timezone for cron schedules
# - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
# - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
# you can change the listen ip:port inside the container like this:
# entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
# healthcheck:
# test: curl -fs "http://localhost:5000/api/health" || exit 1
# interval: 10s
# # or install custom packages for shutdown
# entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"
upsnap:
container_name: upsnap
image: ghcr.io/seriousm4x/upsnap:3
network_mode: host
restart: unless-stopped
volumes:
- ./data:/app/pb_data
# environment:
# - TZ=Europe/Berlin # Set container timezone for cron schedules
# - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged
# - UPSNAP_SCAN_RANGE=192.168.1.0/24 # Scan range is used for device discovery on local network
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
# # dns is used for name resolution during network scan
# dns:
# - 192.18.0.1
# - 192.18.0.2
# # you can change the listen ip:port inside the container like this:
# entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
# healthcheck:
# test: curl -fs "http://localhost:5000/api/health" || exit 1
# interval: 10s
# # or install custom packages for shutdown
# entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"
+11 -3
View File
@@ -1,8 +1,16 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'prettier'],
plugins: ['svelte3'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
extends: ['plugin:svelte/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
+840 -543
View File
File diff suppressed because it is too large Load Diff
+21 -21
View File
@@ -11,31 +11,31 @@
"format": "prettier --ignore-path ../.gitignore --write --plugin-search-dir=. ."
},
"devDependencies": {
"@sveltejs/adapter-static": "^1.0.6",
"@sveltejs/kit": "^1.11.0",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-svelte3": "^4.0.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.22.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte": "^2.32.4",
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.9.0",
"svelte": "^3.56.0",
"svelte-preprocess": "^5.0.1",
"typescript": "^4.9.5",
"vite": "^4.1.4"
"lint-staged": "^13.2.3",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.1.1",
"svelte-preprocess": "^5.0.4",
"typescript": "^5.1.6",
"vite": "^4.4.6"
},
"type": "module",
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.3.0",
"@popperjs/core": "^2.11.6",
"bootstrap": "5.3.0-alpha1",
"date-fns": "^2.29.3",
"pocketbase": "^0.10.2",
"sass": "^1.58.3",
"svelte-fa": "^3.0.3"
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@popperjs/core": "^2.11.8",
"bootstrap": "5.3.0",
"date-fns": "^2.30.0",
"pocketbase": "^0.15.3",
"sass": "^1.64.0",
"svelte-fa": "^3.0.4"
},
"lint-staged": {
"*.{js,svelte}": "eslint --fix --ignore-path ../.gitignore .",
+2301 -2952
View File
File diff suppressed because it is too large Load Diff
+11 -5
View File
@@ -44,8 +44,13 @@
<div class="row">
<div class="col-auto me-auto">
{#if device.status === 'offline'}
<span class="text-danger" on:click={() => wake()} on:keydown={() => wake()}>
<div role="button">
<span
class="text-danger"
role="none"
on:click={() => wake()}
on:keydown={() => wake()}
>
<div>
<Fa icon={faPowerOff} class="fs-4 power-hover" />
</div>
</span>
@@ -53,10 +58,11 @@
{#if device.shutdown_cmd !== ''}
<span
class="text-success"
role="none"
on:click={() => shutdown()}
on:keydown={() => shutdown()}
>
<div role="button">
<div>
<Fa icon={faPowerOff} class="fs-4 power-hover" />
</div>
</span>
@@ -87,13 +93,13 @@
</div>
</div>
{#if device.link}
<p class="m-0 fw-bold fs-5">
<p class="m-0 fw-bold fs-5 text-body-emphasis">
<a class="text-reset" target="_blank" rel="noreferrer" href={device.link}
>{device.name}</a
>
</p>
{:else}
<p class="m-0 fw-bold fs-5">{device.name}</p>
<p class="m-0 fw-bold fs-5 text-body-emphasis">{device.name}</p>
{/if}
<p class="text-muted mb-2">{device.ip}</p>
{#if device?.expand?.ports}
+32 -5
View File
@@ -1,6 +1,6 @@
<script>
import { goto } from '$app/navigation';
import { pocketbase, devices } from '@stores/pocketbase';
import { pocketbase, devices, groups } from '@stores/pocketbase';
import Fa from 'svelte-fa/src/fa.svelte';
import { faEye, faEyeSlash, faPlus, faTrashCan } from '@fortawesome/free-solid-svg-icons';
@@ -115,10 +115,20 @@
function onPasswordInput(event) {
device.password = event.target.value;
}
function toggleGroup(grpId) {
const i = device.groups.indexOf(grpId);
if (i !== -1) {
device.groups.splice(i, 1);
device.groups = device.groups;
} else {
device.groups = [...device.groups, grpId];
}
}
</script>
<section class="m-0 mt-4 p-4 shadow-sm">
<h3 class="mb-3">{mode === 'add' ? 'Add new device' : device.name}</h3>
<h3 class="mb-3 text-body-emphasis">{mode === 'add' ? 'Add new device' : device.name}</h3>
<div class="row">
<div class="col-md-6">
<form on:submit|preventDefault={addOrUpdateDevice}>
@@ -202,7 +212,7 @@
</div>
{/each}
{/if}
<div class="input-group mb-3">
<div class="input-group mb-1">
<span class="input-group-text">Port</span>
<input
type="text"
@@ -228,7 +238,7 @@
<Fa icon={faPlus} />
</button>
</div>
<div class="input-group mb-3">
<div class="input-group mb-1">
<span class="input-group-text">Link</span>
<input
class="form-control"
@@ -283,7 +293,7 @@
/>
</div>
</div>
<div class="input-group mb-3">
<div class="input-group mb-1">
<span class="input-group-text">Shutdown Cmd<sup>(2)</sup></span>
<input
class="form-control"
@@ -314,6 +324,23 @@
<Fa icon={passwordShow ? faEyeSlash : faEye} />
</button>
</div>
{#if groups}
<h5 class="mt-4">Groups:</h5>
<div class="input-group mb-3">
{#each $groups as grp}
<span
class="badge rounded-pill fs-6 cursor-pointer me-2 {device?.groups?.includes(
grp.id
)
? 'text-bg-success'
: 'text-bg-secondary text-white-50'} "
role="none"
on:click={() => toggleGroup(grp.id)}
on:keydown={() => toggleGroup(grp.id)}>{grp.name}</span
>
{/each}
</div>
{/if}
<button
type="submit"
class="btn btn-secondary"
+33 -8
View File
@@ -1,4 +1,6 @@
<script>
import { dev } from '$app/environment';
import { page } from '$app/stores';
import { pocketbase, authorizedStore, settings_public } from '@stores/pocketbase';
let username;
@@ -19,7 +21,7 @@
callout.hidden = false;
}
async function login() {
async function loginUserPass() {
if (isAdmin) {
$pocketbase.admins
.authWithPassword(username, password)
@@ -50,6 +52,22 @@
}
}
async function loginOIDC() {
$pocketbase
.collection('users')
.authWithOAuth2({ provider: 'oidc' })
.then(() => {
authorizedStore.set(true);
})
.catch((err) => {
authorizedStore.set(false);
callout.level = 'danger';
callout.title = err.status;
callout.msg = err.message;
callout.hidden = false;
});
}
async function register() {
if (password !== passwordConfirm) {
callout.level = 'danger';
@@ -91,7 +109,9 @@
<div class="col text-center p-3 p-md-5">
<img
src={$settings_public.favicon !== ''
? `${$pocketbase.baseUrl}/api/files/settings_public/${$settings_public.id}/${$settings_public.favicon}`
? `${dev ? $pocketbase.baseUrl : ''}/api/files/settings_public/${
$settings_public.id
}/${$settings_public.favicon}`
: '/gopher.svg'}
alt={$settings_public.website_title ? $settings_public.website_title : 'UpSnap'}
class="logo pe-none user-select-none"
@@ -112,7 +132,7 @@
{/if}
</div>
{#if $settings_public.setup_completed === true}
<form class="w-100" on:submit|preventDefault={login}>
<form class="w-100" on:submit|preventDefault={loginUserPass}>
<div class="mb-3">
<label for="username" class="form-label">Username or email</label>
<input
@@ -151,7 +171,16 @@
</form>
<p class="text-center m-0 mt-3">
<!-- hacky way of linking a non existing route in svelte -->
<a href="/_/" rel="external" class="text-muted cursor-pointer">Manage users</a>
<a href="/_/" rel="external" class="btn btn-outline-secondary btn-sm"
>Manage users</a
>
<button
class="btn btn-outline-secondary btn-sm"
data-toggle="tooltip"
title="You can setup OIDC at {$page.url.host}/_/#/settings/auth-providers"
on:click={() => loginOIDC()}
on:keydown={() => loginOIDC()}>Login with OIDC</button
>
</p>
{:else}
<form class="w-100" on:submit|preventDefault={register}>
@@ -205,8 +234,4 @@
min-width: 50px;
max-width: 200px;
}
.cursor-pointer {
cursor: pointer;
}
</style>
+7 -1
View File
@@ -1,4 +1,5 @@
<script>
import { dev } from '$app/environment';
import { onMount } from 'svelte';
import { page } from '$app/stores';
import { theme } from '@stores/theme';
@@ -41,7 +42,9 @@
<a class="navbar-brand" href="/">
<img
src={$settings_public.favicon !== ''
? `${$pocketbase.baseUrl}/api/files/settings_public/${$settings_public.id}/${$settings_public.favicon}`
? `${dev ? $pocketbase.baseUrl : ''}/api/files/settings_public/${
$settings_public.id
}/${$settings_public.favicon}`
: '/gopher.svg'}
alt={$settings_public.website_title ? $settings_public.website_title : 'UpSnap'}
width="45"
@@ -93,6 +96,7 @@
<div
class="dropdown-item"
class:active={$theme === 'light'}
role="none"
on:click={() => ($theme = 'light')}
on:keydown={() => ($theme = 'light')}
>
@@ -104,6 +108,7 @@
<div
class="dropdown-item"
class:active={$theme === 'dark'}
role="none"
on:click={() => ($theme = 'dark')}
on:keydown={() => ($theme = 'dark')}
>
@@ -115,6 +120,7 @@
<div
class="dropdown-item"
class:active={$theme === 'auto'}
role="none"
on:click={() => ($theme = 'auto')}
on:keydown={() => ($theme = 'auto')}
>
+15 -4
View File
@@ -1,4 +1,5 @@
<script>
import { dev } from '$app/environment';
import { onMount } from 'svelte';
import { page } from '$app/stores';
import Navbar from '@components/Navbar.svelte';
@@ -9,6 +10,7 @@
pocketbase,
authorizedStore,
devices,
groups,
settings_private,
settings_public
} from '@stores/pocketbase';
@@ -75,28 +77,37 @@
favicon.href =
$settings_public.favicon === ''
? '/gopher.svg'
: `${$pocketbase.baseUrl}/api/files/settings_public/${$settings_public.id}/${$settings_public.favicon}`;
: `${dev ? $pocketbase.baseUrl : ''}/api/files/settings_public/${
$settings_public.id
}/${$settings_public.favicon}`;
document.title =
$settings_public.website_title === '' ? 'UpSnap' : $settings_public.website_title;
}
async function getSettingsPrivateAndDevices() {
if (!$pocketbase.authStore.model?.collectionName === 'users') {
if ($pocketbase.authStore.model?.collectionName !== 'users') {
const settingsPrivateRes = await $pocketbase
.collection('settings_private')
.getList(1, 1);
settings_private.set(settingsPrivateRes.items[0]);
}
// get all devices from pb and save in svelte store
let tempDevices = {};
const devicesRes = await $pocketbase.collection('devices').getFullList(200, {
const devicesRes = await $pocketbase.collection('devices').getFullList(-1, {
sort: 'name',
expand: 'ports'
expand: 'ports,groups'
});
devicesRes.forEach((device) => {
tempDevices[device.id] = device;
});
devices.set(tempDevices);
// get all groups from pb and save in svelte store
const groupsRes = await $pocketbase.collection('groups').getFullList(-1, {
sort: 'name'
});
groups.set(groupsRes);
}
$: if (isAuth) {
+39 -7
View File
@@ -2,7 +2,7 @@
import { onMount } from 'svelte';
import DeviceCard from '@components/DeviceCard.svelte';
import { pocketbase, devices } from '@stores/pocketbase';
import { sortDevices } from '../sorts';
import { sortDevices, sortGroups } from '../sorts';
onMount(async () => {
// subscribe to database events
@@ -11,7 +11,7 @@
$devices[e.record.id] = e.record;
} else if (e.action === 'update') {
const device = await $pocketbase.collection('devices').getOne(e.record.id, {
expand: 'ports'
expand: 'ports,groups'
});
$devices[device.id] = device;
} else if (e.action === 'delete') {
@@ -34,6 +34,27 @@
});
});
let devicesWithoutGroups = [];
let devicesWithGroup = {};
devices.subscribe((d) => {
// sort devices into their groups
devicesWithoutGroups = [];
devicesWithGroup = {};
Object.values(d).forEach((device) => {
if (device.groups.length === 0) {
devicesWithoutGroups = [...devicesWithoutGroups, device];
return;
}
device.expand.groups.forEach((grp) => {
if (!devicesWithGroup.hasOwnProperty(grp.name)) {
devicesWithGroup[grp.name] = [];
}
devicesWithGroup[grp.name] = [...devicesWithGroup[grp.name], device];
});
});
});
// update device date
let now = Date.now();
let interval;
@@ -47,11 +68,22 @@
<div class="container text-body-emphasis mb-4">
{#if Object.keys($devices).length > 0}
<div class="row">
{#each Object.values($devices).sort(sortDevices) as device}
<DeviceCard {device} {now} />
{/each}
</div>
{#if devicesWithoutGroups.length > 0}
<div class="row">
{#each devicesWithoutGroups.sort(sortDevices) as device}
<DeviceCard {device} {now} />
{/each}
</div>
{/if}
{#each Object.keys(devicesWithGroup).sort(sortGroups) as grp}
<h2 class="mt-4 mb-0">{grp}</h2>
<div class="row">
{#each devicesWithGroup[grp] as device}
<DeviceCard {device} {now} />
{/each}
</div>
{/each}
{:else}
<div class="text-center">
<h4 class="text-muted">No devices</h4>
+120 -123
View File
@@ -1,27 +1,32 @@
<script>
import { dev } from '$app/environment';
import { pocketbase, settings_private, settings_public, devices } from '@stores/pocketbase';
import {
pocketbase,
settings_private,
settings_public,
devices,
groups
} from '@stores/pocketbase';
import UnauthorizedMsg from '@components/UnauthorizedMsg.svelte';
import DeviceForm from '@components/DeviceForm.svelte';
import Fa from 'svelte-fa/src/fa.svelte';
import { faPlus } from '@fortawesome/free-solid-svg-icons';
import { faPlus, faXmark } from '@fortawesome/free-solid-svg-icons';
let version = import.meta.env.UPSNAP_VERSION;
let iconFiles = [];
let iconPreview;
let restoreFiles = [];
let timeout;
let buttons = {
settings: {
state: 'none',
error: ''
},
restore: {
scan: {
state: 'none',
error: ''
},
scan: {
addAllDevices: {
state: 'none',
error: ''
}
@@ -41,14 +46,18 @@
shutdown_cron: '',
shutdown_cron_enabled: false,
shutdown_cmd: '',
password: ''
password: '',
groups: []
};
let newGroup = '';
let scannedDevices = {};
$: if (iconPreview && iconFiles.length > 0) {
iconPreview.src = URL.createObjectURL(iconFiles[0]);
} else if (iconPreview && $settings_public.favicon !== '') {
iconPreview.src = `${$pocketbase.baseUrl}/api/files/settings_public/${$settings_public.id}/${$settings_public.favicon}`;
iconPreview.src = `${dev ? $pocketbase.baseUrl : ''}/api/files/settings_public/${
$settings_public.id
}/${$settings_public.favicon}`;
} else if (iconPreview) {
iconPreview.src = '/gopher.svg';
}
@@ -143,77 +152,34 @@
});
}
async function addDevice(device) {
await $pocketbase.collection('devices').create(device);
$devices[device.id] = device;
async function addAllDevices() {
buttons.addAllDevices.state = 'waiting';
scannedDevices.devices.forEach(async (device) => {
device.netmask = scannedDevices.netmask;
await addDevice(device);
});
buttons.addAllDevices.state = 'success';
}
async function restoreV2Backup() {
buttons.restore.state = 'waiting';
async function addDevice(device) {
await $pocketbase.collection('devices').create(device);
}
try {
// delete all devices in pocketbase
let result = await $pocketbase.collection('devices').getFullList();
for (let index = 0; index < result.length; index++) {
$pocketbase.collection('devices').delete(result[index].id);
}
// delete all ports in pocketbase
result = await $pocketbase.collection('ports').getFullList();
for (let index = 0; index < result.length; index++) {
await $pocketbase.collection('ports').delete(result[index].id);
}
async function addGroup() {
const res = await $pocketbase.collection('groups').create({
name: newGroup
});
$groups = [...$groups, res];
newGroup = '';
}
let reader = new FileReader();
reader.readAsText(restoreFiles[0]);
reader.onload = async (e) => {
// parse uploaded file
let data = JSON.parse(e.target.result);
if (!Array.isArray(data)) {
return;
}
// loop devices
for (let index = 0; index < data.length; index++) {
const device = data[index];
// create ports
let thisDevicePorts = [];
for (let index = 0; index < device.ports.length; index++) {
const port = device.ports[index];
const record = await $pocketbase.collection('ports').create({
name: port.name,
number: port.number
});
thisDevicePorts.push(record.id);
}
// create device
await $pocketbase.collection('devices').create({
name: device.name,
ip: device.ip,
mac: device.mac,
netmask: device.netmask,
ports: thisDevicePorts,
link: device.link,
wake_cron: device.wake.cron,
wake_cron_enabled: device.wake.enabled,
shutdown_cron: device.shutdown.cron,
shutdown_cron_enabled: device.shutdown.cron.enabled,
shutdown_cmd: device.shutdown.command
});
}
};
setTimeout(() => {
buttons.restore.state = 'none';
}, 3000);
buttons.restore.state = 'success';
} catch (error) {
setTimeout(() => {
buttons.restore.error = '';
buttons.restore.state = 'none';
}, 3000);
buttons.restore.error = error;
buttons.restore.state = 'failed';
async function deleteGroup(id) {
await $pocketbase.collection('groups').delete(id);
const ids = $groups.map((grp) => grp.id);
const i = ids.indexOf(id);
if (i > -1) {
$groups.splice(i, 1);
$groups = $groups;
}
}
</script>
@@ -224,7 +190,7 @@
<form on:submit|preventDefault={saveSettings}>
<div class="row">
<div class="col-md-6">
<h3 class="mb-3">Ping interval</h3>
<h3 class="mb-3 text-body-emphasis">Ping interval</h3>
<p>Sets the interval in which the devices are pinged.</p>
<div class="input-group mb-3">
<span class="input-group-text">Cron</span>
@@ -237,7 +203,7 @@
bind:value={$settings_private.interval}
/>
</div>
<h3 class="my-3">Title</h3>
<h3 class="my-3 text-body-emphasis">Title</h3>
<p>Sets the title of the website and in the browser tab.</p>
<div class="input-group mb-3">
<span class="input-group-text" id="website-title">Title</span>
@@ -250,7 +216,7 @@
bind:value={$settings_public.website_title}
/>
</div>
<h3 class="my-3">Icon</h3>
<h3 class="my-3 text-body-emphasis">Icon</h3>
<img
src=""
alt=""
@@ -334,7 +300,48 @@
<section class="m-0 my-4 p-4 shadow-sm">
<div class="row">
<div class="col-md-6">
<h3 class="mb-3">Network scan</h3>
<h3 class="mb-3 text-body-emphasis">Manage Groups</h3>
<p>
{#each $groups as grp}
<div class="badge rounded-pill fs-6 text-bg-secondary me-2">
{grp.name}
<span
class="px-1"
on:click={() => deleteGroup(grp.id)}
on:keydown={() => deleteGroup(grp.id)}
role="button"
tabindex="0"
>
<Fa icon={faXmark} />
</span>
</div>
{/each}
</p>
<div class="input-group mb-3">
<span class="input-group-text">Add new group</span>
<input
class="form-control"
placeholder="Name for your new group"
aria-label="New Group"
type="text"
bind:value={newGroup}
/>
<button
class="btn btn-outline-secondary"
type="button"
on:click={() => addGroup()}
on:keydown={() => addGroup()}
>
<Fa icon={faPlus} />
</button>
</div>
</div>
</div>
</section>
<section class="m-0 my-4 p-4 shadow-sm">
<div class="row">
<div class="col-md-6">
<h3 class="mb-3 text-body-emphasis">Network scan</h3>
<p>Set the network address to scan.</p>
<form on:submit|preventDefault={scanDevices}>
<div class="input-group mb-3">
@@ -384,28 +391,32 @@
{#if scannedDevices.devices}
<div class="mt-3">
<div class="row align-items-center my-1">
<div class="col-md fw-bold">Name</div>
<div class="col-md fw-bold">IP</div>
<div class="col-md fw-bold">MAC</div>
<div class="col-md fw-bold">Netmask</div>
<div class="col-md fw-bold">Add</div>
<div class="col-lg-3 fw-bold">Name</div>
<div class="col-lg-2 fw-bold">IP</div>
<div class="col-lg-2 fw-bold">MAC</div>
<div class="col-lg-2 fw-bold">MAC Vendor</div>
<div class="col-lg-2 fw-bold">Netmask</div>
<div class="col-lg-1 fw-bold">Add</div>
</div>
{#each scannedDevices?.devices as device}
<hr class="my-1" />
<div class="row align-items-center my-1">
<div class="col-md">
<div class="col-lg-3">
{device.name}
</div>
<div class="col-md">
<div class="col-lg-2">
{device.ip}
</div>
<div class="col-md">
<div class="col-lg-2">
{device.mac}
</div>
<div class="col-md">
<div class="col-lg-2">
{device.mac_vendor}
</div>
<div class="col-lg-2">
{scannedDevices.netmask}
</div>
<div class="col-md">
<div class="col-lg-1">
<button
class="btn btn-sm btn-secondary py-0"
on:click={async (e) => {
@@ -425,43 +436,29 @@
</div>
{/each}
</div>
<button
class="btn btn-secondary mt-3"
class:btn-success={buttons.addAllDevices.state === 'success' ? true : false}
class:btn-warning={buttons.addAllDevices.state === 'waiting' ? true : false}
on:click={async (e) => {
e.target.disabled = true;
await addAllDevices();
}}
on:keydown={async (e) => {
e.target.disabled = true;
await addAllDevices();
}}
>
{#if buttons.addAllDevices.state === 'success'}
Added
{:else if buttons.addAllDevices.state === 'waiting'}
Adding all...
{:else}
Add all <Fa icon={faPlus} />
{/if}
</button>
{/if}
</section>
<section class="m-0 my-4 p-4 shadow-sm">
<h3 class="mb-3">Restore</h3>
<p>
If you had UpSnap &gt;=2.3.2 and &lt;3.0.0 running before, you can restore your devices
here.
</p>
<div class="callout callout-danger fw-bold">This will wipe the existing database!</div>
<input
class="form-control mb-3"
aria-label="Restore"
aria-describedby="Restore"
type="file"
accept=".json"
bind:files={restoreFiles}
/>
<button
type="button"
class="btn btn-secondary"
class:btn-success={buttons.restore.state === 'success' ? true : false}
class:btn-warning={buttons.restore.state === 'waiting' ? true : false}
class:btn-danger={buttons.restore.state === 'failed' ? true : false}
disabled={restoreFiles ? false : true}
on:click={() => restoreV2Backup()}
>
{#if buttons.restore.state === 'none'}
Restore
{:else if buttons.restore.state === 'success'}
Restored
{:else if buttons.restore.state === 'waiting'}
Waiting
{:else if buttons.restore.state === 'failed'}
Failed: {buttons.restore.error}
{/if}
</button>
</section>
<p class="m-0 my-4 p-4 text-center text-muted">
{#if version !== undefined}
UpSnap version: <a
+4
View File
@@ -156,3 +156,7 @@ html[data-bs-theme='dark'] {
background-color: $gray-800;
}
}
.cursor-pointer {
cursor: pointer;
}
+7
View File
@@ -5,6 +5,13 @@ export function sortDevices(a, b) {
});
}
export function sortGroups(a, b) {
return a.localeCompare(b, undefined, {
numeric: true,
sensitivity: 'base'
});
}
export function sortPorts(a, b) {
return a.number - b.number;
}
+1
View File
@@ -19,4 +19,5 @@ export const settings_public = writable({
favicon: ''
});
export const devices = writable({});
export const groups = writable([]);
export const authorizedStore = writable(false);