Commit Graph

133 Commits

Author SHA1 Message Date
Buriburizaemon 2ad62df7b3 Merge upstream/master and resolve conflicts 2026-04-16 11:58:30 +08:00
Weblate (bot) 04553ca17f Added translation using Weblate (Galician) (#1168)
Co-authored-by: nlimeres <dynosaurioprogramador@gmail.com>
2026-02-19 14:35:24 +08:00
naiba f9e379bdcc fix(tsdb): update test to match 30s downsample interval for 1d period 2026-02-16 02:23:53 +08:00
naiba 4c1584dd5c feat(tsdb): increase 1d downsample resolution from 5min to 30s 2026-02-16 02:18:57 +08:00
奶爸 e61772e858 feat(v2.0.0): tsdb (#1162)
* feat: tsdb

* fix(ci): remove --parseGoList=false from swag init to fix dependency resolution

* fix(ci): fix swag init directory and temporary remove s390x support due to cgo issues

* fix(ci): fix swag init output directory to cmd/dashboard/docs

* fix(ci): set GOTOOLCHAIN=auto for gosec

* feat: add system storage maintenance for SQLite and TSDB

* shit

* feat: add s390x support and improve service monitoring

* ci: upgrade goreleaser-cross image to v1.25

* ci: add libzstd-dev:s390x for cross-compilation

* ci: build libzstd for s390x from source

* ci: add libzstd_linux_s390x.go for gozstd linking

* ci: use vendor mode for s390x gozstd build

* ci: clone zstd source for s390x build

* refactor(tsdb): rename MaxDiskUsageGB to MinFreeDiskSpaceGB and optimize queries

- Rename config to accurately reflect VictoriaMetrics behavior: minimum free disk space threshold
- Add QueryServiceHistoryByServerID for batch query optimization
- Fix hasStatus to avoid false status counting when only delay data exists
- Fix service aggregation boundary: use successCount*2 >= count
- Fix serviceID parsing with strconv.ParseUint error handling
- Add TagFiltersCacheSize for better query performance

* feat(api): add server metrics endpoint and simplify service history response

- Add /server/:id/metrics API for querying TSDB server metrics
- Simplify getServiceHistory by removing redundant data conversion
- Change AvgDelay type from float32 to float64
- Remove generated swagger docs (to be regenerated)
- Update TSDB query, writer and tests

* chore: 临时禁用不支持前端

* ci: cache zstd build for s390x to speed up CI

* fix(tsdb): fix race conditions, data correctness and optimize performance

- Fix TOCTOU race between IsClosed() and write/query by holding RLock
- Fix delay=0 excluded from stats by using hasDelay flag instead of value > 0
- Fix fmt.Sscanf -> strconv.ParseUint for server_id parsing with error logging
- Fix buffer unbounded growth by flushing inside lock when over maxSize
- Split makeMetricRow into makeServerMetricRow/makeServiceMetricRow
- Extract InitGlobalSettings() from Open() for VictoriaMetrics globals
- Remove redundant instance/GetInstance/SetInstance singleton
- Add error logging for silently skipped block decode errors
- Optimize WriteBatch* to build all rows in single write call
- Optimize downsample to use linear scan instead of map for sorted data
- Optimize query slice reuse across block iterations

* 服务添加DisplayIndex (#1166)

* 服务添加DisplayIndex

* 根据ai建议修改

---------

Co-authored-by: huYang <306061454@qq.com>

* fix(tsdb): restore SQLite fallback and monthly status reload on restart

- Restore ServiceHistory model and SQLite write fallback when TSDB is disabled
- Reload monthlyStatus (30-day) and serviceStatusToday from TSDB/SQLite on startup
- Add SQLite fallback query for /service/:id/history and /server/:id/service
- Remove breaking GET /service/:id endpoint, keep /service/:id/history only
- Add QueryServiceDailyStats to TSDB for per-day aggregation
- Add tests for monthly status and today stats loading from both TSDB and SQLite
- Migrate ServiceHistory table only when TSDB is disabled

* ci: exclude false-positive gosec rules G117, G703, G704

* feat(api): expose tsdb_enabled in setting response

* ci: restore G115 exclusion accidentally dropped in previous commit

* fix: update version numbers for OfficialAdmin and Official templates

* chore: upgrade frontend

* chore: upgrade frontend

---------

Co-authored-by: 胡说丷刂 <34758853+laosan-xx@users.noreply.github.com>
Co-authored-by: huYang <306061454@qq.com>
2026-02-15 13:13:33 +08:00
UUBulb 302d278644 feat(notification): add option to convert metric units in request body (#1156)
* feat(notification): add option to convert metric units in request body

* ignore gosec

* rename fields
2026-01-10 17:29:10 +08:00
Weblate (bot) 6b07370c1b Added translation using Weblate (Ukrainian) (#1128)
Added translation using Weblate (Japanese)

Co-authored-by: Zilong Liu <2821624044@qq.com>
Co-authored-by: Руслан Пузич <visp80@gmail.com>
2026-01-01 10:33:59 +08:00
Buriburizaemon 0eb104a2d6 <fixed>fixed bugs that ipinfo db using different symbol for country iso. 2025-12-28 17:40:15 +00:00
Buriburizaemon 3fcfe1eaf1 <edit>added new geoip data, and readme file. 2025-12-29 00:49:42 +08:00
naiba 540c1cb1e7 feat: binding ip with session
🛡️staying safe even your frontend was hacked
2025-10-09 21:36:59 +08:00
Buriburizaemon 1c11637e43 <edit>fixed geoip bugs. 2025-09-13 13:04:16 +08:00
Buriburizaemon 209e78dac6 <edit>add a usable geoip. 2025-09-13 12:44:53 +08:00
Weblate (bot) 799f4a9d61 Added translation using Weblate (French) (#1093)
Translated using Weblate (Indonesian)

Currently translated at 45.0% (27 of 60 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (60 of 60 strings)





Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/id/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/ta/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
Co-authored-by: TommyLPB <hcrochetcanard@gmail.com>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-08-02 15:52:14 +08:00
Weblate (bot) 0005f923a5 Translated using Weblate (Indonesian) (#1049)
Currently translated at 43.3% (26 of 60 strings)

Added translation using Weblate (Indonesian)

Translated using Weblate (Vietnamese)

Currently translated at 16.6% (10 of 60 strings)

Added translation using Weblate (Vietnamese)

Translated using Weblate (Spanish)

Currently translated at 100.0% (60 of 60 strings)





Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/es/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/id/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/vi/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Andres Pava <hola@andrespava.com>
Co-authored-by: Kxroqi :3 <loxocker@gmail.com>
Co-authored-by: hzhoanglee <nganhh.bi12-313@st.usth.edu.vn>
2025-06-08 00:49:31 +08:00
UUBulb bcc4104bde update dependencies (#1077)
* update dependencies

ddns: update libdns to 1.0.0

* rename var
2025-05-02 00:25:23 +08:00
UUBulb 4871211f93 chore: cleanup some code (#1069)
* chore

* modernize loop

* ddns: simpify Provider struct
2025-04-26 18:28:21 +08:00
UUBulb 91cb5e903f i18n: replace gettext implementation (#1056) 2025-04-13 12:26:03 +08:00
UUBulb 67c129635e update ddns on server update (#1050) 2025-03-31 19:41:04 +08:00
naiba c4148fe915 chore: remove unused code 2025-03-29 13:18:12 +08:00
Weblate (bot) 3bcba0c2de Translated using Weblate (Spanish) (#1048)
Currently translated at 100.0% (60 of 60 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/es/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Andres Pava <hola@andrespava.com>
2025-03-29 11:28:06 +08:00
naiba 954939e99d feat: upgrade frontend 2025-03-22 22:44:25 +08:00
Weblate (bot) 0b627ca390 Translated using Weblate (Russian) (#1040)
Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (60 of 60 strings)

Added translation using Weblate (Russian)




Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/ru/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
Co-authored-by: bios let <bioslet@gmail.com>
2025-03-22 22:32:12 +08:00
UUBulb fa36a36beb improve transfer record logic (#1033)
* improve transfer record logic

* refactor

* modernize loops

* remove unused type conversions

* update dependencies

* script: keep .gitkeep files

* fix

* remove clear
2025-03-19 22:21:21 +08:00
UUBulb 38c2374bad ddns: retreive dns servers from context (#1034) 2025-03-17 23:11:40 +08:00
UUBulb 9ee5595da7 generate agent_secret for old users (#1021) 2025-03-08 18:47:42 +08:00
UUBulb f1e3613daf fix: config fields not generated on first startup (#1016)
* fix: config fields not generated on first startup

* cleanup

* fix reference

* replace yaml module

* remove duplicated fields

* remove yaml.v3 as a direct dependency

* update dependency

* chore
2025-03-03 19:02:25 +08:00
UUBulb 5c8cc75523 improve check for offline rules (#1013)
* improve check for offline rules

* bug fixes

* update dependencies

* fix error wrap

* fix offline check

* improve readability
2025-03-02 15:37:21 +08:00
UUBulb 1d2f8d24f6 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
UUBulb 91bef2882a refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
UUBulb a41f623dd2 feat: batch set server config (#983)
* feat: batch set server config

* run in parallel

* fix route

* fix

* return some information

* fix order
2025-02-04 11:25:49 +08:00
Weblate (bot) 9fbda2e4e5 Translated using Weblate (Chinese (Traditional Han script)) (#981)
Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (English (United States))

Currently translated at 100.0% (60 of 60 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" add-on in Weblate.



Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/en_US/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hant/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
2025-02-04 11:23:41 +08:00
UUBulb 7e8985a599 feat: edit server config online (#980)
* feat: edit server config online

* clean

* refactor

* generate template

* fix deadlocks

* fix
2025-01-31 13:33:53 +08:00
UUBulb 82d40d49fd ddns: allow overriding domains per configuration (#979) 2025-01-30 12:19:40 +08:00
Weblate (bot) 7ebe492d78 Translated using Weblate (Tamil) (#962)
Currently translated at 100.0% (57 of 57 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (57 of 57 strings)

Translated using Weblate (Tamil)

Currently translated at 100.0% (57 of 57 strings)

Added translation using Weblate (Tamil)




Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/ta/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-01-20 22:09:11 +08:00
UUBulb 4b1af369e3 small improvements (#958)
* small improvements

* fix: return empty iterator if no json present

* use time.Tick

* changes
2025-01-19 21:22:00 +08:00
naiba f6683adb70 feat: implement client-side status code handling 2025-01-05 23:53:04 +08:00
UUBulb d21179609d feat(waf): return ip in string literal (#947)
* feat(waf): return ip in string literal

* rename
2025-01-04 20:49:14 +08:00
Weblate (bot) 619bb947ba Translated using Weblate (German) (#945)
Currently translated at 100.0% (57 of 57 strings)

Translated using Weblate (German)

Currently translated at 100.0% (57 of 57 strings)




Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/de/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Barium <peter.kuehfuss+weblate@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
2025-01-03 22:39:21 +08:00
Weblate (bot) 64ac2db62b Translated using Weblate (Chinese (Traditional Han script)) (#933)
Currently translated at 100.0% (57 of 57 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (57 of 57 strings)

Translated using Weblate (English (United States))

Currently translated at 100.0% (57 of 57 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" add-on in Weblate.



Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/en_US/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hant/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
2025-01-01 00:01:55 +08:00
UUBulb 553f8e58d4 fix: oauth2 redirect url not consistent (#930)
* fix: oauth2 redirect url not consistent

* only use one redirect uri

* feat: allow to disable password authentication

* generate translation template

* update error

* redirect

* query
2024-12-31 22:29:29 +08:00
Weblate (bot) b876909a8a Translated using Weblate (Spanish) (#916)
Currently translated at 100.0% (49 of 49 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (49 of 49 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (49 of 49 strings)

Translated using Weblate (German)

Currently translated at 100.0% (49 of 49 strings)




Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/de/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/es/
Translation: Nezha/Nezha Dashboard

Co-authored-by: Kris <krishoodbyair@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-26 22:32:36 +08:00
naiba 7c8ac7ae5a refactor: improve performance 2024-12-22 17:23:55 +08:00
Weblate (bot) 75101d860f Translated using Weblate (Chinese (Traditional Han script)) (#901)
Currently translated at 100.0% (49 of 49 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (49 of 49 strings)

Translated using Weblate (English (United States))

Currently translated at 100.0% (49 of 49 strings)

Update translation files

Updated by "Update PO files to match POT (msgmerge)" add-on in Weblate.



Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/en_US/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hant/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-22 13:03:27 +08:00
UUBulb d4c13a7c90 chore: update translation template (#900) 2024-12-22 12:24:39 +08:00
UUBulb 653d0cf2e9 feat: user roles (#852)
* [WIP] feat: user roles

* update

* update

* admin handler

* update

* feat: user-specific connection secret

* simplify some logics

* cleanup

* update waf

* update user api error handling

* update waf api

* fix codeql

* update waf table

* fix several problems

* add pagination for waf api

* update permission checks

* switch to runtime check

* 1

* cover?

* some changes
2024-12-22 00:05:41 +08:00
Weblate (bot) c32dd4cd75 Translations update from Hosted Weblate (#580)
* Translated using Weblate (Spanish)

Currently translated at 100.0% (45 of 45 strings)

Translated using Weblate (German)

Currently translated at 100.0% (45 of 45 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (45 of 45 strings)

Added translation using Weblate (Spanish)

Translated using Weblate (German)

Currently translated at 100.0% (45 of 45 strings)

Added translation using Weblate (German)

Co-authored-by: Barium <peter.kuehfuss+weblate@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kris <krishoodbyair@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/de/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/es/
Translation: Nezha/Nezha Dashboard

* feat: add german support

---------

Co-authored-by: Barium <peter.kuehfuss+weblate@gmail.com>
Co-authored-by: Kris <krishoodbyair@gmail.com>
Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-17 21:46:25 +08:00
Weblate (bot) 858c88275a Translated using Weblate (Chinese (Traditional Han script)) (#570)
Currently translated at 100.0% (45 of 45 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (45 of 45 strings)


Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/nezha/nezha-dashboard/zh_Hant/
Translation: Nezha/Nezha Dashboard

Co-authored-by: UUBulb <uub@kuzu.uk>
2024-12-08 22:27:00 +08:00
UUBulb 2bc3d38b83 chore: use cmp (#568) 2024-12-08 20:21:35 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
UUBulb f853cd9ec9 fix netip parsing (#20) 2024-11-25 21:20:08 +08:00