mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-27 12:21:56 +00:00
Compare commits
250 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 86ed3c1c08 | |||
| 92a142b5ee | |||
| f351df6b88 | |||
| d50245ebaf | |||
| 2f3ad2fdcb | |||
| a4ab575eb3 | |||
| fc3e6e6e90 | |||
| 62e20969b5 | |||
| 89c93d98f2 | |||
| d12c37cf7b | |||
| f3ba2489f4 | |||
| 48228cb01c | |||
| 5292ca82ba | |||
| be98da5c91 | |||
| 915872c634 | |||
| 3788862120 | |||
| 49d729efa8 | |||
| 8457c495cf | |||
| 4426d60248 | |||
| 90ebd6d2a0 | |||
| 4b5354da9b | |||
| f04a54e5dc | |||
| 128a1c61fd | |||
| 60e7ca2c0e | |||
| a649e04d14 | |||
| 489261f0bf | |||
| c91f6767d8 | |||
| 6079ff0fd3 | |||
| 2699ec58bb | |||
| ea328bcd5e | |||
| 433d9e293a | |||
| 888cd82d00 | |||
| f525c4a58d | |||
| 8055967cf2 | |||
| 2d54d9b79c | |||
| 1584c67de3 | |||
| a0d07acd40 | |||
| 88cfead34a | |||
| f4f8d27f42 | |||
| 76b59e3a79 | |||
| fab9f8e607 | |||
| a8a13c5dc6 | |||
| 16107e0b9a | |||
| d01bad585e | |||
| 36d3afd62f | |||
| 7e1491d69b | |||
| 47ed85ffe6 | |||
| 4b63d771f5 |
@@ -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,41 +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.
|
||||
|
||||
**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.
|
||||
@@ -27,7 +27,7 @@ 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"
|
||||
- name: Test
|
||||
|
||||
@@ -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,7 +49,7 @@ jobs:
|
||||
|
||||
# setup go
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ">=1.21.1"
|
||||
|
||||
|
||||
@@ -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, No Cloud Bullshit!
|
||||
|
||||
## 📸 Screenshots
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
## 🐧 Install from the [AUR](https://aur.archlinux.org/packages/upsnap-bin)
|
||||
|
||||
```bash
|
||||
yay -Sy upsnap-bin
|
||||
```
|
||||
|
||||
## 🚀 Run the binary
|
||||
|
||||
Just download the latest binary from the [release page](https://github.com/seriousm4x/UpSnap/releases) and run it.
|
||||
@@ -78,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
|
||||
@@ -111,6 +117,19 @@ Although UpSnap has user authorisation, it is **not recommended to expose it to
|
||||
|
||||
**Recommended**: If you need access from outside your network, please use a vpn. Wireguard or OpenVPN is your way to go.
|
||||
|
||||
## 🌐 Help translating
|
||||
|
||||
UpSnap is available in the following languages so far:
|
||||
|
||||
- 🇺🇸 **English** (en-US)
|
||||
- 🇩🇪 **German** (de-DE)
|
||||
- 🇪🇸 **Spanish** (es-ES)
|
||||
- 🇫🇷 **French** (fr-FR)
|
||||
- 🇵🇹 **Portuguese** (pt-PT)
|
||||
- 🇨🇳 **Chinese** (zh-CN)
|
||||
|
||||
**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)**
|
||||
|
||||
## 🔧 Help developing
|
||||
|
||||
Fork this branch and clone it.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
release:
|
||||
#draft: true
|
||||
draft: true
|
||||
prerelease: auto
|
||||
before:
|
||||
hooks:
|
||||
@@ -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,13 +92,14 @@ 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)
|
||||
@@ -109,70 +113,93 @@ func RunWakeShutdown(app *pocketbase.PocketBase) {
|
||||
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 {
|
||||
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
|
||||
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)
|
||||
}
|
||||
if err := networking.WakeDevice(dev); err != nil {
|
||||
logger.Error.Println(err)
|
||||
dev.Set("status", "offline")
|
||||
if err := app.Dao().SaveRecord(dev); 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)
|
||||
}
|
||||
} 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)
|
||||
}
|
||||
}(dev)
|
||||
})
|
||||
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 {
|
||||
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
|
||||
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")
|
||||
if err := app.Dao().SaveRecord(dev); 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)
|
||||
}
|
||||
} 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)
|
||||
}
|
||||
}(dev)
|
||||
})
|
||||
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")
|
||||
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()
|
||||
}
|
||||
|
||||
+55
-51
@@ -8,91 +8,95 @@ 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.18.9
|
||||
github.com/pocketbase/pocketbase v0.21.3
|
||||
github.com/prometheus-community/pro-bing v0.3.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
golang.org/x/sys v0.17.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.20 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.43 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.41 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.88 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 // indirect
|
||||
github.com/aws/smithy-go v1.14.2 // indirect
|
||||
github.com/aws/aws-sdk-go v1.50.23 // indirect
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.4 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 // 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.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 // indirect
|
||||
github.com/aws/smithy-go v1.20.1 // 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.2 // indirect
|
||||
github.com/ganigeorgiev/fexpr v0.3.0 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/ganigeorgiev/fexpr v0.4.0 // indirect
|
||||
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // 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/google/wire v0.6.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.1 // 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.19 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.17 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // 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/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.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasttemplate v1.2.2 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
gocloud.dev v0.34.0 // indirect
|
||||
golang.org/x/crypto v0.13.0 // indirect
|
||||
golang.org/x/image v0.12.0 // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.15.0 // indirect
|
||||
golang.org/x/oauth2 v0.12.0 // indirect
|
||||
golang.org/x/sync v0.3.0 // indirect
|
||||
golang.org/x/sys v0.12.0 // indirect
|
||||
golang.org/x/term v0.12.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/api v0.143.0 // indirect
|
||||
gocloud.dev v0.36.0 // indirect
|
||||
golang.org/x/crypto v0.19.0 // indirect
|
||||
golang.org/x/image v0.15.0 // indirect
|
||||
golang.org/x/mod v0.15.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/oauth2 v0.17.0 // indirect
|
||||
golang.org/x/sync v0.6.0 // indirect
|
||||
golang.org/x/term v0.17.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.18.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
|
||||
google.golang.org/api v0.166.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
|
||||
google.golang.org/grpc v1.58.2 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/grpc v1.62.0 // indirect
|
||||
google.golang.org/protobuf v1.32.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
|
||||
modernc.org/ccgo/v3 v3.17.0 // indirect
|
||||
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
|
||||
modernc.org/libc v1.41.0 // 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/sqlite v1.29.1 // indirect
|
||||
modernc.org/strutil v1.2.0 // indirect
|
||||
modernc.org/token v1.1.0 // indirect
|
||||
)
|
||||
|
||||
+217
-114
@@ -1,14 +1,14 @@
|
||||
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 v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y=
|
||||
cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic=
|
||||
cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
|
||||
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
|
||||
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/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI=
|
||||
cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8=
|
||||
cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w=
|
||||
cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
|
||||
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 +17,90 @@ 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.20 h1:U/wLZEwqVB6o2XlcJ7um8kczx+A1X2MgO2y4wdKDQTs=
|
||||
github.com/aws/aws-sdk-go v1.45.20/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc=
|
||||
github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.43 h1:IgdUtTRvUDC6eiJBqU6vh7bHFNAEBjQ8S+qJ7zVhDOs=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.18.43/go.mod h1:NiFev8qlgg8MPzw3fO/EwzMZeZwlJEKGwfpjRPA9Nvw=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.41 h1:dgbKq1tamtboYAKSXWbqL0lKO9rmEzEhbZFh9JQW/Bg=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.13.41/go.mod h1:cc3Fn7DkKbJalPtQnudHGZZ8ml9+hwtbc1CJONsYYqk=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.88 h1:AxcMcV1uTY15jysvTiXC6Mgpb5nU1rnqH0PmgJ7ig80=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.88/go.mod h1:C6Kvpm4g92So11JEAHMK0trT6EEEe5g5uG5JrneR6zQ=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.0 h1:vuGK1vHNP9zx0PfOrtPumbwR2af0ATQ1Z2H6p75AgRQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.15.0/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.0 h1:pyvfUqkNLMipdKNAtu7OVbRxUrR2BMaKccIPpk/Hkak=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.23.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU=
|
||||
github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ=
|
||||
github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
|
||||
github.com/aws/aws-sdk-go v1.50.5 h1:H2Aadcgwr7a2aqS6ZwcE+l1mA6ZrTseYCvjw2QLmxIA=
|
||||
github.com/aws/aws-sdk-go v1.50.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go v1.50.23 h1:BB99ohyCmq6O7m5RvjN2yqTt57snL8OhDvfxEvM6ihs=
|
||||
github.com/aws/aws-sdk-go v1.50.23/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU=
|
||||
github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.1 h1:P7hU6A5qEdmajGwvae/zDkOq+ULLC9tQBTwqqiwFGpI=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.1/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 h1:gTK2uhtAPtFcdRRJilZPx8uJLL2J85xK11nKtWL0wfU=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.2 h1:XnMKB9JRjfnxg9ZkUic4MiapnWJISWRo8HVM+7nx9qQ=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.2/go.mod h1:z/XIktFoVIKNEqX/811vx4eHetrC3tAkgJKL1ZY/KM4=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.2 h1:tCZXWtH0HiIEZ50NJ7/QEaXmuzEd36L+2JUiZkp2nsc=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.2/go.mod h1:7Zo+D6q4auSIo3p4EItuTKTk7J+RqjASISZqLvmUgpc=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1 h1:lk1ZZFbdb24qpOwVC1AwYNrswUjAxeyey6kFBVANudQ=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.1/go.mod h1:/xJ6x1NehNGCX4tvGzzj2bq5TBOT/Yxq+qbL9Jpx2Vk=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15 h1:2MUXyGW6dVaQz6aqycpbdLIH1NMcUI6kW6vQ0RabGYg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15/go.mod h1:aHbhbR6WEQgHAiRj41EQ2W47yOYwNtIkWTXmcAtYqj8=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.4 h1:yuhSpqtahkrC8kRCU5v4gEaTDy/ccTIPIkufIRF7YTk=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.4/go.mod h1:q3SxgP2WD9YRLCybtyse8EgO3vKKWVmxlTmBNeRXPyk=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 h1:evvi7FbTAoFxdP/mixmP7LIYzQWAmzBcwNB/es9XPNc=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1/go.mod h1:rH61DT6FDdikhPghymripNUCsf+uVF4Cnk4c4DBKH64=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 h1:RAnaIrbxPtlXNVI/OIlh1sidTQ3e1qM6LRjs7N0bE0I=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1/go.mod h1:nbgAGkH5lk0RZRMh6A4K/oG6Xj11eC/1CyDow+DUAFI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
|
||||
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.2.10 h1:5oE2WzJE56/mVveuDZPJESKlg/00AaS2pY2QZcnxg4M=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10/go.mod h1:FHbKWQtRBYUz4vO5WBWjzMD2by126ny5y/1EoaWoLfI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1 h1:rtYJd3w6IWCTVS8vmMaiXjW198noh2PBm5CiXyJea9o=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.1/go.mod h1:zvXu+CTlib30LUy4LTNFc6HTZ/K6zCae5YIHTdX9wIo=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 h1:L0ai8WICYHozIKK+OtPzVJBugL7culcuM4E4JOpIEm8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10/go.mod h1:byqfyxJBshFk0fF9YmK0M0ugIO8OWjzH2T3bPG4eGuA=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1 h1:5Wxh862HkXL9CbQ83BIkWKLIgQapGeuh5zG2G9OZtQk=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.1/go.mod h1:V7GLA01pNUxMCYSQsibdVrqUrNIYIT/9lCOyR8ExNvQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1 h1:cVP8mng1RjDyI3JN/AXFCn5FHNlsBaBH0/MBtG1bg0o=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.1/go.mod h1:C8sQjoyAsdfjC7hpy4+S6B92hnFzx0d0UAyHicaOTIE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1 h1:OYmmIcyw19f7x0qLBLQ3XsrCZSSyLhxd9GXng5evsN4=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.1/go.mod h1:s5rqdn74Vdg10k61Pwf4ZHEApOSD6CKRe6qpeHDq32I=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 h1:5XNlsBsEvBZBMO6p82y+sqpWg8j5aBCe+5C2GBFgqBQ=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3 h1:Cv/HH7sLzEdJMYQi4MCNHxZeyubQNOOIdVc0VU0lo3Q=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.3/go.mod h1:lTW7O4iMAnO2o7H3XJTvqaWFZCH6zIPs+eP7RdG/yp0=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 h1:eajuO3nykDPdYicLlP3AGgOyVN3MOlFmZv7WGTuJPow=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.18.7/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.19.2 h1:pnj8llQoBAHD4UmbM8UM5GdfycFJKMhgPSeaOyRaZ34=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.19.2/go.mod h1:x6/tCd1o/AOKQR+iYnjrzhJxD+w0xRN34asGPaSV7ew=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 h1:QPMJf+Jw8E1l7zqhZmMlFw6w1NmfkfiSK8mS4zOx3BA=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2 h1:L4yhKxW6HbTSQ08OsvPJuaspaLE40qMgprgXUNFUiMg=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.2/go.mod h1:lZB123q0SVQ3dfIbEOcGzhQHrwVBcHVReNS9tm20oU4=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.27.2 h1:Dr+7r/p20XpN+1U5tVNZfA2bLq0kQ9IjVBM0iAyMMLg=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.27.2/go.mod h1:ozhhG9/NB5c9jcmhGq6tX9dpp21LYdmRWRQVppASim4=
|
||||
github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM=
|
||||
github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
|
||||
github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw=
|
||||
github.com/aws/smithy-go v1.20.1/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.3/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,19 +116,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.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
||||
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.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
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.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.4.0 h1:ojitI+VMNZX/odeNL1x3RzTTE8qAIVvnSSYPNAnQFDI=
|
||||
github.com/ganigeorgiev/fexpr v0.4.0/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/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=
|
||||
@@ -119,29 +167,35 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
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-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/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/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ=
|
||||
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
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/subcommands v1.2.0/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/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.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/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.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
|
||||
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
|
||||
github.com/googleapis/gax-go/v2 v2.12.1 h1:9F8GV9r9ztXyAi00gsMQHNoF51xPZm8uj1dpYt2ZETM=
|
||||
github.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc=
|
||||
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=
|
||||
@@ -166,10 +220,12 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/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-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.20 h1:BAZ50Ns0OFBNxdAqFhbZqdPcht1Xlb16pDCqkq1spr0=
|
||||
github.com/mattn/go-sqlite3 v1.14.20/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
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=
|
||||
@@ -185,13 +241,14 @@ github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a/go.mod h1:XX6nvyQpGc8
|
||||
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.18.9 h1:1i0Lg/vlXJe7DGgHqwIRGBxkpGgZ+0z9m3HNVumb/FM=
|
||||
github.com/pocketbase/pocketbase v0.18.9/go.mod h1:uXjdxN7w0gpVISqbFvX9xXhg9YhRoQ4hYlKEe27yTJ8=
|
||||
github.com/pocketbase/pocketbase v0.21.3 h1:pXNXYi1Ff/zt47DOASYbD6XCOYlqBqJVTgCWPHCQ++s=
|
||||
github.com/pocketbase/pocketbase v0.21.3/go.mod h1:V3/y5RJFddyN0I+/cmMboKq5Tv3UHpTuM+R8/Qo39OU=
|
||||
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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
@@ -202,10 +259,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.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||
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=
|
||||
@@ -225,24 +282,40 @@ 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.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw=
|
||||
go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y=
|
||||
go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI=
|
||||
go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg=
|
||||
go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY=
|
||||
go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0=
|
||||
go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo=
|
||||
gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus=
|
||||
gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg=
|
||||
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.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
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.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
|
||||
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
|
||||
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
|
||||
golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
|
||||
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.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
|
||||
golang.org/x/mod v0.15.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=
|
||||
@@ -255,21 +328,27 @@ 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.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
|
||||
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
|
||||
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ=
|
||||
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=
|
||||
golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
|
||||
golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
|
||||
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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.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=
|
||||
@@ -283,17 +362,22 @@ 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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
|
||||
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
||||
golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
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=
|
||||
@@ -301,10 +385,12 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
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=
|
||||
@@ -314,14 +400,19 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
|
||||
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.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
|
||||
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
|
||||
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-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA=
|
||||
google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk=
|
||||
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.159.0 h1:fVTj+7HHiUYz4JEZCHHoRIeQX7h5FMzrA2RF/DzDdbs=
|
||||
google.golang.org/api v0.159.0/go.mod h1:0mu0TpK33qnydLvWqbImq2b1eQ5FHRSDCBzAxX9ZHyw=
|
||||
google.golang.org/api v0.166.0 h1:6m4NUwrZYhAaVIHZWxaKjw1L1vNAjtMwORmKRyEEo24=
|
||||
google.golang.org/api v0.166.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA=
|
||||
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=
|
||||
@@ -330,19 +421,23 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ
|
||||
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-20230920204549-e6e6cdab5c13 h1:vlzZttNJGVqTsRFU9AmdnrcO1Znh8Ew9kCD//yjigk0=
|
||||
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY=
|
||||
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg=
|
||||
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
||||
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.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
|
||||
google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0=
|
||||
google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
|
||||
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
|
||||
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
|
||||
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=
|
||||
@@ -354,8 +449,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
|
||||
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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
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=
|
||||
@@ -371,20 +466,28 @@ 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/ccgo/v3 v3.17.0 h1:o3OmOqx4/OFnl4Vm3G8Bgmqxnvxnh0nbxeT5p/dWChA=
|
||||
modernc.org/ccgo/v3 v3.17.0/go.mod h1:Sg3fwVpmLvCUTaqEUjiBDAvshIaKDB0RXaf+zgqFu8I=
|
||||
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
|
||||
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
|
||||
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
|
||||
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
|
||||
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/libc v1.40.7 h1:oeLS0G067ZqUu+v143Dqad0btMfKmNS7SuOsnkq0Ysg=
|
||||
modernc.org/libc v1.40.7/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
|
||||
modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk=
|
||||
modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY=
|
||||
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/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/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
|
||||
modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
|
||||
modernc.org/sqlite v1.29.1 h1:19GY2qvWB4VPw0HppFlZCPAbmxFU41r+qjKZQdQ1ryA=
|
||||
modernc.org/sqlite v1.29.1/go.mod h1:hG41jCYxOAOoO6BRK66AdRlmOcDzXf7qnwlwjUIOqa0=
|
||||
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=
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package networking
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
@@ -12,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func ShutdownDevice(device *models.Record) error {
|
||||
logger.Info.Println("shutdown triggered for", device.GetString("name"))
|
||||
logger.Info.Println("Shutdown triggered for", device.GetString("name"))
|
||||
shutdown_cmd := device.GetString("shutdown_cmd")
|
||||
if shutdown_cmd == "" {
|
||||
return fmt.Errorf("%s: no shutdown_cmd definded", device.GetString("name"))
|
||||
@@ -28,24 +29,50 @@ func ShutdownDevice(device *models.Record) error {
|
||||
shell_arg = "-c"
|
||||
}
|
||||
|
||||
cmd := exec.Command(shell, shell_arg, shutdown_cmd)
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(ctx, shell, shell_arg, shutdown_cmd)
|
||||
SetProcessAttributes(cmd)
|
||||
|
||||
var stderr bytes.Buffer
|
||||
cmd.Stderr = &stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errorf("%s", stderr.String())
|
||||
|
||||
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 {
|
||||
time.Sleep(1 * time.Second)
|
||||
isOnline := PingDevice(device)
|
||||
if !isOnline {
|
||||
return nil
|
||||
}
|
||||
if time.Since(start) >= 2*time.Minute {
|
||||
break
|
||||
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 offline 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())
|
||||
}
|
||||
}
|
||||
}
|
||||
return fmt.Errorf(device.GetString("name"), "not offline after 2 min")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package networking
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/seriousm4x/upsnap/logger"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Set platform specifiy custom process attributes
|
||||
func SetProcessAttributes(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &unix.SysProcAttr{Setpgid: true}
|
||||
}
|
||||
|
||||
// Kills child processes on Linux. Windows doesn't provide a direct way to kill child processes, so we kill just the main process.
|
||||
func KillProcess(process *os.Process) error {
|
||||
logger.Warning.Println("Your shutdown cmd didn't finish in 2 minutes. It will be killed.")
|
||||
pgid, err := unix.Getpgid(process.Pid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = unix.Kill(-pgid, unix.SIGTERM)
|
||||
if err != nil {
|
||||
return unix.Kill(-pgid, unix.SIGKILL)
|
||||
}
|
||||
|
||||
_, err = process.Wait()
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package networking
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// Set platform specifiy custom process attributes
|
||||
func SetProcessAttributes(cmd *exec.Cmd) {}
|
||||
|
||||
// Kills child processes on Linux. Windows doesn't provide a direct way to kill child processes, so we kill just the main process.
|
||||
func KillProcess(process *os.Process) error {
|
||||
return windows.GenerateConsoleCtrlEvent(windows.CTRL_BREAK_EVENT, uint32(process.Pid))
|
||||
}
|
||||
@@ -16,7 +16,7 @@ type SolResponse struct {
|
||||
}
|
||||
|
||||
func SleepDevice(device *models.Record) (SolResponse, error) {
|
||||
logger.Info.Println("sleep triggered for", device.GetString("name"))
|
||||
logger.Info.Println("Sleep triggered for", device.GetString("name"))
|
||||
|
||||
var solResp SolResponse
|
||||
var url string
|
||||
|
||||
+80
-15
@@ -1,7 +1,11 @@
|
||||
package networking
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/pocketbase/pocketbase/models"
|
||||
@@ -9,23 +13,84 @@ import (
|
||||
)
|
||||
|
||||
func WakeDevice(device *models.Record) error {
|
||||
logger.Info.Println("wake triggered for", device.GetString("name"))
|
||||
err := SendMagicPacket(device)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
logger.Info.Println("Wake triggered for", device.GetString("name"))
|
||||
|
||||
// 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"
|
||||
@@ -128,7 +129,8 @@ type Nmaprun struct {
|
||||
|
||||
func HandlerScan(c echo.Context) error {
|
||||
// check if nmap installed
|
||||
if _, err := exec.LookPath("nmap"); err != nil {
|
||||
nmap, err := exec.LookPath("nmap")
|
||||
if err != nil {
|
||||
return apis.NewBadRequestError(err.Error(), nil)
|
||||
}
|
||||
|
||||
@@ -145,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
|
||||
|
||||
+23
-9
@@ -122,23 +122,37 @@ 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
|
||||
newRecord := e.Model.(*models.Record)
|
||||
newWakeCron := newRecord.GetString("wake_cron")
|
||||
newWakeCronEnabled := newRecord.GetBool("wake_cron_enabled")
|
||||
newShutdownCron := newRecord.GetString("shutdown_cron")
|
||||
newShutdownCronEnabled := newRecord.GetBool("shutdown_cron_enabled")
|
||||
|
||||
oldRecord := newRecord.OriginalCopy()
|
||||
oldWakeCron := oldRecord.GetString("wake_cron")
|
||||
oldWakeCronEnabled := oldRecord.GetBool("wake_cron_enabled")
|
||||
oldShutdownCron := oldRecord.GetString("shutdown_cron")
|
||||
oldShutdownCronEnabled := oldRecord.GetBool("shutdown_cron_enabled")
|
||||
|
||||
if newWakeCron != oldWakeCron ||
|
||||
newWakeCronEnabled != oldWakeCronEnabled ||
|
||||
newShutdownCron != oldShutdownCron ||
|
||||
newShutdownCronEnabled != oldShutdownCronEnabled {
|
||||
cronjobs.SetWakeShutdownJobs(App)
|
||||
}
|
||||
go cronjobs.RunWakeShutdown(App)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
files:
|
||||
- source: /frontend/src/lib/i18n/*/index.ts
|
||||
- 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:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"adapter": "svelte",
|
||||
"$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json",
|
||||
"baseLocale": "en-US",
|
||||
"outputPath": "./src/lib/i18n/"
|
||||
}
|
||||
|
||||
+21
-21
@@ -16,24 +16,24 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-static": "^2.0.3",
|
||||
"@sveltejs/kit": "^1.25.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"daisyui": "^3.8.3",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-svelte": "^2.33.2",
|
||||
"husky": "^8.0.3",
|
||||
"postcss": "^8.4.31",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"svelte": "^4.2.1",
|
||||
"svelte-check": "^3.5.2",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"@sveltejs/kit": "^1.30.4",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||
"@typescript-eslint/parser": "^7.0.2",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"daisyui": "^4.7.2",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"husky": "^9.0.11",
|
||||
"postcss": "^8.4.35",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-svelte": "^3.2.1",
|
||||
"svelte": "^4.2.11",
|
||||
"svelte-check": "^3.6.4",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.4.9"
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^4.5.2"
|
||||
},
|
||||
"type": "module",
|
||||
"lint-staged": {
|
||||
@@ -41,11 +41,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.1",
|
||||
"date-fns": "^3.3.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pocketbase": "^0.18.0",
|
||||
"svelte-fa": "^3.0.4",
|
||||
"pocketbase": "^0.21.1",
|
||||
"svelte-fa": "^4.0.2",
|
||||
"svelte-french-toast": "^1.2.0",
|
||||
"theme-change": "^2.5.0",
|
||||
"typesafe-i18n": "^5.26.2"
|
||||
|
||||
Generated
+912
-636
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,12 @@
|
||||
} 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 { pt } from 'date-fns/locale/pt';
|
||||
import { zhCN } from 'date-fns/locale/zh-CN';
|
||||
import Fa from 'svelte-fa';
|
||||
import toast from 'svelte-french-toast';
|
||||
import { scale } from 'svelte/transition';
|
||||
@@ -63,14 +69,32 @@
|
||||
$: if ($locale !== undefined) {
|
||||
(async () => {
|
||||
switch ($locale) {
|
||||
case 'de' || 'de-DE':
|
||||
dateFnsLocale = (await import('date-fns/locale/de/index.js')).default;
|
||||
case 'de':
|
||||
case 'de-DE':
|
||||
dateFnsLocale = de;
|
||||
break;
|
||||
case 'en' || 'en-US':
|
||||
dateFnsLocale = (await import('date-fns/locale/en-US/index.js')).default;
|
||||
case 'en':
|
||||
case 'en-US':
|
||||
dateFnsLocale = enUS;
|
||||
break;
|
||||
case 'pt' || 'pt-PT':
|
||||
dateFnsLocale = (await import('date-fns/locale/pt/index.js')).default;
|
||||
case 'fr':
|
||||
case 'fr-FR':
|
||||
dateFnsLocale = fr;
|
||||
break;
|
||||
case 'es':
|
||||
case 'es-ES':
|
||||
dateFnsLocale = es;
|
||||
break;
|
||||
case 'pt':
|
||||
case 'pt-PT':
|
||||
dateFnsLocale = pt;
|
||||
break;
|
||||
case 'zh':
|
||||
case 'zh-CN':
|
||||
dateFnsLocale = zhCN;
|
||||
break;
|
||||
default:
|
||||
dateFnsLocale = enUS;
|
||||
break;
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -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));
|
||||
@@ -86,9 +88,17 @@
|
||||
|
||||
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>
|
||||
@@ -122,15 +132,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 +159,36 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<dialog class="modal" bind:this={modalWake}>
|
||||
<div class="modal-box">
|
||||
<h3 class="font-bold text-lg">
|
||||
{$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="font-bold text-lg">
|
||||
{$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;
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
<input
|
||||
id="device-netmask"
|
||||
type="text"
|
||||
placeholder="255.255.255.0"
|
||||
placeholder="255.255.255.255"
|
||||
class="input w-full max-w-xs"
|
||||
bind:value={device.netmask}
|
||||
required
|
||||
@@ -276,6 +276,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<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 w-full max-w-xs mb-2"
|
||||
bind:value={device.ping_cmd}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card w-full bg-base-300 shadow-xl mt-6">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{$LL.device.wake()}</h2>
|
||||
@@ -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 w-full max-w-xs mb-2"
|
||||
bind:value={device.wake_cmd}
|
||||
/>
|
||||
</div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<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">
|
||||
@@ -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 text-sm min-w-0 max-w-fit">
|
||||
<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 text-sm min-w-0 max-w-fit">
|
||||
<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
|
||||
@@ -460,6 +506,19 @@
|
||||
bind:value={device.shutdown_cmd}
|
||||
/>
|
||||
</div>
|
||||
<div class="form-control flex flex-row flex-wrap gap-4">
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<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>
|
||||
@@ -569,7 +628,7 @@
|
||||
<h3 class="font-bold text-lg">{$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.cancle()}</button>
|
||||
<button class="btn">{$LL.buttons.cancel()}</button>
|
||||
<button class="btn btn-error" on:click={() => deleteDevice()}
|
||||
>{$LL.buttons.delete()}</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,6 +60,18 @@
|
||||
/>
|
||||
</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"
|
||||
|
||||
@@ -48,7 +48,10 @@
|
||||
'lemonade',
|
||||
'night',
|
||||
'coffee',
|
||||
'winter'
|
||||
'winter',
|
||||
'dim',
|
||||
'nord',
|
||||
'sunset'
|
||||
];
|
||||
let activeTheme: string | null = '';
|
||||
let avatar = $pocketbase.authStore.model?.avatar;
|
||||
@@ -74,7 +77,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 +99,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 mt-3 z-[1] p-2 gap-1 shadow bg-base-300 rounded-box w-max"
|
||||
>
|
||||
{#if $settingsPub?.website_title}
|
||||
<div class="menu-title">
|
||||
@@ -122,6 +129,51 @@
|
||||
>
|
||||
</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="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 rounded w-full cursor-pointer font-sans"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-ghost normal-case text-xl px-2" href="/">
|
||||
@@ -135,7 +187,7 @@
|
||||
/>
|
||||
</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}
|
||||
@@ -158,43 +210,43 @@
|
||||
</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 normal-case btn-ghost">
|
||||
<Fa icon={faSwatchbook} />
|
||||
<span class="font-normal">{$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 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="bg-base-100 text-base-content w-full cursor-pointer font-sans"
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
{/each}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
<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 input-bordered join-item w-full"
|
||||
type="text"
|
||||
placeholder="192.168.1.0/24"
|
||||
bind:value={scanRange}
|
||||
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
@@ -160,8 +170,9 @@ const de = {
|
||||
delete: 'Löschen',
|
||||
change: 'Ändern',
|
||||
reset: 'Zurücksetzen',
|
||||
cancle: 'Abbrechen',
|
||||
add: 'Hinzufügen'
|
||||
cancel: 'Abbrechen',
|
||||
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',
|
||||
@@ -156,8 +166,9 @@ const en = {
|
||||
delete: 'Delete',
|
||||
change: 'Change',
|
||||
reset: 'Reset',
|
||||
cancle: 'Cancle',
|
||||
add: 'Add'
|
||||
cancel: 'Cancel',
|
||||
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;
|
||||
@@ -0,0 +1,8 @@
|
||||
import fr from '../fr';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const fr_FR = {
|
||||
...(fr as unknown as Translation)
|
||||
} satisfies Translation;
|
||||
|
||||
export default fr_FR;
|
||||
@@ -0,0 +1,227 @@
|
||||
import en from '../en';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const fr = {
|
||||
...(en as unknown as Translation),
|
||||
home: {
|
||||
page_title: 'Accueil',
|
||||
order_groups: 'Groupes',
|
||||
order_name: 'Nom',
|
||||
order_ip: 'IP',
|
||||
order_tooltip: 'Tri',
|
||||
no_devices: 'Aucun appareil ici.',
|
||||
add_first_device: 'Ajoutez votre premier appareil',
|
||||
grant_permissions:
|
||||
'Veuillez demander à votre administrateur les permissions aux appareils existants ou créez-en de nouveaux.'
|
||||
},
|
||||
account: {
|
||||
page_title: 'Compte',
|
||||
account_type_admin: 'Administrateur',
|
||||
account_type_user: 'Utilisateur',
|
||||
avatar_title: 'Avatar',
|
||||
language_title: 'Langue',
|
||||
language_option_auto: 'Automatique',
|
||||
change_password_title: 'Modification du mot de passe',
|
||||
change_password_body: 'Après la modification du mot de passe, vous devrez vous reconnecter.',
|
||||
change_password_label: 'Ancien mot de passe',
|
||||
change_password_new: 'Nouveau mot de passe',
|
||||
change_password_confirm: 'Confirmation du mot de passe'
|
||||
},
|
||||
device: {
|
||||
page_title: 'Nouvel appareil',
|
||||
tabs: ['Manuel', 'Analyse du réseau'],
|
||||
card_btn_more: 'Plus',
|
||||
card_btn_more_edit: 'Modifier',
|
||||
card_btn_more_sleep: 'Veille',
|
||||
card_btn_more_reboot: 'Redémarrer',
|
||||
card_tooltip_wake_cron: 'Réveil avec cron',
|
||||
card_tooltip_shutdown_cron: 'Arrêt avec cron',
|
||||
card_tooltip_wake_password: 'Mot de passe de réveil',
|
||||
card_tooltip_last_status_change: 'Dernier changement de statut',
|
||||
card_password: 'Mot de passe',
|
||||
card_nic_tooltip_pending: 'En attente',
|
||||
card_nic_tooltip_shutdown: 'Éteindre',
|
||||
card_nic_tooltip_shutdown_no_cmd: "Aucune commande d'arrêt n'est définie",
|
||||
card_nic_tooltip_shutdown_no_permission:
|
||||
"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",
|
||||
general_ip: 'IP',
|
||||
general_mac: 'Mac',
|
||||
general_netmask: 'Masque réseau',
|
||||
general_required_field: 'champ requis',
|
||||
ports: 'Ports',
|
||||
ports_desc: 'UpSnap peut aussi vérifier si certains ports sont ouverts.',
|
||||
ports_add_new: 'Ajouter un nouveau port',
|
||||
ports_name: 'Nom',
|
||||
ports_number: 'Numéro',
|
||||
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',
|
||||
sol_desc1:
|
||||
'Vous pouvez mettre les ordinateurs en veille à l\'aide de l\'outil <a class="link" href="https://github.com/SR-G/sleep-on-lan" target="_blank">Sleep-On-LAN</a>. Sleep-On-LAN (SOL) est un outil/daemon externe qui fonctionne sur les PC que vous souhaitez mettre en veille, fournissant un point de terminaison REST. Pour obtenir des instructions sur la configuration de Sleep-On-LAN, veuillez vous référer à la section <a href="https://github.com/SR-G/sleep-on-lan#usage" class="link" target="_blank">Usage</a>.',
|
||||
sol_desc2:
|
||||
"SOL est configuré pour envoyer des requêtes avec le protocole HTTP au lieu d'UDP pour activer l'autorisation et faire des requêtes plus fiables.",
|
||||
sol_desc3:
|
||||
'Par conséquent, veuillez vous assurer que vous incluez <span class="badge">HTTP:<VOTREPORT></span> dans la section <span class="badge">Listeners</span> de la <a href="https://github.com/SR-G/sleep-on-lan#configuration" class="link" target="_blank">configuration SOL</a>.',
|
||||
sol_enable: 'Activer Sleep-On-LAN',
|
||||
sol_port: 'Port SOL',
|
||||
sol_authorization: 'Autorisation',
|
||||
sol_user: 'Utilisateur SOL',
|
||||
sol_password: 'Mot de passe SOL',
|
||||
shutdown: 'Arrêt',
|
||||
shutdown_desc:
|
||||
'Cette <strong>commande shell</strong> va s\'exécuter au sein de votre conteneur (si vous utilisez Docker) ou sur votre hôte (si vous utilisez l\'exécutable). Pour vérifier que cela fonctionne, vous pouvez d\'abord exécuter la commande à l\'intérieur du conteneur ou sur le shell de l\'hôte. Les commandes courantes sont <span class="badge">net rpc</span> pour Windows, <span class="badge">sshpass</span> pour Linux ou <span class="badge">curl</span> en général pour faire des requêtes web.',
|
||||
shutdown_examples: 'Exemples :',
|
||||
shutdown_examples_windows: 'Arrêter une machine Windows distante :',
|
||||
shutdown_examples_linux: 'Arrêter une machine Linux distante :',
|
||||
shutdown_cmd: "Commande d'arrêt",
|
||||
shutdown_cron_desc:
|
||||
"Exactement comme configurer cron pour réveiller l'appareil, vous pouvez aussi planifier un job cron pour arrêter cet appareil.",
|
||||
shutdown_cron: 'Arrêt avec cron',
|
||||
shutdown_cron_enable: "Activer l'arrêt avec cron",
|
||||
password: 'Mot de passe',
|
||||
password_desc:
|
||||
'Certaines cartes réseau ont l\'option pour définir un mot de passe pour les paquets magiques, aussi appelée <span class="badge">SecureON</span>. Le mot de passe ne peut être que de 0, 4 ou 6 caractères.',
|
||||
groups: 'Groupes',
|
||||
groups_desc:
|
||||
'Vous pouvez ajouter des appareils à un groupe pour pouvoir les trier sur le tableau de bord.',
|
||||
groups_placeholder: 'par ex. « Bureau »', // I had to strink because the original English text in French gives a too long text
|
||||
network_scan_range_saved: "Plage d'analyse sauvegardée",
|
||||
network_scan_desc:
|
||||
"Analyser automatiquement votre réseau pour trouver des appareils. Pour que cela fonctionne, vous devez exécuter UpSnap en tant que root/administrateur et avoir nmap installé et disponible dans votre $PATH (pour les utilisateurs Docker, cela est déjà le cas et vous n'avez besoin de rien faire). L'analyse peut prendre quelques secondes.",
|
||||
network_scan_ip_range: 'Plage IP',
|
||||
network_scan_no_range: "Aucune plage d'analyse",
|
||||
network_scan_unsaved_changes: 'Modifications non sauvegardées',
|
||||
network_scan_running: 'Analyse en cours',
|
||||
network_scan: 'Analyser',
|
||||
network_scan_ip: 'IP :',
|
||||
network_scan_mac: 'Mac :',
|
||||
network_scan_mac_vendor: "Fabricant ayant l'adresse Mac :",
|
||||
network_scan_netmask: 'Masque réseau :',
|
||||
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 »',
|
||||
require_confirmation: 'Demande de confirmation'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Bienvenue',
|
||||
email_label: "Courriel ou nom d'utilisateur :",
|
||||
password_label: 'Mot de passe :',
|
||||
btn_more: 'Plus',
|
||||
menu_title_auth_providers: "Autres fournisseurs d'authentification",
|
||||
btn_login: 'Connexion'
|
||||
},
|
||||
settings: {
|
||||
page_title: 'Paramètres',
|
||||
ping_interval_title: 'Intervalle de ping',
|
||||
ping_interval_desc1:
|
||||
'Définit l\'intervalle dans lequel les appareils reçoivent une requête ping. Laissez vide pour utiliser la valeur par défaut de <span class="badge">@every 3s</span>.',
|
||||
ping_interval_desc2:
|
||||
'Pour écrire une syntaxe correcte pour l\'utilitaire cron, consultez <a class="link" href="https://fr.wikipedia.org/wiki/Cron" target="_blank">Wikipédia</a> ou référez-vous à la <a class="link" href="https://pkg.go.dev/github.com/robfig/cron/v3" target="_blank">documentation du paquet</a>.',
|
||||
lazy_ping_title: 'Ping fainéant',
|
||||
lazy_ping_desc:
|
||||
"Lorsque le mode ping fainéant est activé, UpSnap ne va effectuer des requêtes de ping sur les appareils que lorsqu'un utilisateur actif visite le site. Si vous désactivez cette fonction, UpSnap exécutera toujours ces requêtes.",
|
||||
lazy_ping_enable: 'Activer',
|
||||
website_title_title: 'Titre du site',
|
||||
website_title_desc:
|
||||
"Définit le titre du site ainsi que le texte affiché dans l'onglet du navigateur.",
|
||||
icon_title: 'Icône',
|
||||
icon_desc: 'Définit un favicon personnalisé. Les types de fichier compatibles sont :',
|
||||
upsnap_version: 'Version de UpSnap '
|
||||
},
|
||||
users: {
|
||||
page_title: 'Utilisateurs',
|
||||
allow_create_devices:
|
||||
"Autoriser {username} à créer de nouveaux appareils et à modifier les groupes d'appareils",
|
||||
device_permissions: 'Permissions des appareils',
|
||||
create_new_device: 'Créer un nouvel appareil',
|
||||
read: 'Lire',
|
||||
update: 'Mettre à jour',
|
||||
delete: 'Supprimer',
|
||||
power: 'Allumer',
|
||||
toggle: 'Inverser',
|
||||
confirm_delete_title: 'Confirmation de la suppression',
|
||||
confirm_delete_desc: 'Voulez-vous vraiment supprimer {username} ?',
|
||||
create_new_user: "Création d'un nouvel utilisateur",
|
||||
username: "Nom d'utilisateur",
|
||||
password: 'Mot de passe',
|
||||
password_confirm: 'Confirmation du mot de passe',
|
||||
required_field: 'champ requis'
|
||||
},
|
||||
buttons: {
|
||||
save: 'Sauvegarder',
|
||||
delete: 'Supprimer',
|
||||
change: 'Modifier',
|
||||
reset: 'Réinitialiser',
|
||||
cancel: 'Annuler',
|
||||
add: 'Ajouter',
|
||||
confirm: 'Confirmer'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Bienvenue sur UpSnap 🥳',
|
||||
step1_setup_desc: "Veuillez suivre les étapes suivantes pour terminer l'installation.",
|
||||
step1_setup_btn_next: 'Suivant',
|
||||
step2_page_title: 'Création du compte administrateur',
|
||||
step2_label_email: 'Courriel :',
|
||||
step2_label_password: 'Mot de passe :',
|
||||
step2_label_min_chars: 'min. 10 caractères',
|
||||
step2_label_password_confirm: 'Confirmation du mot de passe :',
|
||||
step2_btn_create: 'Créer',
|
||||
step3_page_title: 'Vous êtes tout bon ! 🎉',
|
||||
step3_page_desc: 'Allez-y et ajoutez quelques appareils à votre tableau de bord.',
|
||||
step3_btn_done: "C'est parti !",
|
||||
not_expected_title: 'Je ne vous attendais pas ici ! 🧐',
|
||||
not_expected_desc: "Vous avez déjà terminé l'installation ! Il n'y a plus rien à faire.",
|
||||
not_expected_back: 'Ramène-moi',
|
||||
progress_step1: 'Bienvenue',
|
||||
progress_step2: 'Créer un compte',
|
||||
progress_step3: 'Fin'
|
||||
},
|
||||
toasts: {
|
||||
admin_saved: 'Administrateur sauvegardé',
|
||||
user_saved: 'Utilisateur sauvegardé',
|
||||
user_created: 'Utilisateur {username} créé',
|
||||
user_deleted: 'Utilisateur {username} supprimé',
|
||||
settings_saved: 'Paramètres sauvegardés',
|
||||
password_changed: 'Mot de passe modifié. Veuillez vous reconnecter.',
|
||||
passwords_missmatch: 'Les mots de passe ne correspondent pas',
|
||||
permissions_created: 'Permissions pour {username} créées',
|
||||
permissions_deleted: 'Permissions pour {username} supprimées',
|
||||
permissions_updated: 'Permissions pour {username} mises à jour',
|
||||
permissions_updated_personal: 'Vos permissions ont été mises à jour',
|
||||
no_permission: "Vous n'avez pas la permission de visiter {url}",
|
||||
device_created: '{device} créé',
|
||||
devices_created_multiple: '{count|int} appareils créés',
|
||||
device_updated: '{device} mis à jour',
|
||||
device_deleted: '{device} supprimé',
|
||||
group_created: 'Groupe {group} créé',
|
||||
group_deleted: 'Groupe {group} supprimé'
|
||||
},
|
||||
navbar: {
|
||||
theme: 'Thème',
|
||||
new: 'Nouveau',
|
||||
edit_account: 'Modifier le compte',
|
||||
logout: 'Déconnexion'
|
||||
}
|
||||
} satisfies Translation;
|
||||
|
||||
export default fr;
|
||||
@@ -7,9 +7,21 @@ import type {
|
||||
} from 'typesafe-i18n';
|
||||
|
||||
export type BaseTranslation = BaseTranslationType;
|
||||
export type BaseLocale = 'en-US';
|
||||
export type BaseLocale = 'en';
|
||||
|
||||
export type Locales = 'de' | 'de-DE' | 'en' | 'en-US' | 'pt' | 'pt-PT';
|
||||
export type Locales =
|
||||
| 'de'
|
||||
| 'de-DE'
|
||||
| 'en'
|
||||
| 'en-US'
|
||||
| 'es'
|
||||
| 'es-ES'
|
||||
| 'fr'
|
||||
| 'fr-FR'
|
||||
| 'pt'
|
||||
| 'pt-PT'
|
||||
| 'zh'
|
||||
| 'zh-CN';
|
||||
|
||||
export type Translation = RootTranslation;
|
||||
|
||||
@@ -171,6 +183,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
|
||||
*/
|
||||
@@ -227,6 +259,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
|
||||
*/
|
||||
@@ -235,6 +279,10 @@ type RootTranslation = {
|
||||
* You can power this device using a scheduled cron job.
|
||||
*/
|
||||
wake_desc: string;
|
||||
/**
|
||||
* Custom wake command
|
||||
*/
|
||||
wake_cmd: string;
|
||||
/**
|
||||
* Wake cron
|
||||
*/
|
||||
@@ -395,6 +443,10 @@ type RootTranslation = {
|
||||
* Include devices where name is "Unknown"
|
||||
*/
|
||||
network_scan_include_unknown: string;
|
||||
/**
|
||||
* Require Confirmation
|
||||
*/
|
||||
require_confirmation: string;
|
||||
};
|
||||
login: {
|
||||
/**
|
||||
@@ -558,13 +610,17 @@ type RootTranslation = {
|
||||
*/
|
||||
reset: string;
|
||||
/**
|
||||
* Cancle
|
||||
* Cancel
|
||||
*/
|
||||
cancle: string;
|
||||
cancel: string;
|
||||
/**
|
||||
* Add
|
||||
*/
|
||||
add: string;
|
||||
/**
|
||||
* Confirm
|
||||
*/
|
||||
confirm: string;
|
||||
};
|
||||
welcome: {
|
||||
/**
|
||||
@@ -902,6 +958,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
|
||||
*/
|
||||
@@ -958,6 +1030,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
|
||||
*/
|
||||
@@ -966,6 +1050,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
|
||||
*/
|
||||
@@ -1126,6 +1214,10 @@ export type TranslationFunctions = {
|
||||
* Include devices where name is "Unknown"
|
||||
*/
|
||||
network_scan_include_unknown: () => LocalizedString;
|
||||
/**
|
||||
* Require Confirmation
|
||||
*/
|
||||
require_confirmation: () => LocalizedString;
|
||||
};
|
||||
login: {
|
||||
/**
|
||||
@@ -1287,13 +1379,17 @@ export type TranslationFunctions = {
|
||||
*/
|
||||
reset: () => LocalizedString;
|
||||
/**
|
||||
* Cancle
|
||||
* Cancel
|
||||
*/
|
||||
cancle: () => LocalizedString;
|
||||
cancel: () => LocalizedString;
|
||||
/**
|
||||
* Add
|
||||
*/
|
||||
add: () => LocalizedString;
|
||||
/**
|
||||
* Confirm
|
||||
*/
|
||||
confirm: () => LocalizedString;
|
||||
};
|
||||
welcome: {
|
||||
/**
|
||||
|
||||
@@ -10,8 +10,14 @@ 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')
|
||||
'pt-PT': () => import('./pt-PT'),
|
||||
zh: () => import('./zh'),
|
||||
'zh-CN': () => import('./zh-CN')
|
||||
};
|
||||
|
||||
const updateDictionary = (locale: Locales, dictionary: Partial<Translations>): Translations =>
|
||||
|
||||
@@ -9,16 +9,28 @@ 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';
|
||||
|
||||
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
|
||||
'pt-PT': pt_PT,
|
||||
zh,
|
||||
'zh-CN': zh_CN
|
||||
};
|
||||
|
||||
export const loadLocale = (locale: Locales): void => {
|
||||
|
||||
@@ -12,9 +12,22 @@ import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors';
|
||||
import { initExtendDictionary } from 'typesafe-i18n/utils';
|
||||
import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types';
|
||||
|
||||
export const baseLocale: Locales = 'en-US';
|
||||
export const baseLocale: Locales = 'en';
|
||||
|
||||
export const locales: Locales[] = ['de', 'de-DE', 'en', 'en-US', 'pt', 'pt-PT'];
|
||||
export const locales: Locales[] = [
|
||||
'de',
|
||||
'de-DE',
|
||||
'en',
|
||||
'en-US',
|
||||
'es',
|
||||
'es-ES',
|
||||
'fr',
|
||||
'fr-FR',
|
||||
'pt',
|
||||
'pt-PT',
|
||||
'zh',
|
||||
'zh-CN'
|
||||
];
|
||||
|
||||
export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales);
|
||||
|
||||
|
||||
@@ -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',
|
||||
@@ -159,8 +169,9 @@ const pt = {
|
||||
delete: 'Apagar',
|
||||
change: 'Alterar',
|
||||
reset: 'Repor',
|
||||
cancle: 'Cancelar',
|
||||
add: 'Adicionar'
|
||||
cancel: 'Cancelar',
|
||||
add: 'Adicionar',
|
||||
confirm: 'Confirmar'
|
||||
},
|
||||
welcome: {
|
||||
step1_page_title: 'Bem-vindo ao UpSnap 🥳',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import zh from '../zh';
|
||||
import type { Translation } from '../i18n-types';
|
||||
|
||||
const zh_CN = {
|
||||
...(zh as unknown as Translation)
|
||||
} satisfies Translation;
|
||||
|
||||
export default zh_CN;
|
||||
@@ -0,0 +1,215 @@
|
||||
import type { BaseTranslation } from '../i18n-types';
|
||||
|
||||
const zh = {
|
||||
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: '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:
|
||||
'您可以使用自定义 shell 命令来查看设备是否已接通电源。该命令应返回 <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中运行该命令. 通常在 Windows 上使用 <span class="badge">net rpc</span>, Linux上使用 <span class="badge">sshpass</span> 或者针对Web请求使用 <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:
|
||||
'自动扫描网络中的设备. 要实现这一点, 您需要以超级用户/管理员身份运行 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 BaseTranslation;
|
||||
|
||||
export default zh;
|
||||
@@ -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;
|
||||
|
||||
@@ -17,10 +17,16 @@
|
||||
const languageEmojis = {
|
||||
en: '🇺🇸',
|
||||
'en-US': '🇺🇸',
|
||||
fr: '🇫🇷',
|
||||
'fr-FR': '🇫🇷',
|
||||
de: '🇩🇪',
|
||||
'de-DE': '🇩🇪',
|
||||
pt: '🇵🇹',
|
||||
'pt-PT': '🇵🇹'
|
||||
'pt-PT': '🇵🇹',
|
||||
es: '🇪🇸',
|
||||
'es-ES': '🇪🇸',
|
||||
zh: '🇨🇳',
|
||||
'zh-CN': '🇨🇳'
|
||||
};
|
||||
let localStorageLang: Locales | 'auto' = 'auto';
|
||||
let selectedLanguage: Locales | 'auto' = localStorageLang;
|
||||
|
||||
@@ -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,16 +41,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
@@ -114,9 +114,17 @@
|
||||
><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"
|
||||
|
||||
@@ -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) => {
|
||||
@@ -311,7 +312,7 @@
|
||||
<button
|
||||
class="join-item btn btn-error"
|
||||
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"
|
||||
@@ -321,12 +322,12 @@
|
||||
</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>
|
||||
<p class="py-4">{$LL.users.confirm_delete_desc({ username: user.username })}</p>
|
||||
<div class="modal-action">
|
||||
<button class="btn">{$LL.buttons.cancle()}</button>
|
||||
<button class="btn">{$LL.buttons.cancel()}</button>
|
||||
<button class="btn btn-error" on:click={() => deleteUser(user)}
|
||||
>{$LL.buttons.delete()}</button
|
||||
>
|
||||
|
||||
@@ -11,7 +11,7 @@ export default {
|
||||
themes: [
|
||||
{
|
||||
light: {
|
||||
...themes['[data-theme=light]'],
|
||||
...themes['light'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'primary-content': '#ffffff'
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
{
|
||||
dark: {
|
||||
...themes['[data-theme=dark]'],
|
||||
...themes['dark'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'base-300': '#12161b',
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
},
|
||||
{
|
||||
cupcake: {
|
||||
...themes['[data-theme=cupcake]'],
|
||||
...themes['cupcake'],
|
||||
primary: '#55BCD9',
|
||||
secondary: '#D4A35C',
|
||||
'primary-content': '#ffffff'
|
||||
@@ -61,7 +61,10 @@ export default {
|
||||
'lemonade',
|
||||
'night',
|
||||
'coffee',
|
||||
'winter'
|
||||
'winter',
|
||||
'dim',
|
||||
'nord',
|
||||
'sunset'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user