mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-27 12:21:56 +00:00
Compare commits
390 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 579e374e2f | |||
| 21f9f54115 | |||
| 15fcda8a5a | |||
| 17997d7a56 | |||
| aa2dbf8e2f | |||
| 8c1a27b68b | |||
| e063c575ab | |||
| db07069f9a | |||
| 6c8a145f0a | |||
| 8959a34eb9 | |||
| 3d5563c019 | |||
| a1e7b82993 | |||
| 8759231b9c | |||
| e6b8176fff | |||
| 77c23a4813 | |||
| 24cac05ef8 | |||
| 359a504806 | |||
| 90fb0d0ef7 | |||
| 91fe02839c | |||
| 3121f27d25 | |||
| 92c83e5163 | |||
| 1c0ec91fa8 | |||
| ac4bc761a3 | |||
| 0eb443ff6b | |||
| 0697cfec62 | |||
| c4f2e86a05 | |||
| b884223e5e | |||
| 1ea6efbcef | |||
| a8b976536d | |||
| b7251a3313 | |||
| 9268c9ee68 | |||
| c522fc9d7f | |||
| 6a76a38a59 | |||
| 949e391549 | |||
| 864935b3b3 | |||
| 31231bac1f | |||
| 37842110d1 | |||
| 5c8e1e0833 | |||
| b332d95a0a | |||
| 041a5b4d65 | |||
| 5e8aeb88a8 | |||
| 7488677b61 | |||
| b8642ee6c3 | |||
| 0af2aff5cd | |||
| c61830eb5c | |||
| 12d673c6ac | |||
| 81610f30ac | |||
| 2087e31a92 | |||
| 0a02e70219 | |||
| 22d803fc16 | |||
| 6d8eb54a93 | |||
| 5eda2c524a | |||
| 281adcb3f6 | |||
| 158c4e006e | |||
| 1e72e209e0 | |||
| e15d565a82 | |||
| dc6ca9c1dd | |||
| f2b69fbddb | |||
| b5769508e4 | |||
| bd82e3fe99 | |||
| 7878c64bc7 | |||
| cd2f9fa35d | |||
| 14910b7e84 | |||
| c9a7a09c28 | |||
| 5d3b36ff64 | |||
| bc778779cb | |||
| 3615cdba98 | |||
| c64ad4e5b2 | |||
| 28198a59c0 | |||
| ec387445b9 | |||
| 18551863db | |||
| fceb9cb661 | |||
| 4568521287 | |||
| c0ae608eb5 | |||
| c3bec18bf0 | |||
| 381a47a7b2 | |||
| 35c592fcc4 | |||
| d4326c3163 | |||
| dc9b5cb00a | |||
| b02aa801aa | |||
| 483f010015 | |||
| bed434497f | |||
| f644dbf6a0 | |||
| 9fbdf8dbcb | |||
| 4e3f8d97dd | |||
| 9668cfeabb | |||
| 39f854b4ab | |||
| 82a071e8ff | |||
| dc4608bf3d | |||
| 814a9ecd94 | |||
| 34952a02c7 | |||
| 4fa0b312c3 | |||
| 1b7daaafbd | |||
| 8a25aa28dc | |||
| 5ec6ebbbc5 | |||
| 3f70ad371f | |||
| 7376a77cb7 | |||
| 66ede799a4 | |||
| 1db61ce7f7 | |||
| f6a6f08aa7 | |||
| 89f10d62de | |||
| 1a4de72094 | |||
| b3dd9ae5bf | |||
| a8d08db78f | |||
| 7b4c18ac49 | |||
| fd60d11d5c | |||
| 4c0d9cd435 | |||
| a86cb39435 | |||
| c12be28937 | |||
| 6dd5947216 | |||
| bd29e92617 | |||
| 5ebdecbe48 | |||
| 33724e80fb | |||
| be4c70c133 | |||
| 16fb66501b | |||
| 9e72166e9a | |||
| 56b5f1980f | |||
| 26b4a228c8 | |||
| 962ef0c9df | |||
| abdf71935e | |||
| c78a3f4127 | |||
| 682523db04 | |||
| 4c510a5aa8 | |||
| cbb94b61df | |||
| adf5fc218a | |||
| 7310a8953e | |||
| c859fce069 | |||
| c167cea600 | |||
| 6e2001847b | |||
| 7bcd309ea1 | |||
| ce9e27d70b | |||
| 97e626f441 | |||
| 0aaaf92bd4 | |||
| dbcbb64614 | |||
| b283103631 | |||
| 070a8e9164 | |||
| 86185fc4c6 | |||
| 24b703dffb | |||
| 67fdcfae99 | |||
| b83377e300 | |||
| 797738745c | |||
| ea9d9606b4 | |||
| 6b0b8fe5f8 | |||
| a30a78b18f | |||
| 9757f836bb | |||
| c0d290d1fd | |||
| b82bc42f31 | |||
| 65ff22be4f | |||
| 911f7fbf60 | |||
| 42fa838594 | |||
| 094a7092b0 | |||
| 67598612e8 | |||
| 53de7e1147 | |||
| 1b5945a324 | |||
| 1625133c3a | |||
| 1b09636159 | |||
| e05447da0d | |||
| b995340cd1 | |||
| 67bb89f4c0 | |||
| 0f8103f79f | |||
| dfec61466f | |||
| 72cee310f3 | |||
| ae890cc65d | |||
| bbbe428f2a | |||
| 08f1112c0b | |||
| f8be9db23b | |||
| edeae0023b | |||
| ddc2f67f87 | |||
| f5ca0b42be | |||
| 8ebb77f54b | |||
| d4415d099f | |||
| 11a8a6c17c | |||
| 195d885829 | |||
| c4fce39b48 | |||
| aff1c97854 | |||
| 1b591a4dac | |||
| 3a8e239b35 | |||
| a61f554ad0 | |||
| 24905013de | |||
| 65b9173629 | |||
| c50c7bc0df | |||
| d514eaa2d7 | |||
| 15b57dc64b | |||
| 3eb88f6430 | |||
| f315e16bad | |||
| 7ffe1a1c58 | |||
| 06d10acc8f | |||
| 168e35de95 | |||
| b05cf7a485 | |||
| 0d985d3b95 | |||
| 6b4e4d7113 | |||
| a907dd9469 | |||
| 17deea598f | |||
| babdc6ab46 | |||
| a8ee4ed943 | |||
| 6e0b7bfa2d | |||
| a9b3fdd2fc | |||
| ac6d5738bf | |||
| 6d3e011397 | |||
| 9bd1ed3af8 | |||
| e161a6b2c2 | |||
| adc4307a12 | |||
| 0429667fdd | |||
| 00ed2dae15 | |||
| 40838e0018 | |||
| 11317ed783 | |||
| f61db97047 | |||
| d405872050 | |||
| 8691600651 | |||
| 3bc9d63977 | |||
| 6f91198201 | |||
| 9f58153a44 | |||
| 88b1a8898b | |||
| 19c8906c3f | |||
| 067c46b693 | |||
| 96459eb3f4 | |||
| bcb1200592 | |||
| e3ccf59284 | |||
| ed2750ce3b | |||
| e62e67827c | |||
| 7fe56a80b0 | |||
| 9f0657a16a | |||
| a739adb3a4 | |||
| 3d304bea13 | |||
| a6c8a7bbfa | |||
| 82c7cbfa1e | |||
| d474af0303 | |||
| ede3c4ff51 | |||
| c5995c69c5 | |||
| 880dd931dc | |||
| 62f849cbef | |||
| eeb7ee1e78 | |||
| 46a80d3604 | |||
| 8285285a85 | |||
| c8015ff45e | |||
| 4c4b58ace2 | |||
| dc887708d2 | |||
| f94e4045a7 | |||
| fef8ad17e6 | |||
| b2f4bec842 | |||
| f80fd507b4 | |||
| adbfb3f4f9 | |||
| c73d460f60 | |||
| cda30b1fb0 | |||
| 37ed1ef902 | |||
| 8ccd0427ad | |||
| 146eb4148a | |||
| ac28fbe183 | |||
| f7efed7bdb | |||
| cb1b6f7340 | |||
| 20123fe108 | |||
| 73b1f1b818 | |||
| 6675778efd | |||
| 90f8a11a40 | |||
| 14a59605df | |||
| 853ac5d5c5 | |||
| 4433c88ef2 | |||
| fb46285088 | |||
| dc2dc03949 | |||
| 564e5541dc | |||
| e3dddcfc65 | |||
| b386e21b65 | |||
| 1489f92729 | |||
| 0502bea9ac | |||
| e6ade1e572 | |||
| b1df10c5c8 | |||
| bf336a2da5 | |||
| 978d81abc7 | |||
| 9cf32927fe | |||
| d53c4699ba | |||
| 976e808d75 | |||
| 7bba99fc01 | |||
| 30c074930c | |||
| cb05d37bdb | |||
| 5e644a5104 | |||
| eb1c50f2ef | |||
| 9ff4b4212f | |||
| 1b2042b6ee | |||
| 702dc541ed | |||
| 606d26ee88 | |||
| 2824a937a8 | |||
| 16ec0b42ea | |||
| 77daa4f34d | |||
| ea46f625b6 | |||
| a9fa2b6a46 | |||
| 8d532a2e1a | |||
| b8ac841129 | |||
| ba17d119cc | |||
| 79af6fd046 | |||
| d7a04562e0 | |||
| 4ffae6ebee | |||
| 4ccb066469 | |||
| dbb194e247 | |||
| cbff13659b | |||
| a7e2cdd405 | |||
| f8f387e90b | |||
| 90d22d9dcd | |||
| 3331ae96f5 | |||
| 6c6fd561e6 | |||
| 7ea9f931ea | |||
| faa47f2cdd | |||
| e7c5b07a48 | |||
| 153e9bdab7 | |||
| eefad8c467 | |||
| 583f388e5b | |||
| 241c1077b6 | |||
| 5c26bc3111 | |||
| e9977b8db2 | |||
| 8c6f11ea1e | |||
| 3ca0116028 | |||
| 79cce75d1b | |||
| 27ef0bc3c7 | |||
| 4ca9651214 | |||
| 27b806d67a | |||
| 93486e8d2c | |||
| 3b22464833 | |||
| 1f7511fa0a | |||
| 5593902ea8 | |||
| ede0ebfaa8 | |||
| 203b1a9916 | |||
| 7237ba3abd | |||
| 01b8e147e6 | |||
| fce6869d15 | |||
| 9f0f5c0b53 | |||
| 58f2f191f9 | |||
| 9e57d1c748 | |||
| 5f06939e2b | |||
| a641ffdd1e | |||
| 36cad3a941 | |||
| b421417efb | |||
| b808b2a8a1 | |||
| 0d68df2a45 | |||
| 626de2ec66 | |||
| 818a06f5b9 | |||
| 3849a03971 | |||
| d0a83edc66 | |||
| 1fee766ef6 | |||
| 554409e1d4 | |||
| d2f5e2b3a9 | |||
| 2d7d1119d4 | |||
| 2fce7f2b1d | |||
| 6368c9a410 | |||
| 43a6aa369f | |||
| 9c85f7bcb2 | |||
| a374e0e806 | |||
| c5c89d49db | |||
| b1cd7adcd7 | |||
| b74e503669 | |||
| a1421acfd8 | |||
| d522eba257 | |||
| 22d20bff54 | |||
| 5acfcbbcba | |||
| 2423f64f60 | |||
| aae85864e0 | |||
| c48be0aec7 | |||
| 959fbc48a6 | |||
| 73711a7241 | |||
| 51ff4ff038 | |||
| ca6a1a036a | |||
| bccf5b4d86 | |||
| f87d06829d | |||
| 4d2c96aec4 | |||
| 175017d9a9 | |||
| 7439dc62be | |||
| cdb42b97ae | |||
| d6975c1562 | |||
| 123acdbb60 | |||
| 16277a3c56 | |||
| 687214ea4f | |||
| 1461d17981 | |||
| 9a64762c25 | |||
| 3975c495cc | |||
| 04c67ddcd6 | |||
| b8afd70d1d | |||
| 64a79873a2 | |||
| 2056e548da | |||
| ab929469cb | |||
| 9c0854ad1e | |||
| 7479a96e41 | |||
| 0fab62b3a3 | |||
| bdd0337b82 | |||
| 5d9599b8c2 | |||
| c93b6185b5 | |||
| 7e8eda714f | |||
| e3d1f33d51 | |||
| 99e12ea280 | |||
| bd1c80dd3b | |||
| 8f93f3e187 | |||
| cfbc850e5a | |||
| aa254c08dc |
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -0,0 +1,10 @@
|
||||
title: "<feature-name-goes-here>"
|
||||
labels: ["feature-request"]
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature
|
||||
attributes:
|
||||
label: The feature
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,70 @@
|
||||
name: 🕷️ Bug report
|
||||
description: Create a bug report to help the project improve
|
||||
labels: ["bug"]
|
||||
title: "[BUG] <title>"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This issue form is for reporting bugs only!
|
||||
|
||||
If you have a feature or enhancement request, please use the [feature request][fr] section of our [GitHub Discussions][fr].
|
||||
|
||||
[fr]: https://github.com/seriousm4x/UpSnap/discussions/new?category=feature-requests
|
||||
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: The bug
|
||||
description: >-
|
||||
Describe the issue you are experiencing here. Tell us what you were trying to do and what happened.
|
||||
|
||||
Provide a clear and concise description of what the problem is.
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Environment
|
||||
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: The OS that UpSnap is running on
|
||||
placeholder: Ubuntu 22.10, Debian, Arch...
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Version of UpSnap
|
||||
placeholder: 4.2.0
|
||||
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Your docker-compose.yml content
|
||||
render: YAML
|
||||
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Reproduction steps
|
||||
description: "How do you trigger this bug? Please walk us through it step by step."
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional information
|
||||
description: >
|
||||
If you have any additional information for us, use the field below.
|
||||
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: I have a question or need support
|
||||
url: https://github.com/seriousm4x/UpSnap/discussions/categories/help-wanted
|
||||
about: Please use our GitHub Discussion if you need help.
|
||||
- name: Feature Request
|
||||
url: https://github.com/seriousm4x/UpSnap/discussions/categories/feature-requests
|
||||
about: Please use our GitHub Discussion for making feature requests.
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
name: "⭐ Feature request"
|
||||
about: Suggest an idea for this project
|
||||
title: "[REQUEST]"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**The problem you currently have with this project**
|
||||
A clear and concise description of what the problem is.
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
name: "\U0001F577️ Bug report"
|
||||
about: Create a report to help the project improve
|
||||
title: "[BUG]"
|
||||
labels: ""
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**UpSnap version**
|
||||
|
||||
```bash
|
||||
$ upsnap --version
|
||||
upsnap version 4.1.1
|
||||
```
|
||||
|
||||
**Logs**
|
||||
|
||||
```
|
||||
formatted logs here
|
||||
```
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Host OS (and version)**
|
||||
eg. Windows 10, Ubuntu 22.10, macOS 13
|
||||
|
||||
**Host Architecture**
|
||||
e.g. amd64/arm64/arm7
|
||||
|
||||
**Brower (if relevant)**
|
||||
e.g. Firefox 109.0.1
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1
|
||||
uses: dependabot/fetch-metadata@v2
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
|
||||
@@ -27,9 +27,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ">=1.21"
|
||||
go-version-file: "./backend/go.mod"
|
||||
cache-dependency-path: "./backend/go.sum"
|
||||
- name: Test
|
||||
run: |
|
||||
cd backend
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
# install latest node
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
@@ -49,13 +49,14 @@ jobs:
|
||||
|
||||
# setup go
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ">=1.21.1"
|
||||
go-version-file: "./backend/go.mod"
|
||||
cache-dependency-path: "./backend/go.sum"
|
||||
|
||||
# build
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
@@ -108,7 +109,7 @@ jobs:
|
||||
# build and push
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 🚀 One-Click Device Wake-Up Dashboard
|
||||
- ⏰ Timed Events via Cron for Automation
|
||||
- 🔌 Ping Any Port You Choose
|
||||
- 🔍 Discover Devices with Network Scanning (nmap required)
|
||||
- 👤 Secured User Management
|
||||
- 🌐 i18n support for [these](https://github.com/seriousm4x/UpSnap/tree/master/frontend/src/lib/i18n) languages
|
||||
- 🎨 29 Themes
|
||||
- 🐳 [Docker images](https://github.com/seriousm4x/UpSnap/pkgs/container/upsnap) for amd64, arm64, arm/v7, arm/v6
|
||||
- 🏠 Self-Hostable, No Cloud Bullshit!
|
||||
- 🚀 One-Click Device Wake-Up Dashboard
|
||||
- ⏰ Timed Events via Cron for Automation
|
||||
- 🔌 Ping Any Port You Choose
|
||||
- 🔍 Discover Devices with Network Scanning (nmap required)
|
||||
- 👤 Secured User Management
|
||||
- 🌐 i18n support for [these](https://github.com/seriousm4x/UpSnap/tree/master/frontend/src/lib/i18n) languages
|
||||
- 🎨 29 Themes
|
||||
- 🐳 [Docker images](https://github.com/seriousm4x/UpSnap/pkgs/container/upsnap) for amd64, arm64, arm/v7, arm/v6
|
||||
- 🏠 Self-Hostable
|
||||
|
||||
## 📸 Screenshots
|
||||
|
||||
@@ -84,7 +84,7 @@ If you want to change the port from 8090 to something else, change the following
|
||||
```yml
|
||||
entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
|
||||
healthcheck:
|
||||
test: curl -fs "http://localhost:5000/api/health" || exit 1
|
||||
test: curl -fs "http://localhost:5000/api/health" || exit 1
|
||||
```
|
||||
|
||||
### Install additional packages for shutdown cmd
|
||||
@@ -121,11 +121,14 @@ Although UpSnap has user authorisation, it is **not recommended to expose it to
|
||||
|
||||
UpSnap is available in the following languages so far:
|
||||
|
||||
- 🇺🇸 **English** (en-US)
|
||||
- 🇩🇪 **German** (de-DE)
|
||||
- 🇫🇷 **French** (fr-FR)
|
||||
- 🇵🇹 **Portuguese** (pt-PT)
|
||||
- 🇨🇳 **Chinese** (zh-CN)
|
||||
- 🇺🇸 **English** (en-US)
|
||||
- 🇩🇪 **German** (de-DE)
|
||||
- 🇮🇹 **Italian** (it-IT)
|
||||
- 🇪🇸 **Spanish** (es-ES)
|
||||
- 🇫🇷 **French** (fr-FR)
|
||||
- 🇵🇹 **Portuguese** (pt-PT)
|
||||
- 🇨🇳 **Chinese** (zh-CN)
|
||||
- 🇹🇼 **Chinese (Taiwan)** (zh-TW)
|
||||
|
||||
**If you want to contribute and help translating, check the wiki: [How to add languages](https://github.com/seriousm4x/UpSnap/wiki/How-to-add-languages)**
|
||||
|
||||
|
||||
@@ -66,13 +66,8 @@ aurs:
|
||||
private_key: "{{ .Env.AUR_KEY }}"
|
||||
git_url: "ssh://aur@aur.archlinux.org/upsnap-bin.git"
|
||||
package: |-
|
||||
# bin
|
||||
install -Dm755 "./upsnap" "${pkgdir}/usr/bin/upsnap"
|
||||
sudo setcap cap_net_raw=+ep "${pkgdir}/usr/bin/upsnap"
|
||||
skip_upload: auto
|
||||
depends:
|
||||
- sudo
|
||||
- libcap
|
||||
optdepends:
|
||||
- "nmap: to scan for network devices"
|
||||
commit_author:
|
||||
|
||||
@@ -8,21 +8,24 @@ import (
|
||||
"github.com/seriousm4x/upsnap/networking"
|
||||
)
|
||||
|
||||
var PingRunning bool = false
|
||||
var WakeShutdownRunning bool = false
|
||||
var CronPing *cron.Cron
|
||||
var CronWakeShutdown *cron.Cron
|
||||
var (
|
||||
PingRunning = false
|
||||
WakeShutdownRunning = false
|
||||
CronPing = cron.New()
|
||||
CronWakeShutdown = cron.New()
|
||||
)
|
||||
|
||||
func RunPing(app *pocketbase.PocketBase) {
|
||||
PingRunning = true
|
||||
func SetPingJobs(app *pocketbase.PocketBase) {
|
||||
// remove existing jobs
|
||||
for _, job := range CronPing.Entries() {
|
||||
CronPing.Remove(job.ID)
|
||||
}
|
||||
|
||||
settingsPrivateRecords, err := app.Dao().FindRecordsByExpr("settings_private")
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
|
||||
// init cronjob
|
||||
CronPing = cron.New()
|
||||
CronPing.AddFunc(settingsPrivateRecords[0].GetString("interval"), func() {
|
||||
// skip cron if no realtime clients connected and lazy_ping is turned on
|
||||
realtimeClients := len(app.SubscriptionsBroker().Clients())
|
||||
@@ -89,90 +92,120 @@ func RunPing(app *pocketbase.PocketBase) {
|
||||
}(device)
|
||||
}
|
||||
})
|
||||
CronPing.Run()
|
||||
}
|
||||
|
||||
func RunWakeShutdown(app *pocketbase.PocketBase) {
|
||||
WakeShutdownRunning = true
|
||||
func SetWakeShutdownJobs(app *pocketbase.PocketBase) {
|
||||
// remove existing jobs
|
||||
for _, job := range CronWakeShutdown.Entries() {
|
||||
CronWakeShutdown.Remove(job.ID)
|
||||
}
|
||||
|
||||
CronWakeShutdown = cron.New()
|
||||
devices, err := app.Dao().FindRecordsByExpr("devices")
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return
|
||||
}
|
||||
for _, device := range devices {
|
||||
dev := device
|
||||
for _, dev := range devices {
|
||||
wake_cron := dev.GetString("wake_cron")
|
||||
wake_cron_enabled := dev.GetBool("wake_cron_enabled")
|
||||
shutdown_cron := dev.GetString("shutdown_cron")
|
||||
shutdown_cron_enabled := dev.GetBool("shutdown_cron_enabled")
|
||||
|
||||
if wake_cron_enabled && wake_cron != "" {
|
||||
go func(d *models.Record) {
|
||||
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
|
||||
d.Set("status", "pending")
|
||||
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")
|
||||
if err := app.Dao().SaveRecord(d); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
} else {
|
||||
d.Set("status", "online")
|
||||
if err := app.Dao().SaveRecord(d); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
|
||||
dev, err = app.Dao().FindRecordById("devices", dev.Id)
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return
|
||||
}
|
||||
}(dev)
|
||||
|
||||
status := dev.GetString("status")
|
||||
if status == "pending" || status == "online" {
|
||||
return
|
||||
}
|
||||
dev.Set("status", "pending")
|
||||
if err := app.Dao().SaveRecord(dev); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
return
|
||||
}
|
||||
if err := networking.WakeDevice(dev); err != nil {
|
||||
logger.Error.Println(err)
|
||||
dev.Set("status", "offline")
|
||||
} else {
|
||||
dev.Set("status", "online")
|
||||
}
|
||||
if err := app.Dao().SaveRecord(dev); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
if shutdown_cron_enabled && shutdown_cron != "" {
|
||||
go func(d *models.Record) {
|
||||
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
|
||||
d.Set("status", "pending")
|
||||
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")
|
||||
if err := app.Dao().SaveRecord(d); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
} else {
|
||||
d.Set("status", "offline")
|
||||
if err := app.Dao().SaveRecord(d); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
|
||||
dev, err = app.Dao().FindRecordById("devices", dev.Id)
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return
|
||||
}
|
||||
}(dev)
|
||||
|
||||
status := dev.GetString("status")
|
||||
if status == "pending" || status == "offline" {
|
||||
return
|
||||
}
|
||||
dev.Set("status", "pending")
|
||||
if err := app.Dao().SaveRecord(dev); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
if err := networking.ShutdownDevice(dev); err != nil {
|
||||
logger.Error.Println(err)
|
||||
dev.Set("status", "online")
|
||||
} else {
|
||||
dev.Set("status", "offline")
|
||||
}
|
||||
if err := app.Dao().SaveRecord(dev); err != nil {
|
||||
logger.Error.Println("Failed to save record:", err)
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
CronWakeShutdown.Run()
|
||||
}
|
||||
|
||||
func StopAll() {
|
||||
if PingRunning {
|
||||
logger.Info.Println("Stopping ping cronjob")
|
||||
ctx := CronPing.Stop()
|
||||
<-ctx.Done()
|
||||
func StartWakeShutdown() {
|
||||
WakeShutdownRunning = true
|
||||
go CronWakeShutdown.Run()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func StopWakeShutdown() {
|
||||
if WakeShutdownRunning {
|
||||
logger.Info.Println("Stopping wake/shutdown cronjob")
|
||||
ctx := CronWakeShutdown.Stop()
|
||||
<-ctx.Done()
|
||||
}
|
||||
WakeShutdownRunning = false
|
||||
}
|
||||
|
||||
func StartPing() {
|
||||
PingRunning = true
|
||||
go CronPing.Run()
|
||||
}
|
||||
|
||||
func StopPing() {
|
||||
if PingRunning {
|
||||
logger.Info.Println("Stopping wake/shutdown cronjob")
|
||||
ctx := CronPing.Stop()
|
||||
<-ctx.Done()
|
||||
}
|
||||
PingRunning = false
|
||||
}
|
||||
|
||||
func StopAll() {
|
||||
StopPing()
|
||||
StopWakeShutdown()
|
||||
}
|
||||
|
||||
+52
-61
@@ -1,99 +1,90 @@
|
||||
module github.com/seriousm4x/upsnap
|
||||
|
||||
go 1.21
|
||||
|
||||
toolchain go1.21.1
|
||||
go 1.22.5
|
||||
|
||||
require (
|
||||
github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61
|
||||
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a
|
||||
github.com/pocketbase/dbx v1.10.1
|
||||
github.com/pocketbase/pocketbase v0.19.0
|
||||
github.com/prometheus-community/pro-bing v0.3.0
|
||||
github.com/pocketbase/pocketbase v0.22.15
|
||||
github.com/prometheus-community/pro-bing v0.4.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
golang.org/x/sys v0.13.0
|
||||
golang.org/x/sys v0.21.0
|
||||
)
|
||||
|
||||
require (
|
||||
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.45.27 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.19.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
|
||||
github.com/aws/smithy-go v1.15.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.30.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 // indirect
|
||||
github.com/aws/smithy-go v1.20.3 // indirect
|
||||
github.com/disintegration/imaging v1.6.2 // indirect
|
||||
github.com/domodwyer/mailyak/v3 v3.6.2 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/ganigeorgiev/fexpr v0.3.0 // indirect
|
||||
github.com/fatih/color v1.17.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
|
||||
github.com/ganigeorgiev/fexpr v0.4.1 // indirect
|
||||
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/goccy/go-json v0.10.3 // 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.3 // indirect
|
||||
github.com/google/uuid v1.3.1 // indirect
|
||||
github.com/google/wire v0.5.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // 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.20 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.17 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
||||
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 // indirect
|
||||
github.com/mdlayher/packet v1.1.2 // indirect
|
||||
github.com/mdlayher/socket v0.5.0 // indirect
|
||||
github.com/mdlayher/socket v0.5.1 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/cobra v1.7.0 // indirect
|
||||
github.com/spf13/cast v1.6.0 // indirect
|
||||
github.com/spf13/cobra v1.8.1 // 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.34.0 // indirect
|
||||
golang.org/x/crypto v0.14.0 // indirect
|
||||
golang.org/x/image v0.13.0 // indirect
|
||||
golang.org/x/mod v0.13.0 // indirect
|
||||
golang.org/x/net v0.17.0 // indirect
|
||||
golang.org/x/oauth2 v0.13.0 // indirect
|
||||
golang.org/x/sync v0.4.0 // indirect
|
||||
golang.org/x/term v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
gocloud.dev v0.37.0 // indirect
|
||||
golang.org/x/crypto v0.24.0 // indirect
|
||||
golang.org/x/image v0.18.0 // indirect
|
||||
golang.org/x/net v0.26.0 // indirect
|
||||
golang.org/x/oauth2 v0.21.0 // indirect
|
||||
golang.org/x/sync v0.7.0 // indirect
|
||||
golang.org/x/term v0.21.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
|
||||
google.golang.org/api v0.147.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
|
||||
google.golang.org/grpc v1.58.3 // 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.15 // indirect
|
||||
modernc.org/libc v1.24.1 // indirect
|
||||
google.golang.org/api v0.187.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
|
||||
google.golang.org/grpc v1.65.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect
|
||||
modernc.org/libc v1.52.1 // indirect
|
||||
modernc.org/mathutil v1.6.0 // indirect
|
||||
modernc.org/memory v1.7.2 // indirect
|
||||
modernc.org/opt v0.1.3 // indirect
|
||||
modernc.org/sqlite v1.26.0 // indirect
|
||||
modernc.org/memory v1.8.0 // indirect
|
||||
modernc.org/sqlite v1.30.1 // indirect
|
||||
modernc.org/strutil v1.2.0 // indirect
|
||||
modernc.org/token v1.1.0 // indirect
|
||||
)
|
||||
|
||||
+168
-166
@@ -1,14 +1,19 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o=
|
||||
cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI=
|
||||
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
|
||||
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y=
|
||||
cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU=
|
||||
cloud.google.com/go/storage v1.31.0 h1:+S3LjjEN2zZ+L5hOwj4+1OkGCsLVe0NzpXKQ1pSdTCI=
|
||||
cloud.google.com/go/storage v1.31.0/go.mod h1:81ams1PrhW16L4kF7qg+4mTq7SRs5HsbDTM0bWvrwJ0=
|
||||
cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14=
|
||||
cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU=
|
||||
cloud.google.com/go/auth v0.6.1 h1:T0Zw1XM5c1GlpN2HYr2s+m3vr1p2wy+8VN+Z1FKxW38=
|
||||
cloud.google.com/go/auth v0.6.1/go.mod h1:eFHG7zDzbXHKmjJddFG/rBlcGp6t25SwRUiEQSlO4x4=
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q=
|
||||
cloud.google.com/go/compute v1.25.0 h1:H1/4SqSUhjPFE7L5ddzHOfY2bCAvjwNRZPNl6Ni5oYU=
|
||||
cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
|
||||
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
|
||||
cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc=
|
||||
cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI=
|
||||
cloud.google.com/go/storage v1.39.1 h1:MvraqHKhogCOTXTlct/9C3K3+Uy2jBmFYb3/Sp6dVtY=
|
||||
cloud.google.com/go/storage v1.39.1/go.mod h1:xK6xZmxZmo+fyP7+DEF6FhNc24/JAe95OLyOHCXFH1o=
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
|
||||
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
@@ -17,50 +22,50 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDe
|
||||
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-sdk-go v1.45.27 h1:b+zOTPkAG4i2RvqPdHxkJZafmhhVaVHBp4r41Tu4I6U=
|
||||
github.com/aws/aws-sdk-go v1.45.27/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA=
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 h1:Sc82v7tDQ/vdU1WtuSyzZ1I7y/68j//HJ6uozND1IDs=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14/go.mod h1:9NCTOURS8OpxvoAVHq79LK81/zC78hfRWFn+aL0SPcY=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.19.0 h1:AdzDvwH6dWuVARCl3RTLGRc4Ogy+N7yLFxVxXe1ClQ0=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.19.0/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91 h1:haAyxKHwoE+y/TJt+qHcPQf1dCViyyGbWcKjjYUllTE=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.91/go.mod h1:ACQ6ta5YFlfSOz2c9A+EVYawLxFMZ0rI3Q0A0tGieKo=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 h1:wmGLw2i8ZTlHLw7a9ULGfQbuccw8uIiNr6sol5bFzc8=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6/go.mod h1:Q0Hq2X/NuL7z8b1Dww8rmOFl+jzusKEcyvkKspwdpyc=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 h1:7R8uRYyXzdD71KWVCL78lJZltah6VVznXBazvKjfH58=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15/go.mod h1:26SQUPcTNgV1Tapwdt4a1rOsYRsnBsJHLMPoxK2b0d8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 h1:skaFGzv+3kA+v2BPKhuekeb1Hbb105+44r8ASC+q5SE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38/go.mod h1:epIZoRSSbRIwLPJU5F+OldHhwZPBdpDeQkRdCeY3+00=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 h1:9ulSU5ClouoPIYhDQdg9tpl83d5Yb91PXTKK+17q+ow=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6/go.mod h1:lnc2taBsR9nTlz9meD+lhFZZ9EWY712QHrRflWpTcOA=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 h1:Ll5/YVCOzRB+gxPqs2uD0R7/MyATC0w85626glSKmp4=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2/go.mod h1:Zjfqt7KhQK+PO1bbOsFNzKgaq7TcxzmEoDWN8lM0qzQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ=
|
||||
github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8=
|
||||
github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
||||
github.com/aws/aws-sdk-go v1.51.11 h1:El5VypsMIz7sFwAAj/j06JX9UGs4KAbAIEaZ57bNY4s=
|
||||
github.com/aws/aws-sdk-go v1.51.11/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o=
|
||||
github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3/go.mod h1:UbnqO+zjqk3uIt9yCACHJ9IVNhyhOCnYk8yA19SAWrM=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.4 h1:6eKRM6fgeXG4krRO9XKz755vuRhT5UyB9M1W6vjA3JU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.4/go.mod h1:h0TjcRi+nTob6fksqubKOe+Hra8uqfgmN+vuw4xRwWE=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13 h1:THZJJ6TU/FOiM7DZFnisYV9d49oxXWUzsVIMTuf3VNU=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.13/go.mod h1:VISUTg6n+uBaYIWPBaIG0jk7mbBxm7DUqBtU2cUDDWI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.15 h1:2jyRZ9rVIMisyQRnhSS/SqlckveoxXneIumECVFP91Y=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.15/go.mod h1:bDRG3m382v1KJBk1cKz7wIajg87/61EiiymEyfLvAe0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.13 h1:Eq2THzHt6P41mpjS2sUzz/3dJYFRqdWZ+vQaEMm98EM=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.13/go.mod h1:FgwTca6puegxgCInYwGjmd4tB9195Dd6LCuA+8MjpWw=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0 h1:4rhV0Hn+bf8IAIUphRX1moBcEvKJipCPmswMCl6Q5mw=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.58.0/go.mod h1:hdV0NTYd0RwV4FvNKhKUNbPLZoq9CTr/lke+3I7aCAI=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ=
|
||||
github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE=
|
||||
github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
|
||||
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -76,21 +81,27 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
||||
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
|
||||
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/ganigeorgiev/fexpr v0.3.0 h1:RwSyJBME+g/XdzlUW0paH/4VXhLHPg+rErtLeC7K8Ew=
|
||||
github.com/ganigeorgiev/fexpr v0.3.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
|
||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I=
|
||||
github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s=
|
||||
github.com/ganigeorgiev/fexpr v0.4.1 h1:hpUgbUEEWIZhSDBtf4M9aUNfQQ0BZkGRaMePy7Gcx5k=
|
||||
github.com/ganigeorgiev/fexpr v0.4.1/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es=
|
||||
github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew=
|
||||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
|
||||
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4=
|
||||
github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
|
||||
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@@ -108,42 +119,33 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE=
|
||||
github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk=
|
||||
github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk=
|
||||
github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg=
|
||||
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
|
||||
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
||||
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 h1:gpptm606MZYGaMHMsB4Srmb6EbW/IVHnt04rcMXnkBQ=
|
||||
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0 h1:e+8XbKB6IMn8A4OAyZccO4pYfB3s7bt6azNIPE7AnPg=
|
||||
github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
||||
github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
|
||||
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
|
||||
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
|
||||
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
|
||||
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI=
|
||||
github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
|
||||
github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA=
|
||||
github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
|
||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
|
||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||
@@ -170,8 +172,8 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
|
||||
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mdlayher/ethernet v0.0.0-20190313224307-5b5fc417d966/go.mod h1:5s5p/sMJ6sNsFl6uCh85lkFGV8kLuIYJCRJLavVJwvg=
|
||||
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 h1:2oDp6OOhLxQ9JBoUuysVz9UZ9uI6oLUbvAZu0x8o+vE=
|
||||
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118/go.mod h1:ZFUnHIVchZ9lJoWoEGUg8Q3M4U8aNNWA3CVSUTkW4og=
|
||||
@@ -180,22 +182,23 @@ github.com/mdlayher/packet v1.1.2 h1:3Up1NG6LZrsgDVn6X4L9Ge/iyRyxFEFD9o6Pr3Q1nQY
|
||||
github.com/mdlayher/packet v1.1.2/go.mod h1:GEu1+n9sG5VtiRE4SydOmX5GTwyyYlteZiFU+x0kew4=
|
||||
github.com/mdlayher/raw v0.0.0-20190313224157-43dbcdd7739d/go.mod h1:r1fbeITl2xL/zLbVnNHFyOzQJTgr/3fpf1lJX/cjzR8=
|
||||
github.com/mdlayher/socket v0.2.1/go.mod h1:QLlNPkFR88mRUNQIzRBMfXxwKal8H7u1h3bL1CV+f0E=
|
||||
github.com/mdlayher/socket v0.5.0 h1:ilICZmJcQz70vrWVes1MFera4jGiWNocSkykwwoy3XI=
|
||||
github.com/mdlayher/socket v0.5.0/go.mod h1:WkcBFfvyG8QENs5+hfQPl1X6Jpd2yeLIYgrGFmJiJxI=
|
||||
github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos=
|
||||
github.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ=
|
||||
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a h1:fpQi42PM6HzbHwNg6a7OvLbh5l49Rgr7GCARozjHwio=
|
||||
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a/go.mod h1:XX6nvyQpGc8E4KaQm62FyexOYd36ilpyfYf8wjgMDV8=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pocketbase/dbx v1.10.1 h1:cw+vsyfCJD8YObOVeqb93YErnlxwYMkNZ4rwN0G0AaA=
|
||||
github.com/pocketbase/dbx v1.10.1/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
|
||||
github.com/pocketbase/pocketbase v0.19.0 h1:PvRsABvNgJhafShpXZNXeF/BdkmiwEIcc/+r9QsONdg=
|
||||
github.com/pocketbase/pocketbase v0.19.0/go.mod h1:iNGsMmhAtmiH4X9aYPK4nTS56XL1HhQPBkmZaWRyQ8Q=
|
||||
github.com/prometheus-community/pro-bing v0.3.0 h1:SFT6gHqXwbItEDJhTkzPWVqU6CLEtqEfNAPp47RUON4=
|
||||
github.com/prometheus-community/pro-bing v0.3.0/go.mod h1:p9dLb9zdmv+eLxWfCT6jESWuDrS+YzpPkQBgysQF8a0=
|
||||
github.com/pocketbase/pocketbase v0.22.15 h1:7q1aVP4T6NpsBdfHTvEYkq+UeOoSsuTGO5qQXCuqy5g=
|
||||
github.com/pocketbase/pocketbase v0.22.15/go.mod h1:tsEEQ2xXydNUeDUDkgSQDBlIuF0gkhE2tcYZThLCSHg=
|
||||
github.com/prometheus-community/pro-bing v0.4.0 h1:YMbv+i08gQz97OZZBwLyvmmQEEzyfyrrjEaAchdy3R4=
|
||||
github.com/prometheus-community/pro-bing v0.4.0/go.mod h1:b7wRYZtCcPmt4Sz319BykUU241rWLe1VFXyiyWK/dH4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
@@ -204,10 +207,10 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
|
||||
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
|
||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
||||
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
|
||||
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
|
||||
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -227,23 +230,33 @@ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
gocloud.dev v0.34.0 h1:LzlQY+4l2cMtuNfwT2ht4+fiXwWf/NmPTnXUlLmGif4=
|
||||
gocloud.dev v0.34.0/go.mod h1:psKOachbnvY3DAOPbsFVmLIErwsbWPUG2H5i65D38vE=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
|
||||
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
|
||||
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
|
||||
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
|
||||
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
|
||||
go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=
|
||||
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
|
||||
gocloud.dev v0.37.0 h1:XF1rN6R0qZI/9DYjN16Uy0durAmSlf58DHOcb28GPro=
|
||||
gocloud.dev v0.37.0/go.mod h1:7/O4kqdInCNsc6LqgmuFnS0GRew4XNNYWpA44yQnwco=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
|
||||
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg=
|
||||
golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk=
|
||||
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
|
||||
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
|
||||
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -256,19 +269,18 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
|
||||
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
|
||||
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
|
||||
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
|
||||
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -282,62 +294,56 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
|
||||
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
|
||||
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
|
||||
google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc=
|
||||
google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs=
|
||||
google.golang.org/api v0.187.0 h1:Mxs7VATVC2v7CY+7Xwm4ndkX71hpElcvx0D1Ji/p1eo=
|
||||
google.golang.org/api v0.187.0/go.mod h1:KIHlTc4x7N7gKKuVsdmfBXN13yEEWXWFURWY6SBp2gk=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8=
|
||||
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
|
||||
google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d h1:PksQg4dV6Sem3/HkBX+Ltq8T0ke0PKIRBNBatoDTVls=
|
||||
google.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:s7iA721uChleev562UJO2OYB0PPT9CMFjV+Ce7VJH5M=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 h1:QW9+G6Fir4VcRXVH8x3LilNAb6cxBGLa6+GM4hRwexE=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3/go.mod h1:kdrSS/OiLkPrNUpzD4aHgCq2rVuC/YRxok32HXZ4vRE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
|
||||
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
|
||||
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
@@ -347,10 +353,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
@@ -360,31 +364,29 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=
|
||||
lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q=
|
||||
modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y=
|
||||
modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0=
|
||||
modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI=
|
||||
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
|
||||
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
|
||||
modernc.org/libc v1.24.1 h1:uvJSeCKL/AgzBo2yYIPPTy82v21KgGnizcGYfBHaNuM=
|
||||
modernc.org/libc v1.24.1/go.mod h1:FmfO1RLrU3MHJfyi9eYYmZBfi/R+tqZ6+hQ3yQQUkak=
|
||||
modernc.org/cc/v4 v4.21.2 h1:dycHFB/jDc3IyacKipCNSDrjIC0Lm1hyoWOZTRR20Lk=
|
||||
modernc.org/cc/v4 v4.21.2/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ=
|
||||
modernc.org/ccgo/v4 v4.17.10 h1:6wrtRozgrhCxieCeJh85QsxkX/2FFrT9hdaWPlbn4Zo=
|
||||
modernc.org/ccgo/v4 v4.17.10/go.mod h1:0NBHgsqTTpm9cA5z2ccErvGZmtntSM9qD2kFAs6pjXM=
|
||||
modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
|
||||
modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
|
||||
modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw=
|
||||
modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU=
|
||||
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b h1:BnN1t+pb1cy61zbvSUV7SeI0PwosMhlAEi/vBY4qxp8=
|
||||
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
|
||||
modernc.org/libc v1.52.1 h1:uau0VoiT5hnR+SpoWekCKbLqm7v6dhRL3hI+NQhgN3M=
|
||||
modernc.org/libc v1.52.1/go.mod h1:HR4nVzFDSDizP620zcMCgjb1/8xk2lg5p/8yjfGv1IQ=
|
||||
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
|
||||
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
|
||||
modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
|
||||
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
|
||||
modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=
|
||||
modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU=
|
||||
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
|
||||
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.26.0 h1:SocQdLRSYlA8W99V8YH0NES75thx19d9sB/aFc4R8Lw=
|
||||
modernc.org/sqlite v1.26.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU=
|
||||
modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc=
|
||||
modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss=
|
||||
modernc.org/sqlite v1.30.1 h1:YFhPVfu2iIgUf9kuA1CR7iiHdcEEsI2i+yjRYHscyxk=
|
||||
modernc.org/sqlite v1.30.1/go.mod h1:DUmsiWQDaAvU4abhc/N+djlom/L2o8f7gZ95RCvyoLU=
|
||||
modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
|
||||
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
|
||||
modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=
|
||||
modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY=
|
||||
modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE=
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
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_wake_confirm := &schema.SchemaField{}
|
||||
json.Unmarshal([]byte(`{
|
||||
"system": false,
|
||||
"id": "chtoblvl",
|
||||
"name": "wake_confirm",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}`), new_wake_confirm)
|
||||
collection.Schema.AddField(new_wake_confirm)
|
||||
|
||||
// add
|
||||
new_shutdown_confirm := &schema.SchemaField{}
|
||||
json.Unmarshal([]byte(`{
|
||||
"system": false,
|
||||
"id": "muqy3axq",
|
||||
"name": "shutdown_confirm",
|
||||
"type": "bool",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {}
|
||||
}`), new_shutdown_confirm)
|
||||
collection.Schema.AddField(new_shutdown_confirm)
|
||||
|
||||
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("chtoblvl")
|
||||
|
||||
// remove
|
||||
collection.Schema.RemoveField("muqy3axq")
|
||||
|
||||
return dao.SaveCollection(collection)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
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_wake_cmd := &schema.SchemaField{}
|
||||
json.Unmarshal([]byte(`{
|
||||
"system": false,
|
||||
"id": "murx1eum",
|
||||
"name": "wake_cmd",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}`), new_wake_cmd)
|
||||
collection.Schema.AddField(new_wake_cmd)
|
||||
|
||||
// add
|
||||
new_ping_cmd := &schema.SchemaField{}
|
||||
json.Unmarshal([]byte(`{
|
||||
"system": false,
|
||||
"id": "kefxqjbj",
|
||||
"name": "ping_cmd",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"min": null,
|
||||
"max": null,
|
||||
"pattern": ""
|
||||
}
|
||||
}`), new_ping_cmd)
|
||||
collection.Schema.AddField(new_ping_cmd)
|
||||
|
||||
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("murx1eum")
|
||||
|
||||
// remove
|
||||
collection.Schema.RemoveField("kefxqjbj")
|
||||
|
||||
return dao.SaveCollection(collection)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
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("cti4l8f4mz8df3r")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// add
|
||||
new_link := &schema.SchemaField{}
|
||||
json.Unmarshal([]byte(`{
|
||||
"system": false,
|
||||
"id": "i3uvw7ij",
|
||||
"name": "link",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"presentable": false,
|
||||
"unique": false,
|
||||
"options": {
|
||||
"exceptDomains": null,
|
||||
"onlyDomains": null
|
||||
}
|
||||
}`), new_link)
|
||||
collection.Schema.AddField(new_link)
|
||||
|
||||
return dao.SaveCollection(collection)
|
||||
}, func(db dbx.Builder) error {
|
||||
dao := daos.New(db);
|
||||
|
||||
collection, err := dao.FindCollectionByNameOrId("cti4l8f4mz8df3r")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// remove
|
||||
collection.Schema.RemoveField("i3uvw7ij")
|
||||
|
||||
return dao.SaveCollection(collection)
|
||||
})
|
||||
}
|
||||
+45
-22
@@ -2,6 +2,10 @@ package networking
|
||||
|
||||
import (
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/pocketbase/pocketbase/models"
|
||||
@@ -10,24 +14,46 @@ import (
|
||||
)
|
||||
|
||||
func PingDevice(device *models.Record) bool {
|
||||
pinger, err := probing.NewPinger(device.GetString("ip"))
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return false
|
||||
}
|
||||
pinger.Count = 1
|
||||
pinger.Timeout = 500 * time.Millisecond
|
||||
pinger.SetPrivileged(true)
|
||||
err = pinger.Run()
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return false
|
||||
}
|
||||
stats := pinger.Statistics()
|
||||
if stats.PacketLoss > 0 {
|
||||
return false
|
||||
ping_cmd := device.GetString("ping_cmd")
|
||||
if ping_cmd == "" {
|
||||
pinger, err := probing.NewPinger(device.GetString("ip"))
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return false
|
||||
}
|
||||
pinger.Count = 1
|
||||
pinger.Timeout = 500 * time.Millisecond
|
||||
privileged, err := strconv.ParseBool(os.Getenv("UPSNAP_PING_PRIVILEGED"))
|
||||
if err != nil {
|
||||
privileged = true
|
||||
}
|
||||
pinger.SetPrivileged(privileged)
|
||||
err = pinger.Run()
|
||||
if err != nil {
|
||||
logger.Error.Println(err)
|
||||
return false
|
||||
}
|
||||
stats := pinger.Statistics()
|
||||
if stats.PacketLoss > 0 {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
var shell string
|
||||
var shell_arg string
|
||||
if runtime.GOOS == "windows" {
|
||||
shell = "cmd"
|
||||
shell_arg = "/C"
|
||||
} else {
|
||||
shell = "/bin/sh"
|
||||
shell_arg = "-c"
|
||||
}
|
||||
|
||||
cmd := exec.Command(shell, shell_arg, ping_cmd)
|
||||
err := cmd.Run()
|
||||
|
||||
return err == nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +63,6 @@ func CheckPort(host string, port string) bool {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if conn != nil {
|
||||
defer conn.Close()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
defer conn.Close()
|
||||
return conn != nil
|
||||
}
|
||||
|
||||
+79
-14
@@ -1,7 +1,11 @@
|
||||
package networking
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/pocketbase/pocketbase/models"
|
||||
@@ -10,22 +14,83 @@ import (
|
||||
|
||||
func WakeDevice(device *models.Record) error {
|
||||
logger.Info.Println("Wake triggered for", device.GetString("name"))
|
||||
err := SendMagicPacket(device)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// check state every seconds for 2 min
|
||||
start := time.Now()
|
||||
for {
|
||||
time.Sleep(1 * time.Second)
|
||||
isOnline := PingDevice(device)
|
||||
if isOnline {
|
||||
return nil
|
||||
wake_cmd := device.GetString("wake_cmd")
|
||||
if wake_cmd != "" {
|
||||
var shell string
|
||||
var shell_arg string
|
||||
if runtime.GOOS == "windows" {
|
||||
shell = "cmd"
|
||||
shell_arg = "/C"
|
||||
} else {
|
||||
shell = "/bin/sh"
|
||||
shell_arg = "-c"
|
||||
}
|
||||
if time.Since(start) >= 2*time.Minute {
|
||||
break
|
||||
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(ctx, shell, shell_arg, wake_cmd)
|
||||
SetProcessAttributes(cmd)
|
||||
|
||||
var stderr bytes.Buffer
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
if err := cmd.Start(); err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
|
||||
done := make(chan error, 1)
|
||||
go func() {
|
||||
done <- cmd.Wait()
|
||||
}()
|
||||
|
||||
// check state every seconds for 2 min
|
||||
start := time.Now()
|
||||
for {
|
||||
select {
|
||||
case <-time.After(1 * time.Second):
|
||||
if time.Since(start) >= 2*time.Minute {
|
||||
if err := KillProcess(cmd.Process); err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
return fmt.Errorf("%s not online after 2 minutes", device.GetString("name"))
|
||||
}
|
||||
isOnline := PingDevice(device)
|
||||
if isOnline {
|
||||
if err := KillProcess(cmd.Process); err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
case err := <-done:
|
||||
if err != nil {
|
||||
if err := KillProcess(cmd.Process); err != nil {
|
||||
logger.Error.Println(err)
|
||||
}
|
||||
return fmt.Errorf("%s", stderr.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
err := SendMagicPacket(device)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// check state every seconds for 2 min
|
||||
start := time.Now()
|
||||
for {
|
||||
time.Sleep(1 * time.Second)
|
||||
isOnline := PingDevice(device)
|
||||
if isOnline {
|
||||
return nil
|
||||
}
|
||||
if time.Since(start) >= 2*time.Minute {
|
||||
break
|
||||
}
|
||||
}
|
||||
return fmt.Errorf(device.GetString("name"), "not online after 2 min")
|
||||
}
|
||||
return fmt.Errorf(device.GetString("name"), "not online after 2 min")
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/xml"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -146,7 +147,11 @@ func HandlerScan(c echo.Context) error {
|
||||
}
|
||||
|
||||
// run nmap
|
||||
cmd := exec.Command(nmap, "-sn", "-oX", "-", scanRange, "--host-timeout", "500ms")
|
||||
timeout := os.Getenv("UPSNAP_SCAN_TIMEOUT")
|
||||
if timeout == "" {
|
||||
timeout = "500ms"
|
||||
}
|
||||
cmd := exec.Command(nmap, "-sn", "-oX", "-", scanRange, "--host-timeout", timeout)
|
||||
cmdOutput, err := cmd.Output()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+33
-12
@@ -122,23 +122,45 @@ func StartPocketBase(distDirFS fs.FS) {
|
||||
return err
|
||||
}
|
||||
|
||||
go cronjobs.RunPing(App)
|
||||
go cronjobs.RunWakeShutdown(App)
|
||||
cronjobs.SetPingJobs(App)
|
||||
cronjobs.StartPing()
|
||||
cronjobs.SetWakeShutdownJobs(App)
|
||||
cronjobs.StartWakeShutdown()
|
||||
|
||||
// restart ping cronjobs or wake/shutdown cronjobs on model update
|
||||
// add event hook before starting server.
|
||||
// using this outside App.OnBeforeServe() would not work
|
||||
App.OnModelAfterUpdate("settings_private", "devices").Add(func(e *core.ModelEvent) error {
|
||||
if e.Model.TableName() == "settings_private" {
|
||||
for _, job := range cronjobs.CronPing.Entries() {
|
||||
cronjobs.CronPing.Remove(job.ID)
|
||||
}
|
||||
go cronjobs.RunPing(App)
|
||||
cronjobs.SetPingJobs(App)
|
||||
} else if e.Model.TableName() == "devices" {
|
||||
for _, job := range cronjobs.CronWakeShutdown.Entries() {
|
||||
cronjobs.CronWakeShutdown.Remove(job.ID)
|
||||
// only restart wake/shutdown cronjobs if new model's cron changed
|
||||
record := e.Model.(*models.Record)
|
||||
newRecord := record.CleanCopy()
|
||||
oldRecord := record.OriginalCopy()
|
||||
|
||||
newWakeCron := newRecord.GetString("wake_cron")
|
||||
newWakeCmd := newRecord.GetString("wake_cmd")
|
||||
newWakeCronEnabled := newRecord.GetBool("wake_cron_enabled")
|
||||
newShutdownCron := newRecord.GetString("shutdown_cron")
|
||||
newShutdownCmd := newRecord.GetString("shutdown_cmd")
|
||||
newShutdownCronEnabled := newRecord.GetBool("shutdown_cron_enabled")
|
||||
|
||||
oldWakeCron := oldRecord.GetString("wake_cron")
|
||||
oldWakeCmd := oldRecord.GetString("wake_cmd")
|
||||
oldWakeCronEnabled := oldRecord.GetBool("wake_cron_enabled")
|
||||
oldShutdownCron := oldRecord.GetString("shutdown_cron")
|
||||
oldShutdownCmd := oldRecord.GetString("shutdown_cmd")
|
||||
oldShutdownCronEnabled := oldRecord.GetBool("shutdown_cron_enabled")
|
||||
|
||||
if newWakeCron != oldWakeCron ||
|
||||
newWakeCmd != oldWakeCmd ||
|
||||
newWakeCronEnabled != oldWakeCronEnabled ||
|
||||
newShutdownCron != oldShutdownCron ||
|
||||
newShutdownCronEnabled != oldShutdownCronEnabled ||
|
||||
newShutdownCmd != oldShutdownCmd {
|
||||
cronjobs.SetWakeShutdownJobs(App)
|
||||
}
|
||||
go cronjobs.RunWakeShutdown(App)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@@ -265,9 +287,8 @@ func resetDeviceStates() error {
|
||||
return err
|
||||
}
|
||||
for _, device := range devices {
|
||||
d := device
|
||||
d.Set("status", "offline")
|
||||
if err := App.Dao().SaveRecord(d); err != nil {
|
||||
device.Set("status", "offline")
|
||||
if err := App.Dao().SaveRecord(device); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
files:
|
||||
- source: /frontend/src/lib/i18n/en/index.ts
|
||||
translation: /frontend/src/lib/i18n/%locale%/index.ts
|
||||
@@ -13,6 +13,8 @@ services:
|
||||
# - 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_SCAN_TIMEOUT=500ms # Scan timeout is nmap's --host-timeout value to wait for devices (https://nmap.org/book/man-performance.html)
|
||||
# - UPSNAP_PING_PRIVILEGED=true # Set to false if you don't have root user permissions
|
||||
# - UPSNAP_WEBSITE_TITLE=Custom name # Custom website title
|
||||
# # dns is used for name resolution during network scan
|
||||
# dns:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
|
||||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
|
||||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
||||
+28
-24
@@ -11,29 +11,33 @@
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "eslint --fix --cache --ignore-path ../.gitignore .",
|
||||
"format": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore .",
|
||||
"prepare": "cd .. && husky install frontend/.husky",
|
||||
"prepare": "cd .. && husky frontend/.husky",
|
||||
"typesafe-i18n": "typesafe-i18n"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-static": "^2.0.3",
|
||||
"@sveltejs/kit": "^1.26.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
||||
"@typescript-eslint/parser": "^6.8.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"daisyui": "^3.9.3",
|
||||
"eslint": "^8.51.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-svelte": "^2.34.0",
|
||||
"husky": "^8.0.3",
|
||||
"postcss": "^8.4.31",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"svelte": "^4.2.2",
|
||||
"svelte-check": "^3.5.2",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.5.0"
|
||||
"@eslint/js": "^9.6.0",
|
||||
"@sveltejs/adapter-static": "^3.0.2",
|
||||
"@sveltejs/kit": "^2.5.18",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
||||
"@typescript-eslint/parser": "^7.15.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"daisyui": "^4.12.10",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-svelte": "^2.41.0",
|
||||
"husky": "^9.0.11",
|
||||
"postcss": "^8.4.39",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier-plugin-svelte": "^3.2.5",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"svelte": "^4.2.18",
|
||||
"svelte-check": "^3.8.4",
|
||||
"tailwindcss": "^3.4.4",
|
||||
"tslib": "^2.6.3",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^7.15.0",
|
||||
"vite": "^5.3.3"
|
||||
},
|
||||
"type": "module",
|
||||
"lint-staged": {
|
||||
@@ -41,11 +45,11 @@
|
||||
"*.{js,css,md,svelte,scss}": "prettier --write --cache --cache-strategy content --ignore-path ../.gitignore ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
||||
"date-fns": "^2.30.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
||||
"date-fns": "^3.6.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pocketbase": "^0.19.0",
|
||||
"svelte-fa": "^3.0.4",
|
||||
"pocketbase": "^0.21.3",
|
||||
"svelte-fa": "^4.0.2",
|
||||
"svelte-french-toast": "^1.2.0",
|
||||
"theme-change": "^2.5.0",
|
||||
"typesafe-i18n": "^5.26.2"
|
||||
|
||||
Generated
+3050
-2004
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,8 @@
|
||||
const theme = localStorage.getItem('theme')
|
||||
? localStorage.getItem('theme')
|
||||
: preferesDark
|
||||
? darkTheme
|
||||
: lightTheme;
|
||||
? darkTheme
|
||||
: lightTheme;
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
|
||||
window
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import type { Locale } from 'date-fns';
|
||||
import { formatDistance, parseISO } from 'date-fns';
|
||||
import { de } from 'date-fns/locale/de';
|
||||
import { enUS } from 'date-fns/locale/en-US';
|
||||
import { es } from 'date-fns/locale/es';
|
||||
import { fr } from 'date-fns/locale/fr';
|
||||
import { it } from 'date-fns/locale/it';
|
||||
import { pt } from 'date-fns/locale/pt';
|
||||
import { zhCN } from 'date-fns/locale/zh-CN';
|
||||
import { zhTW } from 'date-fns/locale/zh-TW';
|
||||
import Fa from 'svelte-fa';
|
||||
import toast from 'svelte-french-toast';
|
||||
import { scale } from 'svelte/transition';
|
||||
@@ -65,26 +73,37 @@
|
||||
switch ($locale) {
|
||||
case 'de':
|
||||
case 'de-DE':
|
||||
dateFnsLocale = (await import('date-fns/locale/de/index.js')).default;
|
||||
dateFnsLocale = de;
|
||||
break;
|
||||
case 'en':
|
||||
case 'en-US':
|
||||
dateFnsLocale = (await import('date-fns/locale/en-US/index.js')).default;
|
||||
dateFnsLocale = enUS;
|
||||
break;
|
||||
case 'fr':
|
||||
case 'fr-FR':
|
||||
dateFnsLocale = (await import('date-fns/locale/fr/index.js')).default;
|
||||
dateFnsLocale = fr;
|
||||
break;
|
||||
case 'it':
|
||||
case 'it-IT':
|
||||
dateFnsLocale = it;
|
||||
break;
|
||||
case 'es':
|
||||
case 'es-ES':
|
||||
dateFnsLocale = es;
|
||||
break;
|
||||
case 'pt':
|
||||
case 'pt-PT':
|
||||
dateFnsLocale = (await import('date-fns/locale/pt/index.js')).default;
|
||||
dateFnsLocale = pt;
|
||||
break;
|
||||
case 'zh':
|
||||
case 'zh-CN':
|
||||
dateFnsLocale = (await import('date-fns/locale/zh-CN/index.js')).default;
|
||||
dateFnsLocale = zhCN;
|
||||
break;
|
||||
case 'zh-TW':
|
||||
dateFnsLocale = zhTW;
|
||||
break;
|
||||
default:
|
||||
dateFnsLocale = (await import('date-fns/locale/en-US/index.js')).default;
|
||||
dateFnsLocale = enUS;
|
||||
break;
|
||||
}
|
||||
})();
|
||||
@@ -111,16 +130,16 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="card bg-base-300 shadow-md rounded-3xl" transition:scale={{ delay: 0, duration: 200 }}>
|
||||
<div class="card rounded-3xl bg-base-300 shadow-md" transition:scale={{ delay: 0, duration: 200 }}>
|
||||
<div class="card-body p-6">
|
||||
{#if device.link.toString() !== ''}
|
||||
<a href={device.link.toString()} target="_blank">
|
||||
<h1 class="card-title link">{device.name}</h1>
|
||||
<h1 class="link card-title">{device.name}</h1>
|
||||
</a>
|
||||
{:else}
|
||||
<h1 class="card-title">{device.name}</h1>
|
||||
{/if}
|
||||
<ul class="menu bg-base-200 rounded-box">
|
||||
<ul class="menu rounded-box bg-base-200">
|
||||
<!-- TODO: change to nic array once backend supports it -->
|
||||
<DeviceCardNic {device} />
|
||||
</ul>
|
||||
@@ -161,14 +180,14 @@
|
||||
{/if}
|
||||
</span>
|
||||
{#if moreButtons.filter((btn) => btn.requires).length > 0}
|
||||
<div class="dropdown dropdown-top dropdown-end bg-base-300 ms-auto">
|
||||
<div class="dropdown dropdown-end dropdown-top ms-auto bg-base-300">
|
||||
<label tabindex="-1" class="btn btn-sm m-1" for="more-{device.id}"
|
||||
>{$LL.device.card_btn_more()}</label
|
||||
>
|
||||
<ul
|
||||
id="more-{device.id}"
|
||||
tabindex="-1"
|
||||
class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-fit"
|
||||
class="menu dropdown-content z-[1] w-fit rounded-box bg-base-100 p-2 shadow"
|
||||
>
|
||||
{#each moreButtons as btn}
|
||||
{#if btn.requires}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
let disabled = false;
|
||||
let timeout = 120;
|
||||
var interval: number;
|
||||
let modalWake: HTMLDialogElement;
|
||||
let modalShutdown: HTMLDialogElement;
|
||||
|
||||
$: if (device.status === 'pending' && !interval) {
|
||||
countdown(Date.parse(device.updated));
|
||||
@@ -80,22 +82,31 @@
|
||||
timeout = Math.round((end - Date.now()) / 1000);
|
||||
if (timeout <= 0 || device.status !== 'pending') {
|
||||
clearInterval(interval);
|
||||
interval = 0;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
if (device.status === 'offline') {
|
||||
wake();
|
||||
device.wake_confirm ? askConfirmation('wake') : wake();
|
||||
} else if (device.status === 'online') {
|
||||
shutdown();
|
||||
device.shutdown_confirm ? askConfirmation('shutdown') : shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
function askConfirmation(action: string) {
|
||||
if (action === 'wake') {
|
||||
modalWake.showModal();
|
||||
} else {
|
||||
modalShutdown.showModal();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<li class="tooltip" class:disabled data-tip={hoverText}>
|
||||
<div
|
||||
class="flex items-start p-2 gap-4"
|
||||
class="flex items-start gap-4 p-2"
|
||||
on:click={disabled ? null : handleClick}
|
||||
on:keydown={disabled ? null : handleClick}
|
||||
role="none"
|
||||
@@ -122,15 +133,23 @@
|
||||
<div class="grow">
|
||||
<div class="text-lg font-bold leading-4">{device.ip}</div>
|
||||
<div>{device.mac}</div>
|
||||
<div class="flex flex-wrap gap-x-4 gap-y-0">
|
||||
<div class="flex flex-wrap gap-x-4">
|
||||
{#if device?.expand?.ports}
|
||||
{#each device?.expand?.ports.sort((a, b) => a.number - b.number) as port}
|
||||
<span class="flex items-center gap-1 break-all">
|
||||
{#if port.status}
|
||||
<Fa icon={faCircle} class="text-success" />
|
||||
{port.name} ({port.number})
|
||||
{:else}
|
||||
<Fa icon={faCircle} class="text-error" />
|
||||
{/if}
|
||||
{#if port.link}
|
||||
<a
|
||||
href={port.link}
|
||||
target="_blank"
|
||||
class="underline"
|
||||
on:click={(e) => e.stopPropagation()}>{port.name} ({port.number})</a
|
||||
>
|
||||
{:else}
|
||||
{port.name} ({port.number})
|
||||
{/if}
|
||||
</span>
|
||||
@@ -141,6 +160,36 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<dialog class="modal" bind:this={modalWake}>
|
||||
<div class="modal-box">
|
||||
<h3 class="text-lg font-bold">
|
||||
{$LL.device.modal_confirm_wake_title({ device: device.name })}
|
||||
</h3>
|
||||
<p class="py-4">{$LL.device.modal_confirm_wake_desc({ device: device.name })}</p>
|
||||
<div class="modal-action">
|
||||
<form method="dialog" class="flex flex-row flex-wrap gap-2">
|
||||
<button class="btn btn-neutral">{$LL.buttons.cancel()}</button>
|
||||
<button class="btn btn-success" on:click={wake}>{$LL.buttons.confirm()}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<dialog class="modal" bind:this={modalShutdown}>
|
||||
<div class="modal-box">
|
||||
<h3 class="text-lg font-bold">
|
||||
{$LL.device.modal_confirm_shutdown_title({ device: device.name })}
|
||||
</h3>
|
||||
<p class="py-4">{$LL.device.modal_confirm_shutdown_desc({ device: device.name })}</p>
|
||||
<div class="modal-action">
|
||||
<form method="dialog" class="flex flex-row flex-wrap gap-2">
|
||||
<button class="btn btn-neutral">{$LL.buttons.cancel()}</button>
|
||||
<button class="btn btn-success" on:click={shutdown}>{$LL.buttons.confirm()}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<style>
|
||||
:global(.menu li.disabled) {
|
||||
color: inherit;
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
<div class="card w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.general()}</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="form-control w-full max-w-xs">
|
||||
<label class="label" for="device-name">
|
||||
<div class="label-text">
|
||||
@@ -237,30 +237,30 @@
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<span class="badge text-error self-center">* {$LL.device.general_required_field()}</span>
|
||||
<span class="badge self-center text-error">* {$LL.device.general_required_field()}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.ports()}</h2>
|
||||
<p class="my-2">{$LL.device.ports_desc()}</p>
|
||||
<div class="form-control w-full">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
||||
<!-- eslint-disable-next-line @typescript-eslint/no-unused-vars -->
|
||||
{#each device.expand.ports as _, index}
|
||||
<DeviceFormPort bind:device {index} />
|
||||
{/each}
|
||||
</div>
|
||||
<button
|
||||
class="btn max-w-xs btn-primary mt-4"
|
||||
class="btn btn-primary mt-4 max-w-xs"
|
||||
on:click={() => createEmptyPort()}
|
||||
type="button">{$LL.device.ports_add_new()}</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.link()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -276,7 +276,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.ping()}</h2>
|
||||
<p class="my-2">
|
||||
<!-- eslint-disable svelte/no-at-html-tags -->
|
||||
{@html $LL.device.ping_desc()}
|
||||
</p>
|
||||
<div class="form-control w-full">
|
||||
<label class="label cursor-pointer" for="ping-cmd">
|
||||
<span class="label-text">{$LL.device.ping_cmd()}</span>
|
||||
</label>
|
||||
<input
|
||||
id="ping-cmd"
|
||||
type="text"
|
||||
placeholder="$:"
|
||||
class="input mb-2 w-full max-w-xs"
|
||||
bind:value={device.ping_cmd}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.wake()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -284,6 +305,31 @@
|
||||
<!-- eslint-disable svelte/no-at-html-tags -->
|
||||
{@html $LL.settings.ping_interval_desc2()}
|
||||
</p>
|
||||
<div class="form-control w-full">
|
||||
<label class="label cursor-pointer" for="wake-cmd">
|
||||
<span class="label-text">{$LL.device.wake_cmd()}</span>
|
||||
</label>
|
||||
<input
|
||||
id="wake-cmd"
|
||||
type="text"
|
||||
placeholder="$:"
|
||||
class="input mb-2 w-full max-w-xs"
|
||||
bind:value={device.wake_cmd}
|
||||
/>
|
||||
</div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<input
|
||||
id="wake-confirm"
|
||||
type="checkbox"
|
||||
class="toggle toggle-success"
|
||||
bind:checked={device.wake_confirm}
|
||||
/>
|
||||
<label class="label cursor-pointer" for="wake-confirm">
|
||||
<span class="label-text">{$LL.device.require_confirmation()}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="w-full max-w-xs">
|
||||
<label class="label" for="wake-cron">
|
||||
@@ -319,7 +365,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">Sleep-On-LAN</h2>
|
||||
<p class="mt-2">
|
||||
@@ -333,10 +379,10 @@
|
||||
<!-- eslint-disable svelte/no-at-html-tags -->
|
||||
{@html $LL.device.sol_desc3()}
|
||||
</p>
|
||||
<div class="flex flex-row flex-wrap gap-4 items-end mt-4">
|
||||
<div class="mt-4 flex flex-row flex-wrap items-end gap-4">
|
||||
<div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<input
|
||||
id="sol-enable"
|
||||
type="checkbox"
|
||||
@@ -372,7 +418,7 @@
|
||||
{#if device.sol_enabled}
|
||||
<div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<input
|
||||
id="sol-auth"
|
||||
type="checkbox"
|
||||
@@ -428,7 +474,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.shutdown()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -436,13 +482,13 @@
|
||||
{@html $LL.device.shutdown_desc()}
|
||||
</p>
|
||||
<p class="my-2 font-bold">{$LL.device.shutdown_examples()}</p>
|
||||
<div class="mockup-code text-sm max-w-fit">
|
||||
<div class="mockup-code min-w-0 max-w-fit text-sm">
|
||||
<pre data-prefix="#"><code>{$LL.device.shutdown_examples_windows()}</code></pre>
|
||||
<pre data-prefix="$" class="text-warning"><code
|
||||
>net rpc shutdown -I 192.168.1.13 -U "user%password"</code
|
||||
></pre>
|
||||
</div>
|
||||
<div class="mockup-code text-sm max-w-fit">
|
||||
<div class="mockup-code min-w-0 max-w-fit text-sm">
|
||||
<pre data-prefix="#"><code>{$LL.device.shutdown_examples_linux()}</code></pre>
|
||||
<pre data-prefix="$" class="text-warning"><code
|
||||
>sshpass -p password ssh -o "StrictHostKeyChecking=no" user@192.168.1.13 "sudo poweroff"</code
|
||||
@@ -456,10 +502,23 @@
|
||||
id="shutdown-cmd"
|
||||
type="text"
|
||||
placeholder="$:"
|
||||
class="input w-full max-w-xs mb-2"
|
||||
class="input mb-2 w-full max-w-xs"
|
||||
bind:value={device.shutdown_cmd}
|
||||
/>
|
||||
</div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<input
|
||||
id="shutdown-confirm"
|
||||
type="checkbox"
|
||||
class="toggle toggle-success"
|
||||
bind:checked={device.shutdown_confirm}
|
||||
/>
|
||||
<label class="label cursor-pointer" for="shutdown-confirm">
|
||||
<span class="label-text">{$LL.device.require_confirmation()}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="my-2">
|
||||
{$LL.device.shutdown_cron_desc()}
|
||||
</p>
|
||||
@@ -497,7 +556,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.password()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -515,7 +574,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.groups()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -526,13 +585,13 @@
|
||||
<div class="join">
|
||||
<div class=" tooltip" data-tip="Delete">
|
||||
<button
|
||||
class="join-item btn btn-error"
|
||||
class="btn btn-error join-item"
|
||||
type="button"
|
||||
on:click={() => deleteGroup(group)}><Fa icon={faX} /></button
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="btn bg-base-100 hover:bg-base-200 join-item"
|
||||
class="btn join-item bg-base-100 hover:bg-base-200"
|
||||
on:click={() => toggleGroup(group.id)}
|
||||
role="none"
|
||||
>
|
||||
@@ -548,7 +607,7 @@
|
||||
</div>
|
||||
<div class="join max-w-xs">
|
||||
<input
|
||||
class="input input-bordered join-item w-full"
|
||||
class="input join-item input-bordered w-full"
|
||||
placeholder={$LL.device.groups_placeholder()}
|
||||
type="text"
|
||||
bind:value={newGroup}
|
||||
@@ -566,7 +625,7 @@
|
||||
>
|
||||
<dialog class="modal" bind:this={deleteModal}>
|
||||
<form method="dialog" class="modal-box">
|
||||
<h3 class="font-bold text-lg">{$LL.users.confirm_delete_title()}</h3>
|
||||
<h3 class="text-lg font-bold">{$LL.users.confirm_delete_title()}</h3>
|
||||
<p class="py-4">{$LL.users.confirm_delete_desc({ username: device.name })}</p>
|
||||
<div class="modal-action">
|
||||
<button class="btn">{$LL.buttons.cancel()}</button>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { pocketbase } from '$lib/stores/pocketbase';
|
||||
import type { Device, Port } from '$lib/types/device';
|
||||
import { faTrash } from '@fortawesome/free-solid-svg-icons';
|
||||
import type { Record } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
import Fa from 'svelte-fa';
|
||||
import toast from 'svelte-french-toast';
|
||||
import { scale } from 'svelte/transition';
|
||||
@@ -11,7 +11,7 @@
|
||||
export let device: Device;
|
||||
export let index: number;
|
||||
|
||||
function deletePort(port: Port | Record) {
|
||||
function deletePort(port: Port | RecordModel) {
|
||||
if (port.id !== undefined) {
|
||||
$pocketbase
|
||||
.collection('ports')
|
||||
@@ -60,9 +60,21 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label p-0" for="port-link-{index}">
|
||||
<span class="label-text">{$LL.device.link()}</span>
|
||||
</label>
|
||||
<input
|
||||
id="port-link-{index}"
|
||||
type="url"
|
||||
placeholder="https:// ..."
|
||||
class="input input-sm input-bordered w-full"
|
||||
bind:value={device.expand.ports[index].link}
|
||||
/>
|
||||
</div>
|
||||
<div class="card-actions justify-end">
|
||||
<button
|
||||
class="btn btn-xs btn-outline btn-error"
|
||||
class="btn btn-outline btn-error btn-xs"
|
||||
on:click={() => deletePort(device.expand.ports[index])}
|
||||
type="button"><Fa icon={faTrash} />{$LL.buttons.delete()}</button
|
||||
>
|
||||
|
||||
@@ -48,7 +48,11 @@
|
||||
'lemonade',
|
||||
'night',
|
||||
'coffee',
|
||||
'winter'
|
||||
'winter',
|
||||
'dim',
|
||||
'nord',
|
||||
'sunset',
|
||||
'colorful'
|
||||
];
|
||||
let activeTheme: string | null = '';
|
||||
let avatar = $pocketbase.authStore.model?.avatar;
|
||||
@@ -74,7 +78,11 @@
|
||||
<div class="navbar bg-base-100">
|
||||
<div class="justify-start">
|
||||
<div class="dropdown">
|
||||
<label tabindex="-1" class="btn btn-ghost lg:hidden" for="mobile-menu">
|
||||
<label
|
||||
tabindex="-1"
|
||||
class="btn btn-ghost {$settingsPub?.website_title ? 'lg:hidden' : 'md:hidden'}"
|
||||
for="mobile-menu"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
@@ -92,7 +100,7 @@
|
||||
<ul
|
||||
id="mobile-menu"
|
||||
tabindex="-1"
|
||||
class="menu dropdown-content mt-3 z-[1] p-2 gap-1 shadow bg-base-300 rounded-box w-52"
|
||||
class="menu dropdown-content z-[1] mt-3 w-max gap-1 rounded-box bg-base-300 p-2 shadow"
|
||||
>
|
||||
{#if $settingsPub?.website_title}
|
||||
<div class="menu-title">
|
||||
@@ -122,9 +130,54 @@
|
||||
>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<details>
|
||||
<summary>
|
||||
<Fa icon={faSwatchbook} />
|
||||
Themes</summary
|
||||
>
|
||||
<ul>
|
||||
<div class="h-fit max-h-72 overflow-scroll">
|
||||
{#each availableThemes as theme}
|
||||
<li>
|
||||
<button
|
||||
class="overflow-hidden rounded-lg text-left outline-base-content"
|
||||
data-set-theme={theme}
|
||||
on:click={() => (activeTheme = theme)}
|
||||
on:keydown={() => (activeTheme = theme)}
|
||||
>
|
||||
<div
|
||||
data-theme={theme}
|
||||
class="w-full cursor-pointer rounded bg-base-100 font-sans text-base-content"
|
||||
>
|
||||
<div class="grid grid-cols-5 grid-rows-3">
|
||||
<div
|
||||
class="col-span-5 row-span-3 row-start-1 flex items-center gap-2 px-4 py-3"
|
||||
>
|
||||
<Fa
|
||||
icon={faCheck}
|
||||
class={activeTheme === theme ? 'visible' : 'invisible'}
|
||||
/>
|
||||
<div class="flex-grow text-sm">{theme}</div>
|
||||
<div class="flex h-full flex-shrink-0 flex-wrap gap-1">
|
||||
<div class="w-2 rounded bg-primary" />
|
||||
<div class="w-2 rounded bg-secondary" />
|
||||
<div class="w-2 rounded bg-accent" />
|
||||
<div class="w-2 rounded bg-neutral" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-ghost normal-case text-xl px-2" href="/">
|
||||
<a class="btn btn-ghost px-2 text-xl normal-case" href="/">
|
||||
<img
|
||||
src={$settingsPub?.id && $settingsPub?.favicon
|
||||
? `${backendUrl}api/files/settings_public/${$settingsPub?.id}/${$settingsPub?.favicon}`
|
||||
@@ -135,11 +188,11 @@
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="hidden lg:flex">
|
||||
<div class="hidden {$settingsPub?.website_title ? 'lg:flex' : 'md:flex'}">
|
||||
{#if $settingsPub?.website_title}
|
||||
<span class="px-2">{$settingsPub?.website_title}</span>
|
||||
{/if}
|
||||
<ul class="menu menu-horizontal px-1 gap-1">
|
||||
<ul class="menu menu-horizontal gap-1 px-1">
|
||||
<li>
|
||||
<a href="/" class="p-2" class:active={$page.url.pathname === '/'}
|
||||
><Fa icon={faHome} />{$LL.home.page_title()}</a
|
||||
@@ -158,47 +211,47 @@
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dropdown md:dropdown-end">
|
||||
<div tabindex="-1" class="btn normal-case btn-ghost">
|
||||
<Fa icon={faSwatchbook} />
|
||||
<span class="hidden font-normal md:inline">{$LL.navbar.theme()}</span>
|
||||
<Fa icon={faChevronDown} />
|
||||
</div>
|
||||
<div
|
||||
class="dropdown-content bg-base-200 text-base-content rounded-box h-fit max-h-96 w-56 overflow-y-auto shadow mt-3 z-[1]"
|
||||
>
|
||||
<div class="grid grid-cols-1 gap-3 p-3" tabindex="-1">
|
||||
{#each availableThemes as theme}
|
||||
<button
|
||||
class="outline-base-content overflow-hidden rounded-lg text-left"
|
||||
data-set-theme={theme}
|
||||
on:click={() => (activeTheme = theme)}
|
||||
on:keydown={() => (activeTheme = theme)}
|
||||
>
|
||||
<div
|
||||
data-theme={theme}
|
||||
class="bg-base-100 text-base-content w-full cursor-pointer font-sans"
|
||||
<div class="dropdown dropdown-end">
|
||||
<div tabindex="-1" class="btn btn-ghost normal-case">
|
||||
<Fa icon={faSwatchbook} />
|
||||
<span class="font-normal">{$LL.navbar.theme()}</span>
|
||||
<Fa icon={faChevronDown} />
|
||||
</div>
|
||||
<div
|
||||
class="dropdown-content z-[1] mt-3 h-fit max-h-96 w-56 overflow-y-auto rounded-box bg-base-200 text-base-content shadow"
|
||||
>
|
||||
<div class="grid grid-cols-1 gap-3 p-3" tabindex="-1">
|
||||
{#each availableThemes as theme}
|
||||
<button
|
||||
class="overflow-hidden rounded-lg text-left outline-base-content"
|
||||
data-set-theme={theme}
|
||||
on:click={() => (activeTheme = theme)}
|
||||
on:keydown={() => (activeTheme = theme)}
|
||||
>
|
||||
<div class="grid grid-cols-5 grid-rows-3">
|
||||
<div class="col-span-5 row-span-3 row-start-1 flex items-center gap-2 px-4 py-3">
|
||||
<Fa icon={faCheck} class={activeTheme === theme ? 'visible' : 'invisible'} />
|
||||
<div class="flex-grow text-sm">{theme}</div>
|
||||
<div class="flex h-full flex-shrink-0 flex-wrap gap-1">
|
||||
<div class="bg-primary w-2 rounded" />
|
||||
<div class="bg-secondary w-2 rounded" />
|
||||
<div class="bg-accent w-2 rounded" />
|
||||
<div class="bg-neutral w-2 rounded" />
|
||||
<div
|
||||
data-theme={theme}
|
||||
class="w-full cursor-pointer bg-base-100 font-sans text-base-content"
|
||||
>
|
||||
<div class="grid grid-cols-5 grid-rows-3">
|
||||
<div class="col-span-5 row-span-3 row-start-1 flex items-center gap-2 px-4 py-3">
|
||||
<Fa icon={faCheck} class={activeTheme === theme ? 'visible' : 'invisible'} />
|
||||
<div class="flex-grow text-sm">{theme}</div>
|
||||
<div class="flex h-full flex-shrink-0 flex-wrap gap-1">
|
||||
<div class="w-2 rounded bg-primary" />
|
||||
<div class="w-2 rounded bg-secondary" />
|
||||
<div class="w-2 rounded bg-accent" />
|
||||
<div class="w-2 rounded bg-neutral" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
{/each}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-end ms-auto">
|
||||
<div class="ms-auto justify-end">
|
||||
{#if $pocketbase.authStore?.model !== null}
|
||||
{#if $pocketbase.authStore.isAdmin || $permission.create}
|
||||
<a class="btn btn-success me-4" href="/device/new">
|
||||
@@ -207,14 +260,14 @@
|
||||
</a>
|
||||
{/if}
|
||||
<div class="dropdown dropdown-end">
|
||||
<label tabindex="-1" class="btn btn-ghost btn-circle avatar" for="avatar">
|
||||
<label tabindex="-1" class="avatar btn btn-circle btn-ghost" for="avatar">
|
||||
<div class="w-10 rounded-full" id="avatar">
|
||||
<img src="{backendUrl}_/images/avatars/avatar{avatar}.svg" alt="Avatar {avatar}" />
|
||||
</div>
|
||||
</label>
|
||||
<ul
|
||||
tabindex="-1"
|
||||
class="menu dropdown-content mt-3 z-[1] p-2 shadow bg-base-300 rounded-box"
|
||||
class="menu dropdown-content z-[1] mt-3 rounded-box bg-base-300 p-2 shadow"
|
||||
>
|
||||
<li class="menu-title">
|
||||
{$pocketbase.authStore.isAdmin
|
||||
|
||||
@@ -116,21 +116,21 @@
|
||||
</script>
|
||||
|
||||
{#if $settingsPriv}
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.tabs[1]()}</h2>
|
||||
<p class="my-2">
|
||||
{$LL.device.network_scan_desc()}
|
||||
</p>
|
||||
<div class="flex flex-row flex-wrap gap-4 items-end">
|
||||
<div class="flex flex-row flex-wrap items-end gap-4">
|
||||
<form on:submit|preventDefault={saveSettings}>
|
||||
<label class="label" for="scan-range">
|
||||
<span class="label-text">{$LL.device.network_scan_ip_range()}</span>
|
||||
</label>
|
||||
<div class="join">
|
||||
<div class="join max-w-xs">
|
||||
<input
|
||||
id="scan-range"
|
||||
class="input input-bordered join-item"
|
||||
class="input join-item input-bordered w-full"
|
||||
type="text"
|
||||
placeholder="192.168.1.0/24"
|
||||
bind:value={scanRange}
|
||||
@@ -192,7 +192,7 @@
|
||||
</div>
|
||||
<div class="ms-auto">
|
||||
<button
|
||||
class="btn btn-sm btn-success"
|
||||
class="btn btn-success btn-sm"
|
||||
on:click={(e) => {
|
||||
addSingle(device);
|
||||
e.currentTarget.disabled = true;
|
||||
@@ -219,7 +219,7 @@
|
||||
id="replaceNetmaskInput"
|
||||
class="input input-bordered"
|
||||
type="text"
|
||||
placeholder="255.255.0.0"
|
||||
placeholder="255.255.255.0"
|
||||
bind:value={replaceNetmask}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="container max-w-lg mx-auto text-center">
|
||||
<div class="container mx-auto max-w-lg text-center">
|
||||
<span class="loading loading-dots loading-lg" />
|
||||
</div>
|
||||
|
||||
@@ -45,6 +45,10 @@ const de = {
|
||||
card_nic_tooltip_shutdown_no_permission: 'Keine Berechtigung zum ausschalten',
|
||||
card_nic_tooltip_power: 'Einschalten',
|
||||
card_nic_tooltip_power_no_permission: 'Keine Berechtigung zum einschalten',
|
||||
modal_confirm_wake_title: '{device} einschalten?',
|
||||
modal_confirm_wake_desc: 'Bitte bestätigen, um {device} einzuschalten.',
|
||||
modal_confirm_shutdown_title: '{device} herunterfahren?',
|
||||
modal_confirm_shutdown_desc: 'Bitte bestätigen, um {device} herunterzufahren.',
|
||||
general: 'Allgemein',
|
||||
general_name: 'Name',
|
||||
general_name_placeholder: 'Gerätename',
|
||||
@@ -60,8 +64,13 @@ const de = {
|
||||
link: 'Link',
|
||||
link_desc:
|
||||
'Macht Ihren Gerätenamen zu einem anklickbaren Link, ideal zum Beispiel für die Verknüpfung eines Dashboards.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'Du kannst einen benutzerdefinierten Shell-Befehl verwenden, um festzustellen, ob das Gerät eingeschaltet ist. Der Befehl sollte einen Exit-Code von <span class="badge">0</span> zurückgeben, um anzuzeigen, dass das Gerät eingeschaltet ist. Jeder andere Exit-Code setzt den Status auf offline.',
|
||||
ping_cmd: 'Eigener Ping-Befehl',
|
||||
wake: 'Einschalten',
|
||||
wake_desc: 'Du kannst das Gerät mit einem Cron-Job einschalten.',
|
||||
wake_cmd: 'Eigener Einschalt-Befehl',
|
||||
wake_cron: 'Cron',
|
||||
wake_cron_enable: 'Aktivieren',
|
||||
sol: 'Sleep-On-LAN',
|
||||
@@ -70,7 +79,7 @@ const de = {
|
||||
sol_desc2:
|
||||
'SOL ist so konfiguriert, dass es Anfragen über HTTP statt über UDP sendet, um eine Autorisierung zu ermöglichen und die Zuverlässigkeit der Anfragen zu erhöhen.',
|
||||
sol_desc3:
|
||||
'Daher stellen Sie bitte sicher, dass Sie <span class="badge">HTTP:<DEINPORT></span> im Abschnitt <span class="badge">Listener</span> der <a href="https://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">SOL-Konfiguration</a> hinzufügen.',
|
||||
'Daher stell bitte sicher, dass du <span class="badge">HTTP:<DEINPORT></span> im Abschnitt <span class="badge">Listener</span> der <a href="https://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">SOL-Konfiguration</a> hinzufügst.',
|
||||
sol_enable: 'Sleep-On-LAN aktivieren',
|
||||
sol_port: 'SOL Port',
|
||||
sol_authorization: 'Authorisierung',
|
||||
@@ -109,7 +118,8 @@ const de = {
|
||||
network_scan_add_all: 'Alle Geräte hinzufügen',
|
||||
network_scan_replace_netmask: 'Netmask für alle Geräte ändern?',
|
||||
network_scan_new_netmask: 'Neue Netmask',
|
||||
network_scan_include_unknown: 'Schließe Geräte ein, bei denen der Name "Unknown" ist.'
|
||||
network_scan_include_unknown: 'Schließe Geräte ein, bei denen der Name "Unknown" ist.',
|
||||
require_confirmation: 'Bestätigung erforderlich'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Willkommen',
|
||||
@@ -161,7 +171,8 @@ const de = {
|
||||
change: 'Ändern',
|
||||
reset: 'Zurücksetzen',
|
||||
cancel: 'Abbrechen',
|
||||
add: 'Hinzufügen'
|
||||
add: 'Hinzufügen',
|
||||
confirm: 'Bestätigen'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Willkommen bei UpSnap 🥳',
|
||||
|
||||
@@ -43,6 +43,10 @@ const en = {
|
||||
card_nic_tooltip_shutdown_no_permission: 'No permission to shut down this device',
|
||||
card_nic_tooltip_power: 'Power on',
|
||||
card_nic_tooltip_power_no_permission: 'No permission to power on this device',
|
||||
modal_confirm_wake_title: 'Wake {device}?',
|
||||
modal_confirm_wake_desc: 'Please confirm to wake {device}.',
|
||||
modal_confirm_shutdown_title: 'Shutdown {device}?',
|
||||
modal_confirm_shutdown_desc: 'Please confirm to shutdown {device}.',
|
||||
general: 'General',
|
||||
general_name: 'Name',
|
||||
general_name_placeholder: 'Device name',
|
||||
@@ -58,8 +62,13 @@ const en = {
|
||||
link: 'Link',
|
||||
link_desc:
|
||||
'Makes your device name a clickable link, perfect for linking a dashboard for example.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'You can use a custom shell command to see if the device is powered on. The command should return an exit code of <span class="badge">0</span> to indicate that the device is powered on, any other exit code will mark the device as powered off.',
|
||||
ping_cmd: 'Custom ping command',
|
||||
wake: 'Wake',
|
||||
wake_desc: 'You can power this device using a scheduled cron job.',
|
||||
wake_cmd: 'Custom wake command',
|
||||
wake_cron: 'Wake cron',
|
||||
wake_cron_enable: 'Enable wake cron',
|
||||
sol: 'Sleep-On-LAN',
|
||||
@@ -106,7 +115,8 @@ const en = {
|
||||
network_scan_add_all: 'Add all devices',
|
||||
network_scan_replace_netmask: 'Replace netmask for all devices?',
|
||||
network_scan_new_netmask: 'New netmask',
|
||||
network_scan_include_unknown: 'Include devices where name is "Unknown"'
|
||||
network_scan_include_unknown: 'Include devices where name is "Unknown"',
|
||||
require_confirmation: 'Require Confirmation'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Welcome',
|
||||
@@ -157,7 +167,8 @@ const en = {
|
||||
change: 'Change',
|
||||
reset: 'Reset',
|
||||
cancel: 'Cancel',
|
||||
add: 'Add'
|
||||
add: 'Add',
|
||||
confirm: 'Confirm'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Welcome to UpSnap 🥳',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import es from '../es';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const es_ES = {
|
||||
...(es as unknown as Translation)
|
||||
} satisfies Translation;
|
||||
|
||||
export default es_ES;
|
||||
@@ -0,0 +1,224 @@
|
||||
import en from '../en';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const es = {
|
||||
...(en as unknown as Translation),
|
||||
home: {
|
||||
page_title: 'Inicio',
|
||||
order_groups: 'Grupos',
|
||||
order_name: 'Nombre',
|
||||
order_ip: 'IP',
|
||||
order_tooltip: 'Orden',
|
||||
no_devices: 'Sin dispositivos.',
|
||||
add_first_device: 'Añade tu primer dispositivo',
|
||||
grant_permissions:
|
||||
'Pídale al administrador que le otorgue permisos para los dispositivos existentes o que cree otros nuevos..'
|
||||
},
|
||||
account: {
|
||||
page_title: 'Cuenta',
|
||||
account_type_admin: 'Admin',
|
||||
account_type_user: 'Usuario',
|
||||
avatar_title: 'Avatar',
|
||||
language_title: 'Idioma',
|
||||
language_option_auto: 'Automático',
|
||||
change_password_title: 'Cambiar contraseña',
|
||||
change_password_body: 'Después de cambiar la contraseña, deberá iniciar sesión nuevamente.',
|
||||
change_password_label: 'Antigua contraseña',
|
||||
change_password_new: 'Nueva contraseña',
|
||||
change_password_confirm: 'Confirmar contraseña'
|
||||
},
|
||||
device: {
|
||||
page_title: 'Nuevo dispositivo',
|
||||
tabs: ['Manual', 'búsqueda de red'],
|
||||
card_btn_more: 'Más',
|
||||
card_btn_more_edit: 'Editar',
|
||||
card_btn_more_sleep: 'Suspender',
|
||||
card_btn_more_reboot: 'Reiniciar',
|
||||
card_tooltip_wake_cron: 'Wake cron',
|
||||
card_tooltip_shutdown_cron: 'Shutdown cron',
|
||||
card_tooltip_wake_password: 'Wake password',
|
||||
card_tooltip_last_status_change: 'Último cambio de estado',
|
||||
card_password: 'Contraseña',
|
||||
card_nic_tooltip_pending: 'Pendiente',
|
||||
card_nic_tooltip_shutdown: 'Apagar',
|
||||
card_nic_tooltip_shutdown_no_cmd: 'El comando de apagado no está definido',
|
||||
card_nic_tooltip_shutdown_no_permission: 'No tienes permiso para apagar este dispositivo',
|
||||
card_nic_tooltip_power: 'Encender',
|
||||
card_nic_tooltip_power_no_permission: 'No tienes permiso para encender este dispositivo',
|
||||
modal_confirm_wake_title: 'Activar {device}?',
|
||||
modal_confirm_wake_desc: 'Confirme para activar {device}.',
|
||||
modal_confirm_shutdown_title: 'Apagar {device}?',
|
||||
modal_confirm_shutdown_desc: 'Por favor confirme para apagar {device}.',
|
||||
general: 'General',
|
||||
general_name: 'Nombre',
|
||||
general_name_placeholder: 'Nombre del dispositivo',
|
||||
general_ip: 'IP',
|
||||
general_mac: 'Mac',
|
||||
general_netmask: 'Máscara de red',
|
||||
general_required_field: 'Campo obligatorio',
|
||||
ports: 'Puertos',
|
||||
ports_desc: 'UpSnap puede comprobar si ciertos puertos están abiertos.',
|
||||
ports_add_new: 'Añadir nuevo puerto',
|
||||
ports_name: 'Nombre',
|
||||
ports_number: 'Número',
|
||||
link: 'Link',
|
||||
link_desc:
|
||||
'Permite que el nombre de su dispositivo sea un enlace. Perfecto para dashboard, por ejemplo.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'Puede utilizar un comando de shell personalizado para ver si el dispositivo está conectado. El comando debe devolver un código de salida de <span class="badge">0</span> para indicar que el dispositivo está encendido; cualquier otro código de salida marcará el dispositivo como apagado.',
|
||||
ping_cmd: 'Comando ping personalizado',
|
||||
wake: 'Encender',
|
||||
wake_desc: 'Podrá encender este dispositivo utilizando un scheduled cron job.',
|
||||
wake_cmd: 'Comando de encendido personalizado',
|
||||
wake_cron: 'Encender cron',
|
||||
wake_cron_enable: 'Activar wake cron',
|
||||
sol: 'Sleep-On-LAN',
|
||||
sol_desc1:
|
||||
'Puedes poner las computadoras en modo de suspensión usando <a class="link" href="https://github.com/SR-G/sleep-on-lan" target="_blank">Sleep-On-LAN</a > herramienta. Sleep-On-LAN (SOL) es una herramienta/daemon externo que opera en las PC que desea poner en suspensión y proporciona un punto final REST. Para obtener instrucciones sobre cómo configurar Sleep-On-LAN, consulte <a href="https://github.com/SR-G/sleep-on-lan#usage" class="link" target="_blank" >Uso</a> sección.',
|
||||
sol_desc2:
|
||||
'SOL está configurado para enviar solicitudes a través de HTTP en lugar de UDP para permitir la autorización y hacer que las solicitudes sean más confiables.',
|
||||
sol_desc3:
|
||||
'Por lo tanto, asegúrese de incluir <span class="badge">HTTP:<YOURPORT></span> en la sección <span class="badge">Oyentes</span> de <a href="https ://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">configuración SOL</a>.',
|
||||
sol_enable: 'Activar Sleep-On-LAN',
|
||||
sol_port: 'Puerto SOL',
|
||||
sol_authorization: 'Autorización',
|
||||
sol_user: 'Usuario SOL',
|
||||
sol_password: 'Contraseña SOL',
|
||||
shutdown: 'Apagar',
|
||||
shutdown_desc:
|
||||
'Este <strong>comando de shell</strong> se ejecutará dentro de su contenedor (si usa Docker) o en su host (si usa el binario). Para verificar que funciona, primero puede ejecutar el comando dentro del contenedor o en el shell de su host. Los comandos comunes son <span class="badge">net rpc</span> para Windows, <span class="badge">sshpass</span> para Linux o <span class="badge">curl</span> en general para realizar solicitudes web.',
|
||||
shutdown_examples: 'Ejemplos:',
|
||||
shutdown_examples_windows: 'Apagar el dispositivo Windows remoto:',
|
||||
shutdown_examples_linux: 'Apagar el dispositivo Linux remoto:',
|
||||
shutdown_cmd: 'Comando para Apagar',
|
||||
shutdown_cron_desc:
|
||||
'Al igual que configurar un cron para encender el dispositivo, también puede programar un cron job para apagar este dispositivo.',
|
||||
shutdown_cron: 'Apagar cron',
|
||||
shutdown_cron_enable: 'Activar apagado de cron',
|
||||
password: 'Contraseña',
|
||||
password_desc:
|
||||
'Algunos adaptadores de red tienen la opción de definir una contraseña para magic pockets, también conocidos como <span class="badge">SecureON</span>. la contraseña sólo podrá contener 0, 4 o 6 caracteres.',
|
||||
groups: 'Grupos',
|
||||
groups_desc: 'Puede agregar dispositivos a un grupo para ordenarlos por grupo en el dashboard.',
|
||||
groups_placeholder: "e.g. 'Basement' o 'Office'",
|
||||
network_scan_range_saved: 'Rango de escaneo guardado',
|
||||
network_scan_desc:
|
||||
'Escanee automáticamente su red en busca de dispositivos. Para que esto funcione, necesita ejecutar UpSnap como root/admin y tener nmap instalado y disponible en su $PATH (para los usuarios de Docker, ese ya es el caso y no necesitan hacer nada). El escaneo puede tardar algunos segundos.',
|
||||
network_scan_ip_range: 'Rango IP',
|
||||
network_scan_no_range: 'Sin rango de escaneo',
|
||||
network_scan_unsaved_changes: 'Cambios sin guardar',
|
||||
network_scan_running: 'Escaneo en curso',
|
||||
network_scan: 'Escaneo',
|
||||
network_scan_ip: 'IP:',
|
||||
network_scan_mac: 'Mac:',
|
||||
network_scan_mac_vendor: 'Proveedor Mac:',
|
||||
network_scan_netmask: 'Máscara de red:',
|
||||
network_scan_add_all: 'Añadir todos los dispositivos',
|
||||
network_scan_replace_netmask: 'Reemplazar máscara de red para todos los dispositivos?',
|
||||
network_scan_new_netmask: 'Nueva mascara de red',
|
||||
network_scan_include_unknown: 'Incluir dispositivos donde este el nombre "Unknown"',
|
||||
require_confirmation: 'Requiere confirmación'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Bienvenido',
|
||||
email_label: 'Email o Nombre de usuario:',
|
||||
password_label: 'Contraseña:',
|
||||
btn_more: 'Más',
|
||||
menu_title_auth_providers: 'Otros proveedores de autenticación',
|
||||
btn_login: 'Entrar'
|
||||
},
|
||||
settings: {
|
||||
page_title: 'Ajustes',
|
||||
ping_interval_title: 'Intervalo ping',
|
||||
ping_interval_desc1:
|
||||
'Establece el intervalo en el que se realiza el ping. Déjelo en blanco para usar el valor predeterminado de <span class="badge">@every 3s</span>.',
|
||||
ping_interval_desc2:
|
||||
'Puedes ver la sintaxis correcta para cron en <a class="link" href="https://en.wikipedia.org/wiki/Cron" target="_blank">Wikipedia</a> o en <a class="link" href="https://pkg.go.dev/github.com/robfig/cron/v3" target="_blank">documentación cron</a>.',
|
||||
lazy_ping_title: 'Lazy ping',
|
||||
lazy_ping_desc:
|
||||
'Cuando el ping diferido está activado, UpSnap solo hará ping a los dispositivos si hay un usuario activo visitando el sitio web. Si está desactivado, UpSnap siempre hará ping a los dispositivos.',
|
||||
lazy_ping_enable: 'Activar',
|
||||
website_title_title: 'Titulo de la página',
|
||||
website_title_desc: 'Establece el título del sitio web y en la pestaña del navegador.',
|
||||
icon_title: 'Icon',
|
||||
icon_desc: 'Establece un favicon personalizado. Los tipos de archivos admitidos son:',
|
||||
upsnap_version: 'Version UpSnap'
|
||||
},
|
||||
users: {
|
||||
page_title: 'Usuarios',
|
||||
allow_create_devices:
|
||||
'Permitir a {username} para crear nuevos dispositivos y editar grupos de dispositivos',
|
||||
device_permissions: 'Permisos del dispositivo',
|
||||
create_new_device: 'Añadir dispositivo',
|
||||
read: 'Leer',
|
||||
update: 'Editar',
|
||||
delete: 'Eliminar',
|
||||
power: 'Energía',
|
||||
toggle: 'Alternar',
|
||||
confirm_delete_title: 'Confirmar',
|
||||
confirm_delete_desc: 'Estas seguro que quieres borrarlo {username}?',
|
||||
create_new_user: 'Crear nuevo usuario',
|
||||
username: 'Usuario',
|
||||
password: 'Contraseña',
|
||||
password_confirm: 'Confirmar contraseña',
|
||||
required_field: 'Campo obligatorio'
|
||||
},
|
||||
buttons: {
|
||||
save: 'Guardar',
|
||||
delete: 'Eliminar',
|
||||
change: 'Alterar',
|
||||
reset: 'Reiniciar',
|
||||
cancel: 'Cancelar',
|
||||
add: 'Añadir',
|
||||
confirm: 'Confirmar'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Bienvenido a UpSnap 🥳',
|
||||
step1_setup_desc: 'Por favor complete los siguientes pasos para terminar la configuración.',
|
||||
step1_setup_btn_next: 'Siguiente',
|
||||
step2_page_title: 'Crear cuenta de administrador',
|
||||
step2_label_email: 'Email:',
|
||||
step2_label_password: 'Contraseña:',
|
||||
step2_label_min_chars: 'min. 10 caracteres',
|
||||
step2_label_password_confirm: 'Confirmar contraseña:',
|
||||
step2_btn_create: 'Crear',
|
||||
step3_page_title: 'Ya está hecho! 🎉',
|
||||
step3_page_desc: 'Añada algún dispositivo a su dashboard.',
|
||||
step3_btn_done: 'Vamos!',
|
||||
not_expected_title: 'No te esperaba por aquí! 🧐',
|
||||
not_expected_desc: 'Ya has terminado con la configuración! Nada que hacer!.',
|
||||
not_expected_back: 'Llévame de vuelta',
|
||||
progress_step1: 'Bienvenido',
|
||||
progress_step2: 'Crear cuenta',
|
||||
progress_step3: 'Terminado'
|
||||
},
|
||||
toasts: {
|
||||
admin_saved: 'Administrador guardado',
|
||||
user_saved: 'Usuario actualizado',
|
||||
user_created: 'Usuario {username} creado',
|
||||
user_deleted: 'Usuario {username} eliminado',
|
||||
settings_saved: 'Configuraciones guardadas',
|
||||
password_changed: 'Contraseña cambiada. Por favor acceda otra vez',
|
||||
passwords_missmatch: 'Las contraseñas no coinciden',
|
||||
permissions_created: 'Permisos creados para {username}',
|
||||
permissions_deleted: 'Permisos para {username} eliminados',
|
||||
permissions_updated: 'Permisos para {username} actualizados',
|
||||
permissions_updated_personal: 'Tus permisos han sido actualizados',
|
||||
no_permission: 'Tu no tienes permiso para visitar {url}',
|
||||
device_created: 'Creado {device}',
|
||||
devices_created_multiple: 'Añadidos {count|int} dispositivos',
|
||||
device_updated: '{device} actualizado',
|
||||
device_deleted: '{device} apagado',
|
||||
group_created: 'Grupo {group} creado',
|
||||
group_deleted: 'Grupo {group} eliminado'
|
||||
},
|
||||
navbar: {
|
||||
theme: 'Tema',
|
||||
new: 'Nuevo',
|
||||
edit_account: 'Editar cuenta',
|
||||
logout: 'Salir'
|
||||
}
|
||||
} satisfies Translation;
|
||||
|
||||
export default es;
|
||||
@@ -46,6 +46,10 @@ const fr = {
|
||||
"Vous n'avez pas la permission pour éteindre cet appareil",
|
||||
card_nic_tooltip_power: 'Allumer',
|
||||
card_nic_tooltip_power_no_permission: "Vous n'avez pas la permission pour allumer cet appareil",
|
||||
modal_confirm_wake_title: 'Réveiller {device} ?',
|
||||
modal_confirm_wake_desc: 'Veuillez confirmer le réveil de {device}.',
|
||||
modal_confirm_shutdown_title: 'Arrêter {device} ?',
|
||||
modal_confirm_shutdown_desc: "Veuillez confirmer l'arrêt du {device}.",
|
||||
general: 'Général',
|
||||
general_name: 'Nom',
|
||||
general_name_placeholder: "Nom de l'appareil",
|
||||
@@ -61,8 +65,13 @@ const fr = {
|
||||
link: 'Lien',
|
||||
link_desc:
|
||||
'Rend le nom de votre appareil cliquable, parfait pour y lier un tableau de bord par exemple.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
"Vous pouvez utiliser une commande shell personnalisée pour vérifier si l'appareil est sous tension. La commande doit renvoyer un code de sortie de <span class='badge'>0</span> pour indiquer que l'appareil est sous tension, tout autre code de sortie indiquera que l'appareil est hors tension.",
|
||||
ping_cmd: 'Commande ping personnalisée',
|
||||
wake: 'Réveil',
|
||||
wake_desc: 'Vous pouvez allumer cet appareil en utilisant un job cron planifié.',
|
||||
wake_cmd: 'Commande de réveil personnalisée',
|
||||
wake_cron: 'Réveil avec cron',
|
||||
wake_cron_enable: 'Activer le réveil avec cron',
|
||||
sol: 'Sleep-On-LAN',
|
||||
@@ -110,7 +119,8 @@ const fr = {
|
||||
network_scan_add_all: 'Ajouter tous les appareils',
|
||||
network_scan_replace_netmask: 'Remplacer le masque réseau pour tous les appareils ?',
|
||||
network_scan_new_netmask: 'Nouveau masque réseau',
|
||||
network_scan_include_unknown: 'Inclure les appareils dont nom est « Inconnu »'
|
||||
network_scan_include_unknown: 'Inclure les appareils dont nom est « Inconnu »',
|
||||
require_confirmation: 'Demande de confirmation'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Bienvenue',
|
||||
@@ -163,7 +173,8 @@ const fr = {
|
||||
change: 'Modifier',
|
||||
reset: 'Réinitialiser',
|
||||
cancel: 'Annuler',
|
||||
add: 'Ajouter'
|
||||
add: 'Ajouter',
|
||||
confirm: 'Confirmer'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Bienvenue sur UpSnap 🥳',
|
||||
|
||||
@@ -14,12 +14,15 @@ export type Locales =
|
||||
| 'de-DE'
|
||||
| 'en'
|
||||
| 'en-US'
|
||||
| 'es'
|
||||
| 'es-ES'
|
||||
| 'fr'
|
||||
| 'fr-FR'
|
||||
| 'pt'
|
||||
| 'pt-PT'
|
||||
| 'zh'
|
||||
| 'zh-CN';
|
||||
| 'zh-CN'
|
||||
| 'zh-TW';
|
||||
|
||||
export type Translation = RootTranslation;
|
||||
|
||||
@@ -181,6 +184,26 @@ type RootTranslation = {
|
||||
* No permission to power on this device
|
||||
*/
|
||||
card_nic_tooltip_power_no_permission: string;
|
||||
/**
|
||||
* Wake {device}?
|
||||
* @param {unknown} device
|
||||
*/
|
||||
modal_confirm_wake_title: RequiredParams<'device'>;
|
||||
/**
|
||||
* Please confirm to wake {device}.
|
||||
* @param {unknown} device
|
||||
*/
|
||||
modal_confirm_wake_desc: RequiredParams<'device'>;
|
||||
/**
|
||||
* Shutdown {device}?
|
||||
* @param {unknown} device
|
||||
*/
|
||||
modal_confirm_shutdown_title: RequiredParams<'device'>;
|
||||
/**
|
||||
* Please confirm to shutdown {device}.
|
||||
* @param {unknown} device
|
||||
*/
|
||||
modal_confirm_shutdown_desc: RequiredParams<'device'>;
|
||||
/**
|
||||
* General
|
||||
*/
|
||||
@@ -237,6 +260,18 @@ type RootTranslation = {
|
||||
* Makes your device name a clickable link, perfect for linking a dashboard for example.
|
||||
*/
|
||||
link_desc: string;
|
||||
/**
|
||||
* Ping
|
||||
*/
|
||||
ping: string;
|
||||
/**
|
||||
* You can use a custom shell command to see if the device is powered on. The command should return an exit code of <span class="badge">0</span> to indicate that the device is powered on, any other exit code will mark the device as powered off.
|
||||
*/
|
||||
ping_desc: string;
|
||||
/**
|
||||
* Custom ping command
|
||||
*/
|
||||
ping_cmd: string;
|
||||
/**
|
||||
* Wake
|
||||
*/
|
||||
@@ -245,6 +280,10 @@ type RootTranslation = {
|
||||
* You can power this device using a scheduled cron job.
|
||||
*/
|
||||
wake_desc: string;
|
||||
/**
|
||||
* Custom wake command
|
||||
*/
|
||||
wake_cmd: string;
|
||||
/**
|
||||
* Wake cron
|
||||
*/
|
||||
@@ -405,6 +444,10 @@ type RootTranslation = {
|
||||
* Include devices where name is "Unknown"
|
||||
*/
|
||||
network_scan_include_unknown: string;
|
||||
/**
|
||||
* Require Confirmation
|
||||
*/
|
||||
require_confirmation: string;
|
||||
};
|
||||
login: {
|
||||
/**
|
||||
@@ -575,6 +618,10 @@ type RootTranslation = {
|
||||
* Add
|
||||
*/
|
||||
add: string;
|
||||
/**
|
||||
* Confirm
|
||||
*/
|
||||
confirm: string;
|
||||
};
|
||||
welcome: {
|
||||
/**
|
||||
@@ -912,6 +959,22 @@ export type TranslationFunctions = {
|
||||
* No permission to power on this device
|
||||
*/
|
||||
card_nic_tooltip_power_no_permission: () => LocalizedString;
|
||||
/**
|
||||
* Wake {device}?
|
||||
*/
|
||||
modal_confirm_wake_title: (arg: { device: unknown }) => LocalizedString;
|
||||
/**
|
||||
* Please confirm to wake {device}.
|
||||
*/
|
||||
modal_confirm_wake_desc: (arg: { device: unknown }) => LocalizedString;
|
||||
/**
|
||||
* Shutdown {device}?
|
||||
*/
|
||||
modal_confirm_shutdown_title: (arg: { device: unknown }) => LocalizedString;
|
||||
/**
|
||||
* Please confirm to shutdown {device}.
|
||||
*/
|
||||
modal_confirm_shutdown_desc: (arg: { device: unknown }) => LocalizedString;
|
||||
/**
|
||||
* General
|
||||
*/
|
||||
@@ -968,6 +1031,18 @@ export type TranslationFunctions = {
|
||||
* Makes your device name a clickable link, perfect for linking a dashboard for example.
|
||||
*/
|
||||
link_desc: () => LocalizedString;
|
||||
/**
|
||||
* Ping
|
||||
*/
|
||||
ping: () => LocalizedString;
|
||||
/**
|
||||
* You can use a custom shell command to see if the device is powered on. The command should return an exit code of <span class="badge">0</span> to indicate that the device is powered on, any other exit code will mark the device as powered off.
|
||||
*/
|
||||
ping_desc: () => LocalizedString;
|
||||
/**
|
||||
* Custom ping command
|
||||
*/
|
||||
ping_cmd: () => LocalizedString;
|
||||
/**
|
||||
* Wake
|
||||
*/
|
||||
@@ -976,6 +1051,10 @@ export type TranslationFunctions = {
|
||||
* You can power this device using a scheduled cron job.
|
||||
*/
|
||||
wake_desc: () => LocalizedString;
|
||||
/**
|
||||
* Custom wake command
|
||||
*/
|
||||
wake_cmd: () => LocalizedString;
|
||||
/**
|
||||
* Wake cron
|
||||
*/
|
||||
@@ -1136,6 +1215,10 @@ export type TranslationFunctions = {
|
||||
* Include devices where name is "Unknown"
|
||||
*/
|
||||
network_scan_include_unknown: () => LocalizedString;
|
||||
/**
|
||||
* Require Confirmation
|
||||
*/
|
||||
require_confirmation: () => LocalizedString;
|
||||
};
|
||||
login: {
|
||||
/**
|
||||
@@ -1304,6 +1387,10 @@ export type TranslationFunctions = {
|
||||
* Add
|
||||
*/
|
||||
add: () => LocalizedString;
|
||||
/**
|
||||
* Confirm
|
||||
*/
|
||||
confirm: () => LocalizedString;
|
||||
};
|
||||
welcome: {
|
||||
/**
|
||||
|
||||
@@ -10,12 +10,15 @@ const localeTranslationLoaders = {
|
||||
'de-DE': () => import('./de-DE'),
|
||||
en: () => import('./en'),
|
||||
'en-US': () => import('./en-US'),
|
||||
es: () => import('./es'),
|
||||
'es-ES': () => import('./es-ES'),
|
||||
fr: () => import('./fr'),
|
||||
'fr-FR': () => import('./fr-FR'),
|
||||
pt: () => import('./pt'),
|
||||
'pt-PT': () => import('./pt-PT'),
|
||||
zh: () => import('./zh'),
|
||||
'zh-CN': () => import('./zh-CN')
|
||||
'zh-CN': () => import('./zh-CN'),
|
||||
'zh-TW': () => import('./zh-TW')
|
||||
};
|
||||
|
||||
const updateDictionary = (locale: Locales, dictionary: Partial<Translations>): Translations =>
|
||||
|
||||
@@ -9,24 +9,30 @@ import de from './de';
|
||||
import de_DE from './de-DE';
|
||||
import en from './en';
|
||||
import en_US from './en-US';
|
||||
import es from './es';
|
||||
import es_ES from './es-ES';
|
||||
import fr from './fr';
|
||||
import fr_FR from './fr-FR';
|
||||
import pt from './pt';
|
||||
import pt_PT from './pt-PT';
|
||||
import zh from './zh';
|
||||
import zh_CN from './zh-CN';
|
||||
import zh_TW from './zh-TW';
|
||||
|
||||
const localeTranslations = {
|
||||
de,
|
||||
'de-DE': de_DE,
|
||||
en,
|
||||
'en-US': en_US,
|
||||
es,
|
||||
'es-ES': es_ES,
|
||||
fr,
|
||||
'fr-FR': fr_FR,
|
||||
pt,
|
||||
'pt-PT': pt_PT,
|
||||
zh,
|
||||
'zh-CN': zh_CN
|
||||
'zh-CN': zh_CN,
|
||||
'zh-TW': zh_TW
|
||||
};
|
||||
|
||||
export const loadLocale = (locale: Locales): void => {
|
||||
|
||||
@@ -19,12 +19,15 @@ export const locales: Locales[] = [
|
||||
'de-DE',
|
||||
'en',
|
||||
'en-US',
|
||||
'es',
|
||||
'es-ES',
|
||||
'fr',
|
||||
'fr-FR',
|
||||
'pt',
|
||||
'pt-PT',
|
||||
'zh',
|
||||
'zh-CN'
|
||||
'zh-CN',
|
||||
'zh-TW'
|
||||
];
|
||||
|
||||
export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import it from '../it';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const it_IT = {
|
||||
...(it as unknown as Translation)
|
||||
} satisfies Translation;
|
||||
|
||||
export default it_IT;
|
||||
@@ -0,0 +1,226 @@
|
||||
import type { BaseTranslation } from '../i18n-types';
|
||||
|
||||
const it = {
|
||||
home: {
|
||||
page_title: 'Home',
|
||||
order_groups: 'Gruppi',
|
||||
order_name: 'Nome',
|
||||
order_ip: 'IP',
|
||||
order_tooltip: 'Ordine',
|
||||
no_devices: 'Nessun dispositivo qui.',
|
||||
add_first_device: 'Aggiungi il tuo primo dispositivo',
|
||||
grant_permissions:
|
||||
"Per favore chiedi all' amministratore di darti i permessi necessari per aggiungere un nuovo dispositivo."
|
||||
},
|
||||
account: {
|
||||
page_title: 'Account',
|
||||
account_type_admin: 'Amministratore',
|
||||
account_type_user: 'Utente',
|
||||
avatar_title: 'Avatar',
|
||||
language_title: 'Lingua',
|
||||
language_option_auto: 'Automatico',
|
||||
change_password_title: 'Cambia password',
|
||||
change_password_body: 'Dopo aver cambiato la password, dovrai effettuare di nuovo il login.',
|
||||
change_password_label: 'Vecchia password',
|
||||
change_password_new: 'Nuova password',
|
||||
change_password_confirm: 'Conferma la password'
|
||||
},
|
||||
device: {
|
||||
page_title: 'Nuovo dispositivo',
|
||||
tabs: ['Manuale', 'Scansiona la rete'],
|
||||
card_btn_more: '...',
|
||||
card_btn_more_edit: 'Modifica',
|
||||
card_btn_more_sleep: 'Dormi',
|
||||
card_btn_more_reboot: 'Riavvia',
|
||||
card_tooltip_wake_cron: 'Sveglia programmata',
|
||||
card_tooltip_shutdown_cron: 'Spegnimento programmato',
|
||||
card_tooltip_wake_password: 'Password sveglia',
|
||||
card_tooltip_last_status_change: 'Ultimo cambiamento di stato',
|
||||
card_password: 'Password',
|
||||
card_nic_tooltip_pending: 'In attesa',
|
||||
card_nic_tooltip_shutdown: 'Spegni',
|
||||
card_nic_tooltip_shutdown_no_cmd: 'Nessun comando di spegnimento impostato',
|
||||
card_nic_tooltip_shutdown_no_permission:
|
||||
'Non hai i permessi necessari per spegnere questo dispositivo',
|
||||
card_nic_tooltip_power: 'Accendi',
|
||||
card_nic_tooltip_power_no_permission:
|
||||
'Non hai i permessi necessari per accendere questo dispositivo',
|
||||
modal_confirm_wake_title: 'Accendere {device}?',
|
||||
modal_confirm_wake_desc: 'Sicuro di voler accendere {device}.',
|
||||
modal_confirm_shutdown_title: 'Spegnere {device}?',
|
||||
modal_confirm_shutdown_desc: 'Sicuro di voler spegnere {device}.',
|
||||
general: 'Generale',
|
||||
general_name: 'Nome',
|
||||
general_name_placeholder: 'Nome dispositivo',
|
||||
general_ip: 'IP',
|
||||
general_mac: 'Mac',
|
||||
general_netmask: 'Maschera di rete',
|
||||
general_required_field: 'Campo obbligatorio',
|
||||
ports: 'Porte',
|
||||
ports_desc: "UpSnap puo' anche controllare che le porte siano aperte.",
|
||||
ports_add_new: 'Aggiungi nuova porta',
|
||||
ports_name: 'Nome',
|
||||
ports_number: 'Numero',
|
||||
link: 'Collegamento',
|
||||
link_desc:
|
||||
'Rende il nome del tuo dispositivo un collegamento, perfetto per collegare ad esempio un sito.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'Puoi usare un comando personalizzato per controllare che il dispositivo sia acceso. Il comando deve ritornare un codice uguale a <span class="badge">0</span> per confermare che il dispositivo sia acceso, mentre qualunque altro codice indica che il dispositivo e\' spento.',
|
||||
ping_cmd: 'Comando ping personalizzato',
|
||||
wake: 'Accendi',
|
||||
wake_desc: 'Puoi accendere questo dispositivo con una sveglia programmata.',
|
||||
wake_cmd: 'Comando di accensione personalizzato',
|
||||
wake_cron: 'Sveglia programmata',
|
||||
wake_cron_enable: 'Abilita sveglia programmata',
|
||||
sol: 'Sleep-On-LAN',
|
||||
sol_desc1:
|
||||
'Puoi spegnere il tuo dispositivo usando lo strumento <a class="link" href="https://github.com/SR-G/sleep-on-lan" target="_blank">Sleep-On-LAN</a>. Sleep-On-LAN (SOL) e\' uno strumento esterno che opera sul dispositivo che vuoi spegnere, il quale rende disponibile un endpoint REST. Puoi riferirti al link <a href="https://github.com/SR-G/sleep-on-lan#usage" class="link" target="_blank">Uso</a> (in inglese) per le istruzioni.',
|
||||
sol_desc2:
|
||||
"Lo strumento SOL e' configurato per mandare richieste con il protocollo HTTP invece che UDP per abilitare l' autorizzazione e rendere le richieste piu' affidabili",
|
||||
sol_desc3:
|
||||
'Pertanto, assicuratevi di includere <span class="badge">HTTP:<LA-TUA-PORTA></span> nella sezione <span class="badge">Listeners</span> della <a href="https://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">configurazione di SOL</a>.',
|
||||
sol_enable: 'Abilita Sleep-On-LAN',
|
||||
sol_port: 'Porta SOL',
|
||||
sol_authorization: 'Autorizzazione',
|
||||
sol_user: 'Utente SOL',
|
||||
sol_password: 'Password SOL',
|
||||
shutdown: 'Spegni',
|
||||
shutdown_desc:
|
||||
'Questo <strong>prompt dei comandi</strong> girera\' nel tuo container (se usi docker) o direttamente sul tuo host (se usi i file di installazione). Per verificare che funzioni correttamente, puoi eseguire i comandi direttamente nel container o nel tuo sistema host. Alcuni comandi comuni sono <span class="badge">net rpc</span> per windows, <span class="badge">sshpass</span> per linux oppure <span class="badge">curl</span> in generale per fare richieste con HTTP.',
|
||||
shutdown_examples: 'Esempi:',
|
||||
shutdown_examples_windows: 'Spegni macchina windows remota:',
|
||||
shutdown_examples_linux: 'Spegni macchina linux remota:',
|
||||
shutdown_cmd: 'Comando di spegnimento',
|
||||
shutdown_cron_desc:
|
||||
'Settando i parametri esattamente come fareste con cron su linux, potrete cosi anche impostare un azione di spegnimento su questo dispositivo.',
|
||||
shutdown_cron: 'Parametri di spegnimento per cron',
|
||||
shutdown_cron_enable: 'Abilita lo spegnimento tramite cron',
|
||||
password: 'Password',
|
||||
password_desc:
|
||||
'Alcune schede di rete hanno una opzione per settare una password per i magic packets, chiamata anche <span class="badge">SecureON</span>. La lunghezza della password puo\' essere solo di 0, 4 o 6 caratteri.',
|
||||
groups: 'Gruppi',
|
||||
groups_desc:
|
||||
'Puoi aggiungere un dispositivo ad un gruppo per averli raggruppati nel schermata principale.',
|
||||
groups_placeholder: "per esempio 'Cantina' o 'Ufficio'",
|
||||
network_scan_range_saved: 'Intervallo di scansione salvato',
|
||||
network_scan_desc:
|
||||
"Scansiona automaticamente la tua rete per i dispositivi disponibili. Affinche' funzioni, devi eseguire UpSnap come root/admin ed avere nmap installato e disponibile nella variabile d'ambiente $PATH (per gli utenti docker, questo e' gia' il caso e non devi cambiare niente). La scansione puo' richiedere alcuni secondi.",
|
||||
network_scan_ip_range: 'Intervallo IP',
|
||||
network_scan_no_range: 'Nessuno intervallo di scansione',
|
||||
network_scan_unsaved_changes: 'Modifiche non salvate',
|
||||
network_scan_running: 'Scansione in corso',
|
||||
network_scan: 'Scansiona',
|
||||
network_scan_ip: 'IP:',
|
||||
network_scan_mac: 'Mac:',
|
||||
network_scan_mac_vendor: 'Fornitore Mac:',
|
||||
network_scan_netmask: 'Maschera di rete:',
|
||||
network_scan_add_all: 'Aggiungi tutti i dispositivi',
|
||||
network_scan_replace_netmask: 'Modificare la maschera di rete per tutti i dispositivi?',
|
||||
network_scan_new_netmask: 'Nuova mascheda di rete',
|
||||
network_scan_include_unknown: 'Includi i dispositivi il cui nome e\' "Unknown" o "Sconosciuto"',
|
||||
require_confirmation: 'Chiedi conferma'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Benvenuti',
|
||||
email_label: 'Email o nome utente:',
|
||||
password_label: 'Password:',
|
||||
btn_more: 'Di piu...',
|
||||
menu_title_auth_providers: 'Altri gestori di autenticazione',
|
||||
btn_login: 'Login'
|
||||
},
|
||||
settings: {
|
||||
page_title: 'Opzioni',
|
||||
ping_interval_title: 'Intervallo di ping',
|
||||
ping_interval_desc1:
|
||||
'Imposta l\'intervallo nel quale i dispositivi vengono testati con ping. Lasciare in bianco per lasciare il valore predefinito <span class="badge">@every 3s</span>.',
|
||||
ping_interval_desc2:
|
||||
'Per ulteriori dettagli circa la sintassi corretta di cron, fare riferimento a <a class="link" href="https://it.wikipedia.org/wiki/Cron" target="_blank">Wikipedia</a> oppure a <a class="link" href="https://pkg.go.dev/github.com/robfig/cron/v3" target="_blank">questa documentazione</a> (in inglese).',
|
||||
lazy_ping_title: 'Ping pigro',
|
||||
lazy_ping_desc:
|
||||
"Quando il ping pigro e' abilitato, UpSnap effettuera' i ping verso di dispositivi solamente quando un utente effettivamente visita il sito. Se e' spento, allora UpSnap continuera' con il ping sempre.",
|
||||
lazy_ping_enable: 'Abilita',
|
||||
website_title_title: 'Nome del sito',
|
||||
website_title_desc: 'Imposta il nome del sito.',
|
||||
icon_title: 'Icona',
|
||||
icon_desc: 'Imposta una icona personalizzata. I tipi di file supportati sono:',
|
||||
upsnap_version: 'Versione UpSnap'
|
||||
},
|
||||
users: {
|
||||
page_title: 'Utenti',
|
||||
allow_create_devices:
|
||||
'Permetti a {username} di creare nuovo dispositivi e gestire i gruppi di dispositivi.',
|
||||
device_permissions: 'Permessi dispositivo',
|
||||
create_new_device: 'Crea un nuovo dispositivo',
|
||||
read: 'Leggi',
|
||||
update: 'Modifica',
|
||||
delete: 'Cancella',
|
||||
power: 'Accendi',
|
||||
toggle: 'Inverti',
|
||||
confirm_delete_title: 'Conferma rimozione',
|
||||
confirm_delete_desc: 'Sei sicuro di voler rimuovere {username}?',
|
||||
create_new_user: 'Crea nuovo utente',
|
||||
username: 'Nome utente',
|
||||
password: 'Password',
|
||||
password_confirm: 'Conferma la password',
|
||||
required_field: 'Campo obbligatorio'
|
||||
},
|
||||
buttons: {
|
||||
save: 'Salva',
|
||||
delete: 'Cancella',
|
||||
change: 'Cambia',
|
||||
reset: 'Resetta',
|
||||
cancel: 'Annulla',
|
||||
add: 'Aggiungi',
|
||||
confirm: 'Conferma'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Benvenuti ad UpSnap 🥳',
|
||||
step1_setup_desc: "Per favore, completate i seguenti passi per terminare l'installazione.",
|
||||
step1_setup_btn_next: 'Avanti',
|
||||
step2_page_title: 'Creare un account amministratore',
|
||||
step2_label_email: 'Email:',
|
||||
step2_label_password: 'Password:',
|
||||
step2_label_min_chars: 'Min. 10 caratteri',
|
||||
step2_label_password_confirm: 'Conferma la password:',
|
||||
step2_btn_create: 'Crea',
|
||||
step3_page_title: 'Abbiamo finito! 🎉',
|
||||
step3_page_desc: 'Prosegui adesso per aggiungere dispositivi alla tua lista.',
|
||||
step3_btn_done: 'Andiamo!',
|
||||
not_expected_title: 'Non mi aspettavo di vederti qui! 🧐',
|
||||
not_expected_desc:
|
||||
"L' installazione e' gia' terminata! Non ci sono operazioni da svolgere qui.",
|
||||
not_expected_back: 'Indietro',
|
||||
progress_step1: 'Benvenuti',
|
||||
progress_step2: 'Creare un account',
|
||||
progress_step3: 'Fatto'
|
||||
},
|
||||
toasts: {
|
||||
admin_saved: 'Account amministratore salvato',
|
||||
user_saved: 'Account utente salvato',
|
||||
user_created: 'Utente {username} creato',
|
||||
user_deleted: 'Utente {username} cancellato',
|
||||
settings_saved: 'Impostazioni salvate',
|
||||
password_changed: 'Password cambiata. Per favore, effettuate di nuovo il login.',
|
||||
passwords_missmatch: 'Le password non corrispondono',
|
||||
permissions_created: 'I permessi per {username} sono stati creati',
|
||||
permissions_deleted: 'I permessi per {username} sono stati cancellati',
|
||||
permissions_updated: 'I permessi per {username} sono stati aggiornati',
|
||||
permissions_updated_personal: 'I tuoi permessi sono stati aggiornati',
|
||||
no_permission: 'Non hai i permessi necessari per visitare {url}',
|
||||
device_created: 'Creato dispositivo {device}',
|
||||
devices_created_multiple: 'Creato/i {count|int} dispositivi',
|
||||
device_updated: '{device} aggiornato',
|
||||
device_deleted: '{device} cancellato',
|
||||
group_created: 'Gruppo {group} creato',
|
||||
group_deleted: 'Gruppo {group} cancellato'
|
||||
},
|
||||
navbar: {
|
||||
theme: 'Tema',
|
||||
new: 'Nuovo',
|
||||
edit_account: 'Modifica accont',
|
||||
logout: 'Esci'
|
||||
}
|
||||
} satisfies BaseTranslation;
|
||||
|
||||
export default it;
|
||||
@@ -45,6 +45,10 @@ const pt = {
|
||||
card_nic_tooltip_shutdown_no_permission: 'Não tem permissão para desligar este dispositivo',
|
||||
card_nic_tooltip_power: 'Ligar',
|
||||
card_nic_tooltip_power_no_permission: 'Não tem permissão para ligar este dispositivo',
|
||||
modal_confirm_wake_title: 'Despertar {device}?',
|
||||
modal_confirm_wake_desc: 'Confirme para ativar {device}.',
|
||||
modal_confirm_shutdown_title: 'Desligar {device}?',
|
||||
modal_confirm_shutdown_desc: 'Confirme o encerramento do {device}.',
|
||||
general: 'Geral',
|
||||
general_name: 'Nome',
|
||||
general_name_placeholder: 'Nome do dispositivo',
|
||||
@@ -60,8 +64,13 @@ const pt = {
|
||||
link: 'Link',
|
||||
link_desc:
|
||||
'Permite que o nome do seu dispositivo seja um link. Perfeito para dashboard, por exemplo.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'Pode utilizar um comando shell personalizado para ver se o dispositivo está ligado. O comando deve devolver um código de saída de <span class="badge">0</span> para indicar que o dispositivo está ligado, qualquer outro código de saída marcará o dispositivo como desligado.',
|
||||
ping_cmd: 'Comando ping personalizado',
|
||||
wake: 'Ligar',
|
||||
wake_desc: 'Poderá ligar este dispositivo através dum cron job agendado.',
|
||||
wake_cmd: 'Comando de despertar personalizado',
|
||||
wake_cron: 'Wake cron',
|
||||
wake_cron_enable: 'Ativar wake cron',
|
||||
sol: 'Sleep-On-LAN',
|
||||
@@ -108,7 +117,8 @@ const pt = {
|
||||
network_scan_add_all: 'Adicionar todos os dispositivos',
|
||||
network_scan_replace_netmask: 'Substituir máscara de rede para todos os dispositivos?',
|
||||
network_scan_new_netmask: 'Nova máscara de rede',
|
||||
network_scan_include_unknown: 'Incluir dispositivos em que o nome é "Unknown"'
|
||||
network_scan_include_unknown: 'Incluir dispositivos em que o nome é "Unknown"',
|
||||
require_confirmation: 'Exigir confirmação'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Bem-vindo',
|
||||
@@ -160,7 +170,8 @@ const pt = {
|
||||
change: 'Alterar',
|
||||
reset: 'Repor',
|
||||
cancel: 'Cancelar',
|
||||
add: 'Adicionar'
|
||||
add: 'Adicionar',
|
||||
confirm: 'Confirmar'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Bem-vindo ao UpSnap 🥳',
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
import zh from '../zh';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const zh_TW = {
|
||||
...(zh as unknown as Translation),
|
||||
home: {
|
||||
page_title: '首頁',
|
||||
order_groups: '群組',
|
||||
order_name: '名稱',
|
||||
order_ip: 'IP位址',
|
||||
order_tooltip: '排序',
|
||||
no_devices: '尚無設備',
|
||||
add_first_device: '添加你的第一台設備',
|
||||
grant_permissions: '請聯絡系統管理員授權現有設備或創建新設備的權限'
|
||||
},
|
||||
account: {
|
||||
page_title: '帳號資訊',
|
||||
account_type_admin: '管理員',
|
||||
account_type_user: '普通使用者',
|
||||
avatar_title: '頭像',
|
||||
language_title: '語言',
|
||||
language_option_auto: '自動',
|
||||
change_password_title: '更改密碼',
|
||||
change_password_body: '更改密碼後,將需重新登入',
|
||||
change_password_label: '舊密碼',
|
||||
change_password_new: '新密碼',
|
||||
change_password_confirm: '確認密碼'
|
||||
},
|
||||
device: {
|
||||
page_title: '新裝置',
|
||||
tabs: ['手動設定', '網路掃描'],
|
||||
card_btn_more: '更多',
|
||||
card_btn_more_edit: '編輯',
|
||||
card_btn_more_sleep: '睡眠',
|
||||
card_btn_more_reboot: '重新啟動',
|
||||
card_tooltip_wake_cron: '喚醒排程',
|
||||
card_tooltip_shutdown_cron: '關機排程',
|
||||
card_tooltip_wake_password: '喚醒密碼',
|
||||
card_tooltip_last_status_change: '最後狀態更新',
|
||||
card_password: '密碼',
|
||||
card_nic_tooltip_pending: '等待中...',
|
||||
card_nic_tooltip_shutdown: '關機',
|
||||
card_nic_tooltip_shutdown_no_cmd: '未設定關機指令',
|
||||
card_nic_tooltip_shutdown_no_permission: '無關閉此裝置之權限',
|
||||
card_nic_tooltip_power: '開機',
|
||||
card_nic_tooltip_power_no_permission: '無開啟此裝置之權限',
|
||||
modal_confirm_wake_title: '喚醒 {device}?',
|
||||
modal_confirm_wake_desc: '你確定要喚醒 {device} 嗎?',
|
||||
modal_confirm_shutdown_title: '關閉 {device}?',
|
||||
modal_confirm_shutdown_desc: '你確定要關閉 {device} 嗎?',
|
||||
general: '通用',
|
||||
general_name: '名稱',
|
||||
general_name_placeholder: '裝置名稱',
|
||||
general_ip: 'IP',
|
||||
general_mac: 'Mac',
|
||||
general_netmask: '子網域遮罩',
|
||||
general_required_field: '必填',
|
||||
ports: '埠',
|
||||
ports_desc: 'UpSnap 可以檢查指定的埠是否開啟',
|
||||
ports_add_new: '新增埠',
|
||||
ports_name: '名稱',
|
||||
ports_number: '通訊埠編號',
|
||||
link: '連結',
|
||||
link_desc: '讓您的裝置名稱成為可點擊的連結,非常適合用來連結儀表板等。',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'你可以使用自定義的指令來檢查裝置是否開機。該指令應返回退出碼 <span class="badge">0</span> 以表示裝置已開機,任何其他退出碼將標記裝置為關機。',
|
||||
ping_cmd: '自定義 ping 指令',
|
||||
wake: '喚醒',
|
||||
wake_desc: '你可以透過排程来唤醒裝置。',
|
||||
wake_cmd: '自定義唤醒指令',
|
||||
wake_cron: '唤醒排程',
|
||||
wake_cron_enable: '啟用定時喚醒',
|
||||
sol: 'Sleep-On-LAN',
|
||||
sol_desc1:
|
||||
'你可以使用 <a class="link" href="https://github.com/SR-G/sleep-on-lan" target="_blank">Sleep-On-LAN</a> 工具讓電腦睡眠。 Sleep-On-LAN (SOL) 是一个外部的工具,它在你想要進入睡眠的PC上執行並有RestAPI端口. 有關 Sleep-On-LAN 設定的說明, 請見文檔 <a href="https://github.com/SR-G/sleep-on-lan#usage" class="link" target="_blank">Usage</a>',
|
||||
sol_desc2: 'SOL 已配置為使用 HTTP 發送請求,而不是 UDP以啟用授權並提高請求的可靠性。',
|
||||
sol_desc3:
|
||||
'因此, 請確保在 <a href="https://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">SOL 配置</a> 的 <span class="badge">Listeners</span> 部分中包含<span class="badge">HTTP:<YOURPORT></span>',
|
||||
sol_enable: '啟用 Sleep-On-LAN',
|
||||
sol_port: 'SOL 通訊埠',
|
||||
sol_authorization: '認證',
|
||||
sol_user: 'SOL 帳號',
|
||||
sol_password: 'SOL 密碼',
|
||||
shutdown: '關機',
|
||||
shutdown_desc:
|
||||
'這個<strong>shell指令</strong>將在您的容器內運行(如果您使用docker),或者在您的主機上運行(如果您使用二進制)。為了驗證其正常工作,您可以先在容器內或主機的shell中運行這個指令。常見的指令有<span class="badge">net rpc</span>用於Windows,<span class="badge">sshpass</span>用於Linux,或者一般用於進行網絡請求的<span class="badge">curl</span>。',
|
||||
shutdown_examples: '範例:',
|
||||
shutdown_examples_windows: '關閉遠端 Windows 主機:',
|
||||
shutdown_examples_linux: '關閉遠端 Linux 主機:',
|
||||
shutdown_cmd: '關機指令',
|
||||
shutdown_cron_desc: '就像設定排程來喚醒裝置一樣,您也可以設定一個排程來關閉這個裝置。',
|
||||
shutdown_cron: '關機排程',
|
||||
shutdown_cron_enable: '啟用關機排程',
|
||||
password: '密碼',
|
||||
password_desc:
|
||||
'一些網路介面卡能給 magic packets 設密碼, 也可稱作 <span class="badge">SecureON</span>. 密碼長度只能為0、4或6個字。',
|
||||
groups: '群組',
|
||||
groups_desc: '你可以將裝置加到群組, 以便在控制面板上依群組排序。',
|
||||
groups_placeholder: "例如: 'Basement' 或 'Office'",
|
||||
network_scan_range_saved: '掃瞄範圍已儲存',
|
||||
network_scan_desc:
|
||||
'自動掃描網路上的設備,要使用這個功能,你需要以root/系統管理員權限執行 UpSnap, 並在你的 $PATH 中安裝nmap(使用docker安裝者不需執行任何操作),掃描可能需一段時間。',
|
||||
network_scan_ip_range: 'IP 範圍',
|
||||
network_scan_no_range: '無掃瞄範圍',
|
||||
network_scan_unsaved_changes: '未儲存的更改',
|
||||
network_scan_running: '掃描中',
|
||||
network_scan: '掃描',
|
||||
network_scan_ip: 'IP:',
|
||||
network_scan_mac: 'Mac:',
|
||||
network_scan_mac_vendor: 'Mac 供應商:',
|
||||
network_scan_netmask: '子網域遮罩:',
|
||||
network_scan_add_all: '新增全部裝置',
|
||||
network_scan_replace_netmask: '替換所有設備的子網域遮罩?',
|
||||
network_scan_new_netmask: '新子網域遮罩',
|
||||
network_scan_include_unknown: '包括名稱為 “Unknown” 的裝置',
|
||||
require_confirmation: '再次確認'
|
||||
},
|
||||
login: {
|
||||
welcome: '歡迎使用',
|
||||
email_label: '電子郵件/使用者名稱:',
|
||||
password_label: '密碼:',
|
||||
btn_more: '更多',
|
||||
menu_title_auth_providers: '其他身份驗證提供者',
|
||||
btn_login: '登入'
|
||||
},
|
||||
settings: {
|
||||
page_title: '設定',
|
||||
ping_interval_title: 'Ping 間隔',
|
||||
ping_interval_desc1: '設定 ping 的間隔。留空使用預設值 <span class="badge">@every 3s</span>.',
|
||||
ping_interval_desc2:
|
||||
'有關 cron 的更多資訊,請見<a class="link" href="https://zh.wikipedia.org/wiki/Cron" target="_blank">Wikipedia</a> 或參閱 <a class="link" href="https://pkg.go.dev/github.com/robfig/cron/v3" target="_blank">cron 文檔</a>.',
|
||||
lazy_ping_title: 'Lazy ping',
|
||||
lazy_ping_desc: '當開關打開時, UpSnap 只會在有訪問者訪問網站時才對設備進行 ping 測試',
|
||||
lazy_ping_enable: '啟用',
|
||||
website_title_title: '網站標題',
|
||||
website_title_desc: '設置網站的標題,同時顯示在瀏覽器的標籤中。',
|
||||
icon_title: '圖標',
|
||||
icon_desc: '設定一個自訂義圖標。支援的檔案類型:',
|
||||
upsnap_version: 'UpSnap 版本'
|
||||
},
|
||||
users: {
|
||||
page_title: '使用者',
|
||||
allow_create_devices: '允許 {username} 創建新裝置和修改群組',
|
||||
device_permissions: '裝置權限',
|
||||
create_new_device: '創建新裝置',
|
||||
read: '查看',
|
||||
update: '更新',
|
||||
delete: '刪除',
|
||||
power: '電源',
|
||||
toggle: '全選',
|
||||
confirm_delete_title: '確認刪除',
|
||||
confirm_delete_desc: '你確定要刪除 {username} 嗎?',
|
||||
create_new_user: '新增使用者',
|
||||
username: '使用者名稱',
|
||||
password: '密碼',
|
||||
password_confirm: '確認密碼',
|
||||
required_field: '必填'
|
||||
},
|
||||
buttons: {
|
||||
save: '保存',
|
||||
delete: '刪除',
|
||||
change: '更改',
|
||||
reset: '重設',
|
||||
cancel: '取消',
|
||||
add: '新增',
|
||||
confirm: '確認'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: '歡迎使用 UpSnap 🥳',
|
||||
step1_setup_desc: '初次使用,請依下列指示完成步驟',
|
||||
step1_setup_btn_next: '下一步',
|
||||
step2_page_title: '創建管理者帳號',
|
||||
step2_label_email: '電子郵件:',
|
||||
step2_label_password: '密碼:',
|
||||
step2_label_min_chars: '請輸入至少10个字元',
|
||||
step2_label_password_confirm: '確認密碼:',
|
||||
step2_btn_create: '創建',
|
||||
step3_page_title: '一切就緒! 🎉',
|
||||
step3_page_desc: '繼續向您的儀表板新增裝置。',
|
||||
step3_btn_done: '開始使用!',
|
||||
not_expected_title: '意料之外! 🧐',
|
||||
not_expected_desc: '你已經完成設定,無需再次設定',
|
||||
not_expected_back: '返回',
|
||||
progress_step1: '歡迎',
|
||||
progress_step2: '創建帳號',
|
||||
progress_step3: '完成'
|
||||
},
|
||||
toasts: {
|
||||
admin_saved: '帳號資訊已儲存',
|
||||
user_saved: '帳號資訊已儲存',
|
||||
user_created: '使用者 {username} 已創建',
|
||||
user_deleted: '使用者 {username} 已刪除',
|
||||
settings_saved: '設定已儲存',
|
||||
password_changed: '密碼已修改,請重新登入。',
|
||||
passwords_missmatch: '兩次輸入的密碼不相同',
|
||||
permissions_created: '使用者 {username} 的權限已創建',
|
||||
permissions_deleted: '使用者 {username} 的權限已刪除',
|
||||
permissions_updated: '使用者 {username} 的權限已更新',
|
||||
permissions_updated_personal: '你的權限已更新',
|
||||
no_permission: '你無權訪問 {url}',
|
||||
device_created: '已創建 {device}',
|
||||
devices_created_multiple: '已創建 {count|int} 個設備',
|
||||
device_updated: '已更新 {device}',
|
||||
device_deleted: '已刪除 {device}',
|
||||
group_created: '已創建群組 {group}',
|
||||
group_deleted: '已創建群組 {group}'
|
||||
},
|
||||
navbar: {
|
||||
theme: '主題',
|
||||
new: '新增',
|
||||
edit_account: '編輯帳號',
|
||||
logout: '退出'
|
||||
}
|
||||
} satisfies Translation;
|
||||
|
||||
export default zh_TW;
|
||||
@@ -42,6 +42,10 @@ const zh = {
|
||||
card_nic_tooltip_shutdown_no_permission: '没有关闭此设备的权限',
|
||||
card_nic_tooltip_power: '启动',
|
||||
card_nic_tooltip_power_no_permission: '没有启动此设备的权限',
|
||||
modal_confirm_wake_title: '唤醒 {device}?',
|
||||
modal_confirm_wake_desc: '您确定要唤醒 {device} 吗?',
|
||||
modal_confirm_shutdown_title: '关闭 {device}?',
|
||||
modal_confirm_shutdown_desc: '您确定要关闭 {device} 吗?',
|
||||
general: '通用',
|
||||
general_name: '名称',
|
||||
general_name_placeholder: '设备名',
|
||||
@@ -56,8 +60,13 @@ const zh = {
|
||||
ports_number: '端口号',
|
||||
link: '链接',
|
||||
link_desc: '为您的设备名设置一个可点击的链接.',
|
||||
ping: 'Ping',
|
||||
ping_desc:
|
||||
'您可以使用自定义 shell 命令来查看设备是否已接通电源。该命令应返回 <span class="badge">0</span> 的退出代码,表示设备电源已打开,任何其他退出代码都将标记设备电源已关闭。',
|
||||
ping_cmd: '自定义 ping 命令',
|
||||
wake: '唤醒',
|
||||
wake_desc: '您可以通过计划任务来唤醒设备.',
|
||||
wake_cmd: '自定义唤醒命令',
|
||||
wake_cron: '唤醒计划任务',
|
||||
wake_cron_enable: '启用定时唤醒',
|
||||
sol: 'Sleep-On-LAN',
|
||||
@@ -102,7 +111,8 @@ const zh = {
|
||||
network_scan_add_all: '添加全部设备',
|
||||
network_scan_replace_netmask: '更换所有设备的子网掩码?',
|
||||
network_scan_new_netmask: '新子网掩码',
|
||||
network_scan_include_unknown: '包括名称为 “Unknown” 的设备'
|
||||
network_scan_include_unknown: '包括名称为 “Unknown” 的设备',
|
||||
require_confirmation: '二次确认'
|
||||
},
|
||||
login: {
|
||||
welcome: '欢迎使用',
|
||||
@@ -151,7 +161,8 @@ const zh = {
|
||||
change: '更改',
|
||||
reset: '重置',
|
||||
cancel: '取消',
|
||||
add: '添加'
|
||||
add: '添加',
|
||||
confirm: '确认'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: '欢迎使用 UpSnap 🥳',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Record } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export type Device = Record & {
|
||||
export type Device = RecordModel & {
|
||||
name: string;
|
||||
ip: string;
|
||||
mac: string;
|
||||
@@ -8,11 +8,15 @@ export type Device = Record & {
|
||||
status: 'pending' | 'online' | 'offline' | '';
|
||||
ports: string[];
|
||||
link: URL;
|
||||
ping_cmd: string;
|
||||
wake_cron: string;
|
||||
wake_cron_enabled: boolean;
|
||||
wake_cmd: string;
|
||||
wake_confirm: boolean;
|
||||
shutdown_cron: string;
|
||||
shutdown_cron_enabled: boolean;
|
||||
shutdown_cmd: string;
|
||||
shutdown_confirm: boolean;
|
||||
password: string;
|
||||
groups: string[];
|
||||
expand: {
|
||||
@@ -27,11 +31,12 @@ export type Device = Record & {
|
||||
sol_port: number;
|
||||
};
|
||||
|
||||
export type Port = Record & {
|
||||
export type Port = RecordModel & {
|
||||
name: string;
|
||||
number: number;
|
||||
link: string;
|
||||
};
|
||||
|
||||
export type Group = Record & {
|
||||
export type Group = RecordModel & {
|
||||
name: string;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Record } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export type Permission = Record & {
|
||||
export type Permission = RecordModel & {
|
||||
user: string;
|
||||
create: boolean;
|
||||
read: string[];
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { Record } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export type SettingsPublic = Record & {
|
||||
export type SettingsPublic = RecordModel & {
|
||||
collectionId: string;
|
||||
favicon: string;
|
||||
setup_completed: boolean;
|
||||
website_title: string;
|
||||
};
|
||||
|
||||
export type SettingsPrivate = Record & {
|
||||
export type SettingsPrivate = RecordModel & {
|
||||
interval: number;
|
||||
lazy_ping: boolean;
|
||||
scan_range: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Record } from 'pocketbase';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
export type User = Record & {
|
||||
export type User = RecordModel & {
|
||||
username: string;
|
||||
email: string;
|
||||
avatar: number;
|
||||
|
||||
@@ -58,31 +58,15 @@
|
||||
|
||||
// redirect to welcome page if setup is not completed
|
||||
if ($settingsPub.setup_completed === false && $page.url.pathname !== '/welcome') {
|
||||
$pocketbase.authStore.clear();
|
||||
goto('/welcome');
|
||||
return;
|
||||
}
|
||||
|
||||
// load auth from localstorage
|
||||
const pbCookie = localStorage.getItem('pocketbase_auth');
|
||||
if (!pbCookie) {
|
||||
goto('/login');
|
||||
return;
|
||||
}
|
||||
|
||||
$pocketbase.authStore.loadFromCookie('pb_auth=' + pbCookie);
|
||||
if (!$pocketbase.authStore.isValid) {
|
||||
goto('/login');
|
||||
return;
|
||||
}
|
||||
|
||||
// only refresh token if valid less than 1 day
|
||||
const jwt = parseJwt($pocketbase.authStore.token);
|
||||
if (jwt.exp > Date.now() / 1000 + 60 * 60 * 24) {
|
||||
return;
|
||||
}
|
||||
|
||||
// refresh auth token
|
||||
if ($pocketbase.authStore.isAdmin) {
|
||||
await $pocketbase.admins.authRefresh().catch(() => {
|
||||
$pocketbase.authStore.clear();
|
||||
goto('/login');
|
||||
});
|
||||
} else {
|
||||
@@ -90,26 +74,11 @@
|
||||
.collection('users')
|
||||
.authRefresh()
|
||||
.catch(() => {
|
||||
$pocketbase.authStore.clear();
|
||||
goto('/login');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function parseJwt(token: string) {
|
||||
var base64Url = token.split('.')[1];
|
||||
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
||||
var jsonPayload = decodeURIComponent(
|
||||
window
|
||||
.atob(base64)
|
||||
.split('')
|
||||
.map(function (c) {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
})
|
||||
.join('')
|
||||
);
|
||||
|
||||
return JSON.parse(jsonPayload);
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -133,7 +102,7 @@
|
||||
<Toaster position="bottom-center" {toastOptions} />
|
||||
|
||||
<Transition url={$page.url}>
|
||||
<div class="container mx-auto p-2 mb-4">
|
||||
<div class="container mx-auto mb-4 p-2">
|
||||
<slot />
|
||||
</div>
|
||||
</Transition>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<div class="join-item">
|
||||
<div class="join">
|
||||
<button
|
||||
class="join-item btn"
|
||||
class="btn join-item"
|
||||
type="button"
|
||||
on:click={() => (orderByGroups = !orderByGroups)}
|
||||
>{$LL.home.order_groups()}
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
class="join-item btn"
|
||||
class="btn join-item"
|
||||
type="radio"
|
||||
name="order"
|
||||
aria-label={$LL.home.order_name()}
|
||||
@@ -126,7 +126,7 @@
|
||||
value="name"
|
||||
/>
|
||||
<input
|
||||
class="join-item btn"
|
||||
class="btn join-item"
|
||||
type="radio"
|
||||
name="order"
|
||||
aria-label={$LL.home.order_ip()}
|
||||
@@ -135,7 +135,7 @@
|
||||
/>
|
||||
{/if}
|
||||
<div class="tooltip" data-tip={$LL.home.order_tooltip()}>
|
||||
<button class="join-item btn" on:click={() => (orderExpanded = !orderExpanded)}>
|
||||
<button class="btn join-item" on:click={() => (orderExpanded = !orderExpanded)}>
|
||||
{#if orderExpanded}
|
||||
<Fa icon={faChevronCircleRight} size="lg" />
|
||||
{:else}
|
||||
@@ -157,7 +157,7 @@
|
||||
{#if Object.keys(devicesWithGroup).length > 0}
|
||||
{#each Object.keys(devicesWithGroup).sort( (a, b) => a.localeCompare( b, undefined, { numeric: true, sensitivity: 'base' } ) ) as group}
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold mb-3">{group}</h1>
|
||||
<h1 class="mb-3 text-2xl font-bold">{group}</h1>
|
||||
<div class={gridClass}>
|
||||
{#each devicesWithGroup[group].sort( (a, b) => a[orderBy].localeCompare( b[orderBy], undefined, { numeric: true, sensitivity: 'base' } ) ) as device}
|
||||
<DeviceCard {device} />
|
||||
|
||||
@@ -15,16 +15,21 @@
|
||||
|
||||
// locales
|
||||
const languageEmojis = {
|
||||
de: '🇩🇪',
|
||||
'de-DE': '🇩🇪',
|
||||
en: '🇺🇸',
|
||||
'en-US': '🇺🇸',
|
||||
fr: '🇫🇷',
|
||||
'fr-FR': '🇫🇷',
|
||||
de: '🇩🇪',
|
||||
'de-DE': '🇩🇪',
|
||||
it: '🇮🇹',
|
||||
'it-IT': '🇮🇹',
|
||||
pt: '🇵🇹',
|
||||
'pt-PT': '🇵🇹',
|
||||
es: '🇪🇸',
|
||||
'es-ES': '🇪🇸',
|
||||
zh: '🇨🇳',
|
||||
'zh-CN': '🇨🇳'
|
||||
'zh-CN': '🇨🇳',
|
||||
'zh-TW': '🇹🇼'
|
||||
};
|
||||
let localStorageLang: Locales | 'auto' = 'auto';
|
||||
let selectedLanguage: Locales | 'auto' = localStorageLang;
|
||||
@@ -128,10 +133,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1 class="text-3xl font-bold mb-8">{$LL.account.page_title()}</h1>
|
||||
<h1 class="mb-8 text-3xl font-bold">{$LL.account.page_title()}</h1>
|
||||
<div class="card w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<div class="flex flex-row gap-4 items-center">
|
||||
<div class="flex flex-row items-center gap-4">
|
||||
<div class="avatar">
|
||||
<div class="w-16 rounded-full">
|
||||
<!-- svelte static build will fail, because the image gets served from pocketbase
|
||||
@@ -159,10 +164,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<form on:submit|preventDefault={saveUser}>
|
||||
<h2 class="card-title mt-4 mb-2">{$LL.account.avatar_title()}</h2>
|
||||
<h2 class="card-title mb-2 mt-4">{$LL.account.avatar_title()}</h2>
|
||||
<div class="flex flex-row flex-wrap gap-4">
|
||||
{#each [...Array(10).keys()] as i}
|
||||
<div class="avatar btn btn-ghost btn-circle">
|
||||
<div class="avatar btn btn-circle btn-ghost">
|
||||
<div
|
||||
class="w-11 rounded-full"
|
||||
class:ring={newAvatar !== undefined
|
||||
@@ -192,7 +197,7 @@
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<h2 class="card-title mt-4 mb-2">{$LL.account.language_title()}</h2>
|
||||
<h2 class="card-title mb-2 mt-4">{$LL.account.language_title()}</h2>
|
||||
<select class="select select-bordered w-full max-w-xs" bind:value={selectedLanguage}>
|
||||
<option value="auto" selected={localStorageLang === null}
|
||||
>🌐 {$LL.account.language_option_auto()}</option
|
||||
@@ -212,7 +217,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.account.change_password_title()}</h2>
|
||||
<p>{$LL.account.change_password_body()}</p>
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
{#await getDevice()}
|
||||
<PageLoading />
|
||||
{:then device}
|
||||
<h1 class="text-3xl font-bold mb-8 sm:break-all">{device.name}</h1>
|
||||
<h1 class="mb-8 text-3xl font-bold sm:break-all">{device.name}</h1>
|
||||
<DeviceForm {device} />
|
||||
{:catch err}
|
||||
<div class="container max-w-lg mx-auto">
|
||||
<div class="container mx-auto max-w-lg">
|
||||
{err}
|
||||
</div>
|
||||
{/await}
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
let activeTab = 'manual';
|
||||
</script>
|
||||
|
||||
<h1 class="text-3xl font-bold mb-8">{$LL.device.page_title()}</h1>
|
||||
<div class="flex justify-center mb-6">
|
||||
<ul class="menu menu-horizontal bg-base-300 rounded-box gap-1">
|
||||
<h1 class="mb-8 text-3xl font-bold">{$LL.device.page_title()}</h1>
|
||||
<div class="mb-6 flex justify-center">
|
||||
<ul class="menu menu-horizontal gap-1 rounded-box bg-base-300">
|
||||
{#each tabs as tab}
|
||||
{#if tab.show}
|
||||
<li>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import { pocketbase } from '$lib/stores/pocketbase';
|
||||
import { settingsPub } from '$lib/stores/settings';
|
||||
import { faEye, faLockOpen, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import type { AuthProviderInfo } from 'pocketbase';
|
||||
import { onMount } from 'svelte';
|
||||
import Fa from 'svelte-fa';
|
||||
import toast from 'svelte-french-toast';
|
||||
@@ -40,26 +41,25 @@
|
||||
});
|
||||
}
|
||||
|
||||
function loginOIDC() {
|
||||
function loginWithProvider(provider: AuthProviderInfo) {
|
||||
$pocketbase
|
||||
.collection('users')
|
||||
.authWithOAuth2({ provider: 'oidc' })
|
||||
.authWithOAuth2({ provider: provider.name })
|
||||
.then(() => {
|
||||
goto('/');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
toast.error(err.message);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="mt-10 flex items-center justify-center">
|
||||
<div class="card bg-base-300 shadow-xl w-full max-w-lg">
|
||||
<div class="card w-full max-w-lg bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
{#if $settingsPub?.website_title}
|
||||
<h1 class="text-xl text-center font-bold">{$settingsPub?.website_title}</h1>
|
||||
<h1 class="text-center text-xl font-bold">{$settingsPub?.website_title}</h1>
|
||||
{/if}
|
||||
<div class="flex flex-row gap-4">
|
||||
<figure class="w-16"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
@@ -81,7 +81,7 @@
|
||||
</label>
|
||||
<label class="relative block">
|
||||
<div
|
||||
class="absolute top-1/2 -translate-y-1/2 right-4 cursor-pointer"
|
||||
class="absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer"
|
||||
role="none"
|
||||
on:click={() => toggleVisibility(inputPassword)}
|
||||
on:keydown={() => toggleVisibility(inputPassword)}
|
||||
@@ -106,17 +106,25 @@
|
||||
<ul
|
||||
id="other-providers"
|
||||
tabindex="-1"
|
||||
class="dropdown-content z-[1] menu p-2 shadow bg-base-200 rounded-box w-56"
|
||||
class="menu dropdown-content z-[1] w-56 rounded-box bg-base-200 p-2 shadow"
|
||||
>
|
||||
<li class="menu-title flex flex-row gap-2 items-center">
|
||||
<li class="menu-title flex flex-row items-center gap-2">
|
||||
{$LL.login.menu_title_auth_providers()}
|
||||
<a href="https://github.com/seriousm4x/UpSnap/wiki/Auth-providers" target="_blank"
|
||||
><Fa icon={faQuestionCircle} /></a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button" on:click={loginOIDC}>OIDC 1</button>
|
||||
</li>
|
||||
{#await $pocketbase.collection('users').listAuthMethods() then authMethods}
|
||||
{#if authMethods.authProviders.length > 0}
|
||||
{#each authMethods.authProviders as provider}
|
||||
<li>
|
||||
<button type="button" on:click={() => loginWithProvider(provider)}
|
||||
>{provider.displayName}</button
|
||||
>
|
||||
</li>
|
||||
{/each}
|
||||
{/if}
|
||||
{/await}
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn btn-primary ms-auto" type="submit"
|
||||
|
||||
@@ -90,9 +90,9 @@
|
||||
{#if settingsPubClone === undefined || settingsPrivClone === undefined}
|
||||
<PageLoading />
|
||||
{:else}
|
||||
<h1 class="text-3xl font-bold mb-8">{$LL.settings.page_title()}</h1>
|
||||
<h1 class="mb-8 text-3xl font-bold">{$LL.settings.page_title()}</h1>
|
||||
<form on:submit|preventDefault={save}>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.settings.ping_interval_title()}</h2>
|
||||
<p class="mt-2">
|
||||
@@ -106,7 +106,7 @@
|
||||
<!-- eslint-disable svelte/no-at-html-tags -->
|
||||
{@html $LL.settings.ping_interval_desc2()}
|
||||
</p>
|
||||
<div class="form-control w-full mt-2">
|
||||
<div class="form-control mt-2 w-full">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="e.g. '@every 5s' or '@every 1m'"
|
||||
@@ -122,7 +122,7 @@
|
||||
<label class="label cursor-pointer gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="checkbox checkbox-primary"
|
||||
class="checkbox-primary checkbox"
|
||||
bind:checked={settingsPrivClone.lazy_ping}
|
||||
/>
|
||||
<span class="label-text">{$LL.settings.lazy_ping_enable()}</span>
|
||||
@@ -130,7 +130,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.settings.website_title_title()}</h2>
|
||||
<p class="my-2">{$LL.settings.website_title_desc()}</p>
|
||||
@@ -144,7 +144,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.settings.icon_title()}</h2>
|
||||
<p class="my-2">
|
||||
@@ -163,7 +163,7 @@
|
||||
bind:this={faviconPreview}
|
||||
/>
|
||||
</div>
|
||||
<div class="form-control w-full max-w-md flex flex-row gap-4">
|
||||
<div class="form-control flex w-full max-w-md flex-row gap-4">
|
||||
<input
|
||||
type="file"
|
||||
class="file-input w-full max-w-xs"
|
||||
@@ -178,12 +178,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-actions justify-end mt-6">
|
||||
<div class="card-actions mt-6 justify-end">
|
||||
<button class="btn btn-success" type="submit"><Fa icon={faSave} />{$LL.buttons.save()}</button
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
<div class="container mx-auto text-center mt-6">
|
||||
<div class="container mx-auto mt-6 text-center">
|
||||
{#if PUBLIC_VERSION === ''}
|
||||
{$LL.settings.upsnap_version()}: (untracked)
|
||||
{:else}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
let getUsersPromise = getUsers();
|
||||
let getPermissionsPromise = getPermissions();
|
||||
let getDevicesPromise = getDevices();
|
||||
let deleteModal: HTMLDialogElement;
|
||||
let deleteModal = [] as HTMLDialogElement[];
|
||||
|
||||
let users = [] as User[];
|
||||
let permissions = [] as Permission[];
|
||||
@@ -71,23 +71,24 @@
|
||||
}
|
||||
|
||||
async function deleteUser(user: User) {
|
||||
let permission = permissions.find((perm) => perm.user === user.id);
|
||||
if (permission?.id !== undefined) {
|
||||
await $pocketbase
|
||||
.collection('permissions')
|
||||
.delete(permission.id)
|
||||
.then(() => {
|
||||
toast.success($LL.toasts.permissions_deleted({ username: user.username }));
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error(err.message);
|
||||
});
|
||||
}
|
||||
|
||||
await $pocketbase
|
||||
.collection('users')
|
||||
.delete(user.id)
|
||||
.then(async () => {
|
||||
toast.success($LL.toasts.user_deleted({ username: user.username }));
|
||||
let permission = permissions.find((perm) => perm.user === user.id);
|
||||
if (permission?.id !== undefined) {
|
||||
await $pocketbase
|
||||
.collection('permissions')
|
||||
.delete(permission.id)
|
||||
.then(() => {
|
||||
toast.success($LL.toasts.permissions_deleted({ username: user.username }));
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error(err.message);
|
||||
});
|
||||
}
|
||||
reload();
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -180,10 +181,10 @@
|
||||
{#await Promise.all([getUsersPromise, getPermissionsPromise, getDevicesPromise])}
|
||||
<PageLoading />
|
||||
{:then}
|
||||
<h1 class="text-3xl font-bold mb-8">{$LL.users.page_title()}</h1>
|
||||
<h1 class="mb-8 text-3xl font-bold">{$LL.users.page_title()}</h1>
|
||||
{#each users as user, index}
|
||||
<form on:submit|preventDefault={() => save(user)}>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body gap-4">
|
||||
<h2 class="card-title">
|
||||
<label tabindex="-1" class="avatar" for="avatar{index}">
|
||||
@@ -218,16 +219,16 @@
|
||||
<a href="/device/new" class="link">{$LL.users.create_new_device()}</a>
|
||||
</p>
|
||||
{:else}
|
||||
<div class="grid grid-cols-4 md:grid-cols-5 gap-4 justify-items-center">
|
||||
<div class="grid grid-cols-4 justify-items-center gap-4 md:grid-cols-5">
|
||||
<div class="font-bold md:col-start-2">{$LL.users.read()}</div>
|
||||
<div class="font-bold">{$LL.users.update()}</div>
|
||||
<div class="font-bold">{$LL.users.delete()}</div>
|
||||
<div class="font-bold">{$LL.users.power()}</div>
|
||||
{#each devices as device}
|
||||
<hr class="col-span-full w-full border-b-1 opacity-30 border-neutral" />
|
||||
<hr class="border-b-1 col-span-full w-full border-neutral opacity-30" />
|
||||
{#each permissions.filter((perm) => perm.user === user.id) as permission}
|
||||
<div
|
||||
class="flex flex-row flex-wrap gap-2 place-self-start break-all col-span-full md:col-span-1"
|
||||
class="col-span-full flex flex-row flex-wrap gap-2 place-self-start break-all md:col-span-1"
|
||||
>
|
||||
<span class="font-bold">{device.name}</span>
|
||||
<span class="badge hidden md:block">{device.ip}</span>
|
||||
@@ -259,7 +260,7 @@
|
||||
{/each}
|
||||
{/each}
|
||||
<button
|
||||
class="btn btn-sm btn-neutral md:col-start-2"
|
||||
class="btn btn-neutral btn-sm md:col-start-2"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
toggleAllPermissions(user, 'read');
|
||||
@@ -270,7 +271,7 @@
|
||||
/></button
|
||||
>
|
||||
<button
|
||||
class=" btn btn-sm btn-neutral"
|
||||
class=" btn btn-neutral btn-sm"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
toggleAllPermissions(user, 'update');
|
||||
@@ -281,7 +282,7 @@
|
||||
/></button
|
||||
>
|
||||
<button
|
||||
class=" btn btn-sm btn-neutral"
|
||||
class=" btn btn-neutral btn-sm"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
toggleAllPermissions(user, 'delete');
|
||||
@@ -292,7 +293,7 @@
|
||||
/></button
|
||||
>
|
||||
<button
|
||||
class=" btn btn-sm btn-neutral"
|
||||
class=" btn btn-neutral btn-sm"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
toggleAllPermissions(user, 'power');
|
||||
@@ -303,27 +304,27 @@
|
||||
/></button
|
||||
>
|
||||
</div>
|
||||
<div class="mt-4 flex flex-row flex-wrap gap-4 justify-end"></div>
|
||||
<div class="mt-4 flex flex-row flex-wrap justify-end gap-4"></div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="justify-end join">
|
||||
<div class="join justify-end">
|
||||
<button
|
||||
class="join-item btn btn-error"
|
||||
class="btn btn-error join-item"
|
||||
type="button"
|
||||
on:click={() => deleteModal.showModal()}
|
||||
on:click={() => deleteModal[index].showModal()}
|
||||
><Fa icon={faTrash} />{$LL.buttons.delete()}</button
|
||||
>
|
||||
<button class="join-item btn btn-success" type="submit"
|
||||
<button class="btn btn-success join-item" type="submit"
|
||||
><Fa icon={faSave} />{$LL.buttons.save()}</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<dialog class="modal" bind:this={deleteModal}>
|
||||
<dialog class="modal" bind:this={deleteModal[index]}>
|
||||
<form method="dialog" class="modal-box">
|
||||
<h3 class="font-bold text-lg">{$LL.users.confirm_delete_title()}</h3>
|
||||
<h3 class="text-lg font-bold">{$LL.users.confirm_delete_title()}</h3>
|
||||
<p class="py-4">{$LL.users.confirm_delete_desc({ username: user.username })}</p>
|
||||
<div class="modal-action">
|
||||
<button class="btn">{$LL.buttons.cancel()}</button>
|
||||
@@ -334,7 +335,7 @@
|
||||
</form>
|
||||
</dialog>
|
||||
{/each}
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card mt-6 w-full bg-base-300 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.users.create_new_user()}</h2>
|
||||
<form on:submit|preventDefault={createUser}>
|
||||
@@ -392,7 +393,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span class="badge text-error mt-4 self-center">* {$LL.users.required_field()}</span>
|
||||
<span class="badge mt-4 self-center text-error">* {$LL.users.required_field()}</span>
|
||||
<div class="card-actions justify-end">
|
||||
<button type="submit" class="btn btn-success mt-2"
|
||||
><Fa icon={faPlus} />{$LL.buttons.add()}</button
|
||||
|
||||
@@ -57,10 +57,10 @@
|
||||
</script>
|
||||
|
||||
<div class="mt-10 flex items-center justify-center">
|
||||
<div class="flex flex-col gap-16 w-screen max-w-lg my-4">
|
||||
<div class="my-4 flex w-screen max-w-lg flex-col gap-16">
|
||||
<div class="card bg-base-300 shadow-xl">
|
||||
{#if $settingsPub?.setup_completed}
|
||||
<figure class="w-72 mx-auto pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<figure class="mx-auto w-72 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.welcome.not_expected_title()}</h2>
|
||||
<p>{$LL.welcome.not_expected_desc()}</p>
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{:else if stepsCompleted === 0}
|
||||
<figure class="w-44 mx-auto pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<figure class="mx-auto w-44 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.welcome.step1_page_title()}</h2>
|
||||
<p>{$LL.welcome.step1_setup_desc()}</p>
|
||||
@@ -104,7 +104,7 @@
|
||||
</label>
|
||||
<label class="relative block">
|
||||
<div
|
||||
class="absolute top-1/2 -translate-y-1/2 right-4 cursor-pointer"
|
||||
class="absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer"
|
||||
role="none"
|
||||
on:click={() => toggleVisibility(inputPassword)}
|
||||
on:keydown={() => toggleVisibility(inputPassword)}
|
||||
@@ -127,7 +127,7 @@
|
||||
</label>
|
||||
<label class="relative block">
|
||||
<div
|
||||
class="absolute top-1/2 -translate-y-1/2 right-4 cursor-pointer"
|
||||
class="absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer"
|
||||
role="none"
|
||||
on:click={() => toggleVisibility(inputConfirm)}
|
||||
on:keydown={() => toggleVisibility(inputConfirm)}
|
||||
@@ -145,7 +145,7 @@
|
||||
bind:this={inputConfirm}
|
||||
/>
|
||||
</label>
|
||||
<div class="card-actions justify-end mt-4">
|
||||
<div class="card-actions mt-4 justify-end">
|
||||
<button class="btn btn-primary" type="submit"
|
||||
>{$LL.welcome.step2_btn_create()} <Fa icon={faArrowRight} /></button
|
||||
>
|
||||
@@ -153,7 +153,7 @@
|
||||
</form>
|
||||
</div>
|
||||
{:else if stepsCompleted === 2}
|
||||
<figure class="w-72 mx-auto pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<figure class="mx-auto w-72 pt-6"><img src="/gopher.svg" alt="Gopher" /></figure>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.welcome.step3_page_title()}</h2>
|
||||
<p>{$LL.welcome.step3_page_desc()}</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
|
||||
+21
-10
@@ -11,29 +11,37 @@ export default {
|
||||
themes: [
|
||||
{
|
||||
light: {
|
||||
...themes['[data-theme=light]'],
|
||||
...themes['light'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'primary-content': '#ffffff'
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
dark: {
|
||||
...themes['[data-theme=dark]'],
|
||||
...themes['dark'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'base-300': '#12161b',
|
||||
'--rounded-btn': '1.9rem',
|
||||
'--tab-border': '2px',
|
||||
'--tab-radius': '.5rem'
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
cupcake: {
|
||||
...themes['[data-theme=cupcake]'],
|
||||
...themes['cupcake'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'primary-content': '#ffffff'
|
||||
},
|
||||
colorful: {
|
||||
...themes['light'],
|
||||
primary: '#00bdf8',
|
||||
secondary: '#009aff',
|
||||
accent: '#00b3a2',
|
||||
neutral: '#161200',
|
||||
'base-100': '#ffffff',
|
||||
info: '#00c5dc',
|
||||
success: '#00d892',
|
||||
warning: '#f77800',
|
||||
error: '#f36165'
|
||||
}
|
||||
},
|
||||
'bumblebee',
|
||||
@@ -61,7 +69,10 @@ export default {
|
||||
'lemonade',
|
||||
'night',
|
||||
'coffee',
|
||||
'winter'
|
||||
'winter',
|
||||
'dim',
|
||||
'nord',
|
||||
'sunset'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user